There's this snd_pcm_open() function, and one of its arguments takes "ASCII identifier of the PCM handle". How can I get it for each individual devices?

you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 8 months ago

I'd have a look at the aplay.c implementation for listing PCM device names (-L), pcm_list().

It's basically using snd_device_name_hint(-1, "pcm", &hints) and snd_device_name_get_hint() calls to discover the PCM device names.

  • source