imx-pcm.h (c39f2d9db0fd81ea20bb5cce9b3f082ca63753e2) imx-pcm.h (9b3ff6378df33dbea4b9459ee804b25f1ce294ca)
1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright 2009 Sascha Hauer <s.hauer@pengutronix.de>
4 *
5 * This code is based on code copyrighted by Freescale,
6 * Liam Girdwood, Javier Martin and probably others.
7 */
8
9#ifndef _IMX_PCM_H
10#define _IMX_PCM_H
11
12#include <linux/platform_data/dma-imx.h>
13
14/*
15 * Do not change this as the FIQ handler depends on this size
16 */
17#define IMX_SSI_DMABUF_SIZE (64 * 1024)
18
19#define IMX_DEFAULT_DMABUF_SIZE (64 * 1024)
1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright 2009 Sascha Hauer <s.hauer@pengutronix.de>
4 *
5 * This code is based on code copyrighted by Freescale,
6 * Liam Girdwood, Javier Martin and probably others.
7 */
8
9#ifndef _IMX_PCM_H
10#define _IMX_PCM_H
11
12#include <linux/platform_data/dma-imx.h>
13
14/*
15 * Do not change this as the FIQ handler depends on this size
16 */
17#define IMX_SSI_DMABUF_SIZE (64 * 1024)
18
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)
23
24static inline void
25imx_pcm_dma_params_init_data(struct imx_dma_data *dma_data,
26 int dma, enum sdma_peripheral_type peripheral_type)
27{
28 dma_data->dma_request = dma;
29 dma_data->priority = DMA_PRIO_HIGH;
30 dma_data->peripheral_type = peripheral_type;

--- 4 unchanged lines hidden (view full) ---

35 void __iomem *base;
36
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;
40};
41
42#if IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_DMA)
20
21static inline void
22imx_pcm_dma_params_init_data(struct imx_dma_data *dma_data,
23 int dma, enum sdma_peripheral_type peripheral_type)
24{
25 dma_data->dma_request = dma;
26 dma_data->priority = DMA_PRIO_HIGH;
27 dma_data->peripheral_type = peripheral_type;

--- 4 unchanged lines hidden (view full) ---

32 void __iomem *base;
33
34 /* Pointer to original ssi driver to setup tx rx sizes */
35 struct snd_dmaengine_dai_dma_data *dma_params_rx;
36 struct snd_dmaengine_dai_dma_data *dma_params_tx;
37};
38
39#if IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_DMA)
43int imx_pcm_dma_init(struct platform_device *pdev, size_t size);
40int imx_pcm_dma_init(struct platform_device *pdev);
44#else
41#else
45static inline int imx_pcm_dma_init(struct platform_device *pdev, size_t size)
42static inline int imx_pcm_dma_init(struct platform_device *pdev)
46{
47 return -ENODEV;
48}
49#endif
50
51#if IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_FIQ)
52int imx_pcm_fiq_init(struct platform_device *pdev,
53 struct imx_pcm_fiq_params *params);

--- 14 unchanged lines hidden ---
43{
44 return -ENODEV;
45}
46#endif
47
48#if IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_FIQ)
49int imx_pcm_fiq_init(struct platform_device *pdev,
50 struct imx_pcm_fiq_params *params);

--- 14 unchanged lines hidden ---