[PATCH v2 6/6] ASoC: SDCA: class_function: mark PDM data-port terminals
From: Srinivas Kandagatla
Date: Tue Oct 20 2026 - 03:43:20 EST
snd_sdw_params_to_config() leaves sconfig.type at SDW_STREAM_PCM,
which is wrong when the DAI is routed to a PDM data-port terminal.
Set sconfig.type to SDW_STREAM_PDM for PDM terminals so the SoundWire
core sees the right type and does not enforce bps match against the
PCM-container-width value stamped by the helper.
Assisted-by: LLM
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxxxxxxxx>
---
sound/soc/sdca/sdca_class_function.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/sdca/sdca_class_function.c b/sound/soc/sdca/sdca_class_function.c
index 13b70f0f0dbf..41f6f0eb8563 100644
--- a/sound/soc/sdca/sdca_class_function.c
+++ b/sound/soc/sdca/sdca_class_function.c
@@ -142,6 +142,9 @@ static int class_function_sdw_add_peripheral(struct snd_pcm_substream *substream
snd_sdw_params_to_config(substream, params, &sconfig, &pconfig);
+ if (sdca_asoc_dai_is_pdm(drv->function, dai))
+ sconfig.type = SDW_STREAM_PDM;
+
/*
* FIXME: As also noted in sdca_asoc_get_port(), currently only
* a single unshared port is supported for each DAI.
--
2.53.0