All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda: add CSC3551 support for UM5302TA
@ 2022-07-03  5:32 ` xhe
  0 siblings, 0 replies; 6+ messages in thread
From: xhe @ 2022-07-03  5:32 UTC (permalink / raw)
  Cc: xw897002528, Xiaoyan Li, James Schulman, David Rhodes,
	Lucas Tanure, Richard Fitzgerald, Jaroslav Kysela, Takashi Iwai,
	Tim Crawford, Kai-Heng Feng, Werner Sembach, Cameron Berkenpas,
	Kailang Yang, Stefan Binding, Andy Chi, Yong Wu, alsa-devel,
	patches, linux-kernel

From: He Wang <xw897002528@gmail.com>

ASUS UM5302TA are using csc3551, or cs35l41, which is connected to the
laptop by I2C bus. This patch adds quirk for the sound card, and avoid
ACPI DSD things for i2c-multi-instantiate cases like CLSA0100.

Patch is made by XiaoYan Li. It is tested by us on ASUS UM5302TA.

Signed-off-by: He Wang <xw897002528@gmail.com>
Signed-off-by: Xiaoyan Li <lxy.lixiaoyan@gmail.com>
---
 sound/pci/hda/cs35l41_hda.c   | 2 +-
 sound/pci/hda/patch_realtek.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
index cce27a86267f..7374565ecf15 100644
--- a/sound/pci/hda/cs35l41_hda.c
+++ b/sound/pci/hda/cs35l41_hda.c
@@ -420,7 +420,7 @@ static int cs35l41_hda_read_acpi(struct cs35l41_hda *cs35l41, const char *hid, i
 	 * And devm functions expect that the device requesting the resource has the correct
 	 * fwnode.
 	 */
-	if (strncmp(hid, "CLSA0100", 8) != 0)
+	if (strncmp(hid, "CLSA0100", 8) != 0 && strncmp(hid, "CSC3551", 7) != 0)
 		return -EINVAL;
 
 	/* check I2C address to assign the index */
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index cee69fa7e246..49c27d948582 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -9138,6 +9138,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	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, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401),
+	SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302TA", ALC287_FIXUP_CS35L41_I2C_2),
 	SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
 	SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
 	SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] ALSA: hda: add CSC3551 support for UM5302TA
@ 2022-07-03  5:32 ` xhe
  0 siblings, 0 replies; 6+ messages in thread
From: xhe @ 2022-07-03  5:32 UTC (permalink / raw)
  Cc: Kai-Heng Feng, Stefan Binding, Kailang Yang, linux-kernel,
	Lucas Tanure, patches, Takashi Iwai, Xiaoyan Li, xw897002528,
	James Schulman, alsa-devel, Cameron Berkenpas,
	Richard Fitzgerald, Tim Crawford, Werner Sembach, David Rhodes,
	Yong Wu, Andy Chi

From: He Wang <xw897002528@gmail.com>

ASUS UM5302TA are using csc3551, or cs35l41, which is connected to the
laptop by I2C bus. This patch adds quirk for the sound card, and avoid
ACPI DSD things for i2c-multi-instantiate cases like CLSA0100.

Patch is made by XiaoYan Li. It is tested by us on ASUS UM5302TA.

Signed-off-by: He Wang <xw897002528@gmail.com>
Signed-off-by: Xiaoyan Li <lxy.lixiaoyan@gmail.com>
---
 sound/pci/hda/cs35l41_hda.c   | 2 +-
 sound/pci/hda/patch_realtek.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
index cce27a86267f..7374565ecf15 100644
--- a/sound/pci/hda/cs35l41_hda.c
+++ b/sound/pci/hda/cs35l41_hda.c
@@ -420,7 +420,7 @@ static int cs35l41_hda_read_acpi(struct cs35l41_hda *cs35l41, const char *hid, i
 	 * And devm functions expect that the device requesting the resource has the correct
 	 * fwnode.
 	 */
-	if (strncmp(hid, "CLSA0100", 8) != 0)
+	if (strncmp(hid, "CLSA0100", 8) != 0 && strncmp(hid, "CSC3551", 7) != 0)
 		return -EINVAL;
 
 	/* check I2C address to assign the index */
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index cee69fa7e246..49c27d948582 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -9138,6 +9138,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	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, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401),
+	SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302TA", ALC287_FIXUP_CS35L41_I2C_2),
 	SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
 	SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
 	SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ALSA: hda: add CSC3551 support for UM5302TA
  2022-07-03  5:32 ` xhe
@ 2022-07-04 10:15   ` Lucas Tanure
  -1 siblings, 0 replies; 6+ messages in thread
From: Lucas Tanure @ 2022-07-04 10:15 UTC (permalink / raw)
  To: xhe
  Cc: Kai-Heng Feng, Stefan Binding, Kailang Yang, linux-kernel,
	alsa-devel, Xiaoyan Li, patches, Takashi Iwai, Werner Sembach,
	Richard Fitzgerald, Tim Crawford, Andy Chi, Cameron Berkenpas,
	James Schulman, David Rhodes, Yong Wu

