LF-601-1: ASoC: fsl_esai: Switch to imx-pcm-dma-v2
authorShengjiu Wang <shengjiu.wang@nxp.com>
Wed, 4 Mar 2020 08:35:25 +0000 (16:35 +0800)
committerDong Aisheng <aisheng.dong@nxp.com>
Mon, 14 Dec 2020 02:56:26 +0000 (10:56 +0800)
With the imx-pcm-dma, the dma channel will be allocated in probe,
with EDMA, the channel allocation is fixed for each peripheral.

In ASRC->ESAI->CODEC case, we have two sound card device, hw:x,0
and hw:x,1, with imx-pcm-dma, the channel for esai will be ocuppied
by hw:x,0 in boot up.  when asrc platform driver want to request
the dma channnel for esai, it will fail.

So we switch to imx-pcm-dma-v2, with imx-pcm-dma-v2, the dma
channel is allocated when running, not in probe.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
sound/soc/fsl/fsl_esai.c

index 54a0374..e2e33b3 100644 (file)
@@ -1132,7 +1132,7 @@ static int fsl_esai_probe(struct platform_device *pdev)
 
        regcache_cache_only(esai_priv->regmap, true);
 
-       ret = imx_pcm_dma_init(pdev, IMX_ESAI_DMABUF_SIZE);
+       ret = imx_pcm_platform_register(&pdev->dev);
        if (ret)
                dev_err(&pdev->dev, "failed to init imx pcm dma: %d\n", ret);