aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_cirrus.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-12-23 02:31:59 -0500
committerTakashi Iwai <tiwai@suse.de>2009-12-23 02:38:28 -0500
commit21949f00a022e090a7e8bc9a01dfca88273c6146 (patch)
treeea13d6d9cef974da83a7cb5ccacbbd0ca7fbf3b4 /sound/pci/hda/patch_cirrus.c
parent524027916e5763a0c9a7da80aa8dd013a14a0440 (diff)
ALSA: hda - Fix NID association for capture mixers
Fix the wrong implementation of NID <-> kctl mapping for capture mixers introduced by the ocmmit 5b0cb1d850c26893b1468b3a519433a1b7a176be. So far, the driver returns an error at probe. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_cirrus.c')
-rw-r--r--sound/pci/hda/patch_cirrus.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index 093cfbb55e9e..7de782a5b8f4 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -753,6 +753,7 @@ static int build_input(struct hda_codec *codec)
753 spec->capture_bind[1] = make_bind_capture(codec, &snd_hda_bind_vol); 753 spec->capture_bind[1] = make_bind_capture(codec, &snd_hda_bind_vol);
754 for (i = 0; i < 2; i++) { 754 for (i = 0; i < 2; i++) {
755 struct snd_kcontrol *kctl; 755 struct snd_kcontrol *kctl;
756 int n;
756 if (!spec->capture_bind[i]) 757 if (!spec->capture_bind[i])
757 return -ENOMEM; 758 return -ENOMEM;
758 kctl = snd_ctl_new1(&cs_capture_ctls[i], codec); 759 kctl = snd_ctl_new1(&cs_capture_ctls[i], codec);
@@ -762,10 +763,13 @@ static int build_input(struct hda_codec *codec)
762 err = snd_hda_ctl_add(codec, 0, kctl); 763 err = snd_hda_ctl_add(codec, 0, kctl);
763 if (err < 0) 764 if (err < 0)
764 return err; 765 return err;
765 err = snd_hda_add_nids(codec, kctl, 0, spec->adc_nid, 766 for (n = 0; n < AUTO_PIN_LAST; n++) {
766 spec->num_inputs); 767 if (!spec->adc_nid[n])
767 if (err < 0) 768 continue;
768 return err; 769 err = snd_hda_add_nid(codec, kctl, 0, spec->adc_nid[i]);
770 if (err < 0)
771 return err;
772 }
769 } 773 }
770 774
771 if (spec->num_inputs > 1 && !spec->mic_detect) { 775 if (spec->num_inputs > 1 && !spec->mic_detect) {