Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mohammad Rafi Shaik" <mohammad.rafi.shaik@oss.qualcomm.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v8 3/3] ASoC: qcom: sc8280xp: enhance machine driver for board-specific config
Date: Mon, 27 Jul 2026 15:27:44 +0000	[thread overview]
Message-ID: <20260727152744.A04851F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260727151230.408122-4-mohammad.rafi.shaik@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Failure to ignore -ENOTSUPP for codec set_sysclk causes hw_params to fail on MI2S links with dummy codecs if a board enables codec_sysclk_set.
--

--- Patch [3]: [PATCH v8 3/3] ASoC: qcom: sc8280xp: enhance machine driver for board-specific config ---
commit 9cac362c036dd5a3de7ece4d5e191a7aa9929dc8
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 for DAPM widgets, routes, and MI2S MCLK programming. This
allows for integration of third-party audio codecs that require specific
configurations.

> 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
> @@ -96,6 +145,63 @@ static int sc8280xp_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
[ ... ]
> +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 != -ENOTSUPP)
> +			return ret;
> +
[ ... ]
> +		if (data->snd_soc_common_priv->codec_sysclk_set) {
> +			ret = snd_soc_dai_set_sysclk(codec_dai,
> +						     0, mclk_freq,
> +						     SND_SOC_CLOCK_IN);
> +			if (ret)
> +				return ret;

[Severity: Medium]
Should we ignore -ENOTSUPP here just like we do for snd_soc_dai_set_fmt()
above?

If a board enables codec_sysclk_set, this applies to all MI2S links globally.

If any of those links are connected to a dummy codec (which doesn't implement
set_sysclk), snd_soc_dai_set_sysclk() will return -ENOTSUPP and cause
hw_params to abort, breaking the audio stream for those dummy links.

> +		}
> +		break;
> +	default:
> +		break;
> +	}
> +
> +	return 0;
> +}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260727151230.408122-1-mohammad.rafi.shaik@oss.qualcomm.com?part=3

  reply	other threads:[~2026-07-27 15:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27 15:12 [PATCH v8 0/3] ASoC: qcom: qdsp6: Add MI2S clock control Mohammad Rafi Shaik
2026-07-27 15:12 ` [PATCH v8 1/3] ASoC: dt-bindings: qcom,q6apm-lpass-dais: Document DAI subnode Mohammad Rafi Shaik
2026-07-27 15:27   ` Ajay Kumar Nandam
2026-07-27 15:12 ` [PATCH v8 2/3] ASoC: qcom: q6apm-lpass-dais: Add MI2S clock control Mohammad Rafi Shaik
2026-07-27 15:12 ` [PATCH v8 3/3] ASoC: qcom: sc8280xp: enhance machine driver for board-specific config Mohammad Rafi Shaik
2026-07-27 15:27   ` sashiko-bot [this message]
2026-07-27 16:47 ` [PATCH v8 0/3] ASoC: qcom: qdsp6: Add MI2S clock control Ajay Kumar Nandam
2026-07-27 17:42   ` Mark Brown
2026-07-27 17:41 ` Mark Brown

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=20260727152744.A04851F000E9@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