[PATCH v2 5/6] soundwire: stream: skip bps mismatch check for PDM streams
From: Srinivas Kandagatla
Date: Tue Oct 20 2026 - 03:42:14 EST
PDM data-port terminals carry a wire word length defined by the
stream payload, not by any host-side bps field.
Skip the sdw_config_stream() bps mismatch check for SDW_STREAM_PDM.
Behaviour for SDW_STREAM_PCM and SDW_STREAM_BPT is unchanged.
Assisted-by: LLM
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxxxxxxxx>
---
drivers/soundwire/stream.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index 0b00fcdcab2d..31db368ba24b 100644
--- a/drivers/soundwire/stream.c
+++ b/drivers/soundwire/stream.c
@@ -1374,7 +1374,9 @@ static int sdw_config_stream(struct device *dev,
return -EINVAL;
}
- if (stream->params.bps &&
+ /* PDM streams have no stream-wide bps; skip the match for them. */
+ if (stream_config->type != SDW_STREAM_PDM &&
+ stream->params.bps &&
stream->params.bps != stream_config->bps) {
dev_err(dev, "bps not matching, stream:%s\n", stream->name);
return -EINVAL;
--
2.53.0