This means CODEC driver for es8316 is not probed or registered properly. Machine driver is trying to register DAI link with above CODEC DAI and is unable to find.
Check if you see DAI “es8316-hifi” in the following list: cat /sys/kernel/debug/asoc/dais?
If DAI is not part of above list, you need to see what is going wrong in codec driver probe.
Your error logs and dump of “/sys/kernel/debug/asoc/dais” don’t correlate. The dump actually shows that “es8316-hifi” DAI is registered by the codec driver, but machine driver still complains.
As per “cat /proc/asound/cards” dump there is no sound card registered for your codec.
You need to figure out why you are hitting error “sound: ASoC: CODEC DAI es8316-hifi not registered” even though the “es8316-hifi” is already registered as per dump “cat /sys/kernel/debug/asoc/dais”.
Add following debug prints to get some more hints:
diff --git a/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c b/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c
index b2e8fa2..b2e7fd0 100644
--- a/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c
+++ b/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c
@@ -772,9 +772,13 @@ static int tegra_machine_driver_probe(struct platform_device *pdev)
tegra_machine_dma_set_mask(pdev);
+ dev_err(&pdev->dev, "%s and %d\n", __func__, __LINE__);
ret = add_dai_links(pdev);
- if (ret < 0)
+ if (ret < 0) {
+ dev_err(&pdev->dev, "fail to add links, err = %d", ret);
goto cleanup_asoc;
+ }
+ dev_err(&pdev->dev, "%s and %d\n", __func__, __LINE__);
ret = tegra_alt_asoc_utils_init(&machine->audio_clock,
&pdev->dev,
Also add a debug print before and after around “snd_soc_register_codec()” in “es8316_i2c_probe” of codec driver.
Please share complete boot logs to see if there are some other failures.
As per “cat /proc/asound/cards” dump there is no sound card registered for your codec.
You need to figure out why you are hitting error “sound: ASoC: CODEC DAI es8316-hifi not registered” even though the “es8316-hifi” is already registered as per dump “cat /sys/kernel/debug/asoc/dais”.
Add following debug prints to get some more hints:
diff --git a/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c b/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c
index b2e8fa2..b2e7fd0 100644
--- a/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c
+++ b/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c
@@ -772,9 +772,13 @@ static int tegra_machine_driver_probe(struct platform_device *pdev)
tegra_machine_dma_set_mask(pdev);
+ dev_err(&pdev->dev, "%s and %d\n", __func__, __LINE__);
ret = add_dai_links(pdev);
- if (ret < 0)
+ if (ret < 0) {
+ dev_err(&pdev->dev, "fail to add links, err = %d", ret);
goto cleanup_asoc;
+ }
+ dev_err(&pdev->dev, "%s and %d\n", __func__, __LINE__);
ret = tegra_alt_asoc_utils_init(&machine->audio_clock,
&pdev->dev,
Also add a debug print before and after around “snd_soc_register_codec()” in “es8316_i2c_probe” of codec driver.
Please share complete boot logs to see if there are some other failures.
In the attached log (dmesg.txt), I can see that the codec driver probe() happens before machine driver probe(). It is expected to work and I am not sure what you are missing given the driver and DT details you have attached.
To gather more info, please use following change and provide logs.
Thank you very much for your help. Since there is something wrong with the hardware of my board, it has been redesigned. I am asking you about this problem until our new board is designed.