Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH v4 0/4] ASoC: qcom: x1e80100: allow WSA channel map override
@ 2026-11-24 10:57 Abel Vesa
  2026-11-24 10:57 ` [PATCH v4 1/4] ALSA: pcm: Add snd_pcm_add_named_chmap_ctls() for custom control names Abel Vesa
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Abel Vesa @ 2026-11-24 10:57 UTC (permalink / raw)
  To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai
  Cc: Srinivas Kandagatla, linux-sound, linux-arm-msm, linux-kernel,
	Abel Vesa

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@oss.qualcomm.com>
---
Changes in v4:
- Rebased on next-20261123.
- Report the default channel map for the last prepared channel count
  until userspace selects one, instead of zeros (Mark)
- Refuse channel map writes while the backend is prepared, since the
  map only takes effect at prepare time (Mark)
- New patch: advertise writable chmap controls as
  SNDRV_CTL_TLVT_CHMAP_VAR in the ALSA core TLV callback (Mark)
- Apply the selected map only when it describes exactly the prepared
  channel count and reject maps with unset positions in the middle
  (Sashiko)
- Snapshot the map under a lock in prepare (Sashiko)
- Not addressed: AudioReach still rejects more than four channels, so
  six-channel WSA playback needs separate work there (Sashiko)
- Link to v3: https://patch.msgid.link/20261105-b4-sound-qcom-x1e80100-allow-ucm-channel-map-v3-0-29e06613115f@oss.qualcomm.com

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@oss.qualcomm.com

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@oss.qualcomm.com

---
Abel Vesa (3):
      ALSA: pcm: Report writable chmap controls as variable
      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      |  54 +++++++---
 sound/soc/qcom/common.c   |  30 ++++++
 sound/soc/qcom/common.h   |   1 +
 sound/soc/qcom/x1e80100.c | 246 +++++++++++++++++++++++++++++++++++++++++-----
 5 files changed, 302 insertions(+), 35 deletions(-)
---
base-commit: 3191063649dbf7c0d0b768e1f3655e4c5fc6edb5
change-id: 20260724-b4-sound-qcom-x1e80100-allow-ucm-channel-map-5b9ecb27c766

Best regards,
--  

Abel


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

end of thread, other threads:[~2026-11-24 11:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 10:57 [PATCH v4 0/4] ASoC: qcom: x1e80100: allow WSA channel map override Abel Vesa
2026-11-24 10:57 ` [PATCH v4 1/4] ALSA: pcm: Add snd_pcm_add_named_chmap_ctls() for custom control names Abel Vesa
2026-11-24 10:57 ` [PATCH v4 2/4] ALSA: pcm: Report writable chmap controls as variable Abel Vesa
2026-11-24 10:57 ` [PATCH v4 3/4] ASoC: qcom: common: Add SNDRV channel map to Q6 slot helper Abel Vesa
2026-11-24 10:57 ` [PATCH v4 4/4] ASoC: qcom: x1e80100: Allow userspace WSA RX chmap override Abel Vesa
2026-11-24 11:19   ` sashiko-bot

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