* [PATCH] ASoC: core: Move all users to deferrable card binding
@ 2026-04-30 14:07 Cezary Rojewski
2026-05-11 1:06 ` Mark Brown
` (3 more replies)
0 siblings, 4 replies; 26+ messages in thread
From: Cezary Rojewski @ 2026-04-30 14:07 UTC (permalink / raw)
To: broonie
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Cezary Rojewski
Commit a3375522bb5e2 ("ASoC: core: Complete support for card rebinding")
completed the feature and at the same time divided ASoC users into two
groups:
1) cards that fail to enumerate the moment one of the components is
not available
2) cards that succeed to enumerate even if some of their components
become available late
Given the component-based nature of ASoC, approach 2) is preferred and
can be used by all ASoC users. By dropping 1) the card binding code can
also be simplified.
Flatten code that is currently conditional based on ->devres_dev and
convert snd_soc_rebind_card() to call_soc_bind_card(). The latter is a
selector between managed and unmanaged card-binding behaviour to keep
non-devm users happy.
With rebinding being the default, devm_snd_soc_register_card() takes
form of its deferrable friend - all the devm job is already done by
devm_snd_soc_bind_card().
Suggested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
This is a direct continuation of subject [1] begun by Kuninori with goal
of simplifying the code related to card rebinding.
[1]: https://lore.kernel.org/linux-sound/87eck7k868.wl-kuninori.morimoto.gx@renesas.com/
include/sound/soc.h | 2 +-
sound/soc/soc-core.c | 44 ++++++++++++++----------------------------
sound/soc/soc-devres.c | 28 +--------------------------
3 files changed, 17 insertions(+), 57 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index a30f95ff7d86..f0935523c8df 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -425,7 +425,7 @@ struct snd_soc_jack_pin;
int snd_soc_register_card(struct snd_soc_card *card);
void snd_soc_unregister_card(struct snd_soc_card *card);
int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card);
-int devm_snd_soc_register_deferrable_card(struct device *dev, struct snd_soc_card *card);
+#define devm_snd_soc_register_deferrable_card(d, c) devm_snd_soc_register_card(d, c)
#ifdef CONFIG_PM_SLEEP
int snd_soc_suspend(struct device *dev);
int snd_soc_resume(struct device *dev);
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index e70bf22db5c9..ec141b810b50 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2165,6 +2165,7 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
snd_soc_fill_dummy_dai(card);
snd_soc_dapm_init(dapm, card, NULL);
+ list_del_init(&card->list);
/* check whether any platform is ignore machine FE and using topology */
soc_check_tplg_fes(card);
@@ -2308,6 +2309,10 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
probe_end:
if (ret < 0)
soc_cleanup_card_resources(card);
+ if (ret == -EPROBE_DEFER) {
+ list_add(&card->list, &unbind_card_list);
+ ret = 0;
+ }
snd_soc_card_mutex_unlock(card);
return ret;
@@ -2323,12 +2328,15 @@ static int devm_snd_soc_bind_card(struct device *dev, struct snd_soc_card *card)
struct snd_soc_card **ptr;
int ret;
+ /* The procedure may be called many times during the lifetime of the card. */
+ devres_destroy(dev, devm_card_bind_release, NULL, NULL);
+
ptr = devres_alloc(devm_card_bind_release, sizeof(*ptr), GFP_KERNEL);
if (!ptr)
return -ENOMEM;
ret = snd_soc_bind_card(card);
- if (ret == 0 || ret == -EPROBE_DEFER) {
+ if (ret == 0) {
*ptr = card;
devres_add(dev, ptr);
} else {
@@ -2338,21 +2346,11 @@ static int devm_snd_soc_bind_card(struct device *dev, struct snd_soc_card *card)
return ret;
}
-static int snd_soc_rebind_card(struct snd_soc_card *card)
+static int call_soc_bind_card(struct snd_soc_card *card)
{
- int ret;
-
- if (card->devres_dev) {
- devres_destroy(card->devres_dev, devm_card_bind_release, NULL, NULL);
- ret = devm_snd_soc_bind_card(card->devres_dev, card);
- } else {
- ret = snd_soc_bind_card(card);
- }
-
- if (ret != -EPROBE_DEFER)
- list_del_init(&card->list);
-
- return ret;
+ if (card->devres_dev)
+ return devm_snd_soc_bind_card(card->devres_dev, card);
+ return snd_soc_bind_card(card);
}
/* probes a new socdev */
@@ -2550,8 +2548,6 @@ EXPORT_SYMBOL_GPL(snd_soc_add_dai_controls);
*/
int snd_soc_register_card(struct snd_soc_card *card)
{
- int ret;
-
if (!card->name || !card->dev)
return -EINVAL;
@@ -2578,17 +2574,7 @@ int snd_soc_register_card(struct snd_soc_card *card)
guard(mutex)(&client_mutex);
- if (card->devres_dev) {
- ret = devm_snd_soc_bind_card(card->devres_dev, card);
- if (ret == -EPROBE_DEFER) {
- list_add(&card->list, &unbind_card_list);
- ret = 0;
- }
- } else {
- ret = snd_soc_bind_card(card);
- }
-
- return ret;
+ return call_soc_bind_card(card);
}
EXPORT_SYMBOL_GPL(snd_soc_register_card);
@@ -2909,7 +2895,7 @@ int snd_soc_add_component(struct snd_soc_component *component,
list_add(&component->list, &component_list);
list_for_each_entry_safe(card, c, &unbind_card_list, list)
- snd_soc_rebind_card(card);
+ call_soc_bind_card(card);
err_cleanup:
if (ret < 0)
diff --git a/sound/soc/soc-devres.c b/sound/soc/soc-devres.c
index d33f83ec24f2..718165ba84ac 100644
--- a/sound/soc/soc-devres.c
+++ b/sound/soc/soc-devres.c
@@ -49,11 +49,6 @@ int devm_snd_soc_register_component(struct device *dev,
}
EXPORT_SYMBOL_GPL(devm_snd_soc_register_component);
-static void devm_card_release(struct device *dev, void *res)
-{
- snd_soc_unregister_card(*(struct snd_soc_card **)res);
-}
-
/**
* devm_snd_soc_register_card - resource managed card registration
* @dev: Device used to manage card
@@ -63,32 +58,11 @@ static void devm_card_release(struct device *dev, void *res)
* unregistered.
*/
int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card)
-{
- struct snd_soc_card **ptr;
- int ret;
-
- ptr = devres_alloc(devm_card_release, sizeof(*ptr), GFP_KERNEL);
- if (!ptr)
- return -ENOMEM;
-
- ret = snd_soc_register_card(card);
- if (ret == 0) {
- *ptr = card;
- devres_add(dev, ptr);
- } else {
- devres_free(ptr);
- }
-
- return ret;
-}
-EXPORT_SYMBOL_GPL(devm_snd_soc_register_card);
-
-int devm_snd_soc_register_deferrable_card(struct device *dev, struct snd_soc_card *card)
{
card->devres_dev = dev;
return snd_soc_register_card(card);
}
-EXPORT_SYMBOL_GPL(devm_snd_soc_register_deferrable_card);
+EXPORT_SYMBOL_GPL(devm_snd_soc_register_card);
#ifdef CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM
--
2.34.1
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-04-30 14:07 [PATCH] ASoC: core: Move all users to deferrable card binding Cezary Rojewski
@ 2026-05-11 1:06 ` Mark Brown
2026-05-11 1:34 ` Kuninori Morimoto
` (2 subsequent siblings)
3 siblings, 0 replies; 26+ messages in thread
From: Mark Brown @ 2026-05-11 1:06 UTC (permalink / raw)
To: Cezary Rojewski; +Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound
On Thu, 30 Apr 2026 16:07:52 +0200, Cezary Rojewski wrote:
> ASoC: core: Move all users to deferrable card binding
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.2
Thanks!
[1/1] ASoC: core: Move all users to deferrable card binding
https://git.kernel.org/broonie/sound/c/42d99857d6f0
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
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-04-30 14:07 [PATCH] ASoC: core: Move all users to deferrable card binding Cezary Rojewski
2026-05-11 1:06 ` Mark Brown
@ 2026-05-11 1:34 ` Kuninori Morimoto
2026-05-12 8:14 ` Rojewski, Cezary
2026-05-20 9:55 ` Alexander Stein
2026-05-22 10:16 ` Péter Ujfalusi
3 siblings, 1 reply; 26+ messages in thread
From: Kuninori Morimoto @ 2026-05-11 1:34 UTC (permalink / raw)
To: Cezary Rojewski; +Cc: broonie, tiwai, perex, amade, linux-sound
Hi Cezary
Thank you for the patch.
And sorry for my late response, it was long holiday in Japan.
> Commit a3375522bb5e2 ("ASoC: core: Complete support for card rebinding")
> completed the feature and at the same time divided ASoC users into two
> groups:
>
> 1) cards that fail to enumerate the moment one of the components is
> not available
> 2) cards that succeed to enumerate even if some of their components
> become available late
>
> Given the component-based nature of ASoC, approach 2) is preferred and
> can be used by all ASoC users. By dropping 1) the card binding code can
> also be simplified.
>
> Flatten code that is currently conditional based on ->devres_dev and
> convert snd_soc_rebind_card() to call_soc_bind_card(). The latter is a
> selector between managed and unmanaged card-binding behaviour to keep
> non-devm users happy.
>
> With rebinding being the default, devm_snd_soc_register_card() takes
> form of its deferrable friend - all the devm job is already done by
> devm_snd_soc_bind_card().
>
> Suggested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
> ---
It looks more simple, thank you !
2 questions.
Q1. this means, devm_ register user can use auto rebind, normal user can't,
but is this correct ?
Q2. If so, list_xxx() can be done in devm_snd_soc_bind_card(), instead of
normal snd_soc_bind_card(), but what do you think ?
Thank you for your help !!
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-11 1:34 ` Kuninori Morimoto
@ 2026-05-12 8:14 ` Rojewski, Cezary
0 siblings, 0 replies; 26+ messages in thread
From: Rojewski, Cezary @ 2026-05-12 8:14 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: broonie, tiwai, perex, amade, linux-sound
On 5/11/2026 3:34 AM, Kuninori Morimoto wrote:
>
> Hi Cezary
>
> Thank you for the patch.
> And sorry for my late response, it was long holiday in Japan.
Thank you for finding the time for review and asking the questions!
(...)
>
> It looks more simple, thank you !
>
> 2 questions.
>
> Q1. this means, devm_ register user can use auto rebind, normal user can't,
> but is this correct ?
Rebind is now the default, regardless of the method a driver registers a
card. devm_xxx() variant causes the snd_soc_bind_card() to be managed
and the card is automatically unbound (unregistered) when the device is
detached. Apart from that, there's no difference between the classic
(non-devm) and the managed (devm) way.
> Q2. If so, list_xxx() can be done in devm_snd_soc_bind_card(), instead of
> normal snd_soc_bind_card(), but what do you think ?
Guess if Q1 answer is "no", then Q2 needs no discussion. Feel free to
correct me/ask again if I'm wrong about this.
Kind regards,
Czarek
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-04-30 14:07 [PATCH] ASoC: core: Move all users to deferrable card binding Cezary Rojewski
2026-05-11 1:06 ` Mark Brown
2026-05-11 1:34 ` Kuninori Morimoto
@ 2026-05-20 9:55 ` Alexander Stein
2026-05-20 10:33 ` Cezary Rojewski
2026-05-22 10:16 ` Péter Ujfalusi
3 siblings, 1 reply; 26+ messages in thread
From: Alexander Stein @ 2026-05-20 9:55 UTC (permalink / raw)
To: broonie, Cezary Rojewski
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Cezary Rojewski
Hi,
Am Donnerstag, 30. April 2026, 16:07:52 CEST schrieb Cezary Rojewski:
> Commit a3375522bb5e2 ("ASoC: core: Complete support for card rebinding")
> completed the feature and at the same time divided ASoC users into two
> groups:
>
> 1) cards that fail to enumerate the moment one of the components is
> not available
> 2) cards that succeed to enumerate even if some of their components
> become available late
>
> Given the component-based nature of ASoC, approach 2) is preferred and
> can be used by all ASoC users. By dropping 1) the card binding code can
> also be simplified.
>
> Flatten code that is currently conditional based on ->devres_dev and
> convert snd_soc_rebind_card() to call_soc_bind_card(). The latter is a
> selector between managed and unmanaged card-binding behaviour to keep
> non-devm users happy.
>
> With rebinding being the default, devm_snd_soc_register_card() takes
> form of its deferrable friend - all the devm job is already done by
> devm_snd_soc_bind_card().
>
> Suggested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
This showed up in linux-next and causes a regression on my imx8mp-based
platform (imx8mp-tqma8mpql-mba8mpxl.dts).
On 7.1.0-rc3-00101-g56ba969925ac eveythings works as expected and sound
cards are registered.
On 7.1.0-rc3-00102-g42d99857d6f0 I'm getting these messages/errors:
fsl-asoc-card sound: ASoC: CPU DAI (null) not registered
tlv320aic32x4 1-0018: ASoC error (-22): at snd_soc_dai_set_sysclk() on tlv320aic32x4-hifi
fsl-asoc-card sound: failed to set sysclk in fsl_asoc_card_late_probe
fsl-asoc-card sound: ASoC error (-22): at snd_soc_card_late_probe() on tqm-tlv320aic32
The clock tree looks like this:
audio_pll1_ref_sel 0 0 0 24000000
audio_pll1 0 0 0 393216000
audio_pll1_bypass 0 0 0 393216000
audio_pll1_out 0 0 0 393216000
sai3 0 0 0 12288000
sai3_mclk1_sel 0 0 0 12288000
sai3_mclk1_cg 0 0 0 12288000
pll 0 0 0 49152000
codec_clkin 0 0 0 49152000
nadc 0 0 0 49152000
madc 0 0 0 49152000
ndac 0 0 0 49152000
mdac 0 0 0 49152000
bdiv 0 0 0 49152000
Adding some debug output the offending call is
tlv320aic32x4 1-0018: set sai3_mclk1_cg to freq: 24000000
Apparently this was not happening before.
best regards,
Alexander
> ---
>
> This is a direct continuation of subject [1] begun by Kuninori with goal
> of simplifying the code related to card rebinding.
>
> [1]: https://lore.kernel.org/linux-sound/87eck7k868.wl-kuninori.morimoto.gx@renesas.com/
>
> include/sound/soc.h | 2 +-
> sound/soc/soc-core.c | 44 ++++++++++++++----------------------------
> sound/soc/soc-devres.c | 28 +--------------------------
> 3 files changed, 17 insertions(+), 57 deletions(-)
>
> diff --git a/include/sound/soc.h b/include/sound/soc.h
> index a30f95ff7d86..f0935523c8df 100644
> --- a/include/sound/soc.h
> +++ b/include/sound/soc.h
> @@ -425,7 +425,7 @@ struct snd_soc_jack_pin;
> int snd_soc_register_card(struct snd_soc_card *card);
> void snd_soc_unregister_card(struct snd_soc_card *card);
> int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card);
> -int devm_snd_soc_register_deferrable_card(struct device *dev, struct snd_soc_card *card);
> +#define devm_snd_soc_register_deferrable_card(d, c) devm_snd_soc_register_card(d, c)
> #ifdef CONFIG_PM_SLEEP
> int snd_soc_suspend(struct device *dev);
> int snd_soc_resume(struct device *dev);
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index e70bf22db5c9..ec141b810b50 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -2165,6 +2165,7 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
> snd_soc_fill_dummy_dai(card);
>
> snd_soc_dapm_init(dapm, card, NULL);
> + list_del_init(&card->list);
>
> /* check whether any platform is ignore machine FE and using topology */
> soc_check_tplg_fes(card);
> @@ -2308,6 +2309,10 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
> probe_end:
> if (ret < 0)
> soc_cleanup_card_resources(card);
> + if (ret == -EPROBE_DEFER) {
> + list_add(&card->list, &unbind_card_list);
> + ret = 0;
> + }
> snd_soc_card_mutex_unlock(card);
>
> return ret;
> @@ -2323,12 +2328,15 @@ static int devm_snd_soc_bind_card(struct device *dev, struct snd_soc_card *card)
> struct snd_soc_card **ptr;
> int ret;
>
> + /* The procedure may be called many times during the lifetime of the card. */
> + devres_destroy(dev, devm_card_bind_release, NULL, NULL);
> +
> ptr = devres_alloc(devm_card_bind_release, sizeof(*ptr), GFP_KERNEL);
> if (!ptr)
> return -ENOMEM;
>
> ret = snd_soc_bind_card(card);
> - if (ret == 0 || ret == -EPROBE_DEFER) {
> + if (ret == 0) {
> *ptr = card;
> devres_add(dev, ptr);
> } else {
> @@ -2338,21 +2346,11 @@ static int devm_snd_soc_bind_card(struct device *dev, struct snd_soc_card *card)
> return ret;
> }
>
> -static int snd_soc_rebind_card(struct snd_soc_card *card)
> +static int call_soc_bind_card(struct snd_soc_card *card)
> {
> - int ret;
> -
> - if (card->devres_dev) {
> - devres_destroy(card->devres_dev, devm_card_bind_release, NULL, NULL);
> - ret = devm_snd_soc_bind_card(card->devres_dev, card);
> - } else {
> - ret = snd_soc_bind_card(card);
> - }
> -
> - if (ret != -EPROBE_DEFER)
> - list_del_init(&card->list);
> -
> - return ret;
> + if (card->devres_dev)
> + return devm_snd_soc_bind_card(card->devres_dev, card);
> + return snd_soc_bind_card(card);
> }
>
> /* probes a new socdev */
> @@ -2550,8 +2548,6 @@ EXPORT_SYMBOL_GPL(snd_soc_add_dai_controls);
> */
> int snd_soc_register_card(struct snd_soc_card *card)
> {
> - int ret;
> -
> if (!card->name || !card->dev)
> return -EINVAL;
>
> @@ -2578,17 +2574,7 @@ int snd_soc_register_card(struct snd_soc_card *card)
>
> guard(mutex)(&client_mutex);
>
> - if (card->devres_dev) {
> - ret = devm_snd_soc_bind_card(card->devres_dev, card);
> - if (ret == -EPROBE_DEFER) {
> - list_add(&card->list, &unbind_card_list);
> - ret = 0;
> - }
> - } else {
> - ret = snd_soc_bind_card(card);
> - }
> -
> - return ret;
> + return call_soc_bind_card(card);
> }
> EXPORT_SYMBOL_GPL(snd_soc_register_card);
>
> @@ -2909,7 +2895,7 @@ int snd_soc_add_component(struct snd_soc_component *component,
> list_add(&component->list, &component_list);
>
> list_for_each_entry_safe(card, c, &unbind_card_list, list)
> - snd_soc_rebind_card(card);
> + call_soc_bind_card(card);
>
> err_cleanup:
> if (ret < 0)
> diff --git a/sound/soc/soc-devres.c b/sound/soc/soc-devres.c
> index d33f83ec24f2..718165ba84ac 100644
> --- a/sound/soc/soc-devres.c
> +++ b/sound/soc/soc-devres.c
> @@ -49,11 +49,6 @@ int devm_snd_soc_register_component(struct device *dev,
> }
> EXPORT_SYMBOL_GPL(devm_snd_soc_register_component);
>
> -static void devm_card_release(struct device *dev, void *res)
> -{
> - snd_soc_unregister_card(*(struct snd_soc_card **)res);
> -}
> -
> /**
> * devm_snd_soc_register_card - resource managed card registration
> * @dev: Device used to manage card
> @@ -63,32 +58,11 @@ static void devm_card_release(struct device *dev, void *res)
> * unregistered.
> */
> int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card)
> -{
> - struct snd_soc_card **ptr;
> - int ret;
> -
> - ptr = devres_alloc(devm_card_release, sizeof(*ptr), GFP_KERNEL);
> - if (!ptr)
> - return -ENOMEM;
> -
> - ret = snd_soc_register_card(card);
> - if (ret == 0) {
> - *ptr = card;
> - devres_add(dev, ptr);
> - } else {
> - devres_free(ptr);
> - }
> -
> - return ret;
> -}
> -EXPORT_SYMBOL_GPL(devm_snd_soc_register_card);
> -
> -int devm_snd_soc_register_deferrable_card(struct device *dev, struct snd_soc_card *card)
> {
> card->devres_dev = dev;
> return snd_soc_register_card(card);
> }
> -EXPORT_SYMBOL_GPL(devm_snd_soc_register_deferrable_card);
> +EXPORT_SYMBOL_GPL(devm_snd_soc_register_card);
>
> #ifdef CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM
>
>
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-20 9:55 ` Alexander Stein
@ 2026-05-20 10:33 ` Cezary Rojewski
2026-05-21 6:42 ` Alexander Stein
0 siblings, 1 reply; 26+ messages in thread
From: Cezary Rojewski @ 2026-05-20 10:33 UTC (permalink / raw)
To: Alexander Stein
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Mark Brown
On 5/20/2026 11:55 AM, Alexander Stein wrote:
> Hi,
...
> This showed up in linux-next and causes a regression on my imx8mp-based
> platform (imx8mp-tqma8mpql-mba8mpxl.dts).
>
> On 7.1.0-rc3-00101-g56ba969925ac eveythings works as expected and sound
> cards are registered.
>
> On 7.1.0-rc3-00102-g42d99857d6f0 I'm getting these messages/errors:
>
> fsl-asoc-card sound: ASoC: CPU DAI (null) not registered
> tlv320aic32x4 1-0018: ASoC error (-22): at snd_soc_dai_set_sysclk() on tlv320aic32x4-hifi
> fsl-asoc-card sound: failed to set sysclk in fsl_asoc_card_late_probe
> fsl-asoc-card sound: ASoC error (-22): at snd_soc_card_late_probe() on tqm-tlv320aic32
>
> The clock tree looks like this:
> audio_pll1_ref_sel 0 0 0 24000000
> audio_pll1 0 0 0 393216000
> audio_pll1_bypass 0 0 0 393216000
> audio_pll1_out 0 0 0 393216000
> sai3 0 0 0 12288000
> sai3_mclk1_sel 0 0 0 12288000
> sai3_mclk1_cg 0 0 0 12288000
> pll 0 0 0 49152000
> codec_clkin 0 0 0 49152000
> nadc 0 0 0 49152000
> madc 0 0 0 49152000
> ndac 0 0 0 49152000
> mdac 0 0 0 49152000
> bdiv 0 0 0 49152000
>
> Adding some debug output the offending call is
> tlv320aic32x4 1-0018: set sai3_mclk1_cg to freq: 24000000
>
> Apparently this was not happening before.
Hello Alexander,
Sorry to hear about the problem. To really see what's going on it would
be good to attach the entire dmesg with:
options snd_soc_core dyndbg==pmf
Now, listing the clocks won't help here unfortunately. The patch works
on the component-level, clock details do not interest it. Also, could
you specify the scenario? Is just a simple platform boot causing the
problem -or- do you perform some specific test steps to reproduce?
Kind regards,
Czarek
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-20 10:33 ` Cezary Rojewski
@ 2026-05-21 6:42 ` Alexander Stein
2026-05-21 8:13 ` Cezary Rojewski
0 siblings, 1 reply; 26+ messages in thread
From: Alexander Stein @ 2026-05-21 6:42 UTC (permalink / raw)
To: Cezary Rojewski
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Mark Brown
Hi Cezary,
thanks for the quick reply.
Am Mittwoch, 20. Mai 2026, 12:33:14 CEST schrieb Cezary Rojewski:
> On 5/20/2026 11:55 AM, Alexander Stein wrote:
> > Hi,
>
> ...
>
> > This showed up in linux-next and causes a regression on my imx8mp-based
> > platform (imx8mp-tqma8mpql-mba8mpxl.dts).
> >
> > On 7.1.0-rc3-00101-g56ba969925ac eveythings works as expected and sound
> > cards are registered.
> >
> > On 7.1.0-rc3-00102-g42d99857d6f0 I'm getting these messages/errors:
> >
> > fsl-asoc-card sound: ASoC: CPU DAI (null) not registered
> > tlv320aic32x4 1-0018: ASoC error (-22): at snd_soc_dai_set_sysclk() on tlv320aic32x4-hifi
> > fsl-asoc-card sound: failed to set sysclk in fsl_asoc_card_late_probe
> > fsl-asoc-card sound: ASoC error (-22): at snd_soc_card_late_probe() on tqm-tlv320aic32
> >
> > The clock tree looks like this:
> > audio_pll1_ref_sel 0 0 0 24000000
> > audio_pll1 0 0 0 393216000
> > audio_pll1_bypass 0 0 0 393216000
> > audio_pll1_out 0 0 0 393216000
> > sai3 0 0 0 12288000
> > sai3_mclk1_sel 0 0 0 12288000
> > sai3_mclk1_cg 0 0 0 12288000
> > pll 0 0 0 49152000
> > codec_clkin 0 0 0 49152000
> > nadc 0 0 0 49152000
> > madc 0 0 0 49152000
> > ndac 0 0 0 49152000
> > mdac 0 0 0 49152000
> > bdiv 0 0 0 49152000
> >
> > Adding some debug output the offending call is
> > tlv320aic32x4 1-0018: set sai3_mclk1_cg to freq: 24000000
> >
> > Apparently this was not happening before.
> Hello Alexander,
>
> Sorry to hear about the problem. To really see what's going on it would
> be good to attach the entire dmesg with:
>
> options snd_soc_core dyndbg==pmf
I disabled HDMI and xcvr audio, as these are separate sound devices, to not
clobber dmesg. Here is the excerpt from dmesg including the first and last
snd_soc_core message:
--8<--
snd_soc_core:snd_soc_register_dai: faux_driver snd-soc-dummy: ASoC: Registered DAI 'snd-soc-dummy-dai'
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
TI DP83867 30be0000.ethernet-1:00: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:00, irq=134)
hantro-vpu 38300000.video-codec: registered nxp,imx8mm-vpu-g1-dec as /dev/video1
hub 2-1:1.0: USB hub found
hub 2-1:1.0: 4 ports detected
snd_soc_core:snd_soc_register_dai: tlv320aic32x4 1-0018: ASoC: Registered DAI 'tlv320aic32x4-hifi'
hantro-vpu 38310000.video-codec: registered nxp,imx8mq-vpu-g2-dec as /dev/video2
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
snd_soc_core:snd_soc_register_dai: fsl-aud2htx 30cb0000.aud2htx: ASoC: Registered DAI '30cb0000.aud2htx'
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
snd_soc_core:snd_soc_register_dai: fsl-easrc 30c90000.easrc: ASoC: Registered DAI '30c90000.easrc'
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
fsl-asoc-card sound: ASoC: CPU DAI (null) not registered
snd_soc_core:snd_soc_register_dai: fsl-sai 30c30000.sai: ASoC: Registered DAI 'sai-tx-rx'
snd_soc_core:snd_soc_register_dai: fsl-sai 30c30000.sai: ASoC: Registered DAI 'sai-tx'
snd_soc_core:snd_soc_register_dai: fsl-sai 30c30000.sai: ASoC: Registered DAI 'sai-rx'
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi-ASRC-FE
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi-ASRC-FE
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi-ASRC-BE
snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi-ASRC-BE
snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-sai 30c30000.sai: ASoC: adding CPU-Playback widget
snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-sai 30c30000.sai: ASoC: adding CPU-Capture widget
snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-sai 30c30000.sai: ASoC: adding SAI-Playback widget
snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-sai 30c30000.sai: ASoC: adding SAI-Capture widget
snd_soc_core:snd_soc_dapm_new_dai_widgets: tlv320aic32x4 1-0018: ASoC: adding Playback widget
snd_soc_core:snd_soc_dapm_new_dai_widgets: tlv320aic32x4 1-0018: ASoC: adding Capture widget
snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-easrc 30c90000.easrc: ASoC: adding ASRC-Playback widget
snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-easrc 30c90000.easrc: ASoC: adding ASRC-Capture widget
snd_soc_core:soc_create_pcm: fsl-asoc-card sound: ASoC: registered pcm #0 HiFi tlv320aic32x4-hifi-0
snd_soc_core:soc_new_pcm: fsl-asoc-card sound: tlv320aic32x4-hifi <-> sai-tx-rx mapping ok
snd_soc_core:soc_create_pcm: fsl-asoc-card sound: ASoC: registered pcm #1 HiFi-ASRC-FE (*)
snd_soc_core:soc_new_pcm: fsl-asoc-card sound: snd-soc-dummy-dai <-> 30c90000.easrc mapping ok
snd_soc_core:soc_create_pcm: fsl-asoc-card sound: ASoC: registered pcm #2 (HiFi-ASRC-BE)
snd_soc_core:soc_new_pcm: fsl-asoc-card sound: tlv320aic32x4-hifi <-> sai-tx-rx mapping ok
snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Playback -> Left DAC
snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Playback -> Right DAC
snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Right ADC -> Capture
snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Left ADC -> Capture
snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link 30c30000.sai:CPU-Playback -> tlv320aic32x4.1-0018:Playback
snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link tlv320aic32x4.1-0018:Capture -> 30c30000.sai:CPU-Capture
snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link 30c30000.sai:CPU-Playback -> tlv320aic32x4.1-0018:Playback
snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link tlv320aic32x4.1-0018:Capture -> 30c30000.sai:CPU-Capture
tlv320aic32x4 1-0018: ASoC error (-22): at snd_soc_dai_set_sysclk() on tlv320aic32x4-hifi
fsl-asoc-card sound: failed to set sysclk in fsl_asoc_card_late_probe
fsl-asoc-card sound: ASoC error (-22): at snd_soc_card_late_probe() on tqm-tlv320aic32
snd_soc_core:snd_soc_register_dai: fsl-xcvr 30cc0000.xcvr: ASoC: Registered DAI '30cc0000.xcvr'
snd_soc_core:snd_soc_register_dai: hdmi-audio-codec hdmi-audio-codec.1: ASoC: Registered DAI 'i2s-hifi'
--8<--
> Now, listing the clocks won't help here unfortunately. The patch works
> on the component-level, clock details do not interest it. Also, could
> you specify the scenario? Is just a simple platform boot causing the
> problem -or- do you perform some specific test steps to reproduce?
There is no specific scenario, just booting the board causes this error
during probe.
Thanks and best regards
Alexander
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-21 6:42 ` Alexander Stein
@ 2026-05-21 8:13 ` Cezary Rojewski
2026-05-21 10:11 ` Alexander Stein
0 siblings, 1 reply; 26+ messages in thread
From: Cezary Rojewski @ 2026-05-21 8:13 UTC (permalink / raw)
To: Alexander Stein
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Mark Brown
On 5/21/2026 8:42 AM, Alexander Stein wrote:
> Hi Cezary,
>
> thanks for the quick reply.
...
>> Sorry to hear about the problem. To really see what's going on it would
>> be good to attach the entire dmesg with:
>>
>> options snd_soc_core dyndbg==pmf
>
> I disabled HDMI and xcvr audio, as these are separate sound devices, to not
> clobber dmesg. Here is the excerpt from dmesg including the first and last
> snd_soc_core message:
> --8<--
...
> snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Playback -> Left DAC
> snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Playback -> Right DAC
> snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Right ADC -> Capture
> snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Left ADC -> Capture
> snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link 30c30000.sai:CPU-Playback -> tlv320aic32x4.1-0018:Playback
> snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link tlv320aic32x4.1-0018:Capture -> 30c30000.sai:CPU-Capture
> snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link 30c30000.sai:CPU-Playback -> tlv320aic32x4.1-0018:Playback
> snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link tlv320aic32x4.1-0018:Capture -> 30c30000.sai:CPU-Capture
> tlv320aic32x4 1-0018: ASoC error (-22): at snd_soc_dai_set_sysclk() on tlv320aic32x4-hifi
> fsl-asoc-card sound: failed to set sysclk in fsl_asoc_card_late_probe
> fsl-asoc-card sound: ASoC error (-22): at snd_soc_card_late_probe() on tqm-tlv320aic32
> snd_soc_core:snd_soc_register_dai: fsl-xcvr 30cc0000.xcvr: ASoC: Registered DAI '30cc0000.xcvr'
> snd_soc_core:snd_soc_register_dai: hdmi-audio-codec hdmi-audio-codec.1: ASoC: Registered DAI 'i2s-hifi'
> --8<--
>
>
>> Now, listing the clocks won't help here unfortunately. The patch works
>> on the component-level, clock details do not interest it. Also, could
>> you specify the scenario? Is just a simple platform boot causing the
>> problem -or- do you perform some specific test steps to reproduce?
>
> There is no specific scenario, just booting the board causes this error
> during probe.
Thank you for the confirmation.
I've forgotten to mention - please also attach the equivalnet but from
the system running the previous kernel (one that causes no trouble).
Now, would it be possible to receive the excerpts as attachments? The
timestamps are also welcome - in the above snapshop, all of them are cut
off.
Kind regards,
Czarek
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-21 8:13 ` Cezary Rojewski
@ 2026-05-21 10:11 ` Alexander Stein
2026-05-21 14:41 ` Cezary Rojewski
0 siblings, 1 reply; 26+ messages in thread
From: Alexander Stein @ 2026-05-21 10:11 UTC (permalink / raw)
To: Cezary Rojewski
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Mark Brown
Am Donnerstag, 21. Mai 2026, 10:13:45 CEST schrieb Cezary Rojewski:
> On 5/21/2026 8:42 AM, Alexander Stein wrote:
> > Hi Cezary,
> >
> > thanks for the quick reply.
>
> ...
>
> >> Sorry to hear about the problem. To really see what's going on it would
> >> be good to attach the entire dmesg with:
> >>
> >> options snd_soc_core dyndbg==pmf
> >
> > I disabled HDMI and xcvr audio, as these are separate sound devices, to not
> > clobber dmesg. Here is the excerpt from dmesg including the first and last
> > snd_soc_core message:
> > --8<--
>
> ...
>
> > snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Playback -> Left DAC
> > snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Playback -> Right DAC
> > snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Right ADC -> Capture
> > snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Left ADC -> Capture
> > snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link 30c30000.sai:CPU-Playback -> tlv320aic32x4.1-0018:Playback
> > snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link tlv320aic32x4.1-0018:Capture -> 30c30000.sai:CPU-Capture
> > snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link 30c30000.sai:CPU-Playback -> tlv320aic32x4.1-0018:Playback
> > snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link tlv320aic32x4.1-0018:Capture -> 30c30000.sai:CPU-Capture
> > tlv320aic32x4 1-0018: ASoC error (-22): at snd_soc_dai_set_sysclk() on tlv320aic32x4-hifi
> > fsl-asoc-card sound: failed to set sysclk in fsl_asoc_card_late_probe
> > fsl-asoc-card sound: ASoC error (-22): at snd_soc_card_late_probe() on tqm-tlv320aic32
> > snd_soc_core:snd_soc_register_dai: fsl-xcvr 30cc0000.xcvr: ASoC: Registered DAI '30cc0000.xcvr'
> > snd_soc_core:snd_soc_register_dai: hdmi-audio-codec hdmi-audio-codec.1: ASoC: Registered DAI 'i2s-hifi'
> > --8<--
> >
> >
> >> Now, listing the clocks won't help here unfortunately. The patch works
> >> on the component-level, clock details do not interest it. Also, could
> >> you specify the scenario? Is just a simple platform boot causing the
> >> problem -or- do you perform some specific test steps to reproduce?
> >
> > There is no specific scenario, just booting the board causes this error
> > during probe.
> Thank you for the confirmation.
>
> I've forgotten to mention - please also attach the equivalnet but from
> the system running the previous kernel (one that causes no trouble).
> Now, would it be possible to receive the excerpts as attachments? The
> timestamps are also welcome - in the above snapshop, all of them are cut
> off.
I stripped the timestamps deliberately, people told me it's just noise.
But here we go
7.1.0-rc3-00101-g56ba969925ac (works)
[ 14.960029] snd_soc_core:snd_soc_register_dai: faux_driver snd-soc-dummy: ASoC: Registered DAI 'snd-soc-dummy-dai'
[ 14.961501] EDAC MC: ECC not enabled
[ 14.961521] EDAC DEBUG: edac_mc_free:
[ 15.064506] imx8mp-dw-hdmi-tx 32fd8000.hdmi: bound 32fc4800.audio-bridge (ops imx8mp_hdmi_pai_ops [imx8mp_hdmi_pai])
[ 15.064648] imx8mp-dw-hdmi-tx 32fd8000.hdmi: Detected HDMI TX controller v2.13a with HDCP (SAMSUNG HDMI TX PHY)
[ 15.072889] imx8mp-dw-hdmi-tx 32fd8000.hdmi: registered DesignWare HDMI I2C bus driver
[ 15.121803] snd_soc_core:snd_soc_register_dai: tlv320aic32x4 1-0018: ASoC: Registered DAI 'tlv320aic32x4-hifi'
[ 15.123446] dw100 32e30000.dwe: dw100 v4l2 m2m registered as /dev/video0
[ 15.128638] [drm] Initialized imx-lcdif 1.0.0 for 32fc6000.display-controller on minor 1
[ 15.128724] imx-lcdif 32fc6000.display-controller: [drm] Cannot find any crtc or sizes
[ 15.166943] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 15.166979] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.167011] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 15.167024] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
[ 15.217490] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 15.339043] hantro-vpu 38300000.video-codec: registered nxp,imx8mm-vpu-g1-dec as /dev/video1
[ 15.340841] hantro-vpu 38310000.video-codec: registered nxp,imx8mq-vpu-g2-dec as /dev/video2
[ 15.341111] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 15.341140] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.341166] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 15.341203] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
[ 15.342263] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 15.342309] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.342317] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 15.342330] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
[ 15.404980] TI DP83867 30be0000.ethernet-1:00: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:00, irq=131)
[ 15.412128] hub 1-1:1.0: USB hub found
[ 15.412227] hub 1-1:1.0: 4 ports detected
[ 15.474418] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[ 15.476172] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 15.476234] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.476259] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 15.476273] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
[ 15.521980] hub 2-1:1.0: USB hub found
[ 15.522092] hub 2-1:1.0: 4 ports detected
[ 15.547396] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 15.547424] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.547432] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 15.547440] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
[ 15.604694] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 15.604824] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.604857] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 15.604870] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
[ 15.689691] snd_soc_core:snd_soc_register_dai: fsl-aud2htx 30cb0000.aud2htx: ASoC: Registered DAI '30cb0000.aud2htx'
[ 15.690994] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 15.692745] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.697628] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 15.697739] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
[ 15.710917] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 15.710951] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.710978] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 15.710992] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
[ 15.715166] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 15.715388] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.715448] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 15.715471] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
[ 15.843744] snd_soc_core:snd_soc_register_dai: fsl-sai 30c30000.sai: ASoC: Registered DAI 'sai-tx-rx'
[ 15.843776] snd_soc_core:snd_soc_register_dai: fsl-sai 30c30000.sai: ASoC: Registered DAI 'sai-tx'
[ 15.844754] snd_soc_core:snd_soc_register_dai: fsl-sai 30c30000.sai: ASoC: Registered DAI 'sai-rx'
[ 15.847549] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 15.847589] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.847612] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 15.861445] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi-ASRC-FE
[ 15.861478] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.861617] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi-ASRC-FE
[ 15.861640] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi-ASRC-FE
[ 15.884578] snd_soc_core:snd_soc_register_dai: fsl-easrc 30c90000.easrc: ASoC: Registered DAI '30c90000.easrc'
[ 15.888542] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 15.888587] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.888612] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 15.888680] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi-ASRC-FE
[ 15.888692] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.888699] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi-ASRC-FE
[ 15.888739] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi-ASRC-BE
[ 15.888751] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.888763] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi-ASRC-BE
[ 15.888870] snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-sai 30c30000.sai: ASoC: adding CPU-Playback widget
[ 15.888885] snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-sai 30c30000.sai: ASoC: adding CPU-Capture widget
[ 15.888899] snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-sai 30c30000.sai: ASoC: adding SAI-Playback widget
[ 15.888906] snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-sai 30c30000.sai: ASoC: adding SAI-Capture widget
[ 15.889078] snd_soc_core:snd_soc_dapm_new_dai_widgets: tlv320aic32x4 1-0018: ASoC: adding Playback widget
[ 15.889093] snd_soc_core:snd_soc_dapm_new_dai_widgets: tlv320aic32x4 1-0018: ASoC: adding Capture widget
[ 15.997493] snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-easrc 30c90000.easrc: ASoC: adding ASRC-Playback widget
[ 15.997519] snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-easrc 30c90000.easrc: ASoC: adding ASRC-Capture widget
[ 16.002901] snd_soc_core:soc_create_pcm: fsl-asoc-card sound: ASoC: registered pcm #0 HiFi tlv320aic32x4-hifi-0
[ 16.011059] snd_soc_core:soc_new_pcm: fsl-asoc-card sound: tlv320aic32x4-hifi <-> sai-tx-rx mapping ok
[ 16.011150] snd_soc_core:soc_create_pcm: fsl-asoc-card sound: ASoC: registered pcm #1 HiFi-ASRC-FE (*)
[ 16.017612] snd_soc_core:soc_new_pcm: fsl-asoc-card sound: snd-soc-dummy-dai <-> 30c90000.easrc mapping ok
[ 16.020236] snd_soc_core:soc_create_pcm: fsl-asoc-card sound: ASoC: registered pcm #2 (HiFi-ASRC-BE)
[ 16.020283] snd_soc_core:soc_new_pcm: fsl-asoc-card sound: tlv320aic32x4-hifi <-> sai-tx-rx mapping ok
[ 16.020306] snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Playback -> Left DAC
[ 16.020318] snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Playback -> Right DAC
[ 16.020329] snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Right ADC -> Capture
[ 16.020338] snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Left ADC -> Capture
[ 16.020349] snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link 30c30000.sai:CPU-Playback -> tlv320aic32x4.1-0018:Playback
[ 16.020359] snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link tlv320aic32x4.1-0018:Capture -> 30c30000.sai:CPU-Capture
[ 16.020369] snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link 30c30000.sai:CPU-Playback -> tlv320aic32x4.1-0018:Playback
[ 16.020378] snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link tlv320aic32x4.1-0018:Capture -> 30c30000.sai:CPU-Capture
[ 16.171201] snd_soc_core:snd_soc_register_dai: hdmi-audio-codec hdmi-audio-codec.1: ASoC: Registered DAI 'i2s-hifi'
7.1.0-rc3-00102-g42d99857d6f0 (broken)
[ 14.400390] snd_soc_core:snd_soc_register_dai: faux_driver snd-soc-dummy: ASoC: Registered DAI 'snd-soc-dummy-dai'
[ 14.487096] hantro-vpu 38300000.video-codec: registered nxp,imx8mm-vpu-g1-dec as /dev/video1
[ 14.488989] hantro-vpu 38310000.video-codec: registered nxp,imx8mq-vpu-g2-dec as /dev/video2
[ 14.511119] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 14.511158] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 14.511184] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 14.511194] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
[ 14.511210] snd_soc_core:snd_soc_register_dai: tlv320aic32x4 1-0018: ASoC: Registered DAI 'tlv320aic32x4-hifi'
[ 14.511227] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 14.511235] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 14.511244] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 14.511252] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
[ 14.550504] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 14.636061] TI DP83867 30be0000.ethernet-1:00: attached PHY driver (mii_bus:phy_addr=30be0000.ethernet-1:00, irq=131)
[ 14.743400] hub 1-1:1.0: USB hub found
[ 14.743503] hub 1-1:1.0: 4 ports detected
[ 14.807178] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[ 14.817480] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 14.817513] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 14.817542] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 14.817556] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
[ 14.817577] snd_soc_core:snd_soc_register_dai: fsl-aud2htx 30cb0000.aud2htx: ASoC: Registered DAI '30cb0000.aud2htx'
[ 14.817588] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 14.817596] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 14.817605] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 14.817612] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
[ 14.858476] hub 2-1:1.0: USB hub found
[ 14.858592] hub 2-1:1.0: 4 ports detected
[ 14.926344] snd_soc_core:snd_soc_register_dai: fsl-easrc 30c90000.easrc: ASoC: Registered DAI '30c90000.easrc'
[ 14.926383] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 14.926389] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 14.926912] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 14.927047] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
[ 14.927117] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 14.927202] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 14.927250] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 14.927294] snd_soc_core:soc_dai_link_sanity_check: fsl-asoc-card sound: ASoC: Component (null) not found for link HiFi
[ 15.073545] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 15.073683] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.073717] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 15.136499] fsl-asoc-card sound: ASoC: CPU DAI (null) not registered
[ 15.136614] snd_soc_core:snd_soc_register_dai: fsl-sai 30c30000.sai: ASoC: Registered DAI 'sai-tx-rx'
[ 15.139874] snd_soc_core:snd_soc_register_dai: fsl-sai 30c30000.sai: ASoC: Registered DAI 'sai-tx'
[ 15.139928] snd_soc_core:snd_soc_register_dai: fsl-sai 30c30000.sai: ASoC: Registered DAI 'sai-rx'
[ 15.139954] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi
[ 15.139964] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.139976] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi
[ 15.140074] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi-ASRC-FE
[ 15.140085] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.140096] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi-ASRC-FE
[ 15.140134] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: dai_link HiFi-ASRC-BE
[ 15.140147] snd_soc_core:snd_soc_compensate_channel_connection_map: fsl-asoc-card sound: [0] cpu0 <-> codec0
[ 15.140156] snd_soc_core:snd_soc_add_pcm_runtime: fsl-asoc-card sound: ASoC: binding HiFi-ASRC-BE
[ 15.140318] snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-sai 30c30000.sai: ASoC: adding CPU-Playback widget
[ 15.140337] snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-sai 30c30000.sai: ASoC: adding CPU-Capture widget
[ 15.140346] snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-sai 30c30000.sai: ASoC: adding SAI-Playback widget
[ 15.140356] snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-sai 30c30000.sai: ASoC: adding SAI-Capture widget
[ 15.140596] snd_soc_core:snd_soc_dapm_new_dai_widgets: tlv320aic32x4 1-0018: ASoC: adding Playback widget
[ 15.140622] snd_soc_core:snd_soc_dapm_new_dai_widgets: tlv320aic32x4 1-0018: ASoC: adding Capture widget
[ 15.271414] Bluetooth: Core ver 2.22
[ 15.271545] NET: Registered PF_BLUETOOTH protocol family
[ 15.272201] Bluetooth: HCI device and connection manager initialized
[ 15.272255] Bluetooth: HCI socket layer initialized
[ 15.272268] Bluetooth: L2CAP socket layer initialized
[ 15.272293] Bluetooth: SCO socket layer initialized
[ 15.296872] snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-easrc 30c90000.easrc: ASoC: adding ASRC-Playback widget
[ 15.296900] snd_soc_core:snd_soc_dapm_new_dai_widgets: fsl-easrc 30c90000.easrc: ASoC: adding ASRC-Capture widget
[ 15.300069] snd_soc_core:soc_create_pcm: fsl-asoc-card sound: ASoC: registered pcm #0 HiFi tlv320aic32x4-hifi-0
[ 15.317421] snd_soc_core:soc_new_pcm: fsl-asoc-card sound: tlv320aic32x4-hifi <-> sai-tx-rx mapping ok
[ 15.317583] snd_soc_core:soc_create_pcm: fsl-asoc-card sound: ASoC: registered pcm #1 HiFi-ASRC-FE (*)
[ 15.331269] snd_soc_core:soc_new_pcm: fsl-asoc-card sound: snd-soc-dummy-dai <-> 30c90000.easrc mapping ok
[ 15.345851] snd_soc_core:soc_create_pcm: fsl-asoc-card sound: ASoC: registered pcm #2 (HiFi-ASRC-BE)
[ 15.345882] snd_soc_core:soc_new_pcm: fsl-asoc-card sound: tlv320aic32x4-hifi <-> sai-tx-rx mapping ok
[ 15.346065] snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Playback -> Left DAC
[ 15.346088] snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Playback -> Right DAC
[ 15.346104] snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Right ADC -> Capture
[ 15.346116] snd_soc_core:snd_soc_dapm_link_dai_widgets: tlv320aic32x4 1-0018: Left ADC -> Capture
[ 15.346132] snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link 30c30000.sai:CPU-Playback -> tlv320aic32x4.1-0018:Playback
[ 15.346222] snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link tlv320aic32x4.1-0018:Capture -> 30c30000.sai:CPU-Capture
[ 15.346239] snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link 30c30000.sai:CPU-Playback -> tlv320aic32x4.1-0018:Playback
[ 15.346251] snd_soc_core:dapm_connect_dai_routes: fsl-asoc-card sound: connected DAI link tlv320aic32x4.1-0018:Capture -> 30c30000.sai:CPU-Capture
[ 15.360319] tlv320aic32x4 1-0018: ASoC error (-22): at snd_soc_dai_set_sysclk() on tlv320aic32x4-hifi
[ 15.360342] fsl-asoc-card sound: failed to set sysclk in fsl_asoc_card_late_probe
[ 15.360360] fsl-asoc-card sound: ASoC error (-22): at snd_soc_card_late_probe() on tqm-tlv320aic32
[ 15.558546] snd_soc_core:snd_soc_register_dai: hdmi-audio-codec hdmi-audio-codec.1: ASoC: Registered DAI 'i2s-hifi'
Thanks and best regards
Alexander
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-21 10:11 ` Alexander Stein
@ 2026-05-21 14:41 ` Cezary Rojewski
2026-05-21 14:47 ` Alexander Stein
2026-05-22 11:21 ` Alexander Stein
0 siblings, 2 replies; 26+ messages in thread
From: Cezary Rojewski @ 2026-05-21 14:41 UTC (permalink / raw)
To: Alexander Stein
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Mark Brown
On 5/21/2026 12:11 PM, Alexander Stein wrote:
> Am Donnerstag, 21. Mai 2026, 10:13:45 CEST schrieb Cezary Rojewski:
...
>>>> Now, listing the clocks won't help here unfortunately. The patch works
>>>> on the component-level, clock details do not interest it. Also, could
>>>> you specify the scenario? Is just a simple platform boot causing the
>>>> problem -or- do you perform some specific test steps to reproduce?
>>>
>>> There is no specific scenario, just booting the board causes this error
>>> during probe.
>> Thank you for the confirmation.
>>
>> I've forgotten to mention - please also attach the equivalnet but from
>> the system running the previous kernel (one that causes no trouble).
>> Now, would it be possible to receive the excerpts as attachments? The
>> timestamps are also welcome - in the above snapshop, all of them are cut
>> off.
>
> I stripped the timestamps deliberately, people told me it's just noise.
> But here we go
...
> [ 15.360319] tlv320aic32x4 1-0018: ASoC error (-22): at snd_soc_dai_set_sysclk() on tlv320aic32x4-hifi
> [ 15.360342] fsl-asoc-card sound: failed to set sysclk in fsl_asoc_card_late_probe
> [ 15.360360] fsl-asoc-card sound: ASoC error (-22): at snd_soc_card_late_probe() on tqm-tlv320aic32
> [ 15.558546] snd_soc_core:snd_soc_register_dai: hdmi-audio-codec hdmi-audio-codec.1: ASoC: Registered DAI 'i2s-hifi'
The framework' behavior looks just fine. I'll need some additional help
from your side here.
What does -22 from snd_soc_dai_set_sysclk() actually mean here? The
codec's ->set_sysclk looks as such:
static int aic32x4_set_dai_sysclk(struct snd_soc_dai *codec_dai,
int clk_id, unsigned int freq, int dir)
{
struct snd_soc_component *component = codec_dai->component;
struct clk *mclk;
struct clk *pll;
pll = devm_clk_get(component->dev, "pll");
if (IS_ERR(pll))
return PTR_ERR(pll);
mclk = clk_get_parent(pll);
return clk_set_rate(mclk, freq);
}
Do we even get here? If so, does -22 is caused by devm_clk_get(),
clk_get_parent() or clk_set_rate() ?
I'm also up for a call (e.g.: Teams call) to debug the issue. Typically
such problems arise due to dependency problems between the components
(e.g.: platform into codec works, the other way around does not) but
I've only spent an hour or two analyzing fsl <> tlv320aic32x4 stack and
analyzing dependencies usually takes more than that : )
Kind regards,
Czarek
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-21 14:41 ` Cezary Rojewski
@ 2026-05-21 14:47 ` Alexander Stein
2026-05-22 11:21 ` Alexander Stein
1 sibling, 0 replies; 26+ messages in thread
From: Alexander Stein @ 2026-05-21 14:47 UTC (permalink / raw)
To: Cezary Rojewski
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Mark Brown
Hi Cezary,
Am Donnerstag, 21. Mai 2026, 16:41:04 CEST schrieb Cezary Rojewski:
> On 5/21/2026 12:11 PM, Alexander Stein wrote:
> > Am Donnerstag, 21. Mai 2026, 10:13:45 CEST schrieb Cezary Rojewski:
>
> ...
>
> >>>> Now, listing the clocks won't help here unfortunately. The patch works
> >>>> on the component-level, clock details do not interest it. Also, could
> >>>> you specify the scenario? Is just a simple platform boot causing the
> >>>> problem -or- do you perform some specific test steps to reproduce?
> >>>
> >>> There is no specific scenario, just booting the board causes this error
> >>> during probe.
> >> Thank you for the confirmation.
> >>
> >> I've forgotten to mention - please also attach the equivalnet but from
> >> the system running the previous kernel (one that causes no trouble).
> >> Now, would it be possible to receive the excerpts as attachments? The
> >> timestamps are also welcome - in the above snapshop, all of them are cut
> >> off.
> >
> > I stripped the timestamps deliberately, people told me it's just noise.
> > But here we go
>
> ...
> > [ 15.360319] tlv320aic32x4 1-0018: ASoC error (-22): at snd_soc_dai_set_sysclk() on tlv320aic32x4-hifi
> > [ 15.360342] fsl-asoc-card sound: failed to set sysclk in fsl_asoc_card_late_probe
> > [ 15.360360] fsl-asoc-card sound: ASoC error (-22): at snd_soc_card_late_probe() on tqm-tlv320aic32
> > [ 15.558546] snd_soc_core:snd_soc_register_dai: hdmi-audio-codec hdmi-audio-codec.1: ASoC: Registered DAI 'i2s-hifi'
> The framework' behavior looks just fine. I'll need some additional help
> from your side here.
>
> What does -22 from snd_soc_dai_set_sysclk() actually mean here? The
> codec's ->set_sysclk looks as such:
>
> static int aic32x4_set_dai_sysclk(struct snd_soc_dai *codec_dai,
> int clk_id, unsigned int freq, int dir)
> {
> struct snd_soc_component *component = codec_dai->component;
> struct clk *mclk;
> struct clk *pll;
>
> pll = devm_clk_get(component->dev, "pll");
> if (IS_ERR(pll))
> return PTR_ERR(pll);
>
> mclk = clk_get_parent(pll);
>
> return clk_set_rate(mclk, freq);
> }
>
> Do we even get here? If so, does -22 is caused by devm_clk_get(),
> clk_get_parent() or clk_set_rate() ?
AFAICS the error comes from clk_set_rate(). For some reason sai3_mclk1_cg is
to be set to 24 MHz which is not possible, because the parent has 12288000 Hz.
> I'm also up for a call (e.g.: Teams call) to debug the issue. Typically
> such problems arise due to dependency problems between the components
> (e.g.: platform into codec works, the other way around does not) but
> I've only spent an hour or two analyzing fsl <> tlv320aic32x4 stack and
> analyzing dependencies usually takes more than that : )
I'm open for that as well if you see this is a better way to approach this.
Thanks and best regards
Alexander
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-04-30 14:07 [PATCH] ASoC: core: Move all users to deferrable card binding Cezary Rojewski
` (2 preceding siblings ...)
2026-05-20 9:55 ` Alexander Stein
@ 2026-05-22 10:16 ` Péter Ujfalusi
2026-05-22 14:32 ` Cezary Rojewski
3 siblings, 1 reply; 26+ messages in thread
From: Péter Ujfalusi @ 2026-05-22 10:16 UTC (permalink / raw)
To: Cezary Rojewski, broonie
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Liao, Bard, Vehmanen, Kai
Hi Cezary,
On 30/04/2026 17:07, Cezary Rojewski wrote:
> Commit a3375522bb5e2 ("ASoC: core: Complete support for card rebinding")
> completed the feature and at the same time divided ASoC users into two
> groups:
>
> 1) cards that fail to enumerate the moment one of the components is
> not available
> 2) cards that succeed to enumerate even if some of their components
> become available late
>
> Given the component-based nature of ASoC, approach 2) is preferred and
> can be used by all ASoC users. By dropping 1) the card binding code can
> also be simplified.
>
> Flatten code that is currently conditional based on ->devres_dev and
> convert snd_soc_rebind_card() to call_soc_bind_card(). The latter is a
> selector between managed and unmanaged card-binding behaviour to keep
> non-devm users happy.
>
> With rebinding being the default, devm_snd_soc_register_card() takes
> form of its deferrable friend - all the devm job is already done by
> devm_snd_soc_bind_card().
This patch showed up in sof-dev kernel after a recent upstream merge and
broke audio card probing on some devices.
There are no errors in kernel log, the card just does not form.
Reverting only this patch fixes the card binding.
The affected device have 2x sndw speaker amps, 1x headset codec and 3x
HDMI PCMs.
It is likely that one of the codec's probe happens after the card
probed, the card is not created for some reason and nothing happens.
rmmod snd_soc_sof_sdw
modprobe snd_soc_sof_sdw
will create the card, so it is likely that going ahead without waiting
for all components can and might break audio on system boot.
> Suggested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
> ---
>
> This is a direct continuation of subject [1] begun by Kuninori with goal
> of simplifying the code related to card rebinding.
>
> [1]: https://lore.kernel.org/linux-sound/87eck7k868.wl-kuninori.morimoto.gx@renesas.com/
>
> include/sound/soc.h | 2 +-
> sound/soc/soc-core.c | 44 ++++++++++++++----------------------------
> sound/soc/soc-devres.c | 28 +--------------------------
> 3 files changed, 17 insertions(+), 57 deletions(-)
>
> diff --git a/include/sound/soc.h b/include/sound/soc.h
> index a30f95ff7d86..f0935523c8df 100644
> --- a/include/sound/soc.h
> +++ b/include/sound/soc.h
> @@ -425,7 +425,7 @@ struct snd_soc_jack_pin;
> int snd_soc_register_card(struct snd_soc_card *card);
> void snd_soc_unregister_card(struct snd_soc_card *card);
> int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card);
> -int devm_snd_soc_register_deferrable_card(struct device *dev, struct snd_soc_card *card);
> +#define devm_snd_soc_register_deferrable_card(d, c) devm_snd_soc_register_card(d, c)
> #ifdef CONFIG_PM_SLEEP
> int snd_soc_suspend(struct device *dev);
> int snd_soc_resume(struct device *dev);
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index e70bf22db5c9..ec141b810b50 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -2165,6 +2165,7 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
> snd_soc_fill_dummy_dai(card);
>
> snd_soc_dapm_init(dapm, card, NULL);
> + list_del_init(&card->list);
>
> /* check whether any platform is ignore machine FE and using topology */
> soc_check_tplg_fes(card);
> @@ -2308,6 +2309,10 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
> probe_end:
> if (ret < 0)
> soc_cleanup_card_resources(card);
> + if (ret == -EPROBE_DEFER) {
> + list_add(&card->list, &unbind_card_list);
> + ret = 0;
> + }
> snd_soc_card_mutex_unlock(card);
>
> return ret;
> @@ -2323,12 +2328,15 @@ static int devm_snd_soc_bind_card(struct device *dev, struct snd_soc_card *card)
> struct snd_soc_card **ptr;
> int ret;
>
> + /* The procedure may be called many times during the lifetime of the card. */
> + devres_destroy(dev, devm_card_bind_release, NULL, NULL);
> +
> ptr = devres_alloc(devm_card_bind_release, sizeof(*ptr), GFP_KERNEL);
> if (!ptr)
> return -ENOMEM;
>
> ret = snd_soc_bind_card(card);
> - if (ret == 0 || ret == -EPROBE_DEFER) {
> + if (ret == 0) {
> *ptr = card;
> devres_add(dev, ptr);
> } else {
> @@ -2338,21 +2346,11 @@ static int devm_snd_soc_bind_card(struct device *dev, struct snd_soc_card *card)
> return ret;
> }
>
> -static int snd_soc_rebind_card(struct snd_soc_card *card)
> +static int call_soc_bind_card(struct snd_soc_card *card)
> {
> - int ret;
> -
> - if (card->devres_dev) {
> - devres_destroy(card->devres_dev, devm_card_bind_release, NULL, NULL);
> - ret = devm_snd_soc_bind_card(card->devres_dev, card);
> - } else {
> - ret = snd_soc_bind_card(card);
> - }
> -
> - if (ret != -EPROBE_DEFER)
> - list_del_init(&card->list);
> -
> - return ret;
> + if (card->devres_dev)
> + return devm_snd_soc_bind_card(card->devres_dev, card);
> + return snd_soc_bind_card(card);
> }
>
> /* probes a new socdev */
> @@ -2550,8 +2548,6 @@ EXPORT_SYMBOL_GPL(snd_soc_add_dai_controls);
> */
> int snd_soc_register_card(struct snd_soc_card *card)
> {
> - int ret;
> -
> if (!card->name || !card->dev)
> return -EINVAL;
>
> @@ -2578,17 +2574,7 @@ int snd_soc_register_card(struct snd_soc_card *card)
>
> guard(mutex)(&client_mutex);
>
> - if (card->devres_dev) {
> - ret = devm_snd_soc_bind_card(card->devres_dev, card);
> - if (ret == -EPROBE_DEFER) {
> - list_add(&card->list, &unbind_card_list);
> - ret = 0;
> - }
> - } else {
> - ret = snd_soc_bind_card(card);
> - }
> -
> - return ret;
> + return call_soc_bind_card(card);
> }
> EXPORT_SYMBOL_GPL(snd_soc_register_card);
>
> @@ -2909,7 +2895,7 @@ int snd_soc_add_component(struct snd_soc_component *component,
> list_add(&component->list, &component_list);
>
> list_for_each_entry_safe(card, c, &unbind_card_list, list)
> - snd_soc_rebind_card(card);
> + call_soc_bind_card(card);
>
> err_cleanup:
> if (ret < 0)
> diff --git a/sound/soc/soc-devres.c b/sound/soc/soc-devres.c
> index d33f83ec24f2..718165ba84ac 100644
> --- a/sound/soc/soc-devres.c
> +++ b/sound/soc/soc-devres.c
> @@ -49,11 +49,6 @@ int devm_snd_soc_register_component(struct device *dev,
> }
> EXPORT_SYMBOL_GPL(devm_snd_soc_register_component);
>
> -static void devm_card_release(struct device *dev, void *res)
> -{
> - snd_soc_unregister_card(*(struct snd_soc_card **)res);
> -}
> -
> /**
> * devm_snd_soc_register_card - resource managed card registration
> * @dev: Device used to manage card
> @@ -63,32 +58,11 @@ static void devm_card_release(struct device *dev, void *res)
> * unregistered.
> */
> int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card)
> -{
> - struct snd_soc_card **ptr;
> - int ret;
> -
> - ptr = devres_alloc(devm_card_release, sizeof(*ptr), GFP_KERNEL);
> - if (!ptr)
> - return -ENOMEM;
> -
> - ret = snd_soc_register_card(card);
> - if (ret == 0) {
> - *ptr = card;
> - devres_add(dev, ptr);
> - } else {
> - devres_free(ptr);
> - }
> -
> - return ret;
> -}
> -EXPORT_SYMBOL_GPL(devm_snd_soc_register_card);
> -
> -int devm_snd_soc_register_deferrable_card(struct device *dev, struct snd_soc_card *card)
> {
> card->devres_dev = dev;
> return snd_soc_register_card(card);
> }
> -EXPORT_SYMBOL_GPL(devm_snd_soc_register_deferrable_card);
> +EXPORT_SYMBOL_GPL(devm_snd_soc_register_card);
>
> #ifdef CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM
>
--
Péter
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-21 14:41 ` Cezary Rojewski
2026-05-21 14:47 ` Alexander Stein
@ 2026-05-22 11:21 ` Alexander Stein
1 sibling, 0 replies; 26+ messages in thread
From: Alexander Stein @ 2026-05-22 11:21 UTC (permalink / raw)
To: Cezary Rojewski
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Mark Brown
Am Donnerstag, 21. Mai 2026, 16:41:04 CEST schrieb Cezary Rojewski:
> On 5/21/2026 12:11 PM, Alexander Stein wrote:
> > Am Donnerstag, 21. Mai 2026, 10:13:45 CEST schrieb Cezary Rojewski:
>
> ...
>
> >>>> Now, listing the clocks won't help here unfortunately. The patch works
> >>>> on the component-level, clock details do not interest it. Also, could
> >>>> you specify the scenario? Is just a simple platform boot causing the
> >>>> problem -or- do you perform some specific test steps to reproduce?
> >>>
> >>> There is no specific scenario, just booting the board causes this error
> >>> during probe.
> >> Thank you for the confirmation.
> >>
> >> I've forgotten to mention - please also attach the equivalnet but from
> >> the system running the previous kernel (one that causes no trouble).
> >> Now, would it be possible to receive the excerpts as attachments? The
> >> timestamps are also welcome - in the above snapshop, all of them are cut
> >> off.
> >
> > I stripped the timestamps deliberately, people told me it's just noise.
> > But here we go
>
> ...
> > [ 15.360319] tlv320aic32x4 1-0018: ASoC error (-22): at snd_soc_dai_set_sysclk() on tlv320aic32x4-hifi
> > [ 15.360342] fsl-asoc-card sound: failed to set sysclk in fsl_asoc_card_late_probe
> > [ 15.360360] fsl-asoc-card sound: ASoC error (-22): at snd_soc_card_late_probe() on tqm-tlv320aic32
> > [ 15.558546] snd_soc_core:snd_soc_register_dai: hdmi-audio-codec hdmi-audio-codec.1: ASoC: Registered DAI 'i2s-hifi'
> The framework' behavior looks just fine. I'll need some additional help
> from your side here.
>
> What does -22 from snd_soc_dai_set_sysclk() actually mean here? The
> codec's ->set_sysclk looks as such:
>
> static int aic32x4_set_dai_sysclk(struct snd_soc_dai *codec_dai,
> int clk_id, unsigned int freq, int dir)
> {
> struct snd_soc_component *component = codec_dai->component;
> struct clk *mclk;
> struct clk *pll;
>
> pll = devm_clk_get(component->dev, "pll");
> if (IS_ERR(pll))
> return PTR_ERR(pll);
>
> mclk = clk_get_parent(pll);
>
> return clk_set_rate(mclk, freq);
> }
>
> Do we even get here? If so, does -22 is caused by devm_clk_get(),
> clk_get_parent() or clk_set_rate() ?
We had a debug session and were able locate the cause to the clock tree
configuration in DT (fix about to be sent). AFAICS there is no problem
with this patch, it just uncovers another issue.
Thanks again to Cezary for supporting me pining this down.
best regards
Alexander
> [snip]
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-22 10:16 ` Péter Ujfalusi
@ 2026-05-22 14:32 ` Cezary Rojewski
2026-05-22 14:58 ` Mark Brown
2026-05-25 10:44 ` Pierre-Louis Bossart
0 siblings, 2 replies; 26+ messages in thread
From: Cezary Rojewski @ 2026-05-22 14:32 UTC (permalink / raw)
To: broonie
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Liao, Bard, Vehmanen, Kai, Péter Ujfalusi
On 5/22/2026 12:16 PM, Péter Ujfalusi wrote:
> Hi Cezary,
...
> This patch showed up in sof-dev kernel after a recent upstream merge and
> broke audio card probing on some devices.
>
> There are no errors in kernel log, the card just does not form.
> Reverting only this patch fixes the card binding.
>
> The affected device have 2x sndw speaker amps, 1x headset codec and 3x
> HDMI PCMs.
>
> It is likely that one of the codec's probe happens after the card
> probed, the card is not created for some reason and nothing happens.
>
> rmmod snd_soc_sof_sdw
> modprobe snd_soc_sof_sdw
>
> will create the card, so it is likely that going ahead without waiting
> for all components can and might break audio on system boot.
Hi Mark,
I've had a debug session with Peter today (yes, right after one with
Alexander) and the outcome is kind of an expected one - dependency
issue, TLDR:
// working case:
1) snd_soc_add_component(sdw_codec)
2) snd_soc_add_compoenent(sof_platform)
3) <sof card is probing just fine>
// failing case:
1) snd_soc_add_component(sof_platform)
2) snd_soc_add_component(sdw_codec)
3) <sof card is MISSING dependencies i.e.: components>
We're going to ship fix for the SOF within a week or so. ASoC-framework
behaves as it should, no fixes needed there.
As mentioned by me early during the discussion [1] (last paragraph)
moving the ASoC users to sound-card rebinding may reveal issues. With
the change applied, ASoC, perhaps for the very first time in its
lifetime expects its users to respect sound-card enumerating rules.
Many users do not have the same coverage as the avs-driver solution and
problems such as ones reported above may pop up. I believe it actually
fortifies the need of the change initially proposed by Kuninori - enable
rebind for everyone - as it gives us a chance to finally address all
those dependency issues.
The question on the table: Do we revert the change temporarily, fix the
SOF first and then re-apply the patch again?
[1]:
https://lore.kernel.org/linux-sound/0dadcf51-12e5-4bd2-82d4-4a815d7c2d83@intel.com/
Kind regards,
Czarek
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-22 14:32 ` Cezary Rojewski
@ 2026-05-22 14:58 ` Mark Brown
2026-05-22 15:08 ` Cezary Rojewski
2026-05-25 12:48 ` Péter Ujfalusi
2026-05-25 10:44 ` Pierre-Louis Bossart
1 sibling, 2 replies; 26+ messages in thread
From: Mark Brown @ 2026-05-22 14:58 UTC (permalink / raw)
To: Cezary Rojewski
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Liao, Bard, Vehmanen, Kai, Péter Ujfalusi
[-- Attachment #1: Type: text/plain, Size: 431 bytes --]
On Fri, May 22, 2026 at 04:32:03PM +0200, Cezary Rojewski wrote:
> The question on the table: Do we revert the change temporarily, fix the SOF
> first and then re-apply the patch again?
Given that there's two drivers we managed to turn up bugs in already I'm
inclined to leave the patch there so it's more likely that any other
issues get found. It's a bit annoying for SOF CI but I guess a revert
can be merged locally there?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-22 14:58 ` Mark Brown
@ 2026-05-22 15:08 ` Cezary Rojewski
2026-05-25 12:48 ` Péter Ujfalusi
1 sibling, 0 replies; 26+ messages in thread
From: Cezary Rojewski @ 2026-05-22 15:08 UTC (permalink / raw)
To: Mark Brown
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Liao, Bard, Vehmanen, Kai, Péter Ujfalusi
On 5/22/2026 4:58 PM, Mark Brown wrote:
> On Fri, May 22, 2026 at 04:32:03PM +0200, Cezary Rojewski wrote:
>
>> The question on the table: Do we revert the change temporarily, fix the SOF
>> first and then re-apply the patch again?
>
> Given that there's two drivers we managed to turn up bugs in already I'm
> inclined to leave the patch there so it's more likely that any other
> issues get found. It's a bit annoying for SOF CI but I guess a revert
> can be merged locally there?
From technical perspective I couldn't agree more - the problems should
be fixed ASAP and now we have a vehicle for finding them out.
However, I cannot make the call for the SOF team. Peter is
unfortunately already out for today (thus responses are coming from me,
not him directly). What we will do: send you a reply on Monday. Either
I catch Peter or steal someone else from the SOF team to try to address
the dependency issues immediately.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-22 14:32 ` Cezary Rojewski
2026-05-22 14:58 ` Mark Brown
@ 2026-05-25 10:44 ` Pierre-Louis Bossart
2026-05-25 21:10 ` Cezary Rojewski
1 sibling, 1 reply; 26+ messages in thread
From: Pierre-Louis Bossart @ 2026-05-25 10:44 UTC (permalink / raw)
To: Cezary Rojewski, broonie
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Liao, Bard, Vehmanen, Kai, Péter Ujfalusi
On 5/22/26 16:32, Cezary Rojewski wrote:
> On 5/22/2026 12:16 PM, Péter Ujfalusi wrote:
>> Hi Cezary,
>
> ...
>
>> This patch showed up in sof-dev kernel after a recent upstream merge and
>> broke audio card probing on some devices.
>>
>> There are no errors in kernel log, the card just does not form.
>> Reverting only this patch fixes the card binding.
>>
>> The affected device have 2x sndw speaker amps, 1x headset codec and 3x
>> HDMI PCMs.
>>
>> It is likely that one of the codec's probe happens after the card
>> probed, the card is not created for some reason and nothing happens.
>>
>> rmmod snd_soc_sof_sdw
>> modprobe snd_soc_sof_sdw
>>
>> will create the card, so it is likely that going ahead without waiting
>> for all components can and might break audio on system boot.
> Hi Mark,
>
> I've had a debug session with Peter today (yes, right after one with Alexander) and the outcome is kind of an expected one - dependency issue, TLDR:
>
> // working case:
> 1) snd_soc_add_component(sdw_codec)
> 2) snd_soc_add_compoenent(sof_platform)
> 3) <sof card is probing just fine>
>
> // failing case:
> 1) snd_soc_add_component(sof_platform)
> 2) snd_soc_add_component(sdw_codec)
> 3) <sof card is MISSING dependencies i.e.: components>
FWIW the SoundWire codec components are registered during the ACPI scanning phase - there is no dependency on an actual codec being present or bus started. It would be extremely surprising if the missing resources came from the SoundWire side. The probe is done early and returns a clear status.
Conversely, the SOF platform component is registered in a workqueue which doesn't go well with deferred binding. It's a known problem, there is *nothing* that will trigger the deferred probe list to be rescanned when the probe workqueue completes. If a component isn't available, the card creation will fail and nothing happens.
You can test this theory with a simple Kconfig change, with SND_SOC_SOF_PROBE_WORK_QUEUE set to 'n'.
Alternatively you could try this patch from 2021 that will force the deferred probe to be reinspected.
https://lore.kernel.org/alsa-devel/20210817190057.255264-2-pierre-louis.bossart@linux.intel.com/
Note that the workqueue isn't an SOF concept, it's directly inspired by the plain HDAudio driver to make sure PCI probe of non-audio devices isn't delayed by the sound driver taking its time due to the use of request_module for HDaudio.
my 2 cents.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-22 14:58 ` Mark Brown
2026-05-22 15:08 ` Cezary Rojewski
@ 2026-05-25 12:48 ` Péter Ujfalusi
2026-05-25 15:06 ` Mark Brown
1 sibling, 1 reply; 26+ messages in thread
From: Péter Ujfalusi @ 2026-05-25 12:48 UTC (permalink / raw)
To: Mark Brown, Cezary Rojewski
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Liao, Bard, Vehmanen, Kai, Charles Keepax, Liam Girdwood
On 22/05/2026 17:58, Mark Brown wrote:
> On Fri, May 22, 2026 at 04:32:03PM +0200, Cezary Rojewski wrote:
>
>> The question on the table: Do we revert the change temporarily, fix the SOF
>> first and then re-apply the patch again?
>
> Given that there's two drivers we managed to turn up bugs in already I'm
> inclined to leave the patch there so it's more likely that any other
> issues get found. It's a bit annoying for SOF CI but I guess a revert
> can be merged locally there?
It is not really the SOF CI but the users. it looks like all codecs
using SDCA infra is affected and will fail to probe audio on boot.
I did not has time to fully debug it, but how the currect system works
is that we don't and cannot know the DAI name of an SDCA function, they
are parsed and created by parsing the DiSCO table and they will have
FUNCTION_NAME.index, then index is a running number.
If the table has different ordering than for example UAJ can be
UAJ.1/2/3/etc.
The current way is to wait for the codecs (SDCA stack) to probe and
create the DAIs then we check and adjust the dai_link in the sof_sdw
machine driver.
If the SDCA function probes after the machine driver then we will never
have match for the dai link.
At the moment I don't see a reasonably quick workaround for this, but I
let Bard and Charles to comment.
Users of PTL are likely to be affected as their design seams to be
closely identical with most of them having cs42l45 codec for Jack, which
is SDCA only.
--
Péter
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-25 12:48 ` Péter Ujfalusi
@ 2026-05-25 15:06 ` Mark Brown
2026-05-26 5:45 ` Péter Ujfalusi
0 siblings, 1 reply; 26+ messages in thread
From: Mark Brown @ 2026-05-25 15:06 UTC (permalink / raw)
To: Péter Ujfalusi
Cc: Cezary Rojewski, tiwai, perex, amade, kuninori.morimoto.gx,
linux-sound, Liao, Bard, Vehmanen, Kai, Charles Keepax,
Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 978 bytes --]
On Mon, May 25, 2026 at 03:48:36PM +0300, Péter Ujfalusi wrote:
> On 22/05/2026 17:58, Mark Brown wrote:
> > On Fri, May 22, 2026 at 04:32:03PM +0200, Cezary Rojewski wrote:
> >> The question on the table: Do we revert the change temporarily, fix the SOF
> >> first and then re-apply the patch again?
> > Given that there's two drivers we managed to turn up bugs in already I'm
> > inclined to leave the patch there so it's more likely that any other
> > issues get found. It's a bit annoying for SOF CI but I guess a revert
> > can be merged locally there?
> It is not really the SOF CI but the users. it looks like all codecs
> using SDCA infra is affected and will fail to probe audio on boot.
Hang on, are you saying you don't test -next or my ASoC branches at all?
It sounded like this was the result of a merge with some out of tree
stuff you have with Cezary's change but it sounds like you're saying
there are issues independently of the merge.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-25 10:44 ` Pierre-Louis Bossart
@ 2026-05-25 21:10 ` Cezary Rojewski
0 siblings, 0 replies; 26+ messages in thread
From: Cezary Rojewski @ 2026-05-25 21:10 UTC (permalink / raw)
To: Pierre-Louis Bossart, broonie
Cc: tiwai, perex, amade, kuninori.morimoto.gx, linux-sound,
Liao, Bard, Vehmanen, Kai, Péter Ujfalusi
On 5/25/2026 12:44 PM, Pierre-Louis Bossart wrote:
> On 5/22/26 16:32, Cezary Rojewski wrote:
...
>> I've had a debug session with Peter today (yes, right after one with Alexander) and the outcome is kind of an expected one - dependency issue, TLDR:
>>
>> // working case:
>> 1) snd_soc_add_component(sdw_codec)
>> 2) snd_soc_add_compoenent(sof_platform)
>> 3) <sof card is probing just fine>
>>
>> // failing case:
>> 1) snd_soc_add_component(sof_platform)
>> 2) snd_soc_add_component(sdw_codec)
>> 3) <sof card is MISSING dependencies i.e.: components>
>
> FWIW the SoundWire codec components are registered during the ACPI scanning phase - there is no dependency on an actual codec being present or bus started. It would be extremely surprising if the missing resources came from the SoundWire side. The probe is done early and returns a clear status.
Haven't solved it yet but I believe it's related to order the components
are added to ASoC's components_list and the difference in behavior
between snd_soc_lookup_component_by_name() vs.
snd_soc_is_matching_component(): strstr() vs. strcmp().
sdw_utils/soc_sdw_utils.c utilizes the former, soc-core.c (during
soc_bind_aux_dev()) the latter.
> Conversely, the SOF platform component is registered in a workqueue which doesn't go well with deferred binding. It's a known problem, there is *nothing* that will trigger the deferred probe list to be rescanned when the probe workqueue completes. If a component isn't available, the card creation will fail and nothing happens.
>
> You can test this theory with a simple Kconfig change, with SND_SOC_SOF_PROBE_WORK_QUEUE set to 'n'.
>
> Alternatively you could try this patch from 2021 that will force the deferred probe to be reinspected.
> https://lore.kernel.org/alsa-devel/20210817190057.255264-2-pierre-louis.bossart@linux.intel.com/
>
> Note that the workqueue isn't an SOF concept, it's directly inspired by the plain HDAudio driver to make sure PCI probe of non-audio devices isn't delayed by the sound driver taking its time due to the use of request_module for HDaudio.
>
> my 2 cents.
The workqueue does not make things simple, that's for sure. But all the
HDAudio-drivers mimic this behaviour - the avs-driver also utilizes that
mechanism and still supports both cases (codec -> platform; platform ->
codec). Will continue the debug tomorrow, perhaps borrow the setup from
Peter as "dry" debugging is slow.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-25 15:06 ` Mark Brown
@ 2026-05-26 5:45 ` Péter Ujfalusi
2026-05-26 11:21 ` Péter Ujfalusi
2026-05-26 16:02 ` Mark Brown
0 siblings, 2 replies; 26+ messages in thread
From: Péter Ujfalusi @ 2026-05-26 5:45 UTC (permalink / raw)
To: Mark Brown
Cc: Cezary Rojewski, tiwai, perex, amade, kuninori.morimoto.gx,
linux-sound, Liao, Bard, Vehmanen, Kai, Charles Keepax,
Liam Girdwood, Richard Fitzgerald, Simon Trimmer
On 25/05/2026 18:06, Mark Brown wrote:
> On Mon, May 25, 2026 at 03:48:36PM +0300, Péter Ujfalusi wrote:
>> On 22/05/2026 17:58, Mark Brown wrote:
>>> On Fri, May 22, 2026 at 04:32:03PM +0200, Cezary Rojewski wrote:
>
>>>> The question on the table: Do we revert the change temporarily, fix the SOF
>>>> first and then re-apply the patch again?
>
>>> Given that there's two drivers we managed to turn up bugs in already I'm
>>> inclined to leave the patch there so it's more likely that any other
>>> issues get found. It's a bit annoying for SOF CI but I guess a revert
>>> can be merged locally there?
>
>> It is not really the SOF CI but the users. it looks like all codecs
>> using SDCA infra is affected and will fail to probe audio on boot.
>
> Hang on, are you saying you don't test -next or my ASoC branches at all?
We sort of test -next audio stuff in daily bases, but this would have
not been caught if I did not happen to be debugging something on a PTL
system with Cirrus codecs, using SDCA infra.
We do approximately weekly merges of -next audio branches to our sof-dev
working tree, our pending patch deficit usually pretty shallow to allow
testing before sending them upstream (we have sof-dev-rebase branch as
well to see them cleanly).
> It sounded like this was the result of a merge with some out of tree
> stuff you have with Cezary's change but it sounds like you're saying
> there are issues independently of the merge.
No, it is not out of tree stuff, it is upstream stuff already in use for
SDCA proper codecs, but I think what really triggers this is
c5ae3d8bc968 ("ASoC: soc_sdw_utils: partial match the codec name")
which is in 7.1-rc1, so not next stuff either.
I think the issue boils down to the fact that we don't know the exact
name of the SDCA codec and DAI for the function before they have been
created, thus the sof_sdw machine relies on deferring to 'see' the names
they got.
I think Bard and Charles are the best persons to comment, but atm Cirrus
codecs are the ones pioneering the use of generic sdca codec class
driver with Realtek and TI preparing to enable it.
I also think that detaching from driver defer and use internal card
defer is a much better approach, but when majority of new PTL designs
will be broken with no patch in sight to prepare the SDCA class stack is
a regression.
Charles, Bard, Richard, Simon, any thoughts on this?
--
Péter
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-26 5:45 ` Péter Ujfalusi
@ 2026-05-26 11:21 ` Péter Ujfalusi
2026-05-26 11:28 ` Péter Ujfalusi
2026-05-26 16:02 ` Mark Brown
1 sibling, 1 reply; 26+ messages in thread
From: Péter Ujfalusi @ 2026-05-26 11:21 UTC (permalink / raw)
To: Mark Brown
Cc: Cezary Rojewski, tiwai, perex, amade, kuninori.morimoto.gx,
linux-sound, Liao, Bard, Vehmanen, Kai, Charles Keepax,
Liam Girdwood, Richard Fitzgerald, Simon Trimmer
On 26/05/2026 08:45, Péter Ujfalusi wrote:
> I also think that detaching from driver defer and use internal card
> defer is a much better approach, but when majority of new PTL designs
> will be broken with no patch in sight to prepare the SDCA class stack is
> a regression.
>
> Charles, Bard, Richard, Simon, any thoughts on this?
I can force the sof_sdw driver to go back to driver defer queue if any of
the expected (counted for) components yet to be registered, but I'm sure
this has side-effects...
diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c
index 9d0768f21ba4..e80c3904bc37 100644
--- a/sound/soc/sdw_utils/soc_sdw_utils.c
+++ b/sound/soc/sdw_utils/soc_sdw_utils.c
@@ -2022,6 +2022,7 @@ int asoc_sdw_parse_sdw_endpoints(struct snd_soc_card *card,
soc_aux->dlc.name = component->name;
} else {
soc_aux->dlc.name = codec_info->auxs[j].codec_name;
+ return -EPROBE_DEFER;
}
soc_aux++;
}
--
Péter
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-26 11:21 ` Péter Ujfalusi
@ 2026-05-26 11:28 ` Péter Ujfalusi
0 siblings, 0 replies; 26+ messages in thread
From: Péter Ujfalusi @ 2026-05-26 11:28 UTC (permalink / raw)
To: Mark Brown
Cc: Cezary Rojewski, tiwai, perex, amade, kuninori.morimoto.gx,
linux-sound, Liao, Bard, Vehmanen, Kai, Charles Keepax,
Liam Girdwood, Richard Fitzgerald, Simon Trimmer
On 26/05/2026 14:21, Péter Ujfalusi wrote:
> On 26/05/2026 08:45, Péter Ujfalusi wrote:
>> I also think that detaching from driver defer and use internal card
>> defer is a much better approach, but when majority of new PTL designs
>> will be broken with no patch in sight to prepare the SDCA class stack is
>> a regression.
>>
>> Charles, Bard, Richard, Simon, any thoughts on this?
>
> I can force the sof_sdw driver to go back to driver defer queue if any of
> the expected (counted for) components yet to be registered, but I'm sure
> this has side-effects...
Yes, this defeats the purpose of the deferrable card concept.
>
> diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c
> index 9d0768f21ba4..e80c3904bc37 100644
> --- a/sound/soc/sdw_utils/soc_sdw_utils.c
> +++ b/sound/soc/sdw_utils/soc_sdw_utils.c
> @@ -2022,6 +2022,7 @@ int asoc_sdw_parse_sdw_endpoints(struct snd_soc_card *card,
> soc_aux->dlc.name = component->name;
> } else {
> soc_aux->dlc.name = codec_info->auxs[j].codec_name;
> + return -EPROBE_DEFER;
> }
> soc_aux++;
> }
>
>
>
--
Péter
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-26 5:45 ` Péter Ujfalusi
2026-05-26 11:21 ` Péter Ujfalusi
@ 2026-05-26 16:02 ` Mark Brown
2026-05-27 5:22 ` Péter Ujfalusi
1 sibling, 1 reply; 26+ messages in thread
From: Mark Brown @ 2026-05-26 16:02 UTC (permalink / raw)
To: Péter Ujfalusi
Cc: Cezary Rojewski, tiwai, perex, amade, kuninori.morimoto.gx,
linux-sound, Liao, Bard, Vehmanen, Kai, Charles Keepax,
Liam Girdwood, Richard Fitzgerald, Simon Trimmer
[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]
On Tue, May 26, 2026 at 08:45:48AM +0300, Péter Ujfalusi wrote:
> On 25/05/2026 18:06, Mark Brown wrote:
> > On Mon, May 25, 2026 at 03:48:36PM +0300, Péter Ujfalusi wrote:
> >> It is not really the SOF CI but the users. it looks like all codecs
> >> using SDCA infra is affected and will fail to probe audio on boot.
> > Hang on, are you saying you don't test -next or my ASoC branches at all?
> We sort of test -next audio stuff in daily bases, but this would have
> not been caught if I did not happen to be debugging something on a PTL
> system with Cirrus codecs, using SDCA infra.
> We do approximately weekly merges of -next audio branches to our sof-dev
> working tree, our pending patch deficit usually pretty shallow to allow
> testing before sending them upstream (we have sof-dev-rebase branch as
> well to see them cleanly).
I see. I was surprised that merging into sof-dev caused issues, I
thought this was coming up in CI rather than during development.
> I also think that detaching from driver defer and use internal card
> defer is a much better approach, but when majority of new PTL designs
> will be broken with no patch in sight to prepare the SDCA class stack is
> a regression.
OK, sounds like a revert is needed for the time being. Can you send a
patch with a changelog explaining the issue please?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-26 16:02 ` Mark Brown
@ 2026-05-27 5:22 ` Péter Ujfalusi
2026-05-27 10:35 ` Mark Brown
0 siblings, 1 reply; 26+ messages in thread
From: Péter Ujfalusi @ 2026-05-27 5:22 UTC (permalink / raw)
To: Mark Brown
Cc: Cezary Rojewski, tiwai, perex, amade, kuninori.morimoto.gx,
linux-sound, Liao, Bard, Vehmanen, Kai, Charles Keepax,
Liam Girdwood, Richard Fitzgerald, Simon Trimmer
On 26/05/2026 19:02, Mark Brown wrote:
>> I also think that detaching from driver defer and use internal card
>> defer is a much better approach, but when majority of new PTL designs
>> will be broken with no patch in sight to prepare the SDCA class stack is
>> a regression.
>
> OK, sounds like a revert is needed for the time being. Can you send a
> patch with a changelog explaining the issue please?
Bard iterated on my idea with a proper patch which works so far in our
testing:
https://github.com/thesofproject/linux/pull/5788/commits/415b0daa4dc2ae30f54d51abc841a97defe97c42
Basically the sof_sdw machine driver will defer if a component is
missing, which was done by the soc card before the deferable card move.
The sof_sdw needs to know the final name of the components, they don't
have fixed names due to how SDCA stack probes things based ont he ACPI
information.
We do think that this will work for now until we can figure out a leaner
way.
I was thinking of adding an optional card callback to be called from
snd_soc_bind_card() , probably called as .prepare_bind and sof_sdw could
at this point count and prepare the names of the known components.
Since the snd_soc_bind_card() is called for all component registration,
it could work similarly as the driver defer, but in the machine driver
we need to do much bigger changes to properly manage the devm_
allocations since the driver will never defer.
If you and Cezary are OK with the linked patch for now and the proposed
.prepare_bind callback to cards, then I think we can keep this patch
without fear of regressing users.
--
Péter
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH] ASoC: core: Move all users to deferrable card binding
2026-05-27 5:22 ` Péter Ujfalusi
@ 2026-05-27 10:35 ` Mark Brown
0 siblings, 0 replies; 26+ messages in thread
From: Mark Brown @ 2026-05-27 10:35 UTC (permalink / raw)
To: Péter Ujfalusi
Cc: Cezary Rojewski, tiwai, perex, amade, kuninori.morimoto.gx,
linux-sound, Liao, Bard, Vehmanen, Kai, Charles Keepax,
Liam Girdwood, Richard Fitzgerald, Simon Trimmer
[-- Attachment #1: Type: text/plain, Size: 355 bytes --]
On Wed, May 27, 2026 at 08:22:23AM +0300, Péter Ujfalusi wrote:
> If you and Cezary are OK with the linked patch for now and the proposed
> .prepare_bind callback to cards, then I think we can keep this patch
> without fear of regressing users.
That looks plausible to me at first look, if you'd rather send that than
a revert that's also good.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2026-05-27 10:36 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-30 14:07 [PATCH] ASoC: core: Move all users to deferrable card binding Cezary Rojewski
2026-05-11 1:06 ` Mark Brown
2026-05-11 1:34 ` Kuninori Morimoto
2026-05-12 8:14 ` Rojewski, Cezary
2026-05-20 9:55 ` Alexander Stein
2026-05-20 10:33 ` Cezary Rojewski
2026-05-21 6:42 ` Alexander Stein
2026-05-21 8:13 ` Cezary Rojewski
2026-05-21 10:11 ` Alexander Stein
2026-05-21 14:41 ` Cezary Rojewski
2026-05-21 14:47 ` Alexander Stein
2026-05-22 11:21 ` Alexander Stein
2026-05-22 10:16 ` Péter Ujfalusi
2026-05-22 14:32 ` Cezary Rojewski
2026-05-22 14:58 ` Mark Brown
2026-05-22 15:08 ` Cezary Rojewski
2026-05-25 12:48 ` Péter Ujfalusi
2026-05-25 15:06 ` Mark Brown
2026-05-26 5:45 ` Péter Ujfalusi
2026-05-26 11:21 ` Péter Ujfalusi
2026-05-26 11:28 ` Péter Ujfalusi
2026-05-26 16:02 ` Mark Brown
2026-05-27 5:22 ` Péter Ujfalusi
2026-05-27 10:35 ` Mark Brown
2026-05-25 10:44 ` Pierre-Louis Bossart
2026-05-25 21:10 ` Cezary Rojewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox