ASoC: fsl: add imx-pcm-dma v2 platform driver (part 2)
authorViorel Suman <viorel.suman@nxp.com>
Mon, 1 May 2017 11:57:02 +0000 (14:57 +0300)
committerDong Aisheng <aisheng.dong@nxp.com>
Mon, 14 Dec 2020 02:58:14 +0000 (10:58 +0800)
which don't request the dma channel in the probe, but request
dma channel when needed. for the dma channel of cpu dai in BE
can be reused by the FE.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
[ Aisheng: split PCM changes ]
[ Aisheng: fix conflict due to
d1520889782d ("ASoC: fsl_sai: Fix exiting path on probing failure") ]
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
sound/soc/fsl/fsl_sai.c

index f24861b..03dcaac 100644 (file)
@@ -1164,6 +1164,8 @@ static int fsl_sai_probe(struct platform_device *pdev)
                                   MCLK_DIR(index));
        }
 
+       sai->dma_params_rx.chan_name = "rx";
+       sai->dma_params_tx.chan_name = "tx";
        sai->dma_params_rx.addr = res->start + FSL_SAI_RDR0;
        sai->dma_params_tx.addr = res->start + FSL_SAI_TDR0;
        sai->dma_params_rx.maxburst = FSL_SAI_MAXBURST_RX;
@@ -1192,7 +1194,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
                goto err_pm_disable;
 
        if (sai->soc_data->use_imx_pcm) {
-               ret = imx_pcm_dma_init(pdev, IMX_SAI_DMABUF_SIZE);
+               ret = imx_pcm_platform_register(&pdev->dev);
                if (ret)
                        goto err_pm_disable;
        } else {