Skip to content

Commit 2324bc1

Browse files
morimotobroonie
authored andcommitted
ASoC: fsl: imx-spdif: cleanup platform which is using Generic DMA
If CPU is using soc-generic-dmaengine-pcm, Platform Component will be same as CPU Component. In this case, we can use CPU dlc for Platform dlc. This patch shares CPU dlc with Platform, and add comment. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Tested-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/87a5z2f61w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent d6e2869 commit 2324bc1

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

sound/soc/fsl/imx-spdif.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,19 @@ static int imx_spdif_audio_probe(struct platform_device *pdev)
2626
}
2727

2828
data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
29-
comp = devm_kzalloc(&pdev->dev, 3 * sizeof(*comp), GFP_KERNEL);
29+
comp = devm_kzalloc(&pdev->dev, 2 * sizeof(*comp), GFP_KERNEL);
3030
if (!data || !comp) {
3131
ret = -ENOMEM;
3232
goto end;
3333
}
3434

35-
data->dai.cpus = &comp[0];
35+
/*
36+
* CPU == Platform
37+
* platform is using soc-generic-dmaengine-pcm
38+
*/
39+
data->dai.cpus =
40+
data->dai.platforms = &comp[0];
3641
data->dai.codecs = &comp[1];
37-
data->dai.platforms = &comp[2];
3842

3943
data->dai.num_cpus = 1;
4044
data->dai.num_codecs = 1;
@@ -45,7 +49,6 @@ static int imx_spdif_audio_probe(struct platform_device *pdev)
4549
data->dai.codecs->dai_name = "snd-soc-dummy-dai";
4650
data->dai.codecs->name = "snd-soc-dummy";
4751
data->dai.cpus->of_node = spdif_np;
48-
data->dai.platforms->of_node = spdif_np;
4952
data->dai.playback_only = true;
5053
data->dai.capture_only = true;
5154

0 commit comments

Comments
 (0)