Commit 8f398ae7 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Fix DAC filling for multi-connection pins in Realtek parser

Fix a regression in the DAC filling code in patch_realtek.c.  The already
filled DACs in multiout.dac_nids[] were ignored because of num_dacs=0,
thus always pointed to the first DAC.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 76531d41
...@@ -2801,7 +2801,8 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec) ...@@ -2801,7 +2801,8 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec)
int i; int i;
again: again:
spec->multiout.num_dacs = 0; /* set num_dacs once to full for alc_auto_look_for_dac() */
spec->multiout.num_dacs = cfg->line_outs;
spec->multiout.hp_nid = 0; spec->multiout.hp_nid = 0;
spec->multiout.extra_out_nid[0] = 0; spec->multiout.extra_out_nid[0] = 0;
memset(spec->private_dac_nids, 0, sizeof(spec->private_dac_nids)); memset(spec->private_dac_nids, 0, sizeof(spec->private_dac_nids));
...@@ -2834,6 +2835,8 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec) ...@@ -2834,6 +2835,8 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec)
} }
} }
/* re-count num_dacs and squash invalid entries */
spec->multiout.num_dacs = 0;
for (i = 0; i < cfg->line_outs; i++) { for (i = 0; i < cfg->line_outs; i++) {
if (spec->private_dac_nids[i]) if (spec->private_dac_nids[i])
spec->multiout.num_dacs++; spec->multiout.num_dacs++;
......
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