Pierre-Louis Bossart wrote:
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".
This is somewhat misleading.
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
This ID has the same value for two streams if those streams _can_ be started at exactly the same time.
The value returned seems to be the card#, the same value no matter if streams are synchronized or not.
Typically, a card that supports simultaneous starting of multiple streams does so for all its streams (with a register that has one bit for each stream), so the card number is the correct ID to describe this relationship.
Regards, Clemens