How do I know the capabilities of ALSA devices without first opening the device? The problem is that I need to pass function parameters in snd_pcm_open()order to use test functions that are silly to me. Why ask if this is a player or recorder if I have to pass it the opening function first?
As an example, I would like to list all the playback devices, but the only way I can think of is to open every device I discovered (with snd_device_name_hint()) and try to open them in playback mode, and if I succeed openly, everything is fine.
The problem is that with all the possible options (sampling rate, channels, etc.) there would be a terribly large number of open () that I need to execute to find out the parameters.
Makis source
share