ALSA: hda - proc - add support for dynamic controls to mixer<->NID mapping
This patch adds support for dynamically created controls to proc codec file
(Control: lines).
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 1ed1d88..d71e651 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1523,6 +1523,11 @@
int err;
struct hda_nid_item *item;
+ if (kctl->id.subdevice & (1<<31)) {
+ if (nid == 0)
+ nid = kctl->id.subdevice & 0xffff;
+ kctl->id.subdevice = 0;
+ }
err = snd_ctl_add(codec->bus->card, kctl);
if (err < 0)
return err;
@@ -3160,7 +3165,7 @@
*/
int snd_hda_add_new_ctls(struct hda_codec *codec, struct snd_kcontrol_new *knew)
{
- int err;
+ int err;
for (; knew->name; knew++) {
struct snd_kcontrol *kctl;