Commit ebf3fc59b84503a8da40a8e54a92e6de60e01dce
1 parent
314ef30b1b
Exists in
smarc_8mm_imx_4.14.98_2.0.0_ga
and in
4 other branches
MLK-21440-2: ASoC: imx-rpmsg: 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: 75632b22a332 ("MLK-20247: ASoC: imx-rpmsg: fix error when m4 image is not loaded") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> (cherry picked from commit bbc1868d1c3ec448301d76606e7199f74aa35581)
Showing 1 changed file with 0 additions and 8 deletions Side-by-side Diff
sound/soc/fsl/imx-rpmsg.c
... | ... | @@ -42,8 +42,6 @@ |
42 | 42 | struct platform_device *cpu_pdev; |
43 | 43 | struct imx_rpmsg_data *data; |
44 | 44 | struct fsl_rpmsg_i2s *rpmsg_i2s; |
45 | - struct snd_soc_dai_link_component dlc = { 0 }; | |
46 | - struct snd_soc_dai *codec_dai; | |
47 | 45 | int ret; |
48 | 46 | |
49 | 47 | cpu_np = of_parse_phandle(pdev->dev.of_node, "cpu-dai", 0); |
... | ... | @@ -91,12 +89,6 @@ |
91 | 89 | SND_SOC_DAIFMT_NB_NF | |
92 | 90 | SND_SOC_DAIFMT_CBS_CFS; |
93 | 91 | } |
94 | - | |
95 | - dlc.name = data->dai[0].codec_name; | |
96 | - dlc.dai_name = data->dai[0].codec_dai_name; | |
97 | - codec_dai = snd_soc_find_dai(&dlc); | |
98 | - if (!codec_dai) | |
99 | - return -ENODEV; | |
100 | 92 | |
101 | 93 | data->dai[0].cpu_dai_name = dev_name(&cpu_pdev->dev); |
102 | 94 | data->dai[0].platform_of_node = cpu_np; |