Synchronized real time audio streaming over ethernet

Description

Study, implementation and evaluation of the AVB standard of protocols, in a open hardware (beagle board devices) and open software (Linux) for the requirement of Synchronized Real time audio streaming over Ethernet networks.

Supported on the beagle bone black and the beagle board x15 devices. Although it is theocratically possible to port to any platform where the Linux hardware time-stamping is supported for the Ethernet messages.

Partial support for the interoperability with Apple Mac computers which support AVB streaming.

Implementation

A general architecture for the AVB Stack implementation in Linux is as follows,

Linux AVB Stack Architecture

The entire stack is comprised of three set of software components.

The gPTP daemon which can be built either as a daemon or as a normal user level application. Refer the github page for details of building and the execution with different command line arguments.

The AVB virtual ALSA device driver which can be used as a normal ALSA device for playback and capture using the standard ALSA user level API. Can be configurable as a lodable or a static kernel module and built using the Linux kernel build process. Refer to the Linux distribution for beagle bone black gihub page here.

The user level demo/test application. The build instructions and execution details along with the command line parameters are described in the github page here.

Also more details regarding the demo and the general setup of the AVB protocol stack components are explained in the wiki of the AVB demo application.

Evaluation

The following four aspects of the “Synchronized real time audio streaming” requirement of the AVB stack implementation are tested. At first the measured delay variance in the gPTP delay measurement is measured and the results show that the deviation is very less and nearly 2 magnitude smaller than the measured delay value.

gPTP Delay Variance

Another clock related parameter is the ability of the local clock to stay in sync with the remote clock, i.e. the rates of the both clocks should be the same. Any difference in the rates of the two clocks can be measured as the clock drift. This measurement measures the time difference accumulated between the local and remote clocks between two successive corrections. The results show that the clock drift is bounded and has a average of 28.17 us/s.

Clock drift

To measure the real synchronization error, a AVB demo setup is created and the audio streamed over the AVB networks are recorded and the sample error is measured. In the following case the synchronization error is 15 samples which at 48 kHz sampling rate translates to a synhcronization accuracy of 312.5 us.

Sync error measurement

Finally the detection of the beagle board black device running the AVB stack, as a AVB device by a Apple MAC computer is shown below.