From: sashiko-bot@kernel.org
To: "Binbin Zhou" <zhoubinbin@loongson.cn>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 6/9] ASoC: loongson: Add Loongson-2K0300 CTCISZ Forever Pi sound card support
Date: Fri, 26 Jun 2026 02:38:36 +0000 [thread overview]
Message-ID: <20260626023837.2E9081F000E9@smtp.kernel.org> (raw)
In-Reply-To: <ed1314e1d3275fd20aff47397345a88fad6e9368.1782439646.git.zhoubinbin@loongson.cn>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] DAI format configuration is entirely bypassed if `mclk-fs` is 0.
--
commit 00af2efc83640c13d13fd25311896531fc01a8e7
Author: Binbin Zhou <zhoubinbin@loongson.cn>
ASoC: loongson: Add Loongson-2K0300 CTCISZ Forever Pi sound card support
The Loongson-2K0300 audio card uses a different DAI format compared to
existing Loongson platforms. Move the dai_fmt setting from the static
DAI link to runtime hw_params via snd_soc_runtime_set_dai_fmt(), and pass
the correct format through driver match data.
> diff --git a/sound/soc/loongson/loongson_card.c b/sound/soc/loongson/loongson_card.c
> index ea895fe6b5e97..0e63cbcad57ac 100644
> --- a/sound/soc/loongson/loongson_card.c
> +++ b/sound/soc/loongson/loongson_card.c
[ ... ]
> @@ -45,7 +59,7 @@ static int loongson_card_hw_params(struct snd_pcm_substream *substream,
> return ret;
> }
>
> - return 0;
> + return snd_soc_runtime_set_dai_fmt(rtd, ls_card->cfg->fmt);
> }
[Severity: Medium]
If a platform's firmware explicitly sets the mclk-fs property to 0,
loongson_card_hw_params() will exit early:
if (!ls_card->mclk_fs)
return 0;
By moving the format configuration to the end of this function, will
the CPU and CODEC DAIs fail to be configured with the correct format when
mclk-fs is 0, since the early return bypasses this new call?
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1782439646.git.zhoubinbin@loongson.cn?part=6
next prev parent reply other threads:[~2026-06-26 2:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 2:27 [PATCH v3 0/9] ASoC: Add Loongson-2K0300 I2S controller and sound card support Binbin Zhou
2026-06-26 2:27 ` [PATCH v3 1/9] ASoC: loongson: Fix error handling in ACPI property parsing Binbin Zhou
2026-06-26 2:38 ` sashiko-bot
2026-06-26 2:27 ` [PATCH v3 2/9] ASoC: dt-bindings: loongson,ls2k1000-i2s: Document Loongson-2K0300 compatible Binbin Zhou
2026-06-26 2:27 ` [PATCH v3 3/9] ASoC: loongson: Add Loongson-2K0300 I2S controller support Binbin Zhou
2026-06-26 2:37 ` sashiko-bot
2026-06-26 2:27 ` [PATCH v3 4/9] ASoC: dt-bindings: loongson,ls-audio-card: Use common sound card Binbin Zhou
2026-06-26 2:37 ` sashiko-bot
2026-06-26 2:27 ` [PATCH v3 5/9] ASoC: dt-bindings: loongson,ls-audio-card: Add ctcisz forever pi compatible Binbin Zhou
2026-06-26 2:27 ` [PATCH v3 6/9] ASoC: loongson: Add Loongson-2K0300 CTCISZ Forever Pi sound card support Binbin Zhou
2026-06-26 2:38 ` sashiko-bot [this message]
2026-06-26 2:27 ` [PATCH v3 7/9] ASoC: dt-bindings: loongson,ls-audio-card: Add ATK-DL2K0300B compatible Binbin Zhou
2026-06-26 2:38 ` sashiko-bot
2026-06-26 2:27 ` [PATCH v3 8/9] ASoC: loongson: Add headphone jack detection and DAPM routing Binbin Zhou
2026-06-26 2:44 ` sashiko-bot
2026-06-26 2:27 ` [PATCH v3 9/9] ASoC: es8328: Add DAPM routes from MIC inputs to Mic Bias Binbin Zhou
2026-06-26 2:40 ` 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=20260626023837.2E9081F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=zhoubinbin@loongson.cn \
/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