Fixed single output empty pin_sense issue for alc283
Hi Takashi,
Some machine with single output. It has only one HP out on it. alc283_init and alc283_shutup will get empty hp_pin value. I add the check for the attachment patch.
Thanks.
BR,
Kailang
Quoted 1 line
From
bd51a4611d373c5e4895023cb658ae1371783d94Mon Sep 17 00:00:00 2001
From: Kailang Yang <[email protected]>
Date: Thu, 3 Apr 2014 17:28:39 +0800
Subject: [PATCH] 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 .
sound/pci/hda/patch_realtek.c +10 -0
@@ -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 ;
Takashi Iwai
AppliedAt Thu, 3 Apr 2014 17:32:52 +0800,
Quoted 6 lines · Kailang
Hi Takashi,
Some machine with single output. It has only one HP out on it.
alc283_initandalc283_shutupwill get emptyhp_pinvalue. I add the check for the attachment patch.
Thanks, applied.
Takashi
Quoted 6 lines
Thanks.
BR,
Kailang
[2 0000-solve-hp-pins-empty.patch <application/octet-stream (quoted-printable)>]