From: Sasha Levin Date: Fri, 13 Oct 2023 15:03:03 +0000 (-0400) Subject: Fixes for 6.5 X-Git-Tag: v6.1.58~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a8c22bfb4ca503c575cf0d32453cde027dca336d;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 6.5 Signed-off-by: Sasha Levin --- diff --git a/queue-6.5/alsa-hda-realtek-add-quirk-for-hp-victus-16-d1xxx-to.patch b/queue-6.5/alsa-hda-realtek-add-quirk-for-hp-victus-16-d1xxx-to.patch new file mode 100644 index 00000000000..5ebc1f7c642 --- /dev/null +++ b/queue-6.5/alsa-hda-realtek-add-quirk-for-hp-victus-16-d1xxx-to.patch @@ -0,0 +1,79 @@ +From d498314f0ca36dc352dd1a50c30faa34d887082f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 23 Aug 2023 20:40:51 +0900 +Subject: ALSA: hda/realtek: Add quirk for HP Victus 16-d1xxx to enable mute + LED + +From: SungHwan Jung + +[ Upstream commit 93dc18e11b1ab2d485b69f91c973e6b83e47ebd0 ] + +This quirk enables mute LED on HP Victus 16-d1xxx (8A25) laptops, which +use ALC245 codec. + +Signed-off-by: SungHwan Jung +Link: https://lore.kernel.org/r/20230823114051.3921-1-onenowy@gmail.com +Signed-off-by: Takashi Iwai +Stable-dep-of: d93eeca627db ("ALSA: hda/realtek - ALC287 merge RTK codec with CS CS35L41 AMP") +Signed-off-by: Sasha Levin +--- + sound/pci/hda/patch_realtek.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index 333c3664082c7..39e3810f75222 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -4639,6 +4639,22 @@ static void alc236_fixup_hp_mute_led_coefbit2(struct hda_codec *codec, + } + } + ++static void alc245_fixup_hp_mute_led_coefbit(struct hda_codec *codec, ++ const struct hda_fixup *fix, ++ int action) ++{ ++ struct alc_spec *spec = codec->spec; ++ ++ if (action == HDA_FIXUP_ACT_PRE_PROBE) { ++ spec->mute_led_polarity = 0; ++ spec->mute_led_coef.idx = 0x0b; ++ spec->mute_led_coef.mask = 3 << 2; ++ spec->mute_led_coef.on = 2 << 2; ++ spec->mute_led_coef.off = 1 << 2; ++ snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set); ++ } ++} ++ + /* turn on/off mic-mute LED per capture hook by coef bit */ + static int coef_micmute_led_set(struct led_classdev *led_cdev, + enum led_brightness brightness) +@@ -7231,6 +7247,7 @@ enum { + ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS, + ALC236_FIXUP_DELL_DUAL_CODECS, + ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI, ++ ALC245_FIXUP_HP_MUTE_LED_COEFBIT, + }; + + /* A special fixup for Lenovo C940 and Yoga Duet 7; +@@ -9309,6 +9326,10 @@ static const struct hda_fixup alc269_fixups[] = { + .chained = true, + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, + }, ++ [ALC245_FIXUP_HP_MUTE_LED_COEFBIT] = { ++ .type = HDA_FIXUP_FUNC, ++ .v.func = alc245_fixup_hp_mute_led_coefbit, ++ }, + }; + + static const struct snd_pci_quirk alc269_fixup_tbl[] = { +@@ -9582,6 +9603,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { + SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), + SND_PCI_QUIRK(0x103c, 0x89d3, "HP EliteBook 645 G9 (MB 89D2)", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), ++ SND_PCI_QUIRK(0x103c, 0x8a25, "HP Victus 16-d1xxx (MB 8A25)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), + SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST), + SND_PCI_QUIRK(0x103c, 0x8aa0, "HP ProBook 440 G9 (MB 8A9E)", ALC236_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8aa3, "HP ProBook 450 G9 (MB 8AA1)", ALC236_FIXUP_HP_GPIO_LED), +-- +2.40.1 + diff --git a/queue-6.5/alsa-hda-realtek-add-quirk-for-mute-leds-on-hp-envy-.patch b/queue-6.5/alsa-hda-realtek-add-quirk-for-mute-leds-on-hp-envy-.patch new file mode 100644 index 00000000000..7084b9bb0e3 --- /dev/null +++ b/queue-6.5/alsa-hda-realtek-add-quirk-for-mute-leds-on-hp-envy-.patch @@ -0,0 +1,58 @@ +From dd804d012dabb6ea1427be2cafe1ce3db5f0783a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 24 Aug 2023 20:39:48 +0200 +Subject: ALSA: hda/realtek: Add quirk for mute LEDs on HP ENVY x360 15-eu0xxx + +From: Fabian Vogt + +[ Upstream commit c99c26b16c1544534ebd6a5f27a034f3e44d2597 ] + +The LED for the mic mute button is controlled by GPIO2. +The mute button LED is slightly more complex, it's controlled by two bits +in coeff 0x0b. + +Signed-off-by: Fabian Vogt +Link: https://lore.kernel.org/r/2693091.mvXUDI8C0e@fabians-envy +Signed-off-by: Takashi Iwai +Stable-dep-of: d93eeca627db ("ALSA: hda/realtek - ALC287 merge RTK codec with CS CS35L41 AMP") +Signed-off-by: Sasha Levin +--- + sound/pci/hda/patch_realtek.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index 39e3810f75222..bcb48449608a0 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -7248,6 +7248,7 @@ enum { + ALC236_FIXUP_DELL_DUAL_CODECS, + ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI, + ALC245_FIXUP_HP_MUTE_LED_COEFBIT, ++ ALC245_FIXUP_HP_X360_MUTE_LEDS, + }; + + /* A special fixup for Lenovo C940 and Yoga Duet 7; +@@ -9330,6 +9331,12 @@ static const struct hda_fixup alc269_fixups[] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc245_fixup_hp_mute_led_coefbit, + }, ++ [ALC245_FIXUP_HP_X360_MUTE_LEDS] = { ++ .type = HDA_FIXUP_FUNC, ++ .v.func = alc245_fixup_hp_mute_led_coefbit, ++ .chained = true, ++ .chain_id = ALC245_FIXUP_HP_GPIO_LED ++ }, + }; + + static const struct snd_pci_quirk alc269_fixup_tbl[] = { +@@ -9572,6 +9579,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { + SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), + SND_PCI_QUIRK(0x103c, 0x8873, "HP ZBook Studio 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), + SND_PCI_QUIRK(0x103c, 0x887a, "HP Laptop 15s-eq2xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), ++ SND_PCI_QUIRK(0x103c, 0x888a, "HP ENVY x360 Convertible 15-eu0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS), + SND_PCI_QUIRK(0x103c, 0x888d, "HP ZBook Power 15.6 inch G8 Mobile Workstation PC", ALC236_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8895, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED), + SND_PCI_QUIRK(0x103c, 0x8896, "HP EliteBook 855 G8 Notebook PC", ALC285_FIXUP_HP_MUTE_LED), +-- +2.40.1 + diff --git a/queue-6.5/alsa-hda-realtek-alc287-i2s-speaker-platform-support.patch b/queue-6.5/alsa-hda-realtek-alc287-i2s-speaker-platform-support.patch new file mode 100644 index 00000000000..dbb9b2f7f21 --- /dev/null +++ b/queue-6.5/alsa-hda-realtek-alc287-i2s-speaker-platform-support.patch @@ -0,0 +1,89 @@ +From 6f1a97385a4a99639b6b379d278f2d7f476f2a3a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 6 Sep 2023 16:50:41 +0800 +Subject: ALSA: hda/realtek - ALC287 I2S speaker platform support + +From: Kailang Yang + +[ Upstream commit e43252db7e207a2e194e6a4883a43a31a776a968 ] + +0x17 was only speaker pin, DAC assigned will be 0x03. Headphone +assigned to 0x02. +Playback via headphone will get EQ filter processing. So,it needs to +swap DAC. + +Tested-by: Mark Pearson +Signed-off-by: Kailang Yang +Link: https://lore.kernel.org/r/4e4cfa1b3b4c46838aecafc6e8b6f876@realtek.com +Signed-off-by: Takashi Iwai +Stable-dep-of: d93eeca627db ("ALSA: hda/realtek - ALC287 merge RTK codec with CS CS35L41 AMP") +Signed-off-by: Sasha Levin +--- + sound/pci/hda/patch_realtek.c | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index bcb48449608a0..963465286bdc6 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -6988,6 +6988,27 @@ static void alc295_fixup_dell_inspiron_top_speakers(struct hda_codec *codec, + } + } + ++/* Forcibly assign NID 0x03 to HP while NID 0x02 to SPK */ ++static void alc287_fixup_bind_dacs(struct hda_codec *codec, ++ const struct hda_fixup *fix, int action) ++{ ++ struct alc_spec *spec = codec->spec; ++ static const hda_nid_t conn[] = { 0x02, 0x03 }; /* exclude 0x06 */ ++ static const hda_nid_t preferred_pairs[] = { ++ 0x17, 0x02, 0x21, 0x03, 0 ++ }; ++ ++ if (action != HDA_FIXUP_ACT_PRE_PROBE) ++ return; ++ ++ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn); ++ spec->gen.preferred_dacs = preferred_pairs; ++ spec->gen.auto_mute_via_amp = 1; ++ snd_hda_codec_write_cache(codec, 0x14, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, ++ 0x0); /* Make sure 0x14 was disable */ ++} ++ ++ + enum { + ALC269_FIXUP_GPIO2, + ALC269_FIXUP_SONY_VAIO, +@@ -7249,6 +7270,7 @@ enum { + ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI, + ALC245_FIXUP_HP_MUTE_LED_COEFBIT, + ALC245_FIXUP_HP_X360_MUTE_LEDS, ++ ALC287_FIXUP_THINKPAD_I2S_SPK, + }; + + /* A special fixup for Lenovo C940 and Yoga Duet 7; +@@ -9337,6 +9359,10 @@ static const struct hda_fixup alc269_fixups[] = { + .chained = true, + .chain_id = ALC245_FIXUP_HP_GPIO_LED + }, ++ [ALC287_FIXUP_THINKPAD_I2S_SPK] = { ++ .type = HDA_FIXUP_FUNC, ++ .v.func = alc287_fixup_bind_dacs, ++ }, + }; + + static const struct snd_pci_quirk alc269_fixup_tbl[] = { +@@ -10455,6 +10481,10 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { + {0x17, 0x90170111}, + {0x19, 0x03a11030}, + {0x21, 0x03211020}), ++ SND_HDA_PIN_QUIRK(0x10ec0287, 0x17aa, "Lenovo", ALC287_FIXUP_THINKPAD_I2S_SPK, ++ {0x17, 0x90170110}, ++ {0x19, 0x03a11030}, ++ {0x21, 0x03211020}), + SND_HDA_PIN_QUIRK(0x10ec0286, 0x1025, "Acer", ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE, + {0x12, 0x90a60130}, + {0x17, 0x90170110}, +-- +2.40.1 + diff --git a/queue-6.5/alsa-hda-realtek-alc287-merge-rtk-codec-with-cs-cs35.patch b/queue-6.5/alsa-hda-realtek-alc287-merge-rtk-codec-with-cs-cs35.patch new file mode 100644 index 00000000000..c184927af65 --- /dev/null +++ b/queue-6.5/alsa-hda-realtek-alc287-merge-rtk-codec-with-cs-cs35.patch @@ -0,0 +1,72 @@ +From 3eda2008c6ebd6071531e8ba7a844eb1a330cdc6 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 21 Sep 2023 15:20:41 +0800 +Subject: ALSA: hda/realtek - ALC287 merge RTK codec with CS CS35L41 AMP + +From: Kailang Yang + +[ Upstream commit d93eeca627db512a56145285dc94feac5b88a1d4 ] + +This is merge model ALC287_FIXUP_THINKPAD_I2S_SPK and +ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI. + +Signed-off-by: Kailang Yang +Fixes: f7b069cf0881 ("ALSA: hda/realtek: Fix generic fixup definition for cs35l41 amp") +Link: https://lore.kernel.org/r/82a45234327c4c50b4988a27e9f64c37@realtek.com +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/pci/hda/patch_realtek.c | 23 +++++++++++++++-------- + 1 file changed, 15 insertions(+), 8 deletions(-) + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index 963465286bdc6..a505be0fed961 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -7271,6 +7271,7 @@ enum { + ALC245_FIXUP_HP_MUTE_LED_COEFBIT, + ALC245_FIXUP_HP_X360_MUTE_LEDS, + ALC287_FIXUP_THINKPAD_I2S_SPK, ++ ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD, + }; + + /* A special fixup for Lenovo C940 and Yoga Duet 7; +@@ -9363,6 +9364,12 @@ static const struct hda_fixup alc269_fixups[] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc287_fixup_bind_dacs, + }, ++ [ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD] = { ++ .type = HDA_FIXUP_FUNC, ++ .v.func = alc287_fixup_bind_dacs, ++ .chained = true, ++ .chain_id = ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI, ++ }, + }; + + static const struct snd_pci_quirk alc269_fixup_tbl[] = { +@@ -9910,14 +9917,14 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { + SND_PCI_QUIRK(0x17aa, 0x22be, "Thinkpad X1 Carbon 8th", ALC285_FIXUP_THINKPAD_HEADSET_JACK), + SND_PCI_QUIRK(0x17aa, 0x22c1, "Thinkpad P1 Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), + SND_PCI_QUIRK(0x17aa, 0x22c2, "Thinkpad X1 Extreme Gen 3", ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK), +- SND_PCI_QUIRK(0x17aa, 0x22f1, "Thinkpad", ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI), +- SND_PCI_QUIRK(0x17aa, 0x22f2, "Thinkpad", ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI), +- SND_PCI_QUIRK(0x17aa, 0x22f3, "Thinkpad", ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI), +- SND_PCI_QUIRK(0x17aa, 0x2316, "Thinkpad P1 Gen 6", ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI), +- SND_PCI_QUIRK(0x17aa, 0x2317, "Thinkpad P1 Gen 6", ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI), +- SND_PCI_QUIRK(0x17aa, 0x2318, "Thinkpad Z13 Gen2", ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI), +- SND_PCI_QUIRK(0x17aa, 0x2319, "Thinkpad Z16 Gen2", ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI), +- SND_PCI_QUIRK(0x17aa, 0x231a, "Thinkpad Z16 Gen2", ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI), ++ SND_PCI_QUIRK(0x17aa, 0x22f1, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), ++ SND_PCI_QUIRK(0x17aa, 0x22f2, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), ++ SND_PCI_QUIRK(0x17aa, 0x22f3, "Thinkpad", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), ++ SND_PCI_QUIRK(0x17aa, 0x2316, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), ++ SND_PCI_QUIRK(0x17aa, 0x2317, "Thinkpad P1 Gen 6", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), ++ SND_PCI_QUIRK(0x17aa, 0x2318, "Thinkpad Z13 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), ++ SND_PCI_QUIRK(0x17aa, 0x2319, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), ++ SND_PCI_QUIRK(0x17aa, 0x231a, "Thinkpad Z16 Gen2", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD), + SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), + SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), + SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), +-- +2.40.1 + diff --git a/queue-6.5/series b/queue-6.5/series index 97c78e3b616..c0c4f8823c1 100644 --- a/queue-6.5/series +++ b/queue-6.5/series @@ -35,3 +35,7 @@ asoc-intel-soc-acpi-add-entry-for-hdmi_in-capture-support-in-mtl-match-table.pat asoc-fsl_sai-don-t-disable-bitclock-for-i.mx8mp.patch asoc-intel-sof_sdw-add-support-for-sku-0b14.patch asoc-intel-soc-acpi-add-entry-for-sof_es8336-in-mtl-match-table.patch +alsa-hda-realtek-add-quirk-for-hp-victus-16-d1xxx-to.patch +alsa-hda-realtek-add-quirk-for-mute-leds-on-hp-envy-.patch +alsa-hda-realtek-alc287-i2s-speaker-platform-support.patch +alsa-hda-realtek-alc287-merge-rtk-codec-with-cs-cs35.patch