Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] ALSA: hda/realtek: Sort Ally X properly, fix Asus Z13 2025 audio
@ 2025-02-24 16:10 Antheas Kapenekakis
  2025-02-24 16:10 ` [PATCH 1/2] ALSA: hda/realtek: Remove dup Ally X config Antheas Kapenekakis
  2025-02-24 16:10 ` [PATCH 2/2] ALSA: hda/realtek: Fix Asus Z13 2025 audio Antheas Kapenekakis
  0 siblings, 2 replies; 7+ messages in thread
From: Antheas Kapenekakis @ 2025-02-24 16:10 UTC (permalink / raw)
  To: linux-sound, kailang
  Cc: linux-kernel, perex, tiwai, baojun.xu, simont,
	Antheas Kapenekakis

The Ally X has two quirks in the kernel currently. This is due to the
previous quirk not being sorted properly, whoopsies. Therefore, only one
has to stay. During AB testing, I found that the Lenovo quirk makes a
popping sound during boot. Therefore the better quirk is the previous one.

This also mirrors our initial testing last August, where creating that
custom quirk fixed the popping sound over re-using the existing
Lenovo TAS quirk.

Then, add the Asus Z13 2025 quirk to the list. When looking into its dsdt
file, it was found to be identical to the original Ally. Therefore, borrow
its quirk. After using the quirk, sound works properly. However, the kernel
loads the default firmware for it, resulting in subpar sound quality.

After looking into the Windows driver files, the following files were
identified to be the correct ones for it:

Playback_6.83.0/Firmware/CS35L41/RevB2/halo_cspl_RAM_revB2_29.85.0.wmfw
tunings/ASUS_GZ302EA_10431FB3_241018/10431FB3_241018_V01_A0.bin
tunings/ASUS_GZ302EA_10431FB3_241018/10431FB3_241018_V01_A0_cal.bin
tunings/ASUS_GZ302EA_10431FB3_241018/10431FB3_241018_V01_A1.bin
tunings/ASUS_GZ302EA_10431FB3_241018/10431FB3_241018_V01_A1_cal.bin

Which the kernel expects to be named as:

cirrus/cs35l41-dsp1-spk-prot-10431fb3.wmfw
cirrus/cs35l41-dsp1-spk-prot-10431fb3-r0.bin
cirrus/cs35l41-dsp1-spk-prot-10431fb3-l0.bin
cirrus/cs35l41-dsp1-spk-cali-10431fb3-r0.bin
cirrus/cs35l41-dsp1-spk-cali-10431fb3-l0.bin

where A0 corresponds to r0.

Therefore, +cc Simon Trimmer who often uploads firmware for these devices.

Antheas Kapenekakis (2):
  ALSA: hda/realtek: Remove dup Ally X config
  ALSA: hda/realtek: Fix Asus Z13 2025 audio

 sound/pci/hda/patch_realtek.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.48.1


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

* [PATCH 1/2] ALSA: hda/realtek: Remove dup Ally X config
  2025-02-24 16:10 [PATCH 0/2] ALSA: hda/realtek: Sort Ally X properly, fix Asus Z13 2025 audio Antheas Kapenekakis
@ 2025-02-24 16:10 ` Antheas Kapenekakis
  2025-02-24 16:10 ` [PATCH 2/2] ALSA: hda/realtek: Fix Asus Z13 2025 audio Antheas Kapenekakis
  1 sibling, 0 replies; 7+ messages in thread
From: Antheas Kapenekakis @ 2025-02-24 16:10 UTC (permalink / raw)
  To: linux-sound, kailang
  Cc: linux-kernel, perex, tiwai, baojun.xu, simont,
	Antheas Kapenekakis

In commit 1e9c708dc3ae ("ALSA: hda/tas2781: Add new quirk for Lenovo,
ASUS, Dell projects") Baojun adds a bunch of projects to the file,
including for the Ally X. Turns out the initial Ally X was not sorted
properly, so the kernel had 2 quirks for it.

The previous quirk overrode the new one due to being earlier and they
are different. When AB testing, it was found that the Ally X makes a
popping sound during boot when using the (new) Lenovo quirk.

Therefore, keep using the previous custom quirk for the Ally X and sort
it properly, replacing the one added by Baojun.

Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
---
 sound/pci/hda/patch_realtek.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 224616fbec4f..1771e3b5618d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -10644,7 +10644,6 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS),
 	SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK),
 	SND_PCI_QUIRK(0x1043, 0x17f3, "ROG Ally NR2301L/X", ALC294_FIXUP_ASUS_ALLY),
-	SND_PCI_QUIRK(0x1043, 0x1eb3, "ROG Ally X RC72LA", ALC294_FIXUP_ASUS_ALLY_X),
 	SND_PCI_QUIRK(0x1043, 0x1863, "ASUS UX6404VI/VV", ALC245_FIXUP_CS35L41_SPI_2),
 	SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS),
 	SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
@@ -10691,7 +10690,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1043, 0x1e63, "ASUS H7606W", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
 	SND_PCI_QUIRK(0x1043, 0x1e83, "ASUS GA605W", ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1),
 	SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401),
-	SND_PCI_QUIRK(0x1043, 0x1eb3, "ASUS Ally RCLA72", ALC287_FIXUP_TAS2781_I2C),
+	SND_PCI_QUIRK(0x1043, 0x1eb3, "ROG Ally X RC72LA", ALC294_FIXUP_ASUS_ALLY_X),
 	SND_PCI_QUIRK(0x1043, 0x1ed3, "ASUS HN7306W", 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),
-- 
2.48.1


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

* [PATCH 2/2] ALSA: hda/realtek: Fix Asus Z13 2025 audio
  2025-02-24 16:10 [PATCH 0/2] ALSA: hda/realtek: Sort Ally X properly, fix Asus Z13 2025 audio Antheas Kapenekakis
  2025-02-24 16:10 ` [PATCH 1/2] ALSA: hda/realtek: Remove dup Ally X config Antheas Kapenekakis
@ 2025-02-24 16:10 ` Antheas Kapenekakis
  2025-02-24 16:53   ` Stefan Binding (Opensource)
  1 sibling, 1 reply; 7+ messages in thread
From: Antheas Kapenekakis @ 2025-02-24 16:10 UTC (permalink / raw)
  To: linux-sound, kailang
  Cc: linux-kernel, perex, tiwai, baojun.xu, simont,
	Antheas Kapenekakis, Kyle Gospodnetich

dsdt entry is the same as the original Ally, so borrow its quirks.
Sound works in both speakers, headphones, and microphone. Whereas
none worked before.

Tested-by: Kyle Gospodnetich <me@kylegospodneti.ch>
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
---
 sound/pci/hda/patch_realtek.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 1771e3b5618d..62c77db73df9 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -10699,6 +10699,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1043, 0x1f1f, "ASUS H7604JI/JV/J3D", ALC245_FIXUP_CS35L41_SPI_2),
 	SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM", ALC245_FIXUP_CS35L41_SPI_2),
 	SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401),
+	SND_PCI_QUIRK(0x1043, 0x1fb3, "ASUS ROG Flow Z13 GZ302EA", ALC294_FIXUP_ASUS_ALLY),
 	SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
 	SND_PCI_QUIRK(0x1043, 0x31d0, "ASUS Zen AIO 27 Z272SD_A272SD", ALC274_FIXUP_ASUS_ZEN_AIO_27),
 	SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
-- 
2.48.1


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

* RE: [PATCH 2/2] ALSA: hda/realtek: Fix Asus Z13 2025 audio
  2025-02-24 16:10 ` [PATCH 2/2] ALSA: hda/realtek: Fix Asus Z13 2025 audio Antheas Kapenekakis
@ 2025-02-24 16:53   ` Stefan Binding (Opensource)
  2025-02-24 17:02     ` Antheas Kapenekakis
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Binding (Opensource) @ 2025-02-24 16:53 UTC (permalink / raw)
  To: 'Antheas Kapenekakis', linux-sound, kailang
  Cc: linux-kernel, perex, tiwai, baojun.xu, simont,
	'Kyle Gospodnetich'

Hi,

> -----Original Message-----
> From: Antheas Kapenekakis <lkml@antheas.dev>
> Sent: Monday, February 24, 2025 4:10 PM
> To: linux-sound@vger.kernel.org; kailang@realtek.com
> Cc: linux-kernel@vger.kernel.org; perex@perex.cz; tiwai@suse.com;
> baojun.xu@ti.com; simont@opensource.cirrus.com; Antheas Kapenekakis
> <lkml@antheas.dev>; Kyle Gospodnetich <me@kylegospodneti.ch>
> Subject: [PATCH 2/2] ALSA: hda/realtek: Fix Asus Z13 2025 audio
> 
> dsdt entry is the same as the original Ally, so borrow its quirks.
> Sound works in both speakers, headphones, and microphone. Whereas none
> worked before.

This laptop is in the list of laptops that I was planning to upstream, but I
am currently waiting on testing for this generation of laptops.
The Ally fixups do some extra stuff in the Realtek driver, which may or may
not apply to this laptop.  I believe the minimum fixup required for this
laptop is ALC287_FIXUP_CS35L41_I2C_2, but I don't have the laptop to test
that.
If possible, could you provide an acpidump of this system, so I can compare
against what I have?

It would be better to wait until we have tested this generation of laptops,
after which I can upstream the kernel patches to support them, as well as
the firmware.

Thanks,
Stefan

