* [PATCH] ALSA: hda/realtek: Fix speaker on ASUS ExpertBook B7402FEA after Windows
@ 2026-11-22 21:58 Martin Szathmari
2026-11-24 12:53 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Martin Szathmari @ 2026-11-22 21:58 UTC (permalink / raw)
To: Takashi Iwai, Jaroslav Kysela; +Cc: linux-sound
On the ASUS ExpertBook B7402FEA (ALC294, SSID 1043:1b02), the internal
speaker is silent after a warm reboot from Windows. The Windows driver
leaves two vendor coefficients in a state that the generic init path
does not reset:
- COEF 0x66 bit 4 is set, which mutes the speaker.
- COEF 0x1b bit 10 is clear, which distorts the output once the
speaker is unmuted. This is the same bit ALC294_FIXUP_ASUS_COEF_1B
sets for the UX431DA.
A cold boot clears both. Comparing all 256 coefficients of node 0x20
after a cold boot and after a reboot from Windows showed five
differences; writing them back one at a time showed only these two
matter.
Add a fixup that clears COEF 0x66 bit 4 and sets COEF 0x1b bit 10 at
init, so they are also restored on resume. ALC294_FIXUP_ASUS_COEF_1B is
not reused because it chains to the GA401 pin fixup, which does not
apply to this machine.
Tested on a B7402FEA (BIOS 308): sound is clean after a reboot from
Windows, and after suspend/resume with both bits forced back to the
Windows values first.
Signed-off-by: Martin Szathmari <martin.szathmari@gmail.com>
---
Based on sound.git for-next.
Note: This patch was developed with the help of an AI coding assistant
(Claude Opus 5.5). I reviewed the change and tested it myself on my
ASUS ExpertBook B7402FEA as described above.
sound/hda/codecs/realtek/alc269.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index a6b5e8987..cdda02054 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -1116,6 +1116,21 @@ static void alc269vb_fixup_aspire_e1_coef(struct hda_codec *codec,
alc_update_coef_idx(codec, 0x0d, 0x6000, 0x6000);
}
+/*
+ * After a warm reboot from Windows, bit 4 of COEF 0x66 is left set, which
+ * mutes the internal speaker, and bit 10 of COEF 0x1b is left clear, which
+ * distorts the output. Restore both at init and resume.
+ */
+static void alc294_fixup_asus_spk_coefs(struct hda_codec *codec,
+ const struct hda_fixup *fix,
+ int action)
+{
+ if (action != HDA_FIXUP_ACT_INIT)
+ return;
+ alc_update_coef_idx(codec, 0x66, 1 << 4, 0);
+ alc_update_coef_idx(codec, 0x1b, 0, 1 << 10);
+}
+
static void alc269_fixup_pcm_44k(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
@@ -4372,6 +4387,7 @@ enum {
ALC294_FIXUP_ASUS_ALLY_VERBS,
ALC294_FIXUP_ASUS_HPE,
ALC294_FIXUP_ASUS_COEF_1B,
+ ALC294_FIXUP_ASUS_SPK_COEFS,
ALC294_FIXUP_ASUS_GX502_HP,
ALC294_FIXUP_ASUS_GX502_PINS,
ALC294_FIXUP_ASUS_GX502_VERBS,
@@ -6249,6 +6265,10 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true,
.chain_id = ALC289_FIXUP_ASUS_GA401,
},
+ [ALC294_FIXUP_ASUS_SPK_COEFS] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc294_fixup_asus_spk_coefs,
+ },
[ALC285_FIXUP_HP_GPIO_LED] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc285_fixup_hp_gpio_led,
@@ -8207,6 +8227,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x1a83, "ASUS UM5302LA", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x1043, 0x1a8e, "ASUS G712LWS", ALC294_FIXUP_LENOVO_MIC_LOCATION),
SND_PCI_QUIRK(0x1043, 0x1a8f, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2),
+ SND_PCI_QUIRK(0x1043, 0x1b02, "ASUS ExpertBook B7402FEA", ALC294_FIXUP_ASUS_SPK_COEFS),
SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B),
SND_PCI_QUIRK(0x1043, 0x1b13, "ASUS U41SV/GA403U", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC),
SND_PCI_QUIRK(0x1043, 0x1b93, "ASUS G614JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2),
--
2.56.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: hda/realtek: Fix speaker on ASUS ExpertBook B7402FEA after Windows
2026-11-22 21:58 [PATCH] ALSA: hda/realtek: Fix speaker on ASUS ExpertBook B7402FEA after Windows Martin Szathmari
@ 2026-11-24 12:53 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-11-24 12:53 UTC (permalink / raw)
To: Martin Szathmari; +Cc: Takashi Iwai, Jaroslav Kysela, linux-sound
On Sun, 22 Nov 2026 22:58:57 +0100,
Martin Szathmari wrote:
>
> On the ASUS ExpertBook B7402FEA (ALC294, SSID 1043:1b02), the internal
> speaker is silent after a warm reboot from Windows. The Windows driver
> leaves two vendor coefficients in a state that the generic init path
> does not reset:
>
> - COEF 0x66 bit 4 is set, which mutes the speaker.
> - COEF 0x1b bit 10 is clear, which distorts the output once the
> speaker is unmuted. This is the same bit ALC294_FIXUP_ASUS_COEF_1B
> sets for the UX431DA.
>
> A cold boot clears both. Comparing all 256 coefficients of node 0x20
> after a cold boot and after a reboot from Windows showed five
> differences; writing them back one at a time showed only these two
> matter.
>
> Add a fixup that clears COEF 0x66 bit 4 and sets COEF 0x1b bit 10 at
> init, so they are also restored on resume. ALC294_FIXUP_ASUS_COEF_1B is
> not reused because it chains to the GA401 pin fixup, which does not
> apply to this machine.
>
> Tested on a B7402FEA (BIOS 308): sound is clean after a reboot from
> Windows, and after suspend/resume with both bits forced back to the
> Windows values first.
>
> Signed-off-by: Martin Szathmari <martin.szathmari@gmail.com>
Applied to for-next branch. Thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-24 12:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22 21:58 [PATCH] ALSA: hda/realtek: Fix speaker on ASUS ExpertBook B7402FEA after Windows Martin Szathmari
2026-11-24 12:53 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox