hwang4@hwang4-Inspiron-7520:~/work/mainline/alsa/sound$ git show c4cfcf6f4297c9256b53790bacbbbd6901fef468
commit c4cfcf6f4297c9256b53790bacbbbd6901fef468 (origin/for-linus)
Author: Hui Wang <email address hidden>
Date: Mon Nov 26 14:17:16 2018 +0800
ALSA: hda/realtek - fix the pop noise on headphone for lenovo laptops
We have several Lenovo laptops with the codec alc285, when playing
sound via headphone, we can hear click/pop noise in the headphone,
if we let the headphone share the DAC of NID 0x2 with the speaker,
the noise disappears.
The Lenovo laptops here include P52, P72, X1 yoda2 and X1 carbon.
I have tried to set preferred_dacs and override_conn, but neither of
them worked. Thanks for Kailang, he told me to invalidate the NID 0x3
through override_wcaps.
+/* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */
+static void alc285_fixup_invalidate_dacs(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ if (action != HDA_FIXUP_ACT_PRE_PROBE)
+ return;
+
+ snd_hda_override_wcaps(codec, 0x03, 0);
+}
+
/* for hda_fixup_thinkpad_acpi() */
#include "thinkpad_helper.c"
hwang4@ hwang4- Inspiron- 7520:~/ work/mainline/ alsa/sound$ git show c4cfcf6f4297c92 56b53790bacbbbd 6901fef468 56b53790bacbbbd 6901fef468 (origin/for-linus)
commit c4cfcf6f4297c92
Author: Hui Wang <email address hidden>
Date: Mon Nov 26 14:17:16 2018 +0800
ALSA: hda/realtek - fix the pop noise on headphone for lenovo laptops
We have several Lenovo laptops with the codec alc285, when playing
sound via headphone, we can hear click/pop noise in the headphone,
if we let the headphone share the DAC of NID 0x2 with the speaker,
the noise disappears.
The Lenovo laptops here include P52, P72, X1 yoda2 and X1 carbon.
I have tried to set preferred_dacs and override_conn, but neither of
them worked. Thanks for Kailang, he told me to invalidate the NID 0x3
through override_wcaps.
BugLink: https:/ /bugs.launchpad .net/bugs/ 1805079
Cc: <email address hidden>
Signed-off-by: Kailang Yang <email address hidden>
Signed-off-by: Hui Wang <email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>
diff --git a/sound/ pci/hda/ patch_realtek. c b/sound/ pci/hda/ patch_realtek. c .e66da22272fd 100644 pci/hda/ patch_realtek. c pci/hda/ patch_realtek. c fixup_bind_ dacs(struct hda_codec *codec,
spec-> gen.preferred_ dacs = preferred_pairs;
index 1118fd1bbf1a.
--- a/sound/
+++ b/sound/
@@ -5358,6 +5358,16 @@ static void alc274_
}
+/* The DAC of NID 0x3 will introduce click/pop noise on headphones, so invalidate it */ fixup_invalidat e_dacs( struct hda_codec *codec, ACT_PRE_ PROBE) override_ wcaps(codec, 0x03, 0); thinkpad_ acpi() */
+static void alc285_
+ const struct hda_fixup *fix, int action)
+{
+ if (action != HDA_FIXUP_
+ return;
+
+ snd_hda_
+}
+
/* for hda_fixup_
#include "thinkpad_helper.c"
@@ -5495,6 +5505,7 @@ enum {
ALC255_ FIXUP_DELL_ HEADSET_ MIC,
ALC295_ FIXUP_HP_ X360,
ALC221_ FIXUP_HP_ HEADSET_ MIC, FIXUP_LENOVO_ HEADPHONE_ NOISE,
+ ALC285_
};
static const struct hda_fixup alc269_fixups[] = {
.chained = true,
.chain_ id = ALC269_ FIXUP_HEADSET_ MIC FIXUP_LENOVO_ HEADPHONE_ NOISE] = { fixup_invalidat e_dacs,
@@ -6362,6 +6373,10 @@ static const struct hda_fixup alc269_fixups[] = {
},
+ [ALC285_
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc285_
+ },
};
static const struct snd_pci_quirk alc269_fixup_tbl[] = { pin_fixup_ tbl[] = {
{0x12, 0x90a60130},
{0x19, 0x03a11020},
{0x21, 0x0321101f}), PIN_QUIRK( 0x10ec0285, 0x17aa, "Lenovo", ALC285_ FIXUP_LENOVO_ HEADPHONE_ NOISE,
SND_HDA_ PIN_QUIRK( 0x10ec0288, 0x1028, "Dell", ALC288_ FIXUP_DELL1_ MIC_NO_ PRESENCE,
{0x12, 0x90a60120},
{0x14, 0x90170110},
@@ -7035,6 +7050,11 @@ static const struct snd_hda_pin_quirk alc269_
+ SND_HDA_
+ {0x12, 0x90a60130},
+ {0x14, 0x90170110},
+ {0x19, 0x04a11040},
+ {0x21, 0x04211020}),