1 From 9cb40eb184c4220d244a532bd940c6345ad9dbd9 Mon Sep 17 00:00:00 2001
2 From: Hui Wang <hui.wang@canonical.com>
3 Date: Wed, 29 May 2019 12:41:38 +0800
4 Subject: ALSA: hda/realtek - Improve the headset mic for Acer Aspire laptops
6 From: Hui Wang <hui.wang@canonical.com>
8 commit 9cb40eb184c4220d244a532bd940c6345ad9dbd9 upstream.
10 We met another Acer Aspire laptop which has the problem on the
11 headset-mic, the Pin 0x19 is not set the corret configuration for a
12 mic and the pin presence can't be detected too after plugging a
13 headset. Kailang suggested that we should set the coeff to enable the
14 mic and apply the ALC269_FIXUP_LIFEBOOK_EXTMIC. After doing that,
15 both headset-mic presence and headset-mic work well.
17 The existing ALC255_FIXUP_ACER_MIC_NO_PRESENCE set the headset-mic
18 jack to be a phantom jack. Now since the jack can support presence
19 unsol event, let us imporve it to set the jack to be a normal jack.
21 https://bugs.launchpad.net/bugs/1821269
22 Fixes: 5824ce8de7b1c ("ALSA: hda/realtek - Add support for Acer Aspire E5-475 headset mic")
23 Cc: Chris Chiu <chiu@endlessm.com>
24 CC: Daniel Drake <drake@endlessm.com>
25 Cc: <stable@vger.kernel.org>
26 Signed-off-by: Kailang Yang <kailang@realtek.com>
27 Signed-off-by: Hui Wang <hui.wang@canonical.com>
28 Signed-off-by: Takashi Iwai <tiwai@suse.de>
29 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
32 sound/pci/hda/patch_realtek.c | 16 +++++++++++-----
33 1 file changed, 11 insertions(+), 5 deletions(-)
35 --- a/sound/pci/hda/patch_realtek.c
36 +++ b/sound/pci/hda/patch_realtek.c
37 @@ -6166,13 +6166,15 @@ static const struct hda_fixup alc269_fix
38 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
40 [ALC255_FIXUP_ACER_MIC_NO_PRESENCE] = {
41 - .type = HDA_FIXUP_PINS,
42 - .v.pins = (const struct hda_pintbl[]) {
43 - { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
45 + .type = HDA_FIXUP_VERBS,
46 + .v.verbs = (const struct hda_verb[]) {
47 + /* Enable the Mic */
48 + { 0x20, AC_VERB_SET_COEF_INDEX, 0x45 },
49 + { 0x20, AC_VERB_SET_PROC_COEF, 0x5089 },
53 - .chain_id = ALC255_FIXUP_HEADSET_MODE
54 + .chain_id = ALC269_FIXUP_LIFEBOOK_EXTMIC
56 [ALC255_FIXUP_ASUS_MIC_NO_PRESENCE] = {
57 .type = HDA_FIXUP_PINS,
58 @@ -7218,6 +7220,10 @@ static const struct snd_hda_pin_quirk al
61 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1025, "Acer", ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
64 + {0x21, 0x02211030}),
65 + SND_HDA_PIN_QUIRK(0x10ec0255, 0x1025, "Acer", ALC255_FIXUP_ACER_MIC_NO_PRESENCE,