From: Brian J. Tarricone Date: Mon, 3 May 2010 00:32:10 +0000 (-0700) Subject: ALSA: hda - fix array indexing while creating inputs for Cirrus codecs X-Git-Tag: v2.6.34-rc7~21^2^2~4 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=8dd34ab111dc6ccb35a1a7a59222cb9bb0160e6f;p=~emulex%2Finfiniband.git 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: Brian J. Tarricone Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 7de782a5b8f..350ee8ac415 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c @@ -766,7 +766,7 @@ static int build_input(struct hda_codec *codec) for (n = 0; n < AUTO_PIN_LAST; n++) { if (!spec->adc_nid[n]) 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) return err; }