提交 0a3fabe3 编写于 作者: D David Henningsson 提交者: Takashi Iwai

ALSA: HDA: Realtek ALC88x: Do not over-initialize speakers and hp that are primary outputs

Do not initialize again the what has already been initialized as
multi outs, as this breaks surround speakers.
Tested-by: NBartłomiej Żogała <nusch88@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: NDavid Henningsson <david.henningsson@canonical.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 7e59e097
...@@ -10773,23 +10773,28 @@ static void alc882_auto_init_hp_out(struct hda_codec *codec) ...@@ -10773,23 +10773,28 @@ static void alc882_auto_init_hp_out(struct hda_codec *codec)
hda_nid_t pin, dac; hda_nid_t pin, dac;
int i; int i;
for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) { if (spec->autocfg.line_out_type != AUTO_PIN_HP_OUT) {
pin = spec->autocfg.hp_pins[i]; for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) {
if (!pin) pin = spec->autocfg.hp_pins[i];
break; if (!pin)
dac = spec->multiout.hp_nid; break;
if (!dac) dac = spec->multiout.hp_nid;
dac = spec->multiout.dac_nids[0]; /* to front */ if (!dac)
alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac); dac = spec->multiout.dac_nids[0]; /* to front */
alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
}
} }
for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) {
pin = spec->autocfg.speaker_pins[i]; if (spec->autocfg.line_out_type != AUTO_PIN_SPEAKER_OUT) {
if (!pin) for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) {
break; pin = spec->autocfg.speaker_pins[i];
dac = spec->multiout.extra_out_nid[0]; if (!pin)
if (!dac) break;
dac = spec->multiout.dac_nids[0]; /* to front */ dac = spec->multiout.extra_out_nid[0];
alc882_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac); if (!dac)
dac = spec->multiout.dac_nids[0]; /* to front */
alc882_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac);
}
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册