10 Nov
2008
10 Nov
'08
9:56 a.m.
LCID Fire wrote:
Could someone get me some insight into the snd_kontrol_new? I'm especially interested in the "private_value" and "index" field. At least in usb_mixer.c it seems to me like private_value is used as the index!? If that's the case, when should index be used and when private_value?
The index field is used when several controls have the same name.
The private_value field can be used by drivers for any purpose.
The functions for the Audigy 2 NX's LEDs store the LED number in the private_value field so that the same function can be used for all three LEDs without having to look at the control name.
Is there any special convention for the string of "name" field?
linux/Documentation/sound/alsa/ControlNames.txt
HTH Clemens