From: sashiko-bot@kernel.org
To: shengjiu.wang@oss.nxp.com
Cc: robh@kernel.org, imx@lists.linux.dev, conor+dt@kernel.org,
devicetree@vger.kernel.org, Frank.Li@kernel.org
Subject: Re: [PATCH v4 4/5] ASoC: fsl_asrc: expose individual DAIs per conversion path
Date: Thu, 13 Aug 2026 07:14:32 +0000 [thread overview]
Message-ID: <20260813071433.553991F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260813070020.719810-5-shengjiu.wang@oss.nxp.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] ASoC component is unregistered via devres after hardware clocks are disabled in remove(), leading to system hangs if an active stream is terminated during driver unbind.
--
--- Patch [4]: [PATCH v4 4/5] ASoC: fsl_asrc: expose individual DAIs per conversion path ---
commit c1765b1c3c3716b7c2b1c94ee1d7914bfa585bff
Author: Shengjiu Wang <shengjiu.wang@nxp.com>
ASoC: fsl_asrc: expose individual DAIs per conversion path
This commit replaces the single fsl_asrc_dai instance with an array of
three DAI drivers to allow multiple independent conversion paths to be
used simultaneously. It updates the probe function to register all three
DAIs.
> diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
> index 2755ee57c6a17..a5d6c4c1e9292 100644
> --- a/sound/soc/fsl/fsl_asrc.c
> +++ b/sound/soc/fsl/fsl_asrc.c
[ ... ]
> @@ -1393,7 +1442,7 @@ static int fsl_asrc_probe(struct platform_device *pdev)
> goto err_pm_get_sync;
>
> ret = devm_snd_soc_register_component(&pdev->dev, &fsl_asrc_component,
> - &fsl_asrc_dai, 1);
> + fsl_asrc_dai, ARRAY_SIZE(fsl_asrc_dai));
[Severity: High]
This is a pre-existing issue, but does using devres to register the ASoC
component cause a race condition during driver unbind?
Since the component is registered with devm_snd_soc_register_component(),
it won't be unregistered until the devres release phase, which happens
after fsl_asrc_remove() finishes.
If an ALSA stream is active during unbind, fsl_asrc_remove() gates the
ASRC IPG and MEM clocks:
fsl_asrc_remove() {
...
pm_runtime_disable(&pdev->dev);
if (!pm_runtime_status_suspended(&pdev->dev))
fsl_asrc_runtime_suspend(&pdev->dev);
}
During the window between fsl_asrc_remove() completing and the devres
release phase unregistering the component, the PCM streams and DMA
channels are still active.
Can the DMA controller attempt to access the clock-gated ASRC FIFOs
during this window, resulting in a synchronous bus fault or asynchronous
external abort?
Would it be safer to use snd_soc_register_component() here instead, and
manually call snd_soc_unregister_component() early in fsl_asrc_remove()
before gating the hardware clocks?
> if (ret) {
> dev_err(&pdev->dev, "failed to register ASoC DAI\n");
> goto err_pm_get_sync;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260813070020.719810-1-shengjiu.wang@oss.nxp.com?part=4
next prev parent reply other threads:[~2026-08-13 7:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 7:00 [PATCH v4 0/5] ASoC: fsl_asrc/fsl_easrc: expose per-pair/context DAIs and fix DMA race shengjiu.wang
2026-08-13 7:00 ` [PATCH v4 1/5] ASoC: dt-bindings: fsl,imx-asrc: update port binding to support multiple paths shengjiu.wang
2026-08-13 7:00 ` [PATCH v4 2/5] ASoC: dt-bindings: fsl,easrc: add ports binding for multiple conversion paths shengjiu.wang
2026-08-13 7:00 ` [PATCH v4 3/5] ASoC: fsl_asrc/fsl_easrc: move DMA params into pair/context struct shengjiu.wang
2026-08-13 7:09 ` sashiko-bot
2026-08-13 16:54 ` Frank Li
2026-08-13 16:52 ` Frank Li
2026-08-13 7:00 ` [PATCH v4 4/5] ASoC: fsl_asrc: expose individual DAIs per conversion path shengjiu.wang
2026-08-13 7:14 ` sashiko-bot [this message]
2026-08-13 7:00 ` [PATCH v4 5/5] ASoC: fsl_easrc: " shengjiu.wang
2026-08-13 7:10 ` 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=20260813071433.553991F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shengjiu.wang@oss.nxp.com \
/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