[alsa-devel] does snd_pcm_info_get_sync work at all?

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Fri May 18 22:46:25 CEST 2012

Hi list,
After looking a number of times at the code to start multiple devices at
the same time, I wonder if the alsa-lib snd_pcm_info_get_sync() routine
works at all.

The documentation says "Because the drivers cannot guarantee the
synchronization (sample resolution) on hardware lacking this feature,
the #snd_pcm_info_get_sync() function returns synchronization ID,
which is equal for hardware synchronized streams".

It seems some drivers set a value when opening the stream using the
snd_pcm_set_sync() helper. What exactly is the purpose of this id and
what should it be used for in user-space? The value returned seems to
be the card#, the same value no matter if streams are synchronized or

This is confirmed by a simple experiment, When I tried with a test
program on my HDAudio laptop, the ID is consistently zero, no matter if
I called snd_pcm_link() to synchronize devices or not. That doesn't seem
right. If two devices aren't linked, the information reported my the 
kernel should be clearly invalid.

What exactly was this intent of this routine, why would a sync_id be
needed anyway and has anyone used it successfully?


More information about the Alsa-devel mailing list