diff options
Diffstat (limited to 'sound/soc/pxa/pxa2xx-pcm.c')
-rw-r--r-- | sound/soc/pxa/pxa2xx-pcm.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c index ecff116cb7b0..806da27b8b67 100644 --- a/sound/soc/pxa/pxa2xx-pcm.c +++ b/sound/soc/pxa/pxa2xx-pcm.c | |||
@@ -12,10 +12,13 @@ | |||
12 | 12 | ||
13 | #include <linux/dma-mapping.h> | 13 | #include <linux/dma-mapping.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/dmaengine.h> | ||
16 | #include <linux/of.h> | ||
15 | 17 | ||
16 | #include <sound/core.h> | 18 | #include <sound/core.h> |
17 | #include <sound/soc.h> | 19 | #include <sound/soc.h> |
18 | #include <sound/pxa2xx-lib.h> | 20 | #include <sound/pxa2xx-lib.h> |
21 | #include <sound/dmaengine_pcm.h> | ||
19 | 22 | ||
20 | #include "../../arm/pxa2xx-pcm.h" | 23 | #include "../../arm/pxa2xx-pcm.h" |
21 | 24 | ||
@@ -25,7 +28,7 @@ static int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, | |||
25 | struct snd_pcm_runtime *runtime = substream->runtime; | 28 | struct snd_pcm_runtime *runtime = substream->runtime; |
26 | struct pxa2xx_runtime_data *prtd = runtime->private_data; | 29 | struct pxa2xx_runtime_data *prtd = runtime->private_data; |
27 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 30 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
28 | struct pxa2xx_pcm_dma_params *dma; | 31 | struct snd_dmaengine_dai_dma_data *dma; |
29 | int ret; | 32 | int ret; |
30 | 33 | ||
31 | dma = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); | 34 | dma = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); |
@@ -39,7 +42,7 @@ static int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, | |||
39 | * with different params */ | 42 | * with different params */ |
40 | if (prtd->params == NULL) { | 43 | if (prtd->params == NULL) { |
41 | prtd->params = dma; | 44 | prtd->params = dma; |
42 | ret = pxa_request_dma(prtd->params->name, DMA_PRIO_LOW, | 45 | ret = pxa_request_dma("name", DMA_PRIO_LOW, |
43 | pxa2xx_pcm_dma_irq, substream); | 46 | pxa2xx_pcm_dma_irq, substream); |
44 | if (ret < 0) | 47 | if (ret < 0) |
45 | return ret; | 48 | return ret; |
@@ -47,7 +50,7 @@ static int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, | |||
47 | } else if (prtd->params != dma) { | 50 | } else if (prtd->params != dma) { |
48 | pxa_free_dma(prtd->dma_ch); | 51 | pxa_free_dma(prtd->dma_ch); |
49 | prtd->params = dma; | 52 | prtd->params = dma; |
50 | ret = pxa_request_dma(prtd->params->name, DMA_PRIO_LOW, | 53 | ret = pxa_request_dma("name", DMA_PRIO_LOW, |
51 | pxa2xx_pcm_dma_irq, substream); | 54 | pxa2xx_pcm_dma_irq, substream); |
52 | if (ret < 0) | 55 | if (ret < 0) |
53 | return ret; | 56 | return ret; |
@@ -131,10 +134,18 @@ static int pxa2xx_soc_platform_remove(struct platform_device *pdev) | |||
131 | return 0; | 134 | return 0; |
132 | } | 135 | } |
133 | 136 | ||
137 | #ifdef CONFIG_OF | ||
138 | static const struct of_device_id snd_soc_pxa_audio_match[] = { | ||
139 | { .compatible = "mrvl,pxa-pcm-audio" }, | ||
140 | { } | ||
141 | }; | ||
142 | #endif | ||
143 | |||
134 | static struct platform_driver pxa_pcm_driver = { | 144 | static struct platform_driver pxa_pcm_driver = { |
135 | .driver = { | 145 | .driver = { |
136 | .name = "pxa-pcm-audio", | 146 | .name = "pxa-pcm-audio", |
137 | .owner = THIS_MODULE, | 147 | .owner = THIS_MODULE, |
148 | .of_match_table = of_match_ptr(snd_soc_pxa_audio_match), | ||
138 | }, | 149 | }, |
139 | 150 | ||
140 | .probe = pxa2xx_soc_platform_probe, | 151 | .probe = pxa2xx_soc_platform_probe, |