Linux Sound subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: phucduc.bui@gmail.com
Cc: linux-sound@vger.kernel.org
Subject: Re: [PATCH 2/5] ASoC: fsl_asrc: Fix handling of deferred spba clock
Date: Thu, 12 Nov 2026 10:57:45 +0000	[thread overview]
Message-ID: <sashiko-outbox-210979@kernel.org> (raw)
In-Reply-To: <20261112105116.32274-3-phucduc.bui@gmail.com>

Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [Medium] ASoC: fsl_asrc: stale register states in
  fsl_asrc_config_pair() [1]
--

commit 62ba61794f6dac52b1de47eef34f329de32edee9
Author: bui duc phuc <phucduc.bui@gmail.com>

ASoC: fsl_asrc: Fix handling of deferred spba clock

This commit updates fsl_asrc_probe() to return -EPROBE_DEFER when
devm_clk_get() for the spba clock defers, while preserving a warning for
other error codes.

> diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
> index 055593d5d37b6..c91ffb5e0c5e8 100644
> --- a/sound/soc/fsl/fsl_asrc.c
> +++ b/sound/soc/fsl/fsl_asrc.c
> @@ -1315,8 +1315,11 @@ static int fsl_asrc_probe(struct platform_device *pdev)
>  				     "failed to get ipg clock\n");
>  
>  	asrc->spba_clk = devm_clk_get(&pdev->dev, "spba");
> -	if (IS_ERR(asrc->spba_clk))
> +	if (IS_ERR(asrc->spba_clk)) {
> +		if (PTR_ERR(asrc->spba_clk) == -EPROBE_DEFER)
> +			return -EPROBE_DEFER;
>  		dev_warn(&pdev->dev, "failed to get spba clock\n");
> +	}

[Severity: Medium]
This problem wasn't introduced by this patch, but can [1]
fsl_asrc_config_pair() leave hardware registers with stale values across a
warm reboot?

Earlier in fsl_asrc_probe(), devm_regmap_init_mmio() initializes the regmap
cache to all-zero defaults without issuing a hardware soft-reset first:

sound/soc/fsl/fsl_asrc.c:fsl_asrc_probe() {
	...
	asrc->regmap = devm_regmap_init_mmio(&pdev->dev, regs, &fsl_asrc_regmap_config);
	...
}

When fsl_asrc_config_pair() later calls regmap_update_bits() on REG_ASRCNCR,
REG_ASRCDR, REG_ASRMCR1, or REG_ASRCFG with a target field value of 0 (for
example, a 24-bit audio width or 1:1 clock ratio), regmap_update_bits() sees
0 in the cache and skips the register write, leaving the hardware running
with non-zero dividers and modes from the prior boot.

[1] https://sashiko.dev/#/bug/linux-75f0b96f-de73-4139-881e-4c69d6455f22

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261112105116.32274-1-phucduc.bui@gmail.com?part=2

  reply	other threads:[~2026-11-12 10:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 10:51 [PATCH 0/5] ASoC: fsl_asrc: Fix probe and resource management issues phucduc.bui
2026-11-12 10:51 ` [PATCH 1/5] ASoC: fsl_asrc: Improve probe error handling phucduc.bui
2026-11-12 10:51 ` [PATCH 2/5] ASoC: fsl_asrc: Fix handling of deferred spba clock phucduc.bui
2026-11-12 10:57   ` sashiko-bot [this message]
2026-11-12 10:51 ` [PATCH 3/5] ASoC: fsl_asrc: Fix runtime PM usage count on init failure phucduc.bui
2026-11-12 11:00   ` sashiko-bot
2026-11-12 10:51 ` [PATCH 4/5] ASoC: fsl_asrc: Request the IRQ after the device is initialized phucduc.bui
2026-11-12 10:51 ` [PATCH 5/5] ASoC: fsl_asrc: Use devm for runtime PM cleanup phucduc.bui
2026-11-12 11:04   ` 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=sashiko-outbox-210979@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=phucduc.bui@gmail.com \
    --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