Skip to contentSkip to conversation

ASoC: core: Move all users to deferrable card binding

PATCH In review Cezary Rojewski 7 participants 28 messages Apr 30 – Jun 24

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: core: Move all users to deferrable card binding

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 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/[email protected]/

 include/sound/soc.h    |  2 +-
 sound/soc/soc-core.c   | 44 ++++++++++++++----------------------------
 sound/soc/soc-devres.c | 28 +--------------------------
 3 files changed, 17 insertions(+), 57 deletions(-)
include/sound/soc.h +1 -1
index a30f95ff7d86..f0935523c8df 100644
@@ -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);
sound/soc/soc-core.c +15 -29

92 lines not on this page · raw message

sound/soc/soc-devres.c +1 -27
index d33f83ec24f2..718165ba84ac 100644
@@ -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
 
Signature · 1 line
2.34.1
#1 lore raw

Hi Cezary

Thank you for the patch.
And sorry for my late response, it was long holiday in Japan.

Quoted 18 lines

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.

Quoted 7 lines

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().

---

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

#2 lore raw
Quoted 5 lines · Kuninori Morimoto

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!

(...)

Quoted 7 lines

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.

Quoted 2 lines

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

maintainer
#3 lore raw
In reply to Cezary Rojewski
Quoted 1 line · Cezary Rojewski

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

#4 lore raw
In reply to Cezary Rojewski

Hi,

Am Donnerstag, 30. April 2026, 16:07:52 CEST schrieb Cezary Rojewski:

Quoted 18 lines

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.

Quoted 6 lines

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 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

Quoted 179 lines

---

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/[email protected]/

 include/sound/soc.h    |  2 +-
 sound/soc/soc-core.c   | 44 ++++++++++++++----------------------------
 sound/soc/soc-devres.c | 28 +--------------------------
 3 files changed, 17 insertions(+), 57 deletions(-)
include/sound/soc.h +1 -1
index a30f95ff7d86..f0935523c8df 100644
@@ -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);
sound/soc/soc-core.c +15 -29
index e70bf22db5c9..ec141b810b50 100644
@@ -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)
sound/soc/soc-devres.c +1 -27
index d33f83ec24f2..718165ba84ac 100644
@@ -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
 
Signature · 4 lines
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/
#5 lore raw
Quoted 1 line · Alexander Stein

Hi,

...

Quoted 29 lines

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
Quoted 4 lines

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

#6 lore raw

Hi Cezary,

thanks for the quick reply.

Am Mittwoch, 20. Mai 2026, 12:33:14 CEST schrieb Cezary Rojewski:

Quoted 37 lines · Alexander Stein
Quoted 1 line

Hi,

...

Quoted 32 lines

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

Quoted 7 lines
Quoted 1 line

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<--

Quoted 4 lines

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

Signature · 4 lines
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/
#7 lore raw
Quoted 3 lines · Alexander Stein

Hi Cezary,

thanks for the quick reply.

...

Quoted 9 lines
Quoted 4 lines

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<--

...

Quoted 16 lines

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<--

Quoted 7 lines
Quoted 4 lines

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

#8 lore raw

Am Donnerstag, 21. Mai 2026, 10:13:45 CEST schrieb Cezary Rojewski:

Quoted 42 lines · Alexander Stein
Quoted 3 lines

Hi Cezary,

thanks for the quick reply.

...

Quoted 9 lines
Quoted 4 lines

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<--

...

Quoted 16 lines

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<--

Quoted 7 lines
Quoted 4 lines

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.

Quoted 7 lines

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

Signature · 4 lines
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/
#9 lore raw
Quoted 1 line · Alexander Stein

Am Donnerstag, 21. Mai 2026, 10:13:45 CEST schrieb Cezary Rojewski:

...

Quoted 17 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines

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.

Quoted 7 lines

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

...

Quoted 4 lines
[   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

#10 lore raw

Hi Cezary,

Am Donnerstag, 21. Mai 2026, 16:41:04 CEST schrieb Cezary Rojewski:

Quoted 50 lines · Alexander Stein
Quoted 1 line

Am Donnerstag, 21. Mai 2026, 10:13:45 CEST schrieb Cezary Rojewski:

...

Quoted 17 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines

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.

Quoted 7 lines

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

...

Quoted 4 lines
[   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);
}
Quoted 2 lines

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.

Quoted 5 lines

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

Signature · 4 lines
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/
#11 lore raw
In reply to Cezary Rojewski

