Commit c54e5cd3817fde4133c8c994ff7bec59075fc5ec

Authored by Shengjiu Wang
1 parent ebf3fc59b8

MLK-21440-3: ASoC: imx-wm8960: remove snd_soc_find_dai

Previously we add snd_soc_find_dai to check if the codec is probed or
not, but this bring kernel dump issue when CONFIG_LOCKDEP=y.

[    2.823379] WARNING: CPU: 2 PID: 1 at sound/soc/soc-core.c:1016 snd_soc_find_dai+0x144/0x150
[    2.831827] Modules linked in:
[    2.834907] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.14.78-00007-g524e1b1f0b3f #18
[    2.842748] Hardware name: FSL i.MX8MM EVK board (DT)
[    2.847811] task: ffff8000624f0000 task.stack: ffff000008078000
[    2.853745] PC is at snd_soc_find_dai+0x144/0x150
[    2.858462] LR is at snd_soc_find_dai+0x140/0x150

...

[    3.469675] Call trace:
[    3.472135] Exception stack(0xffff00000807ba40 to 0xffff00000807bb80)
[    3.478590] ba40: 0000000000000000 00000000ffffffff 0000000000000000 0000000000000002
[    3.4864333.596564] [<ffff00000883f2a8>] bus_add_driver+0x110/0x230
[    3.602149] [<ffff0000088412e8>] driver_register+0x68/0x100
[    3.607735] [<ffff0000088426dc>] __platform_driver_register+0x54/0x60
[    3.614191] [<ffff0000097e4cc8>] imx_rpmsg_driver_init+0x20/0x28
[    3.620213] [<ffff0000080844c4>] do_one_initcall+0x44/0x130
[    3.625801] [<ffff000009760ef8>] kernel_init_freeable+0x1e0/0x280
[    3.631909] [<ffff00000908c3f8>] kernel_init+0x18/0x110
[    3.637148] [<ffff000008085a4c>] ret_from_fork+0x10/0x1c

So we could't resolve the warning "snd_soc_register_card failed (-517)".

Fixes: a52c88bc3932 ("MLK-19854-1: ASoC: imx-wm8960: fix error when m4
image is not loaded")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>

(cherry picked from commit f5d9013702e172a243da74a42941a62283bbe4a8)

Showing 1 changed file with 0 additions and 8 deletions Side-by-side Diff

sound/soc/fsl/imx-wm8960.c
... ... @@ -448,8 +448,6 @@
448 448 struct imx_wm8960_data *data;
449 449 struct platform_device *asrc_pdev = NULL;
450 450 struct device_node *asrc_np;
451   - struct snd_soc_dai_link_component dlc = { 0 };
452   - struct snd_soc_dai *codec_dai;
453 451 u32 width;
454 452 int ret;
455 453  
... ... @@ -539,12 +537,6 @@
539 537 if (data->is_codec_rpmsg) {
540 538 imx_wm8960_dai[0].codec_name = "rpmsg-audio-codec-wm8960";
541 539 imx_wm8960_dai[0].codec_dai_name = "rpmsg-wm8960-hifi";
542   -
543   - dlc.name = "rpmsg-audio-codec-wm8960";
544   - dlc.dai_name = "rpmsg-wm8960-hifi";
545   - codec_dai = snd_soc_find_dai(&dlc);
546   - if (!codec_dai)
547   - return -ENODEV;
548 540 } else
549 541 imx_wm8960_dai[0].codec_of_node = codec_np;
550 542