[PATCH 0/3] ASoC: fsl-asoc-card: Restructure to support deferrable card binding

Chancel Liu posted 3 patches 1 month, 2 weeks ago
sound/soc/fsl/fsl-asoc-card.c | 728 ++++++++++++++++++++++------------
1 file changed, 465 insertions(+), 263 deletions(-)
[PATCH 0/3] ASoC: fsl-asoc-card: Restructure to support deferrable card binding
Posted by Chancel Liu 1 month, 2 weeks ago
From: Chancel Liu <chancel.liu@nxp.com>

The ASoC core has evolved over several kernel releases to support
deferrable card binding: when a component is not yet available,
devm_snd_soc_register_card() no longer propagates -EPROBE_DEFER back to
the machine driver. Instead the card is placed on an internal deferred
list and rebound automatically once the missing component registers.
As a result, registering a sound card no longer guarantees that all CPU
and codec components have already probed successfully.

This exposed two regressions in fsl-asoc-card:

1. The machine driver caches codec MCLK rate during probe(). On platforms
   where the MCLK is derived from the CPU DAI clock and its final rate is
   applied via assigned-clocks in the CPU DAI node, probing before the CPU
   DAI driver completes leaves fsl-asoc-card with a stale mclk_freq.

2. If a card defers due to a missing component, it queues the card onto
   the unbind_card_list and returns 0. The driver then proceeds to call
   simple_util_init_jack(). At this point, the snd_card pointer is NULL.

Patch 1 drops mclk management for nau8822 from this machine driver.

Patch 2 is a pure refactoring with no functional change. the large if/else
chain of of_device_is_compatible() calls in probe() is
replaced by a platform data table approach.

Patch 3 moves all component-dependent initialisation and jacks out of
probe() and into late_probe(), which is the correct place under the
deferrable binding model.

Chancel Liu (3):
  ASoC: fsl-asoc-card: Drop mclk management for nau8822
  ASoC: fsl-asoc-card: Move static compatible data to platform data
  ASoC: fsl-asoc-card: Move bound-component setup to late_probe

 sound/soc/fsl/fsl-asoc-card.c | 728 ++++++++++++++++++++++------------
 1 file changed, 465 insertions(+), 263 deletions(-)

--
2.50.1
Re: [PATCH 0/3] ASoC: fsl-asoc-card: Restructure to support deferrable card binding
Posted by Mark Brown 1 month, 2 weeks ago
On Mon, 10 Aug 2026 18:35:28 +0900, Chancel Liu wrote:
> ASoC: fsl-asoc-card: Restructure to support deferrable card binding
> 
> From: Chancel Liu <chancel.liu@nxp.com>
> 
> The ASoC core has evolved over several kernel releases to support
> deferrable card binding: when a component is not yet available,
> devm_snd_soc_register_card() no longer propagates -EPROBE_DEFER back to
> the machine driver. Instead the card is placed on an internal deferred
> list and rebound automatically once the missing component registers.
> As a result, registering a sound card no longer guarantees that all CPU
> and codec components have already probed successfully.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3

Thanks!

[1/3] ASoC: fsl-asoc-card: Drop mclk management for nau8822
      https://git.kernel.org/broonie/sound/c/4c51a83a4fe8
[2/3] ASoC: fsl-asoc-card: Move static compatible data to platform data
      https://git.kernel.org/broonie/sound/c/76408e27e60f
[3/3] ASoC: fsl-asoc-card: Move bound-component setup to late_probe
      https://git.kernel.org/broonie/sound/c/de27e0cadcce

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark