diff options
author | Shengjiu Wang <shengjiu.wang@nxp.com> | 2018-11-09 15:16:23 +0800 |
---|---|---|
committer | Shengjiu Wang <shengjiu.wang@nxp.com> | 2018-11-09 15:33:15 +0800 |
commit | 532a86fb069c52a824d70060bc6b444b6eff2eb8 (patch) | |
tree | c4eb2f3c65f0b05294c6253d06a1a7b95ba6bfea /sound | |
parent | 486074baf25e03872b879f7992def8eac6657436 (diff) |
MLK-20247: ASoC: imx-rpmsg: fix error when m4 image is not loaded
The reason is same as commit d4eb8ab26399 ("MLK-19854-1: ASoC:
imx-cs42888: fix error when m4 image is not loaded")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/fsl/imx-rpmsg.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c index 8bbe044e29ba..c782fb9de042 100644 --- a/sound/soc/fsl/imx-rpmsg.c +++ b/sound/soc/fsl/imx-rpmsg.c @@ -35,6 +35,8 @@ static int imx_rpmsg_probe(struct platform_device *pdev) struct platform_device *cpu_pdev; struct imx_rpmsg_data *data; struct fsl_rpmsg_i2s *rpmsg_i2s; + struct snd_soc_dai_link_component dlc = { 0 }; + struct snd_soc_dai *codec_dai; int ret; cpu_np = of_parse_phandle(pdev->dev.of_node, "cpu-dai", 0); @@ -83,6 +85,12 @@ static int imx_rpmsg_probe(struct platform_device *pdev) SND_SOC_DAIFMT_CBS_CFS; } + dlc.name = data->dai[0].codec_name; + dlc.dai_name = data->dai[0].codec_dai_name; + codec_dai = snd_soc_find_dai(&dlc); + if (!codec_dai) + return -ENODEV; + data->dai[0].cpu_dai_name = dev_name(&cpu_pdev->dev); data->dai[0].platform_of_node = cpu_np; data->dai[0].playback_only = true; |