提交 fb92e6f0 编写于 作者: N Nicolas Graziano 提交者: Jaroslav Kysela

[ALSA] hda driver, correct bug in model 'auto'

HDA Codec driver
- Correct some index variable inversion in patch_cmedia.c
Signed-off-by: NNicolas Graziano <nicolas.graziano@wanadoo.fr>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 5a0f217d
...@@ -408,7 +408,7 @@ static int cmi9880_fill_multi_dac_nids(struct hda_codec *codec, const struct aut ...@@ -408,7 +408,7 @@ static int cmi9880_fill_multi_dac_nids(struct hda_codec *codec, const struct aut
/* search for an empty channel */ /* search for an empty channel */
for (j = 0; j < cfg->line_outs; j++) { for (j = 0; j < cfg->line_outs; j++) {
if (! assigned[j]) { if (! assigned[j]) {
spec->dac_nids[i] = i + 0x03; spec->dac_nids[i] = j + 0x03;
assigned[j] = 1; assigned[j] = 1;
break; break;
} }
...@@ -444,11 +444,10 @@ static int cmi9880_fill_multi_init(struct hda_codec *codec, const struct auto_pi ...@@ -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); len = snd_hda_get_connections(codec, nid, conn, 4);
for (k = 0; k < len; k++) for (k = 0; k < len; k++)
if (conn[k] == spec->dac_nids[i]) { if (conn[k] == spec->dac_nids[i]) {
spec->multi_init[j].param = j; spec->multi_init[j].param = k;
break; break;
} }
j++; j++;
break;
} }
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册