mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
The WSA RX slot mapping is currently computed entirely from the channel count in .prepare() and pushed unconditionally via snd_soc_dai_set_channel_map(). Userspace has no way to express a different channel map, so any map defined in UCM is ignored. Add writable WSA Playback Channel Map controls for the WSA RX backend ports. Store the userspace-selected SNDRV_CHMAP_* map per AFE port, translate it to Q6 PCM_CHANNEL_* slots at .prepare() time, and keep the previous default mapping when userspace has not provided a complete map. The WSA DAI links are backend no_pcm links, so there is no PCM instance available when the card is initialized. Register card-level controls instead, which keeps the maps visible to UCM before stream startup while still storing the selected map per WSA backend port. Expose the standard ALSA channel maps through the controls' TLV data. Allow up to six WSA channels for Glymur, and give the controls WSA-specific names so they are distinguishable from other channel map controls on the same card. Assisted-by: Codex:GPT-5.5 Link: https://patch.msgid.link/20260724-b4-sound-qcom-x1e80100-allow-ucm-channel-map-v2-2-2ca3c1250018@oss.qualcomm.com Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>