[PATCH v1 0/2] soundwire: qcom: Restore and fix set_channel_map support for SWR master

From: Mohammad Rafi Shaik

Date: Mon Jun 29 2026 - 10:19:11 EST


The original support for set_channel_map in the Qualcomm SoundWire master
commit 7796c97df6b1 ("soundwire: qcom: Add set_channel_map api support")
was reverted due to multiple issues reported on sdm845 board, including
kernel crashes and data structure corruption. The root causes included
incorrect port indexing, array size mismatches, and improper handling
of TX/RX channel information. This series reintroduces set_channel_map
support with a corrected and safer implementation, and fixes the sdm845
machine driver to avoid misuse ofthe API.

Add a robust qcom_swrm_set_channel_map() implementation that stores
per-port TX/RX channel masks safely under controller lock. Ensure the
configuration is only applied to valid ports and does not corrupt memory
or overwrite unrelated data. Preserve existing behavior for ports that do
not use set_channel_map, by falling back to the default SoundWire stream
configuration. Fix the sdm845 machine driver to avoid applying SLIMbus
channel maps to SoundWire DAIs by skipping DAIs that own an SDW stream
(identified via .set_stream).

Mohammad Rafi Shaik (2):
ASoC: qcom: sdm845: skip set_channel_map for SDW stream DAIs
soundwire: qcom: Add set_channel_map support to SWR master DAI

drivers/soundwire/qcom.c | 54 ++++++++++++++++++++++++++++++++++++++++
sound/soc/qcom/sdm845.c | 27 ++++++++++++++------
2 files changed, 74 insertions(+), 7 deletions(-)


base-commit: 3d5670d672ae08b8c534b7beed6f57c8b44e7b43
--
2.34.1