From: sashiko-bot@kernel.org
To: "Srinivas Kandagatla" <srinivas.kandagatla@oss.qualcomm.com>
Cc: linux-sound@vger.kernel.org
Subject: Re: [PATCH] ASoC: SDCA: skip port channel mask for Output Terminals
Date: Mon, 23 Nov 2026 17:26:12 +0000 [thread overview]
Message-ID: <sashiko-outbox-229735@kernel.org> (raw)
In-Reply-To: <20261123165612.440542-1-srinivas.kandagatla@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] ASoC: SDCA: broken OT channel constraints in
sdca_asoc_set_constraints()
--
commit 635257264d5313aa7d4b4104f59cbc1b9c469fe5
Author: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
ASoC: SDCA: skip port channel mask for Output Terminals
This commit skips intersecting the channel constraint mask with port_ch_mask
for Output Terminals in sdca_asoc_set_constraints() so that DPCM front-end
capture streams are not restricted to the SoundWire port's channel count.
> diff --git a/sound/soc/sdca/sdca_asoc.c b/sound/soc/sdca/sdca_asoc.c
> index aaa84156f20a8..6e42f5262aa77 100644
> --- a/sound/soc/sdca/sdca_asoc.c
> +++ b/sound/soc/sdca/sdca_asoc.c
> @@ -1645,7 +1645,14 @@ int sdca_asoc_set_constraints(struct device *dev, struct sdw_slave *sdw,
>
> constraints->channels.count = ARRAY_SIZE(channel_list);
> constraints->channels.list = channel_list;
> - constraints->channels.mask = cluster_ch_mask & port_ch_mask;
> + /*
> + * OT paths may re-channelize downstream of the port, so only
> + * narrow with port_ch_mask for Input Terminals.
> + */
> + if (entity->type == SDCA_ENTITY_TYPE_IT)
> + constraints->channels.mask = cluster_ch_mask & port_ch_mask;
> + else
> + constraints->channels.mask = cluster_ch_mask;
[Severity: Medium]
Does dropping port_ch_mask unconditionally for all Output Terminals leave
capture DAIs completely unconstrained on links that do not fix up back-end
channels?
sdca_asoc_populate_dais() advertises 1..32 channels and relies on
sdca_asoc_set_constraints() to narrow them, while cluster_ch_mask is
currently hardcoded to UINT_MAX for non-IT entities right above this block:
sound/soc/sdca/sdca_asoc.c:sdca_asoc_set_constraints() {
...
/* FIXME: OTs should inherit cluster information */
if (entity->type == SDCA_ENTITY_TYPE_IT) {
ret = get_cluster_mask(dev, function, entity, &cluster_ch_mask);
if (ret)
return ret;
} else {
cluster_ch_mask = UINT_MAX;
}
...
}
On non-DPCM links, DPCM links with dpcm_merged_chan, or DSPless links
without be_hw_params_fixup, userspace can now request more channels than
the SoundWire source DataPort supports, causing
class_function_sdw_add_peripheral() to pass unsupported channel bits in
pconfig.ch_mask to sdw_stream_add_slave().
Even on DPCM links with a DSP graph, falling back to cluster_ch_mask only
avoids restricting fe_substream->runtime because OT cluster inheritance is
not implemented yet: an Output Terminal's cluster describes the internal
SDCA Function channels upstream of the SoundWire port (for WCD9378 OT 36,
the upstream IT 33 cluster is also mono, 0x1), not the host DSP output.
Meanwhile, dpcm_be_dai_startup() aliasing fe_substream->runtime still leaks
back-end wire constraints onto the front-end for Input Terminal channels
and for constraints->width on both terminal types.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123165612.440542-1-srinivas.kandagatla@oss.qualcomm.com?part=1
prev parent reply other threads:[~2026-11-23 17:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 16:56 [PATCH] ASoC: SDCA: skip port channel mask for Output Terminals Srinivas Kandagatla
2026-11-23 17:21 ` Charles Keepax
2026-11-23 17:26 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-229735@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=srinivas.kandagatla@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox