Commit 716eef03 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda/realtek - Fix DAC assignments of multiple speakers

When a device has multiple speakers and still has the auto-mute support,
the driver copies line_outs[] to speaker_outs[].  And then it tries to
assign DACs for both.  This ended up with the assignment only to the
primary DAC to all speakers.

This patch fixes the situation by checking the duplicated LO/SPK case
appropriately.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent c1466238
...@@ -2996,8 +2996,10 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec) ...@@ -2996,8 +2996,10 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec)
} }
} }
if (cfg->line_out_type != AUTO_PIN_HP_OUT)
alc_auto_fill_extra_dacs(codec, cfg->hp_outs, cfg->hp_pins, alc_auto_fill_extra_dacs(codec, cfg->hp_outs, cfg->hp_pins,
spec->multiout.hp_out_nid); spec->multiout.hp_out_nid);
if (cfg->line_out_type != AUTO_PIN_SPEAKER_OUT)
alc_auto_fill_extra_dacs(codec, cfg->speaker_outs, cfg->speaker_pins, alc_auto_fill_extra_dacs(codec, cfg->speaker_outs, cfg->speaker_pins,
spec->multiout.extra_out_nid); spec->multiout.extra_out_nid);
...@@ -3315,6 +3317,8 @@ static void alc_auto_init_extra_out(struct hda_codec *codec) ...@@ -3315,6 +3317,8 @@ static void alc_auto_init_extra_out(struct hda_codec *codec)
hda_nid_t pin, dac; hda_nid_t pin, dac;
for (i = 0; i < spec->autocfg.hp_outs; i++) { for (i = 0; i < spec->autocfg.hp_outs; i++) {
if (spec->autocfg.line_out_type == AUTO_PIN_HP_OUT)
break;
pin = spec->autocfg.hp_pins[i]; pin = spec->autocfg.hp_pins[i];
if (!pin) if (!pin)
break; break;
...@@ -3328,6 +3332,8 @@ static void alc_auto_init_extra_out(struct hda_codec *codec) ...@@ -3328,6 +3332,8 @@ static void alc_auto_init_extra_out(struct hda_codec *codec)
alc_auto_set_output_and_unmute(codec, pin, PIN_HP, dac); alc_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
} }
for (i = 0; i < spec->autocfg.speaker_outs; i++) { for (i = 0; i < spec->autocfg.speaker_outs; i++) {
if (spec->autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT)
break;
pin = spec->autocfg.speaker_pins[i]; pin = spec->autocfg.speaker_pins[i];
if (!pin) if (!pin)
break; break;
......
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