1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright 2009 Sascha Hauer <s.hauer@pengutronix.de>
5 * This code is based on code copyrighted by Freescale,
6 * Liam Girdwood, Javier Martin and probably others.
12 #include <linux/platform_data/dma-imx.h>
15 * Do not change this as the FIQ handler depends on this size
17 #define IMX_SSI_DMABUF_SIZE (64 * 1024)
19 #define IMX_DEFAULT_DMABUF_SIZE (64 * 1024)
20 #define IMX_SAI_DMABUF_SIZE (64 * 1024)
21 #define IMX_SPDIF_DMABUF_SIZE (64 * 1024)
22 #define IMX_ESAI_DMABUF_SIZE (256 * 1024)
25 imx_pcm_dma_params_init_data(struct imx_dma_data
*dma_data
,
26 int dma
, enum sdma_peripheral_type peripheral_type
)
28 dma_data
->dma_request
= dma
;
29 dma_data
->priority
= DMA_PRIO_HIGH
;
30 dma_data
->peripheral_type
= peripheral_type
;
33 struct imx_pcm_fiq_params
{
37 /* Pointer to original ssi driver to setup tx rx sizes */
38 struct snd_dmaengine_dai_dma_data
*dma_params_rx
;
39 struct snd_dmaengine_dai_dma_data
*dma_params_tx
;
42 #if IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_DMA)
43 int imx_pcm_dma_init(struct platform_device
*pdev
, size_t size
);
45 static inline int imx_pcm_dma_init(struct platform_device
*pdev
, size_t size
)
51 #if IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_FIQ)
52 int imx_pcm_fiq_init(struct platform_device
*pdev
,
53 struct imx_pcm_fiq_params
*params
);
54 void imx_pcm_fiq_exit(struct platform_device
*pdev
);
56 static inline int imx_pcm_fiq_init(struct platform_device
*pdev
,
57 struct imx_pcm_fiq_params
*params
)
62 static inline void imx_pcm_fiq_exit(struct platform_device
*pdev
)
67 #endif /* _IMX_PCM_H */