Commit 8dd34ab1 authored by Brian J. Tarricone's avatar Brian J. Tarricone Committed by Takashi Iwai

ALSA: hda - fix array indexing while creating inputs for Cirrus codecs

This fixes a problem where cards show up as only having a single mixer
element, suppressing all sound output.
Signed-off-by: default avatarBrian J. Tarricone <brian@tarricone.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 5c1bccf6
...@@ -766,7 +766,7 @@ static int build_input(struct hda_codec *codec) ...@@ -766,7 +766,7 @@ static int build_input(struct hda_codec *codec)
for (n = 0; n < AUTO_PIN_LAST; n++) { for (n = 0; n < AUTO_PIN_LAST; n++) {
if (!spec->adc_nid[n]) if (!spec->adc_nid[n])
continue; continue;
err = snd_hda_add_nid(codec, kctl, 0, spec->adc_nid[i]); err = snd_hda_add_nid(codec, kctl, 0, spec->adc_nid[n]);
if (err < 0) if (err < 0)
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment