* [PATCH 1/3] ALSA: hda/realtek: Fix DAC binding for Lenovo Legion Pro 7 16ARX8H
@ 2026-11-04 10:04 Zhang Heng
2026-11-04 10:04 ` [PATCH 2/3] ALSA: hda/realtek: Fix DAC binding for Legion Pro 7 16ARX8H variant Zhang Heng
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Zhang Heng @ 2026-11-04 10:04 UTC (permalink / raw)
To: tiwai, perex, kailang
Cc: linux-sound, linux-kernel, Zhang Heng, Roman Maidanovych via B4 Relay
The Lenovo Legion Pro 7 16ARX8H (SSID 17aa:38a7) uses the TAS2781
I2C DAC. The generic ALC287_FIXUP_TAS2781_I2C quirk assumes two
speakers (0x14 and 0x17). It forcibly binds 0x14 to DAC 0x02, and
binds 0x17 and 0x21 to DAC 0x03.
However, this machine only has 0x17 as the speaker and lacks 0x14,
which leads to incorrect DAC binding. To fix this, chain the
alc295_fixup_asus_dacs() fixup before the generic quirk to ensure
the correct DAC routing for this hardware layout.
Tested-by: Roman Maidanovych via B4 Relay <devnull+devuarpd.gmail.com@kernel.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=221735
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
---
sound/hda/codecs/realtek/alc269.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index a75204d32865..f9dc1e1f3b38 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -4553,6 +4553,7 @@ enum {
ALC256_FIXUP_IPASON_SMARTBOOK_S1,
ALC256_FIXUP_ASUS_SPEAKER_COEFS,
ALC245_FIXUP_MINISFORUM_V3_MIC_NO_PRESENCE,
+ ALC287_FIXUP_TAS2781_I2C_DAC,
};
/* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -7061,6 +7062,12 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true,
.chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
},
+ [ALC287_FIXUP_TAS2781_I2C_DAC] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc295_fixup_asus_dacs,
+ .chained_before = true,
+ .chain_id = ALC287_FIXUP_TAS2781_I2C,
+ },
[ALC287_FIXUP_ASUS_ALLY_X] = {
.type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) {
@@ -8568,7 +8575,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
HDA_CODEC_QUIRK(0x17aa, 0x386a, "Lenovo Yoga 7 16IAP7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
HDA_CODEC_QUIRK(0x17aa, 0x386e, "Legion Y9000X 2022 IAH7", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x17aa, 0x386e, "Yoga Pro 7 14ARP8", ALC285_FIXUP_YOGA_SPEAKER2_TO_DAC1),
- HDA_CODEC_QUIRK(0x17aa, 0x38a7, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C), /* this must match before PCI SSID 17aa:386f below */
+ HDA_CODEC_QUIRK(0x17aa, 0x38a7, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C_DAC), /* this must match before PCI SSID 17aa:386f below */
HDA_CODEC_QUIRK(0x17aa, 0x38a8, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C), /* this must match before PCI SSID 17aa:386f below */
SND_PCI_QUIRK(0x17aa, 0x386f, "Legion Pro 7i 16IAX7", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x17aa, 0x3870, "Lenovo Yoga 7 14ARB7", ALC287_FIXUP_YOGA7_14ARB7_I2C),
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 2/3] ALSA: hda/realtek: Fix DAC binding for Legion Pro 7 16ARX8H variant
2026-11-04 10:04 [PATCH 1/3] ALSA: hda/realtek: Fix DAC binding for Lenovo Legion Pro 7 16ARX8H Zhang Heng
@ 2026-11-04 10:04 ` Zhang Heng
2026-11-04 10:04 ` [PATCH 3/3] ALSA: hda/realtek: Fix pop noise on ASUS PRIME B650M-K Zhang Heng
2026-11-04 14:41 ` [PATCH 1/3] ALSA: hda/realtek: Fix DAC binding for Lenovo Legion Pro 7 16ARX8H Takashi Iwai
2 siblings, 0 replies; 4+ messages in thread
From: Zhang Heng @ 2026-11-04 10:04 UTC (permalink / raw)
To: tiwai, perex, kailang; +Cc: linux-sound, linux-kernel, Zhang Heng
Similar to SSID 17aa:38a7, the Lenovo Legion Pro 7 16ARX8H variant
(SSID 17aa:38a8) also lacks the 0x14 speaker node. The generic
ALC287_FIXUP_TAS2781_I2C quirk assumes the presence of 0x14 and
will result in incorrect DAC bindings on this machine.
Link: https://lore.kernel.org/all/CAGPQRHYXcbWTiKpCANEQ1mq9aUHM=v82T231fw7Ld=C-NM4+Bw@mail.gmail.com/
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
---
sound/hda/codecs/realtek/alc269.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index f9dc1e1f3b38..62760d98e050 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -8576,7 +8576,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
HDA_CODEC_QUIRK(0x17aa, 0x386e, "Legion Y9000X 2022 IAH7", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x17aa, 0x386e, "Yoga Pro 7 14ARP8", ALC285_FIXUP_YOGA_SPEAKER2_TO_DAC1),
HDA_CODEC_QUIRK(0x17aa, 0x38a7, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C_DAC), /* this must match before PCI SSID 17aa:386f below */
- HDA_CODEC_QUIRK(0x17aa, 0x38a8, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C), /* this must match before PCI SSID 17aa:386f below */
+ HDA_CODEC_QUIRK(0x17aa, 0x38a8, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C_DAC), /* this must match before PCI SSID 17aa:386f below */
SND_PCI_QUIRK(0x17aa, 0x386f, "Legion Pro 7i 16IAX7", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x17aa, 0x3870, "Lenovo Yoga 7 14ARB7", ALC287_FIXUP_YOGA7_14ARB7_I2C),
SND_PCI_QUIRK(0x17aa, 0x3871, "Lenovo ThinkBook 16p Gen 3 ARH", ALC287_FIXUP_YOGA7_14ARB7_I2C),
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 3/3] ALSA: hda/realtek: Fix pop noise on ASUS PRIME B650M-K
2026-11-04 10:04 [PATCH 1/3] ALSA: hda/realtek: Fix DAC binding for Lenovo Legion Pro 7 16ARX8H Zhang Heng
2026-11-04 10:04 ` [PATCH 2/3] ALSA: hda/realtek: Fix DAC binding for Legion Pro 7 16ARX8H variant Zhang Heng
@ 2026-11-04 10:04 ` Zhang Heng
2026-11-04 14:41 ` [PATCH 1/3] ALSA: hda/realtek: Fix DAC binding for Lenovo Legion Pro 7 16ARX8H Takashi Iwai
2 siblings, 0 replies; 4+ messages in thread
From: Zhang Heng @ 2026-11-04 10:04 UTC (permalink / raw)
To: tiwai, perex, kailang
Cc: linux-sound, linux-kernel, Zhang Heng, Catalonia_State
The ASUS PRIME B650M-K motherboard with the ALC897 codec produces a
loud "pop" noise from the audio outputs when the driver initializes
the codec during boot.
Add a specific fixup to toggle the EAPD pin (disable, wait 200ms,
then re-enable) during the initialization phase to eliminate the pop.
Tested-by: Catalonia_State <alejandrolibre@disroot.org>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=222096
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
---
sound/hda/codecs/realtek/alc662.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/sound/hda/codecs/realtek/alc662.c b/sound/hda/codecs/realtek/alc662.c
index c1c7277b6754..a0efd4596c88 100644
--- a/sound/hda/codecs/realtek/alc662.c
+++ b/sound/hda/codecs/realtek/alc662.c
@@ -284,6 +284,21 @@ static void alc662_fixup_csl_amp(struct hda_codec *codec,
}
}
+static void alc897_fixup_asus_b650m_depop(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ if (action != HDA_FIXUP_ACT_INIT)
+ return;
+
+ alc_auto_setup_eapd(codec, false);
+ snd_hda_codec_write(codec, 0x1b, 0,
+ AC_VERB_SET_EAPD_BTLENABLE, 0);
+ msleep(200);
+ alc_auto_setup_eapd(codec, true);
+ snd_hda_codec_write(codec, 0x1b, 0,
+ AC_VERB_SET_EAPD_BTLENABLE, 2);
+}
+
enum {
ALC662_FIXUP_ASPIRE,
ALC662_FIXUP_LED_GPIO1,
@@ -345,6 +360,7 @@ enum {
ALC662_FIXUP_CSL_GPIO,
ALC897_FIXUP_BEELINK_SER6_AMP,
ALC897_FIXUP_LIMIT_LINEIN_BOOST,
+ ALC897_FIXUP_ASUS_B650M_DEPOP,
};
static const struct hda_fixup alc662_fixups[] = {
@@ -810,6 +826,10 @@ static const struct hda_fixup alc662_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc897_fixup_limit_linein_boost,
},
+ [ALC897_FIXUP_ASUS_B650M_DEPOP] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc897_fixup_asus_b650m_depop,
+ },
};
static const struct hda_quirk alc662_fixup_tbl[] = {
@@ -858,6 +878,7 @@ static const struct hda_quirk alc662_fixup_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x1b73, "ASUS N55SF", ALC662_FIXUP_BASS_16),
SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_MODE4_CHMAP),
SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT),
+ SND_PCI_QUIRK(0x1043, 0x87fb, "ASUS PRIME B650M-K", ALC897_FIXUP_ASUS_B650M_DEPOP),
SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2),
SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),
SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE),
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 1/3] ALSA: hda/realtek: Fix DAC binding for Lenovo Legion Pro 7 16ARX8H
2026-11-04 10:04 [PATCH 1/3] ALSA: hda/realtek: Fix DAC binding for Lenovo Legion Pro 7 16ARX8H Zhang Heng
2026-11-04 10:04 ` [PATCH 2/3] ALSA: hda/realtek: Fix DAC binding for Legion Pro 7 16ARX8H variant Zhang Heng
2026-11-04 10:04 ` [PATCH 3/3] ALSA: hda/realtek: Fix pop noise on ASUS PRIME B650M-K Zhang Heng
@ 2026-11-04 14:41 ` Takashi Iwai
2 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2026-11-04 14:41 UTC (permalink / raw)
To: Zhang Heng
Cc: tiwai, perex, kailang, linux-sound, linux-kernel,
Roman Maidanovych via B4 Relay
On Wed, 04 Nov 2026 11:04:25 +0100,
Zhang Heng wrote:
>
> The Lenovo Legion Pro 7 16ARX8H (SSID 17aa:38a7) uses the TAS2781
> I2C DAC. The generic ALC287_FIXUP_TAS2781_I2C quirk assumes two
> speakers (0x14 and 0x17). It forcibly binds 0x14 to DAC 0x02, and
> binds 0x17 and 0x21 to DAC 0x03.
>
> However, this machine only has 0x17 as the speaker and lacks 0x14,
> which leads to incorrect DAC binding. To fix this, chain the
> alc295_fixup_asus_dacs() fixup before the generic quirk to ensure
> the correct DAC routing for this hardware layout.
>
> Tested-by: Roman Maidanovych via B4 Relay <devnull+devuarpd.gmail.com@kernel.org>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=221735
> Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Applied all three patches now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-04 14:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 10:04 [PATCH 1/3] ALSA: hda/realtek: Fix DAC binding for Lenovo Legion Pro 7 16ARX8H Zhang Heng
2026-11-04 10:04 ` [PATCH 2/3] ALSA: hda/realtek: Fix DAC binding for Legion Pro 7 16ARX8H variant Zhang Heng
2026-11-04 10:04 ` [PATCH 3/3] ALSA: hda/realtek: Fix pop noise on ASUS PRIME B650M-K Zhang Heng
2026-11-04 14:41 ` [PATCH 1/3] ALSA: hda/realtek: Fix DAC binding for Lenovo Legion Pro 7 16ARX8H Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®