Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Kailang Yang and committed by
Takashi Iwai
8314f225 69dd89fd

+10
+10
sound/pci/hda/patch_realtek.c
··· 3026 3026 bool hp_pin_sense; 3027 3027 int val; 3028 3028 3029 + if (!spec->gen.autocfg.hp_outs) { 3030 + if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) 3031 + hp_pin = spec->gen.autocfg.line_out_pins[0]; 3032 + } 3033 + 3029 3034 alc283_restore_default_value(codec); 3030 3035 3031 3036 if (!hp_pin) ··· 3066 3061 hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0]; 3067 3062 bool hp_pin_sense; 3068 3063 int val; 3064 + 3065 + if (!spec->gen.autocfg.hp_outs) { 3066 + if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT) 3067 + hp_pin = spec->gen.autocfg.line_out_pins[0]; 3068 + } 3069 3069 3070 3070 if (!hp_pin) { 3071 3071 alc269_shutup(codec);