The code that you’ve depicted is the same as I have, though I have modified the file. The file is attached for more inspection.
BTW, when I run the i2cdetect the letters UU are displayed under address 0x18 - AFAIK, this means that the component is being used.
Found the notorious function from tegra_asoc_utils_alt.c:
#ifdef CONFIG_SWITCH
int tegra_alt_asoc_switch_register(struct switch_dev *sdev)
{
int ret;
if (is_switch_registered)
return -EBUSY;
ret = switch_dev_register(sdev);
if (ret >= 0)
is_switch_registered = true;
return ret;
}
makes any sense? I do not know where the global variable is_switch_registered supposed to be initialized.
should the CONFIG_SWITCH be defined? I can see from the kernel configuration that this definition is responsible for enabling switch class support, which allows monitoring switches by userspace by sysfs an uevent
BTW, I tried to remove this definition from the kernel configuration but it looks like the kernel code is too dependent on this definition (CONFIG_SWITCH) because a lot of errors popped-up during kernel compilation that required variables part of this definition.
What really puzzles is the fact that if the function switch_dev_register is successful then the next time the function tegra_alt_asoc_switch_register is invoked an EBUSY is replied. So I have allowed myself (just for the test) to modify the function and return 0 insted of EBUSY.
and then I got the following:
[ 13.491156] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_card_name 0
[ 13.491186] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_audio_routing 0
[ 13.492062] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_switch_register 0
[ 13.492066] tegra-snd-t186ref-mobile-rt565x sound: Failed to get HP Det GPIO, should be handled by codec
[ 13.492520] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_utils_init 0
[ 13.493231] tegra-snd-t186ref-mobile-rt565x sound: ASoC: CODEC DAI tlv320aic32x4-hifi not registered
[ 13.493233] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_register_card failed (-517)
[ 13.496070] tlv320aic32x4 1-0018: Failed getting the mclk.
[ 13.496247] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_card_name 0
[ 13.496276] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_audio_routing 0
[ 13.497282] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_switch_register 0
[ 13.497286] tegra-snd-t186ref-mobile-rt565x sound: Failed to get HP Det GPIO, should be handled by codec
[ 13.498112] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_utils_init 0
[ 13.640164] dhd_module_init in
[ 13.640194] tegra_net_perf_init: cannot get wifi sclk
[ 13.640268] found wifi platform device bcmdhd_wlan
[ 13.641422] gpio tegra-gpio-aon wake69 for gpio=59(FF:3)
[ 13.641430] wifi_platform_get_country_code_map: could not get country_code_map
[ 13.641431] wifi_plat_dev_drv_probe:platform country code map is not available
[ 13.641441] Power-up adapter 'DHD generic adapter'
[ 13.641446] wifi_platform_set_power = 1
[ 13.711751] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_R
[ 13.711755] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_R -> 10 kOhm -> CM_R to Right Mixer Negative Resistor
[ 13.711793] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_R
[ 13.711795] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_R -> 20 kOhm -> CM_R to Right Mixer Negative Resistor
[ 13.711827] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_R
[ 13.711829] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_R -> 40 kOhm -> CM_R to Right Mixer Negative Resistor
[ 13.718766] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_L
[ 13.718769] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_L -> 10 kOhm -> CM_L to Left Mixer Negative Resistor
[ 13.718800] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_L
[ 13.718802] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_L -> 20 kOhm -> CM_L to Left Mixer Negative Resistor
[ 13.718829] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_L
[ 13.718831] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_L -> 40 kOhm -> CM_L to Left Mixer Negative Resistor
[ 13.727559] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF1 <-> ADMAIF1 mapping ok
[ 13.727639] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF2 <-> ADMAIF2 mapping ok
[ 13.727720] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF3 <-> ADMAIF3 mapping ok
[ 13.727795] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF4 <-> ADMAIF4 mapping ok
[ 13.727870] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF5 <-> ADMAIF5 mapping ok
[ 13.727951] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF6 <-> ADMAIF6 mapping ok
[ 13.728028] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF7 <-> ADMAIF7 mapping ok
[ 13.728107] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF8 <-> ADMAIF8 mapping ok
[ 13.728182] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF9 <-> ADMAIF9 mapping ok
[ 13.728261] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF10 <-> ADMAIF10 mapping ok
[ 13.728336] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF11 <-> ADMAIF11 mapping ok
[ 13.728410] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF12 <-> ADMAIF12 mapping ok
[ 13.728486] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF13 <-> ADMAIF13 mapping ok
[ 13.728555] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF14 <-> ADMAIF14 mapping ok
[ 13.728627] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF15 <-> ADMAIF15 mapping ok
[ 13.728700] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF16 <-> ADMAIF16 mapping ok
[ 13.728777] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF17 <-> ADMAIF17 mapping ok
[ 13.728851] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF18 <-> ADMAIF18 mapping ok
[ 13.728925] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF19 <-> ADMAIF19 mapping ok
[ 13.728995] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF20 <-> ADMAIF20 mapping ok
[ 13.732113] tegra-snd-t186ref-mobile-rt565x sound: ADSP-FE1 <-> ADSP PCM1 mapping ok
[ 13.732200] tegra-snd-t186ref-mobile-rt565x sound: ADSP-FE2 <-> ADSP PCM2 mapping ok
[ 13.732228] compress asoc: ADSP-FE3 <-> ADSP COMPR1 mapping ok
[ 13.732249] compress asoc: ADSP-FE4 <-> ADSP COMPR2 mapping ok
<b>[ 13.777259] sysfs: cannot create duplicate filename '/devices/sound/I2S1 CIF'</b>
[ 13.777268] ------------[ cut here ]------------
[ 13.777270] WARNING: at ffffffc000239c54 [verbose debug info unavailable]
[ 13.777277] Modules linked in: bcmdhd(+) tlv320aic32x4(O) hi8435rada(O) pci_tegra bluedroid_pm
[ 13.777278]
[ 13.777282] CPU: 4 PID: 55 Comm: kworker/u12:1 Tainted: G O 4.4.38-DTRE-v0.1 #15
[ 13.777283] Hardware name: quill (DT)
[ 13.777291] Workqueue: deferwq deferred_probe_work_func
[ 13.777293] task: ffffffc1ec2ea580 ti: ffffffc1eb6dc000 task.ti: ffffffc1eb6dc000
[ 13.777298] PC is at sysfs_warn_dup+0x5c/0x80
[ 13.777299] LR is at sysfs_warn_dup+0x5c/0x80
[ 13.777301] pc : [<ffffffc000239c54>] lr : [<ffffffc000239c54>] pstate: 80000045
[ 13.777302] sp : ffffffc1eb6df840
[ 13.777304] x29: ffffffc1eb6df840 x28: ffffffc1e334a958
[ 13.777306] x27: ffffffc1e30f8000 x26: ffffffc000964db0
[ 13.777308] x25: 00000000000070e0 x24: ffffffc1e5ce1400
[ 13.777309] x23: ffffffc00137df38 x22: ffffffc1ebb3d810
[ 13.777311] x21: ffffffc1ebb29a50 x20: ffffffc1df3f3800
[ 13.777313] x19: ffffffc1e30d9000 x18: 0000000000020000
[ 13.777314] x17: 0000000000000004 x16: ffffffc000b5a618
[ 13.777316] x15: ffffffc0012481e8 x14: ffffffc00140b7da
[ 13.777317] x13: ffffffc001248000 x12: ffffffc0013e8000
[ 13.777319] x11: 0000000000000000 x10: 0000000000000000
[ 13.777321] x9 : 000000000000c620 x8 : ffffffc0013fd1d3
[ 13.777322] x7 : 0000000000000000 x6 : 000000001247ffe4
[ 13.777324] x5 : 0000000000000015 x4 : 0000000000000000
[ 13.777325] x3 : 0000000000000040 x2 : ffffffc1eb6dc000
[ 13.777327] x1 : 0000000000000000 x0 : 0000000000000041
[ 13.777327]
[ 13.777328] ---[ end trace 52ec25eaeddb4cc6 ]---
[ 13.777329] Call trace:
[ 13.777332] [<ffffffc000239c54>] sysfs_warn_dup+0x5c/0x80
[ 13.777334] [<ffffffc000239d8c>] sysfs_create_dir_ns+0x9c/0xb0
[ 13.777338] [<ffffffc000323d50>] kobject_add_internal+0xa0/0x300
[ 13.777340] [<ffffffc000324034>] kobject_add+0x84/0xd0
[ 13.777342] [<ffffffc000563af4>] device_add+0xd4/0x580
[ 13.777346] [<ffffffc00096828c>] soc_post_component_init+0xcc/0x120
[ 13.777348] [<ffffffc00096b1c8>] snd_soc_instantiate_card+0x5e0/0xba8
[ 13.777350] [<ffffffc00096bb18>] snd_soc_register_card+0x388/0x480
[ 13.777353] [<ffffffc0009986f0>] tegra_t186ref_driver_probe+0x448/0x5a8
[ 13.777356] [<ffffffc0005695f8>] platform_drv_probe+0x50/0xb8
[ 13.777358] [<ffffffc0005670f4>] driver_probe_device+0xcc/0x428
[ 13.777359] [<ffffffc000567580>] __device_attach_driver+0x90/0xd8
[ 13.777361] [<ffffffc0005650d0>] bus_for_each_drv+0x58/0x98
[ 13.777363] [<ffffffc000566eec>] __device_attach+0xc4/0x170
[ 13.777365] [<ffffffc000567618>] device_initial_probe+0x10/0x18
[ 13.777366] [<ffffffc00056620c>] bus_probe_device+0x94/0xa0
[ 13.777368] [<ffffffc000566738>] deferred_probe_work_func+0x50/0xe0
[ 13.777371] [<ffffffc0000bbab8>] process_one_work+0x138/0x4c0
[ 13.777372] [<ffffffc0000bbf64>] worker_thread+0x124/0x498
[ 13.777374] [<ffffffc0000c1cc4>] kthread+0xdc/0xf0
[ 13.777377] [<ffffffc000084f90>] ret_from_fork+0x10/0x40
[ 13.777380] kobject_add_internal failed for I2S1 CIF with -EEXIST, don't try to register things with the same name in the same directory.
Thanks. I see what is happening now. The first attempt to probe fails because the codec is missing, and the next attempt then fails because the switch has not been unregistered correctly. I was able to reproduce this and verify that this is a bug in the driver. Please can you try the following fix and see if the probe is unable to complete once the codec is registered?
diff --git a/sound/soc/tegra-alt/tegra_t186ref_mobile_rt565x.c b/sound/soc/tegra-alt/tegra_t186ref_mobile_rt565x.c
index 18ff6a7418fe..533f76fb4405 100644
--- a/sound/soc/tegra-alt/tegra_t186ref_mobile_rt565x.c
+++ b/sound/soc/tegra-alt/tegra_t186ref_mobile_rt565x.c
@@ -1101,7 +1101,7 @@ static int tegra_t186ref_driver_probe(struct platform_device *pdev)
&pdev->dev,
card);
if (ret)
- goto err_alloc_dai_link;
+ goto err_switch_unregister;
ret = snd_soc_register_card(card);
if (ret) {
@@ -1135,6 +1135,10 @@ static int tegra_t186ref_driver_probe(struct platform_device *pdev)
err_fini_utils:
tegra_alt_asoc_utils_fini(&machine->audio_clock);
+err_switch_unregister:
+#ifdef CONFIG_SWITCH
+ tegra_alt_asoc_switch_unregister(&tegra_t186ref_headset_switch);
+#endif
err_alloc_dai_link:
tegra_machine_remove_dai_link();
tegra_machine_remove_codec_conf();
After a few retries to activate the sound card, it was eventually initialized and the sound card could start initialization. Though eventually it crashed. Here is the log upon the modification, any ideas?
[ 3.655106] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_card_name 0
[ 3.655136] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_audio_routing 0
[ 3.656001] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_switch_register 0
[ 3.656007] tegra-snd-t186ref-mobile-rt565x sound: Failed to get HP Det GPIO, should be handled by codec
[ 3.656877] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_utils_init 0
[ 3.657541] tegra-snd-t186ref-mobile-rt565x sound: ASoC: CODEC DAI tlv320aic32x4-hifi not registered
[ 3.657543] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_register_card failed (-517)
....
[ 3.695919] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_card_name 0
[ 3.695952] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_audio_routing 0
[ 3.696870] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_switch_register 0
[ 3.696874] tegra-snd-t186ref-mobile-rt565x sound: Failed to get HP Det GPIO, should be handled by codec
[ 3.697323] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_utils_init 0
[ 3.698078] tegra-snd-t186ref-mobile-rt565x sound: ASoC: CODEC DAI tlv320aic32x4-hifi not registered
[ 3.698080] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_register_card failed (-517)
....
[ 3.699208] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_card_name 0
[ 3.699237] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_audio_routing 0
[ 3.700190] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_switch_register 0
[ 3.700193] tegra-snd-t186ref-mobile-rt565x sound: Failed to get HP Det GPIO, should be handled by codec
[ 3.700633] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_utils_init 0
[ 3.701343] tegra-snd-t186ref-mobile-rt565x sound: ASoC: CODEC DAI tlv320aic32x4-hifi not registered
[ 3.701346] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_register_card failed (-517)
....
[ 3.776588] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_card_name 0
[ 3.776618] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_audio_routing 0
[ 3.777520] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_switch_register 0
[ 3.777524] tegra-snd-t186ref-mobile-rt565x sound: Failed to get HP Det GPIO, should be handled by codec
[ 3.777958] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_utils_init 0
[ 3.778642] tegra-snd-t186ref-mobile-rt565x sound: ASoC: CODEC DAI tlv320aic32x4-hifi not registered
[ 3.778645] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_register_card failed (-517)
....
[ 12.849623] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_card_name 0
[ 12.849653] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_audio_routing 0
[ 12.850637] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_switch_register 0
[ 12.850642] tegra-snd-t186ref-mobile-rt565x sound: Failed to get HP Det GPIO, should be handled by codec
[ 12.851158] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_utils_init 0
[ 12.851875] tegra-snd-t186ref-mobile-rt565x sound: ASoC: CODEC DAI tlv320aic32x4-hifi not registered
[ 12.851877] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_register_card failed (-517)
....
[ 13.404270] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_card_name 0
[ 13.404300] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_audio_routing 0
[ 13.405370] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_switch_register 0
[ 13.405374] tegra-snd-t186ref-mobile-rt565x sound: Failed to get HP Det GPIO, should be handled by codec
[ 13.405857] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_utils_init 0
[ 13.406607] tegra-snd-t186ref-mobile-rt565x sound: ASoC: CODEC DAI tlv320aic32x4-hifi not registered
[ 13.406609] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_register_card failed (-517)
....
[ 13.410734] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_card_name 0
[ 13.410763] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_of_parse_audio_routing 0
[ 13.411860] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_switch_register 0
[ 13.411865] tegra-snd-t186ref-mobile-rt565x sound: Failed to get HP Det GPIO, should be handled by codec
[ 13.412369] tegra-snd-t186ref-mobile-rt565x sound: tegra_alt_asoc_utils_init 0
[ 13.416758] spi-tegra114 3240000.spi: Setting clk_src clk_m
[ 13.418946] spi-tegra114 3240000.spi: The def 0x40408000 and written 0x40600807
[ 13.419895] spi-tegra114 3240000.spi: The def 0x40408000 and written 0x40600807
[ 13.420538] spi-tegra114 3240000.spi: The def 0x40408000 and written 0x40600807
[ 13.421520] spi-tegra114 3240000.spi: The def 0x40408000 and written 0x40600807
[ 13.591606] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_R
[ 13.591609] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_R -> 10 kOhm -> CM_R to Right Mixer Negative Resistor
[ 13.591639] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_R
[ 13.591640] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_R -> 20 kOhm -> CM_R to Right Mixer Negative Resistor
[ 13.591664] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_R
[ 13.591666] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_R -> 40 kOhm -> CM_R to Right Mixer Negative Resistor
[ 13.597958] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_L
[ 13.597961] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_L -> 10 kOhm -> CM_L to Left Mixer Negative Resistor
[ 13.597990] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_L
[ 13.597992] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_L -> 20 kOhm -> CM_L to Left Mixer Negative Resistor
[ 13.598018] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_L
[ 13.598020] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_L -> 40 kOhm -> CM_L to Left Mixer Negative Resistor
[ 13.604037] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF1 <-> ADMAIF1 mapping ok
[ 13.604127] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF2 <-> ADMAIF2 mapping ok
[ 13.604211] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF3 <-> ADMAIF3 mapping ok
[ 13.604299] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF4 <-> ADMAIF4 mapping ok
[ 13.604376] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF5 <-> ADMAIF5 mapping ok
[ 13.604454] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF6 <-> ADMAIF6 mapping ok
[ 13.604541] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF7 <-> ADMAIF7 mapping ok
[ 13.604616] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF8 <-> ADMAIF8 mapping ok
[ 13.604748] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF9 <-> ADMAIF9 mapping ok
[ 13.604820] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF10 <-> ADMAIF10 mapping ok
[ 13.604890] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF11 <-> ADMAIF11 mapping ok
[ 13.604959] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF12 <-> ADMAIF12 mapping ok
[ 13.605032] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF13 <-> ADMAIF13 mapping ok
[ 13.605098] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF14 <-> ADMAIF14 mapping ok
[ 13.605168] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF15 <-> ADMAIF15 mapping ok
[ 13.605237] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF16 <-> ADMAIF16 mapping ok
[ 13.605315] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF17 <-> ADMAIF17 mapping ok
[ 13.605384] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF18 <-> ADMAIF18 mapping ok
[ 13.605454] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF19 <-> ADMAIF19 mapping ok
[ 13.605529] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF20 <-> ADMAIF20 mapping ok
[ 13.609570] tegra-snd-t186ref-mobile-rt565x sound: ADSP-FE1 <-> ADSP PCM1 mapping ok
[ 13.609645] tegra-snd-t186ref-mobile-rt565x sound: ADSP-FE2 <-> ADSP PCM2 mapping ok
[ 13.609669] compress asoc: ADSP-FE3 <-> ADSP COMPR1 mapping ok
[ 13.609692] compress asoc: ADSP-FE4 <-> ADSP COMPR2 mapping ok
[ 13.635409] sysfs: cannot create duplicate filename '/devices/sound/I2S1 CIF'
[ 13.635427] ------------[ cut here ]------------
[ 13.635430] WARNING: at ffffffc000239c54 [verbose debug info unavailable]
[ 13.635441] Modules linked in: bcmdhd(+) hi8435rada(O) tlv320aic32x4(O) pci_tegra bluedroid_pm
[ 13.635443]
[ 13.635451] CPU: 1 PID: 55 Comm: kworker/u12:1 Tainted: G O 4.4.38-DTRE-v0.1 #18
[ 13.635453] Hardware name: quill (DT)
[ 13.635467] Workqueue: deferwq deferred_probe_work_func
[ 13.635469] task: ffffffc1ec2e8c80 ti: ffffffc1eb72c000 task.ti: ffffffc1eb72c000
[ 13.635476] PC is at sysfs_warn_dup+0x5c/0x80
[ 13.635479] LR is at sysfs_warn_dup+0x5c/0x80
[ 13.635481] pc : [<ffffffc000239c54>] lr : [<ffffffc000239c54>] pstate: 80000045
[ 13.635482] sp : ffffffc1eb72f840
[ 13.635488] x29: ffffffc1eb72f840 x28: ffffffc07b2ca958
[ 13.635492] x27: ffffffc1e36b0000 x26: ffffffc000964db0
[ 13.635495] x25: 00000000000070e0 x24: ffffffc1e6351c00
[ 13.635498] x23: ffffffc00137df38 x22: ffffffc1ebb3d810
[ 13.635502] x21: ffffffc1ebb29a50 x20: ffffffc0703d6980
[ 13.635505] x19: ffffffc1e353d000 x18: 0000000000020000
[ 13.635508] x17: 0000000000000002 x16: ffffffc000b5a618
[ 13.635511] x15: ffffffc0012481e8 x14: ffffffc00140b7da
[ 13.635514] x13: ffffffc001248000 x12: ffffffc0013e8000
[ 13.635518] x11: 0000000000000000 x10: 0000000000000000
[ 13.635521] x9 : 000000000000cf84 x8 : ffffffc0013fc86f
[ 13.635524] x7 : 0000000000000000 x6 : 000000001247ac17
[ 13.635527] x5 : 0000000000000015 x4 : 0000000000000000
[ 13.635530] x3 : 0000000000000040 x2 : ffffffc1eb72c000
[ 13.635533] x1 : 0000000000000000 x0 : 0000000000000041
[ 13.635534]
[ 13.635536] ---[ end trace 09838e280bf548bf ]---
[ 13.635537] Call trace:
[ 13.635541] [<ffffffc000239c54>] sysfs_warn_dup+0x5c/0x80
[ 13.635544] [<ffffffc000239d8c>] sysfs_create_dir_ns+0x9c/0xb0
[ 13.635551] [<ffffffc000323d50>] kobject_add_internal+0xa0/0x300
[ 13.635554] [<ffffffc000324034>] kobject_add+0x84/0xd0
[ 13.635559] [<ffffffc000563af4>] device_add+0xd4/0x580
[ 13.635565] [<ffffffc00096828c>] soc_post_component_init+0xcc/0x120
[ 13.635568] [<ffffffc00096b1c8>] snd_soc_instantiate_card+0x5e0/0xba8
[ 13.635571] [<ffffffc00096bb18>] snd_soc_register_card+0x388/0x480
[ 13.635576] [<ffffffc0009986ac>] tegra_t186ref_driver_probe+0x40c/0x5a8
[ 13.635580] [<ffffffc0005695f8>] platform_drv_probe+0x50/0xb8
[ 13.635583] [<ffffffc0005670f4>] driver_probe_device+0xcc/0x428
[ 13.635586] [<ffffffc000567580>] __device_attach_driver+0x90/0xd8
[ 13.635589] [<ffffffc0005650d0>] bus_for_each_drv+0x58/0x98
[ 13.635592] [<ffffffc000566eec>] __device_attach+0xc4/0x170
[ 13.635595] [<ffffffc000567618>] device_initial_probe+0x10/0x18
[ 13.635598] [<ffffffc00056620c>] bus_probe_device+0x94/0xa0
[ 13.635601] [<ffffffc000566738>] deferred_probe_work_func+0x50/0xe0
[ 13.635605] [<ffffffc0000bbab8>] process_one_work+0x138/0x4c0
[ 13.635607] [<ffffffc0000bbf64>] worker_thread+0x124/0x498
[ 13.635611] [<ffffffc0000c1cc4>] kthread+0xdc/0xf0
[ 13.635616] [<ffffffc000084f90>] ret_from_fork+0x10/0x40
[ 13.635620] kobject_add_internal failed for I2S1 CIF with -EEXIST, don't try to register things with the same name in the same directory.
....
So that is correct, I2S0 on J21 is I2S1 from a DT perspective. However, you cannot have more than one dai-link in your device-tree file for I2S1. So I am trying to understand what ‘nvidia,dai-link-1’ and ‘nvidia,dai-link-2’ are supposed to represent in your device-tree file. If you remove ‘nvidia,dai-link-2’ I think this will avoid the crash/warning.
Ah I see! So the same dai-link can be used for playback and capture. The example is poorly named in this respect as we use it for playback and capture. So drop one of the dai-links that you have.
This means that we are trying to disable a clock that is not enabled. The call to aic32x4_set_bias_level() (and then clk_core_disable()) is triggered by the following code …
1608 /* Async callback run prior to DAPM sequences - brings to _PREPARE if
1609 * they're changing state.
1610 */
1611 static void dapm_pre_sequence_async(void *data, async_cookie_t cookie)
1612 {
1613 struct snd_soc_dapm_context *d = data;
1614 int ret;
1615
1616 /* If we're off and we're not supposed to be go into STANDBY */
1617 if (d->bias_level == SND_SOC_BIAS_OFF &&
1618 d->target_bias_level != SND_SOC_BIAS_OFF) {
1619 if (d->dev)
1620 pm_runtime_get_sync(d->dev);
1621
1622 ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_STANDBY);
1623 if (ret != 0)
1624 dev_err(d->dev,
1625 "ASoC: Failed to turn on bias: %d\n", ret);
1626 }
1627
So it believes the bias level is OFF and the target is not OFF and tries to place it in STANDBY. I am not familiar with this codec to understand if this is correct or not, but you may wish to see what is setting the target_bias_level. Or ask Texas Instruments what should be happening here.
The actual crash that follows this WARN, is a bug in the rt565x machine driver. Please can you apply the following fix …
diff --git a/sound/soc/tegra-alt/tegra_t210ref_mobile_rt565x_alt.c b/sound/soc/tegra-alt/tegra_t210ref_mobile_rt565x_alt.c
index 9f65190c39ec..3bc1d125a20f 100644
--- a/sound/soc/tegra-alt/tegra_t210ref_mobile_rt565x_alt.c
+++ b/sound/soc/tegra-alt/tegra_t210ref_mobile_rt565x_alt.c
@@ -968,11 +968,11 @@ static int tegra_t210ref_driver_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "This is a dummy codec\n");
machine->is_codec_dummy = 1;
}
- }
- if (!machine->is_codec_dummy) {
- /* setup for jack detection only in non-dummy case */
- rt5659_set_jack_detect(codec, &tegra_t210ref_hp_jack);
+ if (!machine->is_codec_dummy) {
+ /* setup for jack detection only in non-dummy case */
+ rt5659_set_jack_detect(codec, &tegra_t210ref_hp_jack);
+ }
}
return 0;
If this boots, then we need to start looking at all the following messages …
[ 13.632021] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_R
[ 13.632025] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_R -> 10 kOhm -> CM_R to Right Mixer Negative Resistor
Oops! Please apply the above patch to the tegra_t186ref_mobile_rt565x_alt.c and not tegra_t210ref_mobile_rt565x_alt.c, because you are using TX2 and not TX1! However, same fix is needed in both places. And the tegra_t210ref_hp_jack will need to be changed to tegra_t186ref_hp_jack.
Which file did you update? In my earlier post I mentioned the wrong file as I forgot that you are using TX2 and not TX1. Please make sure you have the following change in place …
diff --git a/sound/soc/tegra-alt/tegra_t186ref_mobile_rt565x.c b/sound/soc/tegra-alt/tegra_t186ref_mobile_rt565x.c
index 61357fffc8f8..ebd670258a02 100644
--- a/sound/soc/tegra-alt/tegra_t186ref_mobile_rt565x.c
+++ b/sound/soc/tegra-alt/tegra_t186ref_mobile_rt565x.c
@@ -1124,11 +1124,11 @@ static int tegra_t186ref_driver_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "This is a dummy codec\n");
machine->is_codec_dummy = 1;
}
- }
- if (!machine->is_codec_dummy) {
- /* setup for jack detection only in non-dummy case */
- rt5659_set_jack_detect(codec, &tegra_t186ref_hp_jack);
+ if (!machine->is_codec_dummy) {
+ /* setup for jack detection only in non-dummy case */
+ rt5659_set_jack_detect(codec, &tegra_t186ref_hp_jack);
+ }
}
return 0;
If you have updated tegra_t186ref_mobile_rt565x.c as above and it is still crashing, please attached your tegra_t186ref_mobile_rt565x.c as it should no longer be calling rt5659_set_jack_detect().
Thanks. I took at look at the file and it appears that you haven’t applied the change I mentioned. After applying the diff, you should end up with …
/* check if idx has valid number */
if (idx == -EINVAL)
dev_warn(&pdev->dev, "codec link not defined - codec not part of sound card");
else {
codec = card->rtd[idx].codec;
codec_dai_name = card->rtd[idx].dai_link->codec_dai_name;
dev_info(&pdev->dev,
"codec-dai \"%s\" registered\n", codec_dai_name);
if (!strcmp("dit-hifi", codec_dai_name)) {
dev_info(&pdev->dev, "This is a dummy codec\n");
machine->is_codec_dummy = 1;
}
if (!machine->is_codec_dummy){
/* setup for jack detection only in non-dummy case */
rt5659_set_jack_detect(codec, &tegra_t186ref_hp_jack);
}
}
Jon,
let me thank you again for your support, and a special thank for noticing the error in my updated code.
The system is not crashing though after logging in it starts to print out some failures which are depicted hereafter within the following log, but I guess it is as a result of earlier errors:
[ 13.532124] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_R
[ 13.532127] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_R -> 10 kOhm -> CM_R to Right Mixer Negative Resistor
[ 13.532172] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_R
[ 13.532174] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_R -> 20 kOhm -> CM_R to Right Mixer Negative Resistor
[ 13.532206] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_R
[ 13.532208] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_R -> 40 kOhm -> CM_R to Right Mixer Negative Resistor
[ 13.542137] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_L
[ 13.542140] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_L -> 10 kOhm -> CM_L to Left Mixer Negative Resistor
[ 13.542179] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_L
[ 13.542181] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_L -> 20 kOhm -> CM_L to Left Mixer Negative Resistor
[ 13.542215] tlv320aic32x4 1-0018: ASoC: no source widget found for CM_L
[ 13.542217] tlv320aic32x4 1-0018: ASoC: Failed to add route CM_L -> 40 kOhm -> CM_L to Left Mixer Negative Resistor
[ 13.557177] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF1 <-> ADMAIF1 mapping ok
[ 13.557262] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF2 <-> ADMAIF2 mapping ok
[ 13.557343] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF3 <-> ADMAIF3 mapping ok
[ 13.557416] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF4 <-> ADMAIF4 mapping ok
[ 13.557497] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF5 <-> ADMAIF5 mapping ok
[ 13.557567] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF6 <-> ADMAIF6 mapping ok
[ 13.557640] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF7 <-> ADMAIF7 mapping ok
[ 13.557716] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF8 <-> ADMAIF8 mapping ok
[ 13.557791] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF9 <-> ADMAIF9 mapping ok
[ 13.557863] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF10 <-> ADMAIF10 mapping ok
[ 13.557936] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF11 <-> ADMAIF11 mapping ok
[ 13.558010] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF12 <-> ADMAIF12 mapping ok
[ 13.558076] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF13 <-> ADMAIF13 mapping ok
[ 13.558149] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF14 <-> ADMAIF14 mapping ok
[ 13.558222] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF15 <-> ADMAIF15 mapping ok
[ 13.558300] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF16 <-> ADMAIF16 mapping ok
[ 13.558371] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF17 <-> ADMAIF17 mapping ok
[ 13.558455] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF18 <-> ADMAIF18 mapping ok
[ 13.558529] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF19 <-> ADMAIF19 mapping ok
[ 13.558613] tegra-snd-t186ref-mobile-rt565x sound: ADMAIF20 <-> ADMAIF20 mapping ok
[ 13.565885] tegra-snd-t186ref-mobile-rt565x sound: ADSP-FE1 <-> ADSP PCM1 mapping ok
[ 13.565964] tegra-snd-t186ref-mobile-rt565x sound: ADSP-FE2 <-> ADSP PCM2 mapping ok
[ 13.565990] compress asoc: ADSP-FE3 <-> ADSP COMPR1 mapping ok
[ 13.566012] compress asoc: ADSP-FE4 <-> ADSP COMPR2 mapping ok
[ 13.608352] tegra-snd-t186ref-mobile-rt565x sound: ASoC: no source widget found for x OUT
[ 13.608356] tegra-snd-t186ref-mobile-rt565x sound: ASoC: Failed to add route x OUT -> direct -> x Headphone
[ 13.608448] tegra-snd-t186ref-mobile-rt565x sound: ASoC: no sink widget found for x IN
[ 13.608450] tegra-snd-t186ref-mobile-rt565x sound: ASoC: Failed to add route x Mic -> direct -> x IN
[ 13.720599] tlv320aic32x4 1-0018: ASoC: mux z CM_R to Right Mixer Negative Resistor has no paths
[ 13.721678] tlv320aic32x4 1-0018: ASoC: mux z CM_L to Left Mixer Negative Resistor has no paths
[ 13.741792] tlv320aic32x4 1-0018: AIC32X4_BCLKN
[ 13.743806] ------------[ cut here ]------------
[ 13.743809] WARNING: at ffffffc00089a1e0 [verbose debug info unavailable]
[ 13.743816] Modules linked in: bcmdhd(+) tlv320aic32x4(O) hi8435rada(O) pci_tegra bluedroid_pm
[ 13.743817]
[ 13.743822] CPU: 0 PID: 116 Comm: kworker/u12:2 Tainted: G O 4.4.38-DTRE-v0.1 #27
[ 13.743823] Hardware name: quill (DT)
[ 13.743831] Workqueue: events_unbound async_run_entry_fn
[ 13.743832] task: ffffffc1ec2ea580 ti: ffffffc1eaad0000 task.ti: ffffffc1eaad0000
[ 13.743837] PC is at clk_core_disable+0xb0/0x1e8
[ 13.743839] LR is at clk_disable+0x2c/0x48
[ 13.743841] pc : [<ffffffc00089a1e0>] lr : [<ffffffc00089a60c>] pstate: 800000c5
[ 13.743842] sp : ffffffc1eaad3c80
[ 13.743844] x29: ffffffc1eaad3c80 x28: ffffffc1ecc152e0
[ 13.743846] x27: ffffffc00122e000 x26: ffffffc0013ab000
[ 13.743848] x25: 0000000000000000 x24: ffffffc0013ab31b
[ 13.743849] x23: ffffffc1e5baeb18 x22: 0000000000000000
[ 13.743851] x21: ffffffc1e587d618 x20: 0000000000000040
[ 13.743852] x19: ffffffc1e587d880 x18: 0000000000000a03
[ 13.743854] x17: 0000007f851c8988 x16: ffffffc0001dde30
[ 13.743855] x15: 0000000000000008 x14: 0000000000000000
[ 13.743857] x13: 000000000000022f x12: 0000000000286c2e
[ 13.743859] x11: 0000000000000000 x10: 0000000000000400
[ 13.743860] x9 : 0000000000000400 x8 : 00000000000002f0
[ 13.743862] x7 : ffffffc1f5cf9598 x6 : ffffffc1eb4f2860
[ 13.743863] x5 : 0000000000000000 x4 : ffffffc1ec2ea580
[ 13.743865] x3 : 0000000000000000 x2 : 000000000e7a0e79
[ 13.743866] x1 : 0000000000000000 x0 : ffffffc07034e000
[ 13.743867]
[ 13.743868] ---[ end trace b77a5e45bb4581ce ]---
[ 13.743869] Call trace:
[ 13.743871] [<ffffffc00089a1e0>] clk_core_disable+0xb0/0x1e8
[ 13.743881] [<ffffffbffc0306e0>] aic32x4_set_bias_level+0x100/0x2b0 [tlv320aic32x4]
[ 13.743886] [<ffffffc00096516c>] snd_soc_codec_set_bias_level+0x1c/0x28
[ 13.743888] [<ffffffc00096c458>] snd_soc_dapm_set_bias_level+0x1e8/0x228
[ 13.743891] [<ffffffc00096e434>] dapm_pre_sequence_async+0x3c/0xd0
[ 13.743892] [<ffffffc0000c46d8>] async_run_entry_fn+0x40/0x168
[ 13.743895] [<ffffffc0000bbab8>] process_one_work+0x138/0x4c0
[ 13.743896] [<ffffffc0000bbf64>] worker_thread+0x124/0x498
[ 13.743898] [<ffffffc0000c1cc4>] kthread+0xdc/0xf0
[ 13.743901] [<ffffffc000084f90>] ret_from_fork+0x10/0x40
[ 13.743913] ------------[ cut here ]------------
[ 13.743914] WARNING: at ffffffc0008995e0 [verbose debug info unavailable]
[ 13.743918] Modules linked in: bcmdhd(+) tlv320aic32x4(O) hi8435rada(O) pci_tegra bluedroid_pm
[ 13.743918]
[ 13.743920] CPU: 0 PID: 116 Comm: kworker/u12:2 Tainted: G W O 4.4.38-DTRE-v0.1 #27
[ 13.743921] Hardware name: quill (DT)
[ 13.743924] Workqueue: events_unbound async_run_entry_fn
[ 13.743925] task: ffffffc1ec2ea580 ti: ffffffc1eaad0000 task.ti: ffffffc1eaad0000
[ 13.743927] PC is at clk_core_unprepare+0x90/0x1b0
[ 13.743928] LR is at clk_unprepare+0x28/0x40
[ 13.743930] pc : [<ffffffc0008995e0>] lr : [<ffffffc000899930>] pstate: 60000045
[ 13.743930] sp : ffffffc1eaad3c80
[ 13.743932] x29: ffffffc1eaad3c80 x28: ffffffc1ecc152e0
[ 13.743934] x27: ffffffc00122e000 x26: ffffffc0013ab000
[ 13.743935] x25: 0000000000000000 x24: ffffffc0013ab31b
[ 13.743937] x23: ffffffc1e5baeb18 x22: 0000000000000000
[ 13.743938] x21: ffffffc1e587d618 x20: 0000000000000000
[ 13.743940] x19: ffffffc1e587d880 x18: 0000000000000a03
[ 13.743942] x17: 0000007f851c8988 x16: ffffffc0001dde30
[ 13.743943] x15: 0000000000000008 x14: 0000000000000000
[ 13.743945] x13: 000000000000022f x12: 0000000000286c2e
[ 13.743946] x11: 0000000000000000 x10: 0000000000000400
[ 13.743948] x9 : 0000000000000400 x8 : 00000000000002f0
[ 13.743949] x7 : ffffffc1f5cf9598 x6 : ffffffc1eb4f2860
[ 13.743951] x5 : 0000000000000000 x4 : ffffffc001472000
[ 13.743952] x3 : 0000000000000000 x2 : 0000000000000000
[ 13.743954] x1 : 0000000000000001 x0 : ffffffc07034e000
[ 13.743954]
[ 13.743955] ---[ end trace b77a5e45bb4581cf ]---
[ 13.743955] Call trace:
[ 13.743957] [<ffffffc0008995e0>] clk_core_unprepare+0x90/0x1b0
[ 13.743961] [<ffffffbffc0306e8>] aic32x4_set_bias_level+0x108/0x2b0 [tlv320aic32x4]
[ 13.743964] [<ffffffc00096516c>] snd_soc_codec_set_bias_level+0x1c/0x28
[ 13.743966] [<ffffffc00096c458>] snd_soc_dapm_set_bias_level+0x1e8/0x228
[ 13.743968] [<ffffffc00096e434>] dapm_pre_sequence_async+0x3c/0xd0
[ 13.743969] [<ffffffc0000c46d8>] async_run_entry_fn+0x40/0x168
[ 13.743971] [<ffffffc0000bbab8>] process_one_work+0x138/0x4c0
[ 13.743972] [<ffffffc0000bbf64>] worker_thread+0x124/0x498
[ 13.743974] [<ffffffc0000c1cc4>] kthread+0xdc/0xf0
[ 13.743976] [<ffffffc000084f90>] ret_from_fork+0x10/0x40
[ 13.759187] input: tegra-snd-t186ref-mobile-rt565x Headphone Jack as /devices/sound/sound/card1/input3
[ 13.759876] tegra-snd-t186ref-mobile-rt565x sound: <b>codec link not defined - codec not part of sound card</b>
....
[ 108.068368] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 108.075245] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 108.081426] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 108.089461] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 108.096335] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 108.102511] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 108.110554] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 108.117425] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 108.123603] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 108.131624] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 108.138497] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 108.144673] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 108.155309] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 108.162197] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 108.168378] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 108.176428] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 108.183305] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 108.189483] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 108.197516] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 108.204387] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 108.210566] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 108.218603] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 108.225476] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 108.231659] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 108.239701] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 108.246577] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 108.252755] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 108.263533] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 108.270422] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 108.276605] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 108.284750] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 108.291627] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 108.297805] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 108.305897] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 108.312788] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 108.319005] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 108.327285] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 108.334189] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 108.340411] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 108.348596] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
[ 108.355475] tegra-snd-t186ref-mobile-rt565x sound: Failed dai init
[ 108.361654] tegra-snd-t186ref-mobile-rt565x sound: ASoC: machine hw_params failed: -524
[ 108.372613] tegra-snd-t186ref-mobile-rt565x sound: codec_dai clock not set
.....
What is the meaning of codec link not defined - codec not part of sound card?
I have then disabled all the tr5956 DAIs and enabled only the one handles the tv320aic32x4 (I have added it)
Then it complained that the clock value which is being set is incorrect 11289600 vs 12000000 (as per the codec file) I think that I should update the DT, but the clock values there are not multiplication of 12M or 24M or 25M as the codec requires:
current audio MCLK (from my DT): 11025 x 1024 = 11289600. So I have tested the updated DT but the clock that the codec was receiving was 11289600 although the value in the DT was modified to 12000000Hz.