From: sashiko-bot@kernel.org
To: "Mohammad Rafi Shaik" <mohammad.rafi.shaik@oss.qualcomm.com>
Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 2/5] ASoC: qcom: sc8280xp: add Shikra backend handling
Date: Sun, 22 Nov 2026 20:10:52 +0000 [thread overview]
Message-ID: <sashiko-outbox-228310@kernel.org> (raw)
In-Reply-To: <20261123-shikra-machine-v3-2-e5d074264428@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] ASoC: qcom: sc8280xp: num_codecs check in
sc8280xp_add_be_ops() matches FEs
--
commit c0216a2b49790ae6ec3eaaa0b8959c3342929be7
Author: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
ASoC: qcom: sc8280xp: add Shikra backend handling
This commit adds per-DAI CPU format overrides, VA_CODEC_DMA_TX_1 handling,
and an option to attach backend operations to codec-backed links on
sc8280xp sound cards.
> diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c
> index ac4dfb2c2182c..ff8ccd3065eb9 100644
> --- a/sound/soc/qcom/sc8280xp.c
> +++ b/sound/soc/qcom/sc8280xp.c
[ ... ]
> @@ -540,11 +549,13 @@ static const struct snd_soc_ops sc8280xp_be_ops = {
>
> static void sc8280xp_add_be_ops(struct snd_soc_card *card)
> {
> + struct sc8280xp_snd_data *data = snd_soc_card_get_drvdata(card);
> struct snd_soc_dai_link *link;
> int i;
>
> for_each_card_prelinks(card, i, link) {
> - if (link->no_pcm == 1) {
> + if (link->no_pcm == 1 ||
> + (data->priv->codec_link_be_ops && link->num_codecs > 0)) {
> link->init = sc8280xp_snd_init;
> link->exit = sc8280xp_snd_exit;
> link->be_hw_params_fixup = sc8280xp_be_hw_params_fixup;
[Severity: Medium]
Does checking link->num_codecs > 0 attach backend ops to codeless DPCM
frontend links as well?
card->dai_link is populated by qcom_snd_parse_of(), which sets
num_codecs = 1 on DPCM frontend links using the dummy codec:
sound/soc/qcom/common.c:qcom_snd_parse_of() {
...
if (codec) {
ret = snd_soc_of_get_dai_link_codecs(dev, codec, link);
if (ret < 0) {
dev_err_probe(card->dev, ret,
"%s: codec dai not found\n", link->name);
goto err;
}
if (platform) {
/* DPCM backend */
link->no_pcm = 1;
link->ignore_pmdown_time = 1;
}
} else {
/* DPCM frontend */
link->codecs = &snd_soc_dummy_dlc;
link->num_codecs = 1;
link->dynamic = 1;
}
...
}
Because num_codecs is at least 1 for every link, enabling
codec_link_be_ops attaches sc8280xp_be_ops to DPCM frontend links too.
If a card defines frontend links whose CPU DAI IDs (such as
MSM_FRONTEND_DAI_MULTIMEDIA3..16) overlap with the SLIMBUS_0_RX..SLIMBUS_6_TX
IDs matched by qcom_snd_is_sdw_dai(), opening and closing the frontend
stream calls qcom_snd_sdw_startup() and leaks a struct sdw_stream_runtime
because snd-soc-dummy-dai returns -ENOTSUPP for set_stream and
get_stream.
Checking !link->dynamic (or link->codecs != &snd_soc_dummy_dlc) would
restrict this to links backed by real codecs.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123-shikra-machine-v3-0-e5d074264428@oss.qualcomm.com?part=2
next prev parent reply other threads:[~2026-11-22 20:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 19:40 [PATCH v3 0/5] ASoC: qcom: Shikra machine driver and DT binding support Mohammad Rafi Shaik
2026-11-22 19:40 ` [PATCH v3 1/5] ASoC: dt-bindings: qcom,sm8250: add Shikra sound card compatibles Mohammad Rafi Shaik
2026-11-22 19:40 ` [PATCH v3 2/5] ASoC: qcom: sc8280xp: add Shikra backend handling Mohammad Rafi Shaik
2026-11-22 20:10 ` sashiko-bot [this message]
2026-11-22 19:40 ` [PATCH v3 3/5] ASoC: qcom: sc8280xp: Add shikra-cqm-evk compatible support Mohammad Rafi Shaik
2026-11-22 19:40 ` [PATCH v3 4/5] ASoC: qcom: sc8280xp: Add shikra-cqs-evk " Mohammad Rafi Shaik
2026-11-22 19:40 ` [PATCH v3 5/5] ASoC: qcom: sc8280xp: Add shikra-iqs-evk " Mohammad Rafi Shaik
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-228310@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mohammad.rafi.shaik@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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