Inside of a C program, using
libasound, I have determined a
struct udev_device *device is part of the sound subsystem with
udev_device_get_subsystem(device) == "sound". Now I have obtained the device, I want to obtain more information about it to use with ALSA.
I want to know how to query information about this device, e.g. playback/capture, number of channels, etc. Furthermore, I want to know how to query this device to obtain the parameters to use for a call to ALSA
I can only think of parsing the contents of
/proc/asound/*, however this seems very tedious and rigid. Also, as udev supports detecting sound devices, it seems logical to me that it would have (or there would be) some 'clean' mechanism of obtaining more information about it.