[alsa-devel] ALSA full-duplex questions

pl bossart bossart.nospam at gmail.com
Thu Nov 5 23:40:27 CET 2009

I have a very low-latency full-duplex application where I would like
up- and downlink to be synchronous, i.e. period events happen at the
same time for capture and playback. This would minimize the number of
wake-ups and enable the platform to go to low power.
I thought snd_pcm_link() would enable this coupling between capture
and playback, but it looks like it only buids a list of linked devices
and uses this information for state transitions. Said transitions
don't look quite atomic by looking at the code. The
alsa-lib/test/latency.c code even tries to measure the difference
between the number of samples read/written.
In short the question is whether I can force a synchronous behavior
from my application, or if I need to roll up my sleeves and fix the
drivers to see this behavior?
Another solution I thought of would be to disable the period events on
one of the devices, and handle both devices at once when one period
event fires. But I am not sure you can disable all events for an audio
device (was on the wish list of Lennart, not sure if it became
Thanks for your feedback.
- Pierre

More information about the Alsa-devel mailing list