aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/imx-pcm.h
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-04-03 05:06:04 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-05 06:25:47 -0400
commita8909c9bc5803fd68363c8b349bd76c99fc0569b (patch)
tree8744cc20bbb9456c9f0507af4571fb27cc0dd956 /sound/soc/fsl/imx-pcm.h
parent3489d5067a2cd8c51a2649b2f39bfb5b11852b8d (diff)
ASoC: fsl: Use common DAI DMA data struct
Use the common DAI DMA data struct for fsl/imx, this allows us to use the common helper function to configure the DMA slave config based on the DAI DMA data. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl/imx-pcm.h')
-rw-r--r--sound/soc/fsl/imx-pcm.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/sound/soc/fsl/imx-pcm.h b/sound/soc/fsl/imx-pcm.h
index 16eaf5a09f53..be9cc64a208b 100644
--- a/sound/soc/fsl/imx-pcm.h
+++ b/sound/soc/fsl/imx-pcm.h
@@ -20,22 +20,16 @@
20 */ 20 */
21#define IMX_SSI_DMABUF_SIZE (64 * 1024) 21#define IMX_SSI_DMABUF_SIZE (64 * 1024)
22 22
23struct imx_pcm_dma_params {
24 unsigned long dma_addr;
25 int burstsize;
26 struct imx_dma_data dma_data;
27};
28
29static inline void 23static inline void
30imx_pcm_dma_params_init_data(struct imx_pcm_dma_params *params, 24imx_pcm_dma_params_init_data(struct imx_dma_data *dma_data,
31 int dma, bool shared) 25 int dma, bool shared)
32{ 26{
33 params->dma_data.dma_request = dma; 27 dma_data->dma_request = dma;
34 params->dma_data.priority = DMA_PRIO_HIGH; 28 dma_data->priority = DMA_PRIO_HIGH;
35 if (shared) 29 if (shared)
36 params->dma_data.peripheral_type = IMX_DMATYPE_SSI_SP; 30 dma_data->peripheral_type = IMX_DMATYPE_SSI_SP;
37 else 31 else
38 params->dma_data.peripheral_type = IMX_DMATYPE_SSI; 32 dma_data->peripheral_type = IMX_DMATYPE_SSI;
39} 33}
40 34
41int snd_imx_pcm_mmap(struct snd_pcm_substream *substream, 35int snd_imx_pcm_mmap(struct snd_pcm_substream *substream,