Commit 8314f225 authored by Kailang Yang's avatar Kailang Yang Committed by Takashi Iwai

ALSA: hda/realtek - Fixed single output machine get empty hp sense

If it only has single output of HP out of machine.
The driver parser will copy hp_pins to line_out_pins.
hp_pins will empty for alc283_init and alc283_shutup functions.
This will cause not have value for hp_pin_sense.
Add check line_out_type code will solve it .
Signed-off-by: default avatarKailang Yang <kailang@realtek.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 69dd89fd
......@@ -3026,6 +3026,11 @@ static void alc283_init(struct hda_codec *codec)
bool hp_pin_sense;
int val;
if (!spec->gen.autocfg.hp_outs) {
if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT)
hp_pin = spec->gen.autocfg.line_out_pins[0];
}
alc283_restore_default_value(codec);
if (!hp_pin)
......@@ -3062,6 +3067,11 @@ static void alc283_shutup(struct hda_codec *codec)
bool hp_pin_sense;
int val;
if (!spec->gen.autocfg.hp_outs) {
if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT)
hp_pin = spec->gen.autocfg.line_out_pins[0];
}
if (!hp_pin) {
alc269_shutup(codec);
return;
......
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