aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorKailang Yang <kailang@realtek.com>2014-04-03 05:28:39 -0400
committerTakashi Iwai <tiwai@suse.de>2014-04-03 05:48:33 -0400
commit8314f22589297bdb100788112f901fe885edacbc (patch)
tree84734d68261ee339d8b5ee78357aa114e67bfdf7 /sound
parent69dd89fd2b9406603d218cab8996cfb232d5b8b9 (diff)
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index ea2351d119f0..dba297288398 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3026,6 +3026,11 @@ static void alc283_init(struct hda_codec *codec)
3026 bool hp_pin_sense; 3026 bool hp_pin_sense;
3027 int val; 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 alc283_restore_default_value(codec); 3034 alc283_restore_default_value(codec);
3030 3035
3031 if (!hp_pin) 3036 if (!hp_pin)
@@ -3062,6 +3067,11 @@ static void alc283_shutup(struct hda_codec *codec)
3062 bool hp_pin_sense; 3067 bool hp_pin_sense;
3063 int val; 3068 int val;
3064 3069
3070 if (!spec->gen.autocfg.hp_outs) {
3071 if (spec->gen.autocfg.line_out_type == AC_JACK_HP_OUT)
3072 hp_pin = spec->gen.autocfg.line_out_pins[0];
3073 }
3074
3065 if (!hp_pin) { 3075 if (!hp_pin) {
3066 alc269_shutup(codec); 3076 alc269_shutup(codec);
3067 return; 3077 return;