[alsa-devel] [RFC] provide a simple mechanism to start playback at a given time

Nick Stoughton nstoughton at aether.com
Tue Oct 14 16:31:27 CEST 2014


As discussed at today's meeting, please find 2 patches (one to the 3.17
kernel, the other to alsa-lib) following this that implement a simple
interface to trigger playback at a given point in the future.

The API provides an absolute time, measured against a given clock, at which
to trigger DMA. If the point in the future appears to be less than 100ms
away, we fall back to the standard snd_pcm_start() behavior. This is
because this interface is designed to support networked devices
playing back in sync, and network latencies are likely to be over 100ms.
This value should probably be tunable ...

Also, we simply set up a timer and commence DMA when it expires. If the
devices to be synchronized have identical hardware, then there is no
problem. A future enhancement is to estimate the latency between the DMA
trigger and the codec driver (FIFO sizes etc) so that we can take that into
account.

Any comments gratefully accepted!
*______________________________*
*Nick Stoughton*
 *Aether Things Inc *
 *San Francisco*
  +1 (510) 388 1413


More information about the Alsa-devel mailing list