[alsa-devel] Support for Synchronous Audio
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
Anoop Rajan wrote:
We have requirements to play synchronous multi-room audio with very minimal node to node latency(<100 us). [...] Though I make sure that I start the PCM from user layer synchronously
How? With snd_pcm_link()?
What hardware are you using?
Regards, Clemens
Hi Clemens,
As I told we support synchronous multiroom audio, where in one speaker(master) streams the audio to others nodes(slave) over the network. Master speaker future timestamps the audio and re-transmits to all other nodes based on a common reference clock maintained. Our stack implements the logic to present the audio synchronously to ALSA monitoring the stamped time.We are not using snd_pcm_link().
We use MT-7620 SOC from Mediatek.
Thanks, Anoop ________________________________________ From: Clemens Ladisch clemens@ladisch.de Sent: 17 April 2015 14:37 To: Anoop Rajan; alsa-devel@alsa-project.org Subject: Re: [alsa-devel] Support for Synchronous Audio
Anoop Rajan wrote:
We have requirements to play synchronous multi-room audio with very minimal node to node latency(<100 us). [...] Though I make sure that I start the PCM from user layer synchronously
How? With snd_pcm_link()?
What hardware are you using?
Regards, Clemens
Anoop Rajan wrote:
As I told we support synchronous multiroom audio, where in one speaker (master) streams the audio to others nodes(slave) over the network. Master speaker future timestamps the audio and re-transmits to all other nodes based on a common reference clock maintained. Our stack implements the logic to present the audio synchronously to ALSA monitoring the stamped time.We are not using snd_pcm_link().
Well, snd_pcm_link() would work only on a single computer.
We use MT-7620 SOC from Mediatek.
What sound hardware and driver are you using?
Regards, Clemens
participants (2)
-
Anoop Rajan
-
Clemens Ladisch