Am Donnerstag, 21. Mai 2026, 16:41:04 CEST schrieb Cezary Rojewski:

Quoted 50 lines · Alexander Stein
Quoted 1 line

Am Donnerstag, 21. Mai 2026, 10:13:45 CEST schrieb Cezary Rojewski:

...

Quoted 17 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines

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.

Quoted 7 lines

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

...

Quoted 4 lines
[   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);
}
Quoted 2 lines

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

Quoted 1 line

[snip]

Signature · 4 lines
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/
#12 lore raw
In reply to Cezary Rojewski

Hi Cezary,

Quoted 13 lines · 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.

Quoted 8 lines

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.

Quoted 180 lines

---

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/[email protected]/

 include/sound/soc.h    |  2 +-
 sound/soc/soc-core.c   | 44 ++++++++++++++----------------------------
 sound/soc/soc-devres.c | 28 +--------------------------
 3 files changed, 17 insertions(+), 57 deletions(-)
include/sound/soc.h +1 -1
index a30f95ff7d86..f0935523c8df 100644
@@ -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);
sound/soc/soc-core.c +15 -29
index e70bf22db5c9..ec141b810b50 100644
@@ -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)
sound/soc/soc-devres.c +1 -27
index d33f83ec24f2..718165ba84ac 100644
@@ -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
 
Signature · 1 line
Péter
#13 lore raw
Quoted 1 line · Péter Ujfalusi

Hi Cezary,

...

Quoted 9 lines

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.

Quoted 8 lines

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/[email protected]/

Kind regards,
Czarek

maintainer
#14 lore raw
Quoted 2 lines · Cezary Rojewski

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?

#15 lore raw
Quoted 9 lines · Mark Brown
Quoted 2 lines · Cezary Rojewski

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.

#16 lore raw
In reply to Mark Brown
Quoted 9 lines · Mark Brown
Quoted 2 lines · Cezary Rojewski

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.

Signature · 1 line
Péter
maintainer
#17 lore raw
Quoted 6 lines · Péter Ujfalusi
Quoted 4 lines · Mark Brown
Quoted 2 lines · Cezary Rojewski

The question on the table: Do we revert the change temporarily, fix the SOF first and then re-apply the patch again?

Quoted 7 lines
Quoted 4 lines

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.

#18 lore raw
Quoted 12 lines · Mark Brown
Quoted 10 lines · Péter Ujfalusi
Quoted 9 lines · Mark Brown
Quoted 2 lines · Cezary Rojewski

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?

Quoted 4 lines
Quoted 2 lines

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).

Quoted 3 lines

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?

Signature · 1 line
Péter
#19 lore raw
Quoted 6 lines · Péter Ujfalusi

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...

sound/soc/sdw_utils/soc_sdw_utils.c +1 -0
index 9d0768f21ba4..e80c3904bc37 100644
@@ -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++;
 			}
Signature · 1 line
Péter
#20 lore raw
Quoted 11 lines · Péter Ujfalusi
Quoted 6 lines · Péter Ujfalusi

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.

Quoted 16 lines
sound/soc/sdw_utils/soc_sdw_utils.c +1 -0
index 9d0768f21ba4..e80c3904bc37 100644
@@ -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++;
 			}
Signature · 1 line
Péter
maintainer
#21 lore raw
In reply to Péter Ujfalusi
Quoted 8 lines · Péter Ujfalusi
Quoted 6 lines · Mark Brown
Quoted 2 lines · Péter Ujfalusi

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?

Quoted 8 lines

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.

Quoted 4 lines

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?

#22 lore raw
Quoted 7 lines · Mark Brown
Quoted 4 lines

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.

Signature · 1 line
Péter
maintainer
#23 lore raw
Quoted 3 lines · Péter Ujfalusi

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.

#24 lore raw
In reply to Cezary Rojewski
Quoted 31 lines · Cezary Rojewski
Quoted 1 line · Péter Ujfalusi

Hi Cezary,

...

Quoted 9 lines

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.

Quoted 8 lines

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>

Quoted 4 lines

// 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/[email protected]/

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.

#25 lore raw
Quoted 1 line · Pierre-Louis Bossart

On 5/22/26 16:32, Cezary Rojewski wrote:

...

Quoted 7 lines
Quoted 7 lines

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>

Quoted 6 lines
Quoted 4 lines

// 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.

Quoted 10 lines

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/[email protected]/

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.

#26 lore raw
In reply to Cezary Rojewski

From: Chancel Liu <[email protected]>

Hi,