On 7/3/22 06:32, xhe wrote:
> From: He Wang <xw897002528@gmail.com>
>
> ASUS UM5302TA are using csc3551, or cs35l41, which is connected to the
> laptop by I2C bus. This patch adds quirk for the sound card, and avoid
> ACPI DSD things for i2c-multi-instantiate cases like CLSA0100.
>
> Patch is made by XiaoYan Li. It is tested by us on ASUS UM5302TA.
>
> Signed-off-by: He Wang <xw897002528@gmail.com>
> Signed-off-by: Xiaoyan Li <lxy.lixiaoyan@gmail.com>
> ---
>   sound/pci/hda/cs35l41_hda.c   | 2 +-
>   sound/pci/hda/patch_realtek.c | 1 +
>   2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
> index cce27a86267f..7374565ecf15 100644
> --- a/sound/pci/hda/cs35l41_hda.c
> +++ b/sound/pci/hda/cs35l41_hda.c
> @@ -420,7 +420,7 @@ static int cs35l41_hda_read_acpi(struct cs35l41_hda *cs35l41, const char *hid, i
>   	 * And devm functions expect that the device requesting the resource has the correct
>   	 * fwnode.
>   	 */
> -	if (strncmp(hid, "CLSA0100", 8) != 0)
> +	if (strncmp(hid, "CLSA0100", 8) != 0 && strncmp(hid, "CSC3551", 7) != 0)

Hi,

Sorry, but this is wrong. It's configuring the device as external boost, 
but the correct is internal boost for this device.

Before accepting any new laptops to be supported, we would like to get 
the Firmware support merged first.

Thanks

Lucas

>   		return -EINVAL;
>   
>   	/* check I2C address to assign the index */
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index cee69fa7e246..49c27d948582 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -9138,6 +9138,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
>   	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, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401),
> +	SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302TA", ALC287_FIXUP_CS35L41_I2C_2),
>   	SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
>   	SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
>   	SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ALSA: hda: add CSC3551 support for UM5302TA
@ 2022-07-04 10:15   ` Lucas Tanure
  0 siblings, 0 replies; 6+ messages in thread
From: Lucas Tanure @ 2022-07-04 10:15 UTC (permalink / raw)
  To: xhe
  Cc: Xiaoyan Li, James Schulman, David Rhodes, Richard Fitzgerald,
	Jaroslav Kysela, Takashi Iwai, Tim Crawford, Kai-Heng Feng,
	Werner Sembach, Cameron Berkenpas, Kailang Yang, Stefan Binding,
	Andy Chi, Yong Wu, alsa-devel, patches, linux-kernel

On 7/3/22 06:32, xhe wrote:
> From: He Wang <xw897002528@gmail.com>
>
> ASUS UM5302TA are using csc3551, or cs35l41, which is connected to the
> laptop by I2C bus. This patch adds quirk for the sound card, and avoid
> ACPI DSD things for i2c-multi-instantiate cases like CLSA0100.
>
> Patch is made by XiaoYan Li. It is tested by us on ASUS UM5302TA.
>
> Signed-off-by: He Wang <xw897002528@gmail.com>
> Signed-off-by: Xiaoyan Li <lxy.lixiaoyan@gmail.com>
> ---
>   sound/pci/hda/cs35l41_hda.c   | 2 +-
>   sound/pci/hda/patch_realtek.c | 1 +
>   2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c
> index cce27a86267f..7374565ecf15 100644
> --- a/sound/pci/hda/cs35l41_hda.c
> +++ b/sound/pci/hda/cs35l41_hda.c
> @@ -420,7 +420,7 @@ static int cs35l41_hda_read_acpi(struct cs35l41_hda *cs35l41, const char *hid, i
>   	 * And devm functions expect that the device requesting the resource has the correct
>   	 * fwnode.
>   	 */
> -	if (strncmp(hid, "CLSA0100", 8) != 0)
> +	if (strncmp(hid, "CLSA0100", 8) != 0 && strncmp(hid, "CSC3551", 7) != 0)

Hi,

Sorry, but this is wrong. It's configuring the device as external boost, 
but the correct is internal boost for this device.

Before accepting any new laptops to be supported, we would like to get 
the Firmware support merged first.

Thanks

Lucas

>   		return -EINVAL;
>   
>   	/* check I2C address to assign the index */
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index cee69fa7e246..49c27d948582 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -9138,6 +9138,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
>   	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, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401),
> +	SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302TA", ALC287_FIXUP_CS35L41_I2C_2),
>   	SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
>   	SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
>   	SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ALSA: hda: add CSC3551 support for UM5302TA
  2022-07-04 10:15   ` Lucas Tanure
  (?)
@ 2022-07-04 11:05   ` He X
  2022-07-04 11:53     ` Lucas Tanure
  -1 siblings, 1 reply; 6+ messages in thread
From: He X @ 2022-07-04 11:05 UTC (permalink / raw)
  To: Lucas Tanure; +Cc: linux-kernel

> Before accepting any new laptops to be supported, we would like to get
the Firmware support merged first.

You mean if the firmware is loaded, the ACPI will be fixed?

But I have no idea where the firmware is. I can not find it in the
audio driver. Any advice for that?

Thanks

He Wang

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ALSA: hda: add CSC3551 support for UM5302TA
  2022-07-04 11:05   ` He X
@ 2022-07-04 11:53     ` Lucas Tanure
  0 siblings, 0 replies; 6+ messages in thread
From: Lucas Tanure @ 2022-07-04 11:53 UTC (permalink / raw)
  To: He X; +Cc: linux-kernel, patches


On 7/4/22 12:05, He X wrote:
>> Before accepting any new laptops to be supported, we would like to get
> the Firmware support merged first.
>
> You mean if the firmware is loaded, the ACPI will be fixed?

No. I mean that we are in the middle of merging the Firmware support in 
this driver,

so would like to wait for that to finish before accepting any other 
patch for this driver.

>
> But I have no idea where the firmware is. I can not find it in the
> audio driver. Any advice for that?
>
> Thanks
>
> He Wang

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-04 11:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-03  5:32 [PATCH] ALSA: hda: add CSC3551 support for UM5302TA xhe
2022-07-03  5:32 ` xhe
2022-07-04 10:15 ` Lucas Tanure
2022-07-04 10:15   ` Lucas Tanure
2022-07-04 11:05   ` He X
2022-07-04 11:53     ` Lucas Tanure

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.