Skip to content

Commit d6e2869

Browse files
morimotobroonie
authored andcommitted
ASoC: fsl: imx-es8328: 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/87bkjif628.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 389b01a commit d6e2869

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

sound/soc/fsl/imx-es8328.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static int imx_es8328_probe(struct platform_device *pdev)
149149
goto put_device;
150150
}
151151

152-
comp = devm_kzalloc(dev, 3 * sizeof(*comp), GFP_KERNEL);
152+
comp = devm_kzalloc(dev, 2 * sizeof(*comp), GFP_KERNEL);
153153
if (!comp) {
154154
ret = -ENOMEM;
155155
goto put_device;
@@ -159,9 +159,13 @@ static int imx_es8328_probe(struct platform_device *pdev)
159159

160160
data->jack_gpio = of_get_named_gpio(pdev->dev.of_node, "jack-gpio", 0);
161161

162-
data->dai.cpus = &comp[0];
162+
/*
163+
* CPU == Platform
164+
* platform is using soc-generic-dmaengine-pcm
165+
*/
166+
data->dai.cpus =
167+
data->dai.platforms = &comp[0];
163168
data->dai.codecs = &comp[1];
164-
data->dai.platforms = &comp[2];
165169

166170
data->dai.num_cpus = 1;
167171
data->dai.num_codecs = 1;
@@ -172,7 +176,6 @@ static int imx_es8328_probe(struct platform_device *pdev)
172176
data->dai.codecs->dai_name = "es8328-hifi-analog";
173177
data->dai.codecs->of_node = codec_np;
174178
data->dai.cpus->of_node = ssi_np;
175-
data->dai.platforms->of_node = ssi_np;
176179
data->dai.init = &imx_es8328_dai_init;
177180
data->dai.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
178181
SND_SOC_DAIFMT_CBP_CFP;

0 commit comments

Comments
 (0)