We have found a regression on i.MX6UL/ULL after this change. On our i.MX6UL/ULL + WM8962 platform, starting playback can fail with:

[ 321.026334] Can't scale 63529412MHz input down to <=13.5MHz
[ 321.035547] wm8962 1-001a: ASoC error (-22): at snd_soc_component_set_pll() on wm8962.1-001a
[ 321.035664] wm8962 1-001a: ASoC error (-22): at snd_soc_dai_set_pll() on wm8962
[ 321.035699] fsl-asoc-card sound-wm8962: failed to start FLL: -22
[ 321.035719] HiFi: ASoC error (-22): at snd_soc_link_hw_params() on HiFi
[ 321.035780] HiFi: ASoC error (-22): at __soc_pcm_hw_params() on HiFi

Before that change, if a required CPU DAI or codec component was not ready, devm_snd_soc_register_card() propagated -EPROBE_DEFER back to the machine driver. Therefore fsl_asoc_card_probe() would be retried after the missing components became available.

With the new flow, the card is kept on the internal deferred binding list instead, and the machine driver's probe() is not called again when the card is later rebound. As a result, fsl_asoc_card_probe() may complete before the CPU DAI and codec components are fully bound.

This is a problem for fsl-asoc-card because it currently caches some component-dependent state during probe(), including the codec MCLK rate. On the affected platform, the codec MCLK is provided by the CPU DAI clock, whose final rate is configured through assigned-clocks in the CPU DAI node. If the machine driver probes before the CPU DAI driver has applied those clock settings, fsl-asoc-card can cache an incorrect MCLK rate. Later, hw_params() uses that stale value when configuring the WM8962 FLL, which leads to the error above.

We have prepared a fix that moves the component-dependent initialization in fsl-asoc-card from probe() to card late_probe(), so that it runs only after the related CPU DAI and codec components have been successfully bound.

We are testing the patch internally first on all platforms. If the testing result looks good, we will send the fix patch out.

Regards,
Chancel Liu

#27 lore raw
Quoted 14 lines · On 6/24/2026 10:00 AM, [email protected] wrote:

From: Chancel Liu <[email protected]>

Hi,

We have found a regression on i.MX6UL/ULL after this change. On our i.MX6UL/ULL + WM8962 platform, starting playback can fail with:

[ 321.026334] Can't scale 63529412MHz input down to <=13.5MHz
[ 321.035547] wm8962 1-001a: ASoC error (-22): at snd_soc_component_set_pll() on wm8962.1-001a
[ 321.035664] wm8962 1-001a: ASoC error (-22): at snd_soc_dai_set_pll() on wm8962
[ 321.035699] fsl-asoc-card sound-wm8962: failed to start FLL: -22
[ 321.035719] HiFi: ASoC error (-22): at snd_soc_link_hw_params() on HiFi
[ 321.035780] HiFi: ASoC error (-22): at __soc_pcm_hw_params() on HiFi
Quoted 4 lines

Before that change, if a required CPU DAI or codec component was not ready, devm_snd_soc_register_card() propagated -EPROBE_DEFER back to the machine driver. Therefore fsl_asoc_card_probe() would be retried after the missing components became available.

That's not true for many cards found in ASoC - see the initial commit e894efef9ac7 ("ASoC: core: add support to card rebind") and then the recent refactor [1].

[1]: https://patch.msgid.link/[email protected]

Quoted 14 lines

With the new flow, the card is kept on the internal deferred binding list instead, and the machine driver's probe() is not called again when the card is later rebound. As a result, fsl_asoc_card_probe() may complete before the CPU DAI and codec components are fully bound.

This is a problem for fsl-asoc-card because it currently caches some component-dependent state during probe(), including the codec MCLK rate. On the affected platform, the codec MCLK is provided by the CPU DAI clock, whose final rate is configured through assigned-clocks in the CPU DAI node. If the machine driver probes before the CPU DAI driver has applied those clock settings, fsl-asoc-card can cache an incorrect MCLK rate. Later, hw_params() uses that stale value when configuring the WM8962 FLL, which leads to the error above.

Quoted 4 lines

We have prepared a fix that moves the component-dependent initialization in fsl-asoc-card from probe() to card late_probe(), so that it runs only after the related CPU DAI and codec components have been successfully bound.

Hi Liu,

Looks like you've corrected the dependency issue by yourself - these are precisely the kind of problems that this very patch reveals. If you would like to discuss the solution earlier (including via voice chat) don't hesitate to ping me.

Kind regards,
Czarek