[PATCH v2] ALSA: hda: cs35l41: Enable VSPK on UX3405CA when ACPI leaves GPIO1 unused
Gemayel Lira <[email protected]>
| Newsgroups | gmane.linux.sound,gmane.linux.alsa.devel |
|---|---|
| Message-ID | <CAD96ZTJzEwiNwJm4ujLS4+X_KChi4+_sD0j-m+aE+_9i+eUGcA@mail.gmail.com> |
v1 mapped 10431A63 to generic_dsd_config and INTERNAL boost. Stefan Binding
rejected that: this laptop is external boost, and overriding the ACPI _DSD
as internal can damage the amplifiers. Takashi agreed not to take v1.
v1 also loaded fallback firmware (SPKID: -19). After some S3 resumes the
right amp failed with PM resume -110, then SPI -16 (EBUSY) until reboot.
This v2 keeps Binding's missing_speaker_id_gpio2 parse of the existing
_DSD (external boost, shared reset, gpio2 = IRQ, speaker-id at CRS index
2). ACPI sets cirrus,gpio1-func to VSPK (1) on the left amp and unused (0)
on the right, so the right channel binds with VSPK: 0 and volume drops
about one second after playback. After parse_acpi, enable VSPK on GPIO1
only when ACPI left it unused. Boost type is unchanged.
Tested: ASUS Zenbook 14 UX3405CA, Ubuntu kernel 7.0.0-27-generic.
Both amps: VSPK: 1, SPKID: 1, firmware
spk-prot-10431a63-spkid1-{l,r}0.bin. One S3 (deep): both amps reloaded
firmware, no -110/-16.
ACPI _DSD (SSDT SPKRAMPS), excerpt:
cirrus,gpio1-func: 1, 0
cirrus,gpio2-func: 2, 2
cirrus,boost-type: 1, 1
reset-gpios: shared CRS index 1
spk-id-gpios: missing (CRS index 2)
dmesg after this quirk:
CS35L41 Bound - SSID: 10431A63, BST: 1, VSPK: 1, CH: L, FW EN: 1, SPKID: 1
CS35L41 Bound - SSID: 10431A63, BST: 1, VSPK: 1, CH: R, FW EN: 1, SPKID: 1
v1: https://lore.kernel.org/linux-sound/CAD96ZT+SnRnGr4Xd+NJkkVNpj8XrzL3Ete=pRgz05mqxAzbU2w@mail.gmail.com/
From c325bb06bb37fd658f0250dc8571b5bb6b2c7dbf Mon Sep 17 00:00:00 2001
From: Gemayel Lira <[email protected]>
Date: Sat, 15 Aug 2026 17:16:18 -0300
Subject: [PATCH v2] ALSA: hda: cs35l41: Enable VSPK on UX3405CA when ACPI leaves
GPIO1 unused
The ASUS Zenbook 14 UX3405CA (SSID 1043:1A63) already has a valid _DSD
and uses missing_speaker_id_gpio2. ACPI sets cirrus,gpio1-func to VSPK
on the left amplifier and unused on the right, so the right channel
binds with VSPK: 0 and volume drops shortly after playback starts.
After parsing ACPI, enable VSPK on GPIO1 when it was left unused.
Signed-off-by: Gemayel Lira <[email protected]>
---
Changes in v2:
- Do not map 10431A63 to generic_dsd_config / INTERNAL boost. Stefan
Binding rejected v1: this laptop is external boost, and that override
can damage the amplifiers.
- Keep missing_speaker_id_gpio2 and enable VSPK only when ACPI left
GPIO1 unused. Boost type is unchanged.
- v1 loaded fallback firmware (SPKID: -19) and, after some S3 resumes,
hit PM -110 then SPI -16 (EBUSY) on the right amp. This v2 binds
SPKID: 1 and official spk-prot-10431a63 firmware.
v1: Message-ID:
<CAD96ZT+SnRnGr4Xd+NJkkVNpj8XrzL3Ete=pRgz05mqxAzbU2w@mail.gmail.com>
.../hda/codecs/side-codecs/cs35l41_hda_property.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/sound/hda/codecs/side-codecs/cs35l41_hda_property.c
b/sound/hda/codecs/side-codecs/cs35l41_hda_property.c
index 416d7bf..0c09094 100644
--- a/sound/hda/codecs/side-codecs/cs35l41_hda_property.c
+++ b/sound/hda/codecs/side-codecs/cs35l41_hda_property.c
@@ -450,7 +450,20 @@ static int missing_speaker_id_gpio2(struct
cs35l41_hda *cs35l41, struct device *
return ret;
}
- return cs35l41_hda_parse_acpi(cs35l41, physdev, id);
+ ret = cs35l41_hda_parse_acpi(cs35l41, physdev, id);
+ if (ret)
+ return ret;
+
+ /*
+ * ACPI on 10431A63 sets gpio1 to VSPK on the left amp and unused
+ * on the right, so the right channel binds with VSPK: 0.
+ */
+ if (cs35l41->hw_cfg.gpio1.func == CS35L41_NOT_USED) {
+ cs35l41->hw_cfg.gpio1.func = CS35l41_VSPK_SWITCH;
+ cs35l41->hw_cfg.gpio1.valid = true;
+ }
+
+ return 0;
}
struct cs35l41_prop_model {
--
2.53.0