diff options
author | Zidan Wang <zidan.wang@freescale.com> | 2015-06-26 16:06:45 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:22:49 +0800 |
commit | 94b4714b1b3168350ae9ff8e3129248cfa5bfc7b (patch) | |
tree | ef58832074f1d5ee321f66dbb411a99b1e62d002 /sound/soc/fsl/fsl_ssi.c | |
parent | 13e267983e77c347d131af2d602669945a9c4f25 (diff) |
MLK-11179 ASoC: fsl: implement specify audio DMA buffer size from devicetree
If the property "fsl,dma-buffer-size" is present, using the specified buffer size.
Otherwise, using the default audio buffer size.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit bba153dd92a4f58b81c4c26fb3a95c45445c65e0)
Diffstat (limited to 'sound/soc/fsl/fsl_ssi.c')
-rw-r--r-- | sound/soc/fsl/fsl_ssi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 3ffbb498cc70..00b9626fba8a 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -1328,6 +1328,7 @@ static int fsl_ssi_imx_probe(struct platform_device *pdev, struct device_node *np = pdev->dev.of_node; u32 dmas[4]; int ret; + u32 buffer_size; if (ssi_private->has_ipg_clk_name) ssi_private->clk = devm_clk_get(&pdev->dev, "ipg"); @@ -1370,6 +1371,9 @@ static int fsl_ssi_imx_probe(struct platform_device *pdev, ssi_private->dma_params_rx.maxburst &= ~0x1; } + if (of_property_read_u32(np, "fsl,dma-buffer-size", &buffer_size)) + buffer_size = IMX_SSI_DMABUF_SIZE; + if (!ssi_private->use_dma) { /* @@ -1390,7 +1394,7 @@ static int fsl_ssi_imx_probe(struct platform_device *pdev, if (ret) goto error_pcm; } else { - ret = imx_pcm_dma_init(pdev, IMX_SSI_DMABUF_SIZE); + ret = imx_pcm_dma_init(pdev, buffer_size); if (ret) goto error_pcm; } |