[alsa-devel] Playback and capture synchronization

Clemens Ladisch clemens at ladisch.de
Wed Nov 9 12:55:14 CET 2011

Patrick Lai wrote:
> I have a use case requiring playback and capture starting at the same
> time. Latency between starting of playback and capture streams need to
> be less than few PCM samples. Base on my understanding on ALSA which
> does not have the concept of grouping multiple streams,


> the best I can do is getting playback and capture to prepared state
> then trigger start two streams one after the other. Then, the latency
> would be the time for trigger start of first stream to complete.

If the driver doesn't actually implement starting of linked streams
(which would be pointless if the hardware doesn't support it), ALSA
calls the second trigger callback after the first one.

It might be possible to implement simultaneous starting of two streams.
What hardware (driver) are you using?


More information about the Alsa-devel mailing list