[alsa-devel] Control the exact moment of output

Rob Janssen pe1chl at amsat.org
Sat Apr 19 20:21:20 CEST 2014


For a distributed system that requires synchronized output I would like to determine
the exact moment when output samples are sent, preferably within +/- 1 sample time.
For example, output is sent in blocks with a system time in usec or nsec as a parameter
or header, and the the first sample leaves the soundcard as closely as possible to the
specified system time.

Is this possible within the ALSA API?
Low latency is of course nice to have, but not the prime concern. What I need is
synchronous output between systems that are physically separated and need to send
audio that they receive from a central system over the network.
My intention is to send blocks of audio with an accurate time of transmission in the
header, and then have the systems output it exactly at that time, of course preferably
managed mostly by the driver, not the application.

Are some types of soundcard more suitable than others for this purpose?  And are
there soundcards available where the sample clock can somehow be locked to system
time or an external 10MHz/1PPS reference?

Rob


More information about the Alsa-devel mailing list