2024-02-06 09:14:30

by Jean-Loïc Charroud

[permalink] [raw]
Subject: [PATCH] ALSA: hda/realtek: cs35l41: Fix internal speaker support for ASUS UM3402 with missing DSD

Fix device ID for "ASUS UM3402" and "ASUS UM6702RA/RC".
Add DSD values for "ASUS UM3402" to cs35l41_config_table[].
Reorder alc269_fixup_tbl[] by device id and remove duplicate QUIRK
entry for device {0x1043, 0x1f62, "ASUS UX7602ZM"}.

Signed-off-by: Jean-Loïc Charroud <[email protected]>
---
 sound/pci/hda/cs35l41_hda_property.c | 2 ++
 sound/pci/hda/patch_realtek.c        | 7 +++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/sound/pci/hda/cs35l41_hda_property.c
b/sound/pci/hda/cs35l41_hda_property.c
index 923c0813fa08..d8cd62ef6afc 100644
--- a/sound/pci/hda/cs35l41_hda_property.c
+++ b/sound/pci/hda/cs35l41_hda_property.c
@@ -102,6 +102,7 @@ static const struct cs35l41_config
cs35l41_config_table[] = {
     { "10431D1F", 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 },
0, 1, -1, 1000, 4500, 24 },
     { "10431DA2", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 },
1, 2, 0, 0, 0, 0 },
     { "10431E02", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 },
1, 2, 0, 0, 0, 0 },
+    { "10431E12", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 },
0, 1, -1, 0, 0, 0 },
     { "10431EE2", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 },
0, -1, -1, 0, 0, 0 },
     { "10431F12", 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 },
0, 1, -1, 1000, 4500, 24 },
     { "10431F1F", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 },
1, -1, 0, 0, 0, 0 },
@@ -485,6 +486,7 @@ static const struct cs35l41_prop_model
cs35l41_prop_model_table[] = {
     { "CSC3551", "10431D1F", generic_dsd_config },
     { "CSC3551", "10431DA2", generic_dsd_config },
     { "CSC3551", "10431E02", generic_dsd_config },
+    { "CSC3551", "10431E12", generic_dsd_config },
     { "CSC3551", "10431EE2", generic_dsd_config },
     { "CSC3551", "10431F12", generic_dsd_config },
     { "CSC3551", "10431F1F", generic_dsd_config },
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 7aa88ed04bde..16cb19eee589 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -9893,6 +9893,7 @@ static const struct snd_pci_quirk
alc269_fixup_tbl[] = {
     SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH",
ALC294_FIXUP_ASUS_DUAL_SPK),
     SND_PCI_QUIRK(0x1043, 0x1663, "ASUS GU603ZI/ZJ/ZQ/ZU/ZV",
ALC285_FIXUP_ASUS_HEADSET_MIC),
     SND_PCI_QUIRK(0x1043, 0x1683, "ASUS UM3402YAR",
ALC287_FIXUP_CS35L41_I2C_2),
+    SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS UX3402VA",
ALC245_FIXUP_CS35L41_SPI_2),
     SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
     SND_PCI_QUIRK(0x1043, 0x16d3, "ASUS UX5304VA",
ALC245_FIXUP_CS35L41_SPI_2),
     SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
@@ -9936,14 +9937,12 @@ static const struct snd_pci_quirk
alc269_fixup_tbl[] = {
     SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE),
     SND_PCI_QUIRK(0x1043, 0x1da2, "ASUS UP6502ZA/ZD",
ALC245_FIXUP_CS35L41_SPI_2),
     SND_PCI_QUIRK(0x1043, 0x1e02, "ASUS UX3402ZA",
ALC245_FIXUP_CS35L41_SPI_2),
-    SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS UX3402VA",
ALC245_FIXUP_CS35L41_SPI_2),
-    SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM",
ALC245_FIXUP_CS35L41_SPI_2),
     SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15",
