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>
diff --git a/sound/pci/hda/patch_cmedia.c b/sound/pci/hda/patch_cmedia.c
index cc1c223..ff60908 100644
--- a/sound/pci/hda/patch_cmedia.c
+++ b/sound/pci/hda/patch_cmedia.c
@@ -345,8 +345,7 @@
/* assign Capture Source enums to NID */
kctl = snd_hda_find_mixer_ctl(codec, "Capture Source");
for (i = 0; kctl && i < kctl->count; i++) {
- err = snd_hda_add_nids(codec, kctl, i, spec->adc_nids,
- spec->input_mux->num_items);
+ err = snd_hda_add_nid(codec, kctl, i, spec->adc_nids[i]);
if (err < 0)
return err;
}