[PATCH v3 0/3] ASoC: qcom: x1e80100: allow WSA channel map override
From: Abel Vesa
Date: Thu Nov 05 2026 - 11:14:10 EST
The x1e80100 machine driver currently derives the WSA RX slot map only
from the runtime channel count and programs that map unconditionally in
.prepare(). This means userspace cannot override the speaker channel map
from UCM.
Add a small ALSA core helper to register channel map controls under a
custom name (so the WSA maps are not confused with the DP/HDMI
"Playback Channel Map" controls on the same card), a common helper to
translate SNDRV_CHMAP_* positions into Q6 PCM_CHANNEL_* slots, and
writable "WSA Playback Channel Map" / "WSA2 Playback Channel Map"
controls on the WSA backend PCMs in the x1e80100 machine driver.
Signed-off-by: Abel Vesa <abel.vesa@xxxxxxxxxxxxxxxx>
---
Prepared with help from an LLM-based assistant.
Changes in v3:
- Rebased on next-20261105.
- Switch to the approach suggested by Srini on v1: add
snd_pcm_add_named_chmap_ctls() to the ALSA core and register the WSA
channel map controls on the backend PCMs from late_probe, instead of
card-level mixer controls with a hand-rolled TLV callback. The v2
claim that no_pcm backend links have no PCM instance was wrong; they
get an internal PCM from soc_new_pcm().
- Use a per-WSA-port index for the stored channel map instead of
indexing by AFE port.
- Link to v2: https://patch.msgid.link/20260724-b4-sound-qcom-x1e80100-allow-ucm-channel-map-v2-0-2ca3c1250018@xxxxxxxxxxxxxxxx
Changes in v2:
- Rebased on next-20260723.
- Return 1 from the control put callback when the map changes.
- Allow up to six WSA channels for Glymur.
- Use WSA-specific control names.
- Expose standard ALSA channel maps through TLV data.
- Move the SNDRV_CHMAP_* to Q6 PCM_CHANNEL_* conversion helper into
qcom common code.
- Register card-level controls because the WSA backend links are no_pcm
and have no PCM instance available at card init.
- Link to v1: https://patch.msgid.link/20260610-sound-qcom-x1e80100-allow-ucm-channel-map-v1-1-9339724994f5@xxxxxxxxxxxxxxxx
---
Abel Vesa (2):
ASoC: qcom: common: Add SNDRV channel map to Q6 slot helper
ASoC: qcom: x1e80100: Allow userspace WSA RX chmap override
Srinivas Kandagatla (1):
ALSA: pcm: Add snd_pcm_add_named_chmap_ctls() for custom control names
include/sound/pcm.h | 6 ++
sound/core/pcm_lib.c | 48 +++++++++---
sound/soc/qcom/common.c | 30 +++++++
sound/soc/qcom/common.h | 1 +
sound/soc/qcom/x1e80100.c | 193 +++++++++++++++++++++++++++++++++++++++++++++-
5 files changed, 264 insertions(+), 14 deletions(-)
---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
change-id: 20260724-b4-sound-qcom-x1e80100-allow-ucm-channel-map-5b9ecb27c766
Best regards,
--
Abel