ALC289_FIXUP_ASUS_GA502),
-    SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM6702RA/RC",
ALC287_FIXUP_CS35L41_I2C_2),
+    SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM3402",
ALC287_FIXUP_CS35L41_I2C_2),
     SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15",
ALC294_FIXUP_ASUS_GU502_PINS),
     SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513",
ALC294_FIXUP_ASUS_G513_PINS),
     SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15",
ALC289_FIXUP_ASUS_GA401),
-    SND_PCI_QUIRK(0x1043, 0x1ee2, "ASUS UM3402",
ALC287_FIXUP_CS35L41_I2C_2),
+    SND_PCI_QUIRK(0x1043, 0x1ee2, "ASUS UM6702RA/RC",
ALC287_FIXUP_CS35L41_I2C_2),
     SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022",
ALC289_FIXUP_ASUS_GA401),
     SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14",
ALC289_FIXUP_ASUS_GA401),
     SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302",
ALC287_FIXUP_CS35L41_I2C_2),
--
2.40.1



2024-02-06 15:23:41

by Stefan Binding

[permalink] [raw]
Subject: RE: [PATCH] ALSA: hda/realtek: cs35l41: Fix internal speaker support for ASUS UM3402 with missing DSD

Hi,

Config looks ok to me.

Thanks,
Stefan

> -----Original Message-----
> From: Jean-Loïc Charroud <[email protected]>
> Sent: Tuesday, February 6, 2024 9:14 AM
> To: Stefan Binding <[email protected]>; Jaroslav Kysela
> <[email protected]>; Takashi Iwai <[email protected]>
> Cc: Richard Fitzgerald <[email protected]>; linux-
> [email protected]; [email protected];
> [email protected]
> Subject: [PATCH] ALSA: hda/realtek: cs35l41: Fix internal speaker support
> for ASUS UM3402 with missing DSD
>
> Fix device ID for "ASUS UM3402" and "ASUS UM6702RA/RC".
> Add DSD values for "ASUS UM3402" to cs35l41_config_table[].
> Reorder alc269_fixup_tbl[] by device id and remove duplicate QUIRK
> entry for device {0x1043, 0x1f62, "ASUS UX7602ZM"}.
>
> Signed-off-by: Jean-Loïc Charroud <[email protected]>
> ---
> sound/pci/hda/cs35l41_hda_property.c | 2 ++
> sound/pci/hda/patch_realtek.c | 7 +++----
> 2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/sound/pci/hda/cs35l41_hda_property.c
> b/sound/pci/hda/cs35l41_hda_property.c
> index 923c0813fa08..d8cd62ef6afc 100644
> --- a/sound/pci/hda/cs35l41_hda_property.c
> +++ b/sound/pci/hda/cs35l41_hda_property.c
> @@ -102,6 +102,7 @@ static const struct cs35l41_config
> cs35l41_config_table[] = {
> { "10431D1F", 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 },
> 0, 1, -1, 1000, 4500, 24 },
> { "10431DA2", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 },
> 1, 2, 0, 0, 0, 0 },
> { "10431E02", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 },
> 1, 2, 0, 0, 0, 0 },
> + { "10431E12", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 },
> 0, 1, -1, 0, 0, 0 },
> { "10431EE2", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 },
> 0, -1, -1, 0, 0, 0 },
> { "10431F12", 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 },
> 0, 1, -1, 1000, 4500, 24 },
> { "10431F1F", 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 },
> 1, -1, 0, 0, 0, 0 },
> @@ -485,6 +486,7 @@ static const struct cs35l41_prop_model
> cs35l41_prop_model_table[] = {
> { "CSC3551", "10431D1F", generic_dsd_config },
> { "CSC3551", "10431DA2", generic_dsd_config },
> { "CSC3551", "10431E02", generic_dsd_config },
> + { "CSC3551", "10431E12", generic_dsd_config },
> { "CSC3551", "10431EE2", generic_dsd_config },
> { "CSC3551", "10431F12", generic_dsd_config },
> { "CSC3551", "10431F1F", generic_dsd_config },
> diff --git a/sound/pci/hda/patch_realtek.c
> b/sound/pci/hda/patch_realtek.c
> index 7aa88ed04bde..16cb19eee589 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -9893,6 +9893,7 @@ static const struct snd_pci_quirk
> alc269_fixup_tbl[] = {
> SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH",
> ALC294_FIXUP_ASUS_DUAL_SPK),
> SND_PCI_QUIRK(0x1043, 0x1663, "ASUS GU603ZI/ZJ/ZQ/ZU/ZV",
> ALC285_FIXUP_ASUS_HEADSET_MIC),
> SND_PCI_QUIRK(0x1043, 0x1683, "ASUS UM3402YAR",
> ALC287_FIXUP_CS35L41_I2C_2),
> + SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS UX3402VA",
> ALC245_FIXUP_CS35L41_SPI_2),
> SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603",
> ALC289_FIXUP_ASUS_GA401),
> SND_PCI_QUIRK(0x1043, 0x16d3, "ASUS UX5304VA",
> ALC245_FIXUP_CS35L41_SPI_2),
> SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50",
> ALC269_FIXUP_STEREO_DMIC),
> @@ -9936,14 +9937,12 @@ static const struct snd_pci_quirk
> alc269_fixup_tbl[] = {
> SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420",
> ALC256_FIXUP_ASUS_HPE),
> SND_PCI_QUIRK(0x1043, 0x1da2, "ASUS UP6502ZA/ZD",
> ALC245_FIXUP_CS35L41_SPI_2),
> SND_PCI_QUIRK(0x1043, 0x1e02, "ASUS UX3402ZA",
> ALC245_FIXUP_CS35L41_SPI_2),
> - SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS UX3402VA",
> ALC245_FIXUP_CS35L41_SPI_2),
> - SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM",
> ALC245_FIXUP_CS35L41_SPI_2),
> SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15",
> ALC289_FIXUP_ASUS_GA502),
> - SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM6702RA/RC",
> ALC287_FIXUP_CS35L41_I2C_2),
> + SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM3402",
> ALC287_FIXUP_CS35L41_I2C_2),
> SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15",
> ALC294_FIXUP_ASUS_GU502_PINS),
> SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513",
> ALC294_FIXUP_ASUS_G513_PINS),
> SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15",
> ALC289_FIXUP_ASUS_GA401),
> - SND_PCI_QUIRK(0x1043, 0x1ee2, "ASUS UM3402",
> ALC287_FIXUP_CS35L41_I2C_2),
> + SND_PCI_QUIRK(0x1043, 0x1ee2, "ASUS UM6702RA/RC",
> ALC287_FIXUP_CS35L41_I2C_2),
> SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022",
> ALC289_FIXUP_ASUS_GA401),
> SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14",
> ALC289_FIXUP_ASUS_GA401),
> SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302",
> ALC287_FIXUP_CS35L41_I2C_2),
> --
> 2.40.1



2024-02-06 16:15:09

by Takashi Iwai

[permalink] [raw]
Subject: Re: [PATCH] ALSA: hda/realtek: cs35l41: Fix internal speaker support for ASUS UM3402 with missing DSD

On Tue, 06 Feb 2024 10:14:04 +0100,
Jean-Lo?c Charroud wrote:
>
> Fix device ID for "ASUS UM3402" and "ASUS UM6702RA/RC".
> Add DSD values for "ASUS UM3402" to cs35l41_config_table[].
> Reorder alc269_fixup_tbl[] by device id and remove duplicate QUIRK
> entry for device {0x1043, 0x1f62, "ASUS UX7602ZM"}.
>
> Signed-off-by: Jean-Lo?c Charroud <[email protected]>

The patch isn't cleanly applicable, the tabs and spaces got broken
likely by your mailer.
Could you fix your mailer setup and resubmit? At best with
git-send-email.


thanks,

Takashi