> 
> Tested-by: Kyle Gospodnetich <me@kylegospodneti.ch>
> Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
> ---
>  sound/pci/hda/patch_realtek.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index 1771e3b5618d..62c77db73df9 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -10699,6 +10699,7 @@ static const struct hda_quirk alc269_fixup_tbl[] =
{
>  	SND_PCI_QUIRK(0x1043, 0x1f1f, "ASUS H7604JI/JV/J3D",
> ALC245_FIXUP_CS35L41_SPI_2),
>  	SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM",
> ALC245_FIXUP_CS35L41_SPI_2),
>  	SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16",
> ALC289_FIXUP_ASUS_GA401),
> +	SND_PCI_QUIRK(0x1043, 0x1fb3, "ASUS ROG Flow Z13 GZ302EA",
> +ALC294_FIXUP_ASUS_ALLY),
>  	SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE",
> ALC256_FIXUP_ASUS_AIO_GPIO2),
>  	SND_PCI_QUIRK(0x1043, 0x31d0, "ASUS Zen AIO 27 Z272SD_A272SD",
> ALC274_FIXUP_ASUS_ZEN_AIO_27),
>  	SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR",
> ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
> --
> 2.48.1
> 



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

* Re: [PATCH 2/2] ALSA: hda/realtek: Fix Asus Z13 2025 audio
  2025-02-24 16:53   ` Stefan Binding (Opensource)
@ 2025-02-24 17:02     ` Antheas Kapenekakis
  2025-02-24 17:05       ` Antheas Kapenekakis
  0 siblings, 1 reply; 7+ messages in thread
From: Antheas Kapenekakis @ 2025-02-24 17:02 UTC (permalink / raw)
  To: Stefan Binding (Opensource)
  Cc: linux-sound, kailang, linux-kernel, perex, tiwai, baojun.xu,
	simont, Kyle Gospodnetich

Hi Stefan,

> If possible, could you provide an acpidump of this system, so I can compare
> against what I have?

sure, see [1]

Antheas

[1] https://github.com/hhd-dev/hwinfo/blob/5bb16fa59f533e036e430016f2c85facd0325f5a/devices/Asus%20Z13%202025/decoded/dsdt.dsl

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

* Re: [PATCH 2/2] ALSA: hda/realtek: Fix Asus Z13 2025 audio
  2025-02-24 17:02     ` Antheas Kapenekakis
@ 2025-02-24 17:05       ` Antheas Kapenekakis
  2025-02-24 17:38         ` Antheas Kapenekakis
  0 siblings, 1 reply; 7+ messages in thread
From: Antheas Kapenekakis @ 2025-02-24 17:05 UTC (permalink / raw)
  To: Stefan Binding (Opensource)
  Cc: linux-sound, kailang, linux-kernel, perex, tiwai, baojun.xu,
	simont, Kyle Gospodnetich

You are indeed right Stefan, during grepping i got 16 results for
ALC294_FIXUP_ASUS_ALLY so I thought it was used more.

My mistake. I can also try the base 2c fixup

Antheas

On Mon, 24 Feb 2025 at 18:02, Antheas Kapenekakis <lkml@antheas.dev> wrote:
>
> Hi Stefan,
>
> > If possible, could you provide an acpidump of this system, so I can compare
> > against what I have?
>
> sure, see [1]
>
> Antheas
>
> [1] https://github.com/hhd-dev/hwinfo/blob/5bb16fa59f533e036e430016f2c85facd0325f5a/devices/Asus%20Z13%202025/decoded/dsdt.dsl

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

* Re: [PATCH 2/2] ALSA: hda/realtek: Fix Asus Z13 2025 audio
  2025-02-24 17:05       ` Antheas Kapenekakis
@ 2025-02-24 17:38         ` Antheas Kapenekakis
  0 siblings, 0 replies; 7+ messages in thread
From: Antheas Kapenekakis @ 2025-02-24 17:38 UTC (permalink / raw)
  To: Stefan Binding (Opensource)
  Cc: linux-sound, kailang, linux-kernel, perex, tiwai, baojun.xu,
	simont, Kyle Gospodnetich

Sounds about the same, perhaps a bit better. I'll swap to that one for
our use and for when/if there is a V2.

Any tips about going through this stuff are well appreciated. Online
documentation is very sparse

On that note, what's the timeline for adding support to these laptops?

And speaking of a V2, the Ally X quirk is a bit suspect. Yes it fixes
the popping during boot, but which part of it does that? It is very
long and touches a different amp quirk in the process I'd say, so it
would be nice to clean up. Let's forget about the original Ally, but
the Ally X is still relevant.

Of course, I do not expect an answer from you Stefan, as it is a
competitor amp, haha. This is mostly for Baojun et al.

Best,
Antheas

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

end of thread, other threads:[~2025-02-24 17:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-24 16:10 [PATCH 0/2] ALSA: hda/realtek: Sort Ally X properly, fix Asus Z13 2025 audio Antheas Kapenekakis
2025-02-24 16:10 ` [PATCH 1/2] ALSA: hda/realtek: Remove dup Ally X config Antheas Kapenekakis
2025-02-24 16:10 ` [PATCH 2/2] ALSA: hda/realtek: Fix Asus Z13 2025 audio Antheas Kapenekakis
2025-02-24 16:53   ` Stefan Binding (Opensource)
2025-02-24 17:02     ` Antheas Kapenekakis
2025-02-24 17:05       ` Antheas Kapenekakis
2025-02-24 17:38         ` Antheas Kapenekakis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox