From: sashiko-bot@kernel.org
To: "Mohammad Rafi Shaik" <mohammad.rafi.shaik@oss.qualcomm.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v5 3/3] ASoC: qcom: sc8280xp: enhance machine driver for board-specific config
Date: Tue, 14 Jul 2026 15:06:08 +0000 [thread overview]
Message-ID: <20260714150609.1288E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260714145250.2473461-4-mohammad.rafi.shaik@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Incorrect error code check for unsupported DAI format operations in `sc8280xp_snd_hw_params`.
--
--- Patch [3]: [PATCH v5 3/3] ASoC: qcom: sc8280xp: enhance machine driver for board-specific config ---
commit c24a266f369f96e073e2a8a89d27c04935c6d52d
Author: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
ASoC: qcom: sc8280xp: enhance machine driver for board-specific config
This commit enhances the sc8280xp machine driver to support board-specific
configuration. It allows each board variant to provide its own DAPM widgets
and routes, and enables MI2S MCLK programming.
> diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c
> index 98b15a527e37e..109e39b93b2dd 100644
> --- a/sound/soc/qcom/sc8280xp.c
> +++ b/sound/soc/qcom/sc8280xp.c
[ ... ]
> @@ -96,6 +156,63 @@ static int sc8280xp_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
> return 0;
> }
>
> +static int sc8280xp_snd_hw_params(struct snd_pcm_substream *substream,
> + struct snd_pcm_hw_params *params)
> +{
> + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
> + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
> + struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
> + struct sc8280xp_snd_data *data = snd_soc_card_get_drvdata(rtd->card);
> + int mclk_freq = sc8280xp_get_mclk_freq(params);
> + int bclk_freq = sc8280xp_get_bclk_freq(params);
> + int ret;
> +
> + switch (cpu_dai->id) {
> + case PRIMARY_MI2S_RX ... QUATERNARY_MI2S_TX:
> + case QUINARY_MI2S_RX ... QUINARY_MI2S_TX:
> + case SENARY_MI2S_RX ... SENARY_MI2S_TX:
> + ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_BP_FP);
> + if (ret && ret != -EOPNOTSUPP)
> + return ret;
[Severity: Medium]
Should this error check evaluate against -ENOTSUPP instead of -EOPNOTSUPP?
Looking at snd_soc_dai_set_fmt() in sound/soc/soc-dai.c, it initializes ret
to -ENOTSUPP (524) and returns that if the DAI driver doesn't implement the
set_fmt operation. Since -EOPNOTSUPP is a different value (95), will this
inadvertently propagate the error and fail ALSA PCM stream setup on hardware
where the CPU DAI does not implement .set_fmt?
> +
> + if (data->snd_soc_common_priv->codec_dai_fmt) {
> + ret = snd_soc_dai_set_fmt(codec_dai,
> + data->snd_soc_common_priv->codec_dai_fmt);
> + if (ret && ret != -EOPNOTSUPP)
> + return ret;
[Severity: Medium]
Similarly, could this cause stream setup failures for codecs that don't
support set_fmt?
If the target codec DAI is missing .set_fmt, snd_soc_dai_set_fmt() will
return -ENOTSUPP rather than -EOPNOTSUPP.
> + }
> +
> + if (data->snd_soc_common_priv->mi2s_mclk_enable) {
> + ret = snd_soc_dai_set_sysclk(cpu_dai,
> + LPAIF_MI2S_MCLK, mclk_freq,
> + SND_SOC_CLOCK_OUT);
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260714145250.2473461-1-mohammad.rafi.shaik@oss.qualcomm.com?part=3
prev parent reply other threads:[~2026-07-14 15:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 14:52 [PATCH v5 0/3] ASoC: qcom: qdsp6: Add MI2S clock control Mohammad Rafi Shaik
2026-07-14 14:52 ` [PATCH v5 1/3] ASoC: dt-bindings: qcom,q6apm-lpass-dais: Document DAI subnode Mohammad Rafi Shaik
2026-07-14 14:58 ` sashiko-bot
2026-07-14 14:52 ` [PATCH v5 2/3] ASoC: qcom: q6apm-lpass-dais: Add MI2S clock control Mohammad Rafi Shaik
2026-07-14 14:52 ` [PATCH v5 3/3] ASoC: qcom: sc8280xp: enhance machine driver for board-specific config Mohammad Rafi Shaik
2026-07-14 15:06 ` 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=20260714150609.1288E1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@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