aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-07-23 12:57:11 -0400
committerTakashi Iwai <tiwai@suse.de>2011-07-23 12:57:11 -0400
commit8f398ae72fc7e03356fc1ee6b54beef79ba6be6a (patch)
treeec429e5c3077cb1f88637555606118ce39bdfd2d /sound
parent76531d4166fb620375ff3c1ac24753265216d579 (diff)
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: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 52ce07534e5b..569d2aa4eeb5 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2801,7 +2801,8 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec)
2801 int i; 2801 int i;
2802 2802
2803 again: 2803 again:
2804 spec->multiout.num_dacs = 0; 2804 /* set num_dacs once to full for alc_auto_look_for_dac() */
2805 spec->multiout.num_dacs = cfg->line_outs;
2805 spec->multiout.hp_nid = 0; 2806 spec->multiout.hp_nid = 0;
2806 spec->multiout.extra_out_nid[0] = 0; 2807 spec->multiout.extra_out_nid[0] = 0;
2807 memset(spec->private_dac_nids, 0, sizeof(spec->private_dac_nids)); 2808 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 } 2835 }
2835 } 2836 }
2836 2837
2838 /* re-count num_dacs and squash invalid entries */
2839 spec->multiout.num_dacs = 0;
2837 for (i = 0; i < cfg->line_outs; i++) { 2840 for (i = 0; i < cfg->line_outs; i++) {
2838 if (spec->private_dac_nids[i]) 2841 if (spec->private_dac_nids[i])
2839 spec->multiout.num_dacs++; 2842 spec->multiout.num_dacs++;