ALSA: hda - Fix NID association for capture mixers

Fix the wrong implementation of NID <-> kctl mapping for capture mixers
introduced by the ocmmit 5b0cb1d850.
So far, the driver returns an error at probe.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai
2009-12-23 08:31:59 +01:00
parent 524027916e
commit 21949f00a0
7 changed files with 12 additions and 40 deletions

View File

@ -1907,8 +1907,7 @@ static int via_build_controls(struct hda_codec *codec)
/* assign Capture Source enums to NID */
kctl = snd_hda_find_mixer_ctl(codec, "Input Source");
for (i = 0; kctl && i < kctl->count; i++) {
err = snd_hda_add_nids(codec, kctl, i, spec->mux_nids,
spec->input_mux->num_items);
err = snd_hda_add_nid(codec, kctl, i, spec->mux_nids[i]);
if (err < 0)
return err;
}