Commit 11052185 authored by David Henningsson's avatar David Henningsson Committed by Greg Kroah-Hartman

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

commit 0a3fabe3 upstream.

Do not initialize again the what has already been initialized as
multi outs, as this breaks surround speakers.
Tested-by: default avatarBartłomiej Żogała <nusch88@gmail.com>
Signed-off-by: default avatarDavid Henningsson <david.henningsson@canonical.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f7ff876d
...@@ -10844,6 +10844,7 @@ static void alc882_auto_init_hp_out(struct hda_codec *codec) ...@@ -10844,6 +10844,7 @@ 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;
if (spec->autocfg.line_out_type != AUTO_PIN_HP_OUT) {
for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) { for (i = 0; i < ARRAY_SIZE(spec->autocfg.hp_pins); i++) {
pin = spec->autocfg.hp_pins[i]; pin = spec->autocfg.hp_pins[i];
if (!pin) if (!pin)
...@@ -10853,6 +10854,9 @@ static void alc882_auto_init_hp_out(struct hda_codec *codec) ...@@ -10853,6 +10854,9 @@ static void alc882_auto_init_hp_out(struct hda_codec *codec)
dac = spec->multiout.dac_nids[0]; /* to front */ dac = spec->multiout.dac_nids[0]; /* to front */
alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac); alc882_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
} }
}
if (spec->autocfg.line_out_type != AUTO_PIN_SPEAKER_OUT) {
for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) { for (i = 0; i < ARRAY_SIZE(spec->autocfg.speaker_pins); i++) {
pin = spec->autocfg.speaker_pins[i]; pin = spec->autocfg.speaker_pins[i];
if (!pin) if (!pin)
...@@ -10862,6 +10866,7 @@ static void alc882_auto_init_hp_out(struct hda_codec *codec) ...@@ -10862,6 +10866,7 @@ static void alc882_auto_init_hp_out(struct hda_codec *codec)
dac = spec->multiout.dac_nids[0]; /* to front */ dac = spec->multiout.dac_nids[0]; /* to front */
alc882_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac); alc882_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac);
} }
}
} }
static void alc882_auto_init_analog_input(struct hda_codec *codec) static void alc882_auto_init_analog_input(struct hda_codec *codec)
......
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