From: Nicolas Graziano Date: Wed, 27 Jul 2005 15:25:08 +0000 (+0200) Subject: [ALSA] hda driver, correct bug in model 'auto' X-Git-Tag: v2.6.13-rc4~3^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb92e6f05e84f6c217d786208e2ed5acf633b6ce;p=linux-2.6 [ALSA] hda driver, correct bug in model 'auto' HDA Codec driver - Correct some index variable inversion in patch_cmedia.c Signed-off-by: Nicolas Graziano Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_cmedia.c b/sound/pci/hda/patch_cmedia.c index 2d6e3e3d0a..86f195f19e 100644 --- a/sound/pci/hda/patch_cmedia.c +++ b/sound/pci/hda/patch_cmedia.c @@ -408,7 +408,7 @@ static int cmi9880_fill_multi_dac_nids(struct hda_codec *codec, const struct aut /* search for an empty channel */ for (j = 0; j < cfg->line_outs; j++) { if (! assigned[j]) { - spec->dac_nids[i] = i + 0x03; + spec->dac_nids[i] = j + 0x03; assigned[j] = 1; break; } @@ -444,11 +444,10 @@ static int cmi9880_fill_multi_init(struct hda_codec *codec, const struct auto_pi len = snd_hda_get_connections(codec, nid, conn, 4); for (k = 0; k < len; k++) if (conn[k] == spec->dac_nids[i]) { - spec->multi_init[j].param = j; + spec->multi_init[j].param = k; break; } j++; - break; } } return 0;