2022-08-11 06:11:14

by Fae

[permalink] [raw]
Subject: [PATCH] Sound: pci/hda: Add quirk for HP Envy x360 ey0xxx

This patch fixes speaker output on the HP Envy x360 ey0xxx
The mic/speaker mute LEDs are still non-functional but they aren't required for basic funtionality

Also the quirk is labeled ALC287_FIXUP_CS35L41_I2C_2 however it does not only apply to ALC287
Its function is the generic cs35l41 fixup telling the driver that there's 2 i2c speakers. It isn't actually specific to ALC287

I did have a bit of luck getting the mic mute LED to work but it was to finicky to submit ( I used the ALC245_FIXUP_HP_GPIO_LED quirk )
I had no luck getting the speaker mute LED to work

Signed-off-by: Fae <[email protected]>
---
sound/pci/hda/cs35l41_hda.c | 3 ++-
sound/pci/hda/patch_realtek.c | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
index 129bffb431c22..21d8c2de128ff 100644
--- a/sound/pci/hda/cs35l41_hda.c
+++ b/sound/pci/hda/cs35l41_hda.c
@@ -1156,7 +1156,8 @@ static int cs35l41_no_acpi_dsd(struct cs35l41_hda *cs35l41, struct device *physd
hw_cfg->valid = true;
put_device(physdev);

- if (strncmp(hid, "CLSA0100", 8) == 0) {
+ if ((strncmp(hid, "CLSA0100", 8) == 0) ||
+ (strncmp(hid, "CSC3551", 7) == 0)) {
hw_cfg->bst_type = CS35L41_EXT_BOOST_NO_VSPK_SWITCH;
} else if (strncmp(hid, "CLSA0101", 8) == 0) {
hw_cfg->bst_type = CS35L41_EXT_BOOST;
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 8a57636f622e9..e7053cbc6bb6e 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -9179,6 +9179,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3),
SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
+ SND_PCI_QUIRK(0x103c, 0x8a31, "HP ENVY x360 2-in-1 Laptop 15-ey0xxx", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
--
2.37.1


2022-08-11 09:57:29

by Lucas Tanure

[permalink] [raw]
Subject: Re: [PATCH] Sound: pci/hda: Add quirk for HP Envy x360 ey0xxx

On 8/11/22 06:39, Fae wrote:
> This patch fixes speaker output on the HP Envy x360 ey0xxx
> The mic/speaker mute LEDs are still non-functional but they aren't required for basic funtionality
>
> Also the quirk is labeled ALC287_FIXUP_CS35L41_I2C_2 however it does not only apply to ALC287
> Its function is the generic cs35l41 fixup telling the driver that there's 2 i2c speakers. It isn't actually specific to ALC287
>
> I did have a bit of luck getting the mic mute LED to work but it was to finicky to submit ( I used the ALC245_FIXUP_HP_GPIO_LED quirk )
> I had no luck getting the speaker mute LED to work
>
> Signed-off-by: Fae<[email protected]>
> ---
> sound/pci/hda/cs35l41_hda.c | 3 ++-
> sound/pci/hda/patch_realtek.c | 1 +
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
> index 129bffb431c22..21d8c2de128ff 100644
> --- a/sound/pci/hda/cs35l41_hda.c
> +++ b/sound/pci/hda/cs35l41_hda.c
> @@ -1156,7 +1156,8 @@ static int cs35l41_no_acpi_dsd(struct cs35l41_hda *cs35l41, struct device *physd
> hw_cfg->valid = true;
> put_device(physdev);
>
> - if (strncmp(hid, "CLSA0100", 8) == 0) {
> + if ((strncmp(hid, "CLSA0100", 8) == 0) ||
> + (strncmp(hid, "CSC3551", 7) == 0)) {

Sorry, but we can't accept this. The HID CSC3551 was created for a whole
range of laptops, with all types of Boost.

With this HID the driver expects to read configurations from the BIOS.


> hw_cfg->bst_type = CS35L41_EXT_BOOST_NO_VSPK_SWITCH;
> } else if (strncmp(hid, "CLSA0101", 8) == 0) {
> hw_cfg->bst_type = CS35L41_EXT_BOOST;
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index 8a57636f622e9..e7053cbc6bb6e 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -9179,6 +9179,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
> SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
> SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3),
> SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
> + SND_PCI_QUIRK(0x103c, 0x8a31, "HP ENVY x360 2-in-1 Laptop 15-ey0xxx", ALC287_FIXUP_CS35L41_I2C_2),
> SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
> SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
> SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),

2022-08-11 16:10:33

by Fae

[permalink] [raw]
Subject: [PATCH] Sound: pci/hda: Add quirk for HP Envy x360 ey0xxx

There's at least 1 more device that doesn't use ACPI/BIOS config for the CSC3551
https://lore.kernel.org/lkml/[email protected]/T/

Signed-off-by: Fae <[email protected]>
---
sound/pci/hda/cs35l41_hda.c | 3 ++-
sound/pci/hda/patch_realtek.c | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
index 129bffb431c22..21d8c2de128ff 100644
--- a/sound/pci/hda/cs35l41_hda.c
+++ b/sound/pci/hda/cs35l41_hda.c
@@ -1156,7 +1156,8 @@ static int cs35l41_no_acpi_dsd(struct cs35l41_hda *cs35l41, struct device *physd
hw_cfg->valid = true;
put_device(physdev);

- if (strncmp(hid, "CLSA0100", 8) == 0) {
+ if ((strncmp(hid, "CLSA0100", 8) == 0) ||
+ (strncmp(hid, "CSC3551", 7) == 0)) {
hw_cfg->bst_type = CS35L41_EXT_BOOST_NO_VSPK_SWITCH;
} else if (strncmp(hid, "CLSA0101", 8) == 0) {
hw_cfg->bst_type = CS35L41_EXT_BOOST;
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 8a57636f622e9..e7053cbc6bb6e 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -9179,6 +9179,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
SND_PCI_QUIRK(0x103c, 0x841c, "HP Pavilion 15-CK0xx", ALC269_FIXUP_HP_MUTE_LED_MIC3),
SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3),
+ SND_PCI_QUIRK(0x103c, 0x8a31, "HP ENVY x360 2-in-1 Laptop 15-ey0xxx", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
--
2.37.1

2023-02-02 02:13:06

by Albert Tseng

[permalink] [raw]
Subject: Re: [PATCH] Sound: pci/hda: Add quirk for HP Envy x360 ey0xxx

Apologies if this thread is already dead, but I came across this thread
while debugging an audio issue with my HP 865 G9 (bugzilla report
https://bugzilla.kernel.org/show_bug.cgi?id=216927). I think the issue
with my machine is the same and related to the cirrus logic driver code,
as suggested by Jaroslav (apparently also on this thread). The bug
appears to have been fixed in 6.2rc6, but not in 6.1.8. Can someone add
whatever got fixed to 6.1 since 6.1 is the stable kernel? This is also
my first time using the kernel mailing list so I hope I am not emailing
1000 people or doing something wrong like not opening a new thread.