From: sashiko-bot@kernel.org
To: "Ajay Kumar Nandam" <ajay.nandam@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/5] ASoC: qcom: sc8280xp: Extend hw_params for QAIF backends
Date: Thu, 10 Sep 2026 15:19:59 +0000 [thread overview]
Message-ID: <20260910151959.B5C2C1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260910-shikra-machine-v2-v2-2-9bf6bad589d8@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Critical] Undeclared identifiers AIF_MI2S_RX_0 ... AIF_MI2S_TX_12 and AIF_TDM_RX_0 ... AIF_TDM_TX_12 cause a build failure.
- [High] Widening the link filter unintentionally assigns backend operations to all DPCM frontend links, risking functional breakage.
--
commit d0e12dda100ab67acf7bccf1f2859efd75647281
Author: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
Subject: ASoC: qcom: sc8280xp: Extend hw_params for QAIF backends
This commit prepares the sc8280xp machine driver for Shikra EVK variants
that use Audio-IF (QAIF) based backends. It adds support for overriding
default DAI formats and expands hw_params and SoundWire DAI matching
to accommodate QAIF MI2S/TDM and VA codec DMA paths.
> diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c
> --- a/sound/soc/qcom/sc8280xp.c
> +++ b/sound/soc/qcom/sc8280xp.c
[ ... ]
> @@ -260,9 +268,16 @@ static int sc8280xp_snd_hw_params(struct snd_pcm_substream *substream,
> case QUINARY_MI2S_RX ... QUINARY_MI2S_TX:
> case SENARY_MI2S_RX ... SENARY_MI2S_TX:
> case LPI_MI2S_RX_0 ... LPI_MI2S_TX_4:
> - ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_BP_FP);
> - if (ret && ret != -ENOTSUPP)
> - return ret;
> + case AIF_MI2S_RX_0 ... AIF_MI2S_TX_12:
[Severity: Critical]
Are AIF_MI2S_RX_0 and AIF_MI2S_TX_12 declared in this tree?
A search across the kernel source indicates these identifiers might be
missing, perhaps from a pending dependency patch for DT bindings. This
causes an undeclared identifier error in sc8280xp_snd_hw_params(), which
will break the build.
[ ... ]
> @@ -296,6 +311,7 @@ static int sc8280xp_snd_hw_params(struct snd_pcm_substream *substream,
> }
> break;
> case PRIMARY_TDM_RX_0 ... QUINARY_TDM_TX_7:
> + case AIF_TDM_RX_0 ... AIF_TDM_TX_12:
> return sc8280xp_tdm_hw_params(substream, params);
> default:
> break;
[Severity: Critical]
Similarly, are AIF_TDM_RX_0 and AIF_TDM_TX_12 defined?
This also appears to cause an undeclared identifier compilation error here.
[ ... ]
> @@ -382,7 +398,7 @@ static void sc8280xp_add_be_ops(struct snd_soc_card *card)
> int i;
>
> for_each_card_prelinks(card, i, link) {
> - if (link->no_pcm == 1) {
> + if (link->no_pcm == 1 || link->num_codecs > 0) {
> link->init = sc8280xp_snd_init;
> link->be_hw_params_fixup = sc8280xp_be_hw_params_fixup;
> link->ops = &sc8280xp_be_ops;
[Severity: High]
Could this widened condition inadvertently match DPCM frontend links?
In qcom_snd_parse_of(), DPCM frontend links are initialized with a dummy
codec, which sets link->num_codecs = 1. This means the filter will evaluate
to true for all DPCM frontends, incorrectly assigning backend operations
like sc8280xp_be_ops to them in sc8280xp_add_be_ops().
If a frontend DAI ID in the DT happens to overlap with a backend DAI ID,
it could trigger backend hw_params logic on the frontend.
The backend logic unconditionally calls snd_soc_dai_set_sysclk() without
checking for -ENOTSUPP errors. Since frontend DAIs do not support sysclk
configuration, this will propagate -ENOTSUPP up the stack, causing frontend
hw_params to fail and breaking the audio path.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260910-shikra-machine-v2-v2-0-9bf6bad589d8@oss.qualcomm.com?part=2
next prev parent reply other threads:[~2026-09-10 15:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 15:02 [PATCH v2 0/5] ASoC: qcom: Shikra machine driver and DT binding support Ajay Kumar Nandam
2026-09-10 15:02 ` [PATCH v2 1/5] ASoC: dt-bindings: qcom,sm8250: add Shikra sound card compatibles Ajay Kumar Nandam
2026-09-10 15:02 ` [PATCH v2 2/5] ASoC: qcom: sc8280xp: Extend hw_params for QAIF backends Ajay Kumar Nandam
2026-09-10 15:19 ` sashiko-bot [this message]
2026-09-10 15:02 ` [PATCH v2 3/5] ASoC: qcom: sc8280xp: Add shikra-cqm-evk compatible support Ajay Kumar Nandam
2026-09-10 15:02 ` [PATCH v2 4/5] ASoC: qcom: sc8280xp: Add shikra-cqs-evk " Ajay Kumar Nandam
2026-09-10 15:02 ` [PATCH v2 5/5] ASoC: qcom: sc8280xp: Add shikra-iqs-evk " Ajay Kumar Nandam
2026-09-10 15:13 ` sashiko-bot
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=20260910151959.B5C2C1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ajay.nandam@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--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