[alsa-devel] Support for Synchronous Audio
Anoop Rajan
anoop at librewireless.com
Fri Apr 17 10:07:54 CEST 2015
Hi All,
My self Anoop, an audio frame work developer, but a newbie to linux ALSA.
We have requirements to play synchronous multi-room audio with very minimal node to node latency(<100 us).( Node to node latency: How much one speaker is out of sync with other). Right now we have logic in user space to synchronize the audio using time stamps derived from a common clock, but the node to node latency is over 1ms. Though I make sure that I start the PCM from user layer synchronously, the actual I2S out is out of sync(in consistent values ranging from 100 to 1ms). I beleive the un-deterministic path delay from user to ALSA buffer, big ALSA buffer(8k Samples), scheduling variances(high priority/interrupt preemption) all might have added to this increased latency.
Rather than fine tuning the above discrepancies , I was thinking about some designs to pass the audio frames with time stamps to kernel layer and to implement some logic in kernel (before pushing to DMA) to present the audio at exact stamped time to have a better node to node latency.
Before doing that I was trying to find out what ALSA supports for this requirement and from web could see various comments regarding this (proposal to snd_pcm_start_at()<http://mailman.alsa-project.org/pipermail/alsa-devel/2014-October/082091.html>) and further proposed discussions on Audio mini summit, but I couldn't find further information's on it.
Would you please guide me. Does ALSA provides some means to achieve minimal Node to Node latency? would you please provide some pointers/documents to me to understand better.
Thanks,
Anoop
More information about the Alsa-devel
mailing list