[alsa-devel] What is wrong in this code.

Clemens Ladisch clemens at ladisch.de
Tue Oct 18 17:11:50 CEST 2011


Anders Gnistrup wrote:
> The code works just as expected when using the:
>     snd_ctl_elem_id_set_name(id, "PCM Playback Volume");
> But when I use the snd_ctl_elem_id_set_numid(id, numid); (with numid=23) it fails.
>       ...
> 	snd_ctl_elem_id_set_interface(id, SND_CTL_ELEM_IFACE_MIXER);
> 
> 	//snd_ctl_elem_id_set_numid(id, numid);
> 	snd_ctl_elem_id_set_name(id, "PCM Playback Volume");

When using the numid to access elements, it must be the only field
that is set in the elem id.


Regards,
Clemens


More information about the Alsa-devel mailing list