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

ALSA: hda - Fix initialization of multi-speaker output paths for Realtek

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 5fa9b151
......@@ -3223,6 +3223,7 @@ static void alc_auto_init_multi_out(struct hda_codec *codec)
static void alc_auto_init_extra_out(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
int i;
hda_nid_t pin, dac;
pin = spec->autocfg.hp_pins[0];
......@@ -3232,11 +3233,17 @@ static void alc_auto_init_extra_out(struct hda_codec *codec)
dac = spec->multiout.dac_nids[0];
alc_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
}
pin = spec->autocfg.speaker_pins[0];
if (pin) {
for (i = 0; i < spec->autocfg.speaker_outs; i++) {
pin = spec->autocfg.speaker_pins[i];
if (!pin)
break;
dac = spec->multiout.extra_out_nid[i];
if (!dac) {
if (i > 0 && spec->multiout.extra_out_nid[0])
dac = spec->multiout.extra_out_nid[0];
if (!dac)
else
dac = spec->multiout.dac_nids[0];
}
alc_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac);
}
}
......
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