From fe5819ccaaa52e846b79bd0a8bf6958a0fdc9bd8 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 8 May 2021 13:52:04 +0200 Subject: [PATCH] 5.4-stable patches added patches: alsa-hda-realtek-add-quirk-for-intel-clevo-pcx0dx.patch alsa-hda-realtek-fix-mic-boost-on-intel-nuc-8.patch alsa-hda-realtek-fix-static-noise-on-alc285-lenovo-laptops.patch alsa-hda-realtek-ga503-use-same-quirks-as-ga401.patch --- ...tek-add-quirk-for-intel-clevo-pcx0dx.patch | 40 ++++++++++ ...realtek-fix-mic-boost-on-intel-nuc-8.patch | 77 +++++++++++++++++++ ...tatic-noise-on-alc285-lenovo-laptops.patch | 53 +++++++++++++ ...altek-ga503-use-same-quirks-as-ga401.patch | 32 ++++++++ queue-5.4/series | 4 + 5 files changed, 206 insertions(+) create mode 100644 queue-5.4/alsa-hda-realtek-add-quirk-for-intel-clevo-pcx0dx.patch create mode 100644 queue-5.4/alsa-hda-realtek-fix-mic-boost-on-intel-nuc-8.patch create mode 100644 queue-5.4/alsa-hda-realtek-fix-static-noise-on-alc285-lenovo-laptops.patch create mode 100644 queue-5.4/alsa-hda-realtek-ga503-use-same-quirks-as-ga401.patch diff --git a/queue-5.4/alsa-hda-realtek-add-quirk-for-intel-clevo-pcx0dx.patch b/queue-5.4/alsa-hda-realtek-add-quirk-for-intel-clevo-pcx0dx.patch new file mode 100644 index 00000000000..b67ffa9923b --- /dev/null +++ b/queue-5.4/alsa-hda-realtek-add-quirk-for-intel-clevo-pcx0dx.patch @@ -0,0 +1,40 @@ +From 970e3012c04c96351c413f193a9c909e6d871ce2 Mon Sep 17 00:00:00 2001 +From: Eckhart Mohr +Date: Tue, 27 Apr 2021 17:30:25 +0200 +Subject: ALSA: hda/realtek: Add quirk for Intel Clevo PCx0Dx + +From: Eckhart Mohr + +commit 970e3012c04c96351c413f193a9c909e6d871ce2 upstream. + +This applies a SND_PCI_QUIRK(...) to the Clevo PCx0Dx barebones. This +fix enables audio output over the headset jack and ensures that a +microphone connected via the headset combo jack is correctly recognized +when pluged in. + +[ Rearranged the list entries in a sorted order -- tiwai ] + +Signed-off-by: Eckhart Mohr +Co-developed-by: Werner Sembach +Signed-off-by: Werner Sembach +Cc: +Link: https://lore.kernel.org/r/20210427153025.451118-1-wse@tuxedocomputers.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -2542,8 +2542,10 @@ static const struct snd_pci_quirk alc882 + SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK(0x1558, 0x65e1, "Clevo PB51[ED][DF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), ++ SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), ++ SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK(0x1558, 0x70d1, "Clevo PC70[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK(0x1558, 0x7714, "Clevo X170", ALC1220_FIXUP_CLEVO_PB51ED_PINS), + SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD), diff --git a/queue-5.4/alsa-hda-realtek-fix-mic-boost-on-intel-nuc-8.patch b/queue-5.4/alsa-hda-realtek-fix-mic-boost-on-intel-nuc-8.patch new file mode 100644 index 00000000000..7fd249ac9da --- /dev/null +++ b/queue-5.4/alsa-hda-realtek-fix-mic-boost-on-intel-nuc-8.patch @@ -0,0 +1,77 @@ +From d1ee66c5d3c5a0498dd5e3f2af5b8c219a98bba5 Mon Sep 17 00:00:00 2001 +From: Phil Calvin +Date: Thu, 15 Apr 2021 18:01:29 -0400 +Subject: ALSA: hda/realtek: fix mic boost on Intel NUC 8 + +From: Phil Calvin + +commit d1ee66c5d3c5a0498dd5e3f2af5b8c219a98bba5 upstream. + +Fix two bugs with the Intel HDA Realtek ALC233 sound codec +present in Intel NUC NUC8i7BEH and probably a few other similar +NUC models. + +These codecs advertise a 4-level microphone input boost amplifier on +pin 0x19, but the highest two boost settings do not work correctly, +and produce only low analog noise that does not seem to contain any +discernible signal. There is an existing fixup for this exact problem +but for a different PCI subsystem ID, so we re-use that logic. + +Changing the boost level also triggers a DC spike in the input signal +that bleeds off over about a second and overwhelms any input during +that time. Thankfully, the existing fixup has the side effect of +making the boost control show up in userspace as a mute/unmute switch, +and this keeps (e.g.) PulseAudio from fiddling with it during normal +input volume adjustments. + +Finally, the NUC hardware has built-in inverted stereo mics. This +patch also enables the usual fixup for this so the two channels cancel +noise instead of the actual signal. + +[ Re-ordered the quirk entry point by tiwai ] + +Signed-off-by: Phil Calvin +Cc: +Link: https://lore.kernel.org/r/80dc5663-7734-e7e5-25ef-15b5df24511a@philcalvin.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -6332,6 +6332,8 @@ enum { + ALC269_FIXUP_LEMOTE_A1802, + ALC269_FIXUP_LEMOTE_A190X, + ALC256_FIXUP_INTEL_NUC8_RUGGED, ++ ALC233_FIXUP_INTEL_NUC8_DMIC, ++ ALC233_FIXUP_INTEL_NUC8_BOOST, + ALC256_FIXUP_INTEL_NUC10, + ALC255_FIXUP_XIAOMI_HEADSET_MIC, + ALC274_FIXUP_HP_MIC, +@@ -7043,6 +7045,16 @@ static const struct hda_fixup alc269_fix + .type = HDA_FIXUP_FUNC, + .v.func = alc233_fixup_lenovo_line2_mic_hotkey, + }, ++ [ALC233_FIXUP_INTEL_NUC8_DMIC] = { ++ .type = HDA_FIXUP_FUNC, ++ .v.func = alc_fixup_inv_dmic, ++ .chained = true, ++ .chain_id = ALC233_FIXUP_INTEL_NUC8_BOOST, ++ }, ++ [ALC233_FIXUP_INTEL_NUC8_BOOST] = { ++ .type = HDA_FIXUP_FUNC, ++ .v.func = alc269_fixup_limit_int_mic_boost ++ }, + [ALC255_FIXUP_DELL_SPK_NOISE] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc_fixup_disable_aamix, +@@ -8125,6 +8137,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE), + SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802), + SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X), ++ SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC), + SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED), + SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10), + diff --git a/queue-5.4/alsa-hda-realtek-fix-static-noise-on-alc285-lenovo-laptops.patch b/queue-5.4/alsa-hda-realtek-fix-static-noise-on-alc285-lenovo-laptops.patch new file mode 100644 index 00000000000..c29ec12c357 --- /dev/null +++ b/queue-5.4/alsa-hda-realtek-fix-static-noise-on-alc285-lenovo-laptops.patch @@ -0,0 +1,53 @@ +From 9bbb94e57df135ef61bef075d9c99b8d9e89e246 Mon Sep 17 00:00:00 2001 +From: Sami Loone +Date: Sun, 25 Apr 2021 22:37:12 +0200 +Subject: ALSA: hda/realtek: fix static noise on ALC285 Lenovo laptops + +From: Sami Loone + +commit 9bbb94e57df135ef61bef075d9c99b8d9e89e246 upstream. + +Remove a duplicate vendor+subvendor pin fixup entry as one is masking +the other and making it unreachable. Consider the more specific newcomer +as a second chance instead. + +The generic entry is made less strict to also match for laptops with +slightly different 0x12 pin configuration. Tested on Lenovo Yoga 6 (AMD) +where 0x12 is 0x40000000. + +Fixes: 607184cb1635 ("ALSA: hda/realtek - Add supported for more Lenovo ALC285 Headset Button") +Signed-off-by: Sami Loone +Cc: +Link: https://lore.kernel.org/r/YIXS+GT/dGI/LtK6@yoga +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -8597,12 +8597,7 @@ static const struct snd_hda_pin_quirk al + {0x12, 0x90a60130}, + {0x19, 0x03a11020}, + {0x21, 0x0321101f}), +- SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, +- {0x14, 0x90170110}, +- {0x19, 0x04a11040}, +- {0x21, 0x04211020}), + SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE, +- {0x12, 0x90a60130}, + {0x14, 0x90170110}, + {0x19, 0x04a11040}, + {0x21, 0x04211020}), +@@ -8770,6 +8765,10 @@ static const struct snd_hda_pin_quirk al + SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, + {0x19, 0x40000000}, + {0x1a, 0x40000000}), ++ SND_HDA_PIN_QUIRK(0x10ec0285, 0x17aa, "Lenovo", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK, ++ {0x14, 0x90170110}, ++ {0x19, 0x04a11040}, ++ {0x21, 0x04211020}), + {} + }; + diff --git a/queue-5.4/alsa-hda-realtek-ga503-use-same-quirks-as-ga401.patch b/queue-5.4/alsa-hda-realtek-ga503-use-same-quirks-as-ga401.patch new file mode 100644 index 00000000000..f32af973f96 --- /dev/null +++ b/queue-5.4/alsa-hda-realtek-ga503-use-same-quirks-as-ga401.patch @@ -0,0 +1,32 @@ +From 76fae6185f5456865ff1bcb647709d44fd987eb6 Mon Sep 17 00:00:00 2001 +From: Luke D Jones +Date: Mon, 19 Apr 2021 15:04:11 +1200 +Subject: ALSA: hda/realtek: GA503 use same quirks as GA401 + +From: Luke D Jones + +commit 76fae6185f5456865ff1bcb647709d44fd987eb6 upstream. + +The GA503 has almost exactly the same default setup as the GA401 +model with the same issues. The GA401 quirks solve all the issues +so we will use the full quirk chain. + +Signed-off-by: Luke D Jones +Cc: +Link: https://lore.kernel.org/r/20210419030411.28304-1-luke@ljones.dev +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -7958,6 +7958,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC), + SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE), + SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502), ++ SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401), + SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401), + SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS), + SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), diff --git a/queue-5.4/series b/queue-5.4/series index d5060c64a24..532ece973f0 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -128,3 +128,7 @@ alsa-sb-fix-two-use-after-free-in-snd_sb_qsound_build.patch alsa-usb-audio-explicitly-set-up-the-clock-selector.patch alsa-usb-audio-more-constifications.patch alsa-usb-audio-add-db-range-mapping-for-sennheiser-communications-headset-pc-8.patch +alsa-hda-realtek-ga503-use-same-quirks-as-ga401.patch +alsa-hda-realtek-fix-mic-boost-on-intel-nuc-8.patch +alsa-hda-realtek-fix-static-noise-on-alc285-lenovo-laptops.patch +alsa-hda-realtek-add-quirk-for-intel-clevo-pcx0dx.patch -- 2.47.3