summaryrefslogtreecommitdiff
path: root/sound/soc/pxa/pxa2xx-pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/pxa/pxa2xx-pcm.c')
-rw-r--r--sound/soc/pxa/pxa2xx-pcm.c21
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 @@
#include <linux/dma-mapping.h>
#include <linux/module.h>
+#include <linux/dmaengine.h>
+#include <linux/of.h>
#include <sound/core.h>
#include <sound/soc.h>
#include <sound/pxa2xx-lib.h>
+#include <sound/dmaengine_pcm.h>
#include "../../arm/pxa2xx-pcm.h"
@@ -25,7 +28,7 @@ static int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_runtime *runtime = substream->runtime;
struct pxa2xx_runtime_data *prtd = runtime->private_data;
struct snd_soc_pcm_runtime *rtd = substream->private_data;
- struct pxa2xx_pcm_dma_params *dma;
+ struct snd_dmaengine_dai_dma_data *dma;
int ret;
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,
* with different params */
if (prtd->params == NULL) {
prtd->params = dma;
- ret = pxa_request_dma(prtd->params->name, DMA_PRIO_LOW,
+ ret = pxa_request_dma("name", DMA_PRIO_LOW,
pxa2xx_pcm_dma_irq, substream);
if (ret < 0)
return ret;
@@ -47,7 +50,7 @@ static int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream,
} else if (prtd->params != dma) {
pxa_free_dma(prtd->dma_ch);
prtd->params = dma;
- ret = pxa_request_dma(prtd->params->name, DMA_PRIO_LOW,
+ ret = pxa_request_dma("name", DMA_PRIO_LOW,
pxa2xx_pcm_dma_irq, substream);
if (ret < 0)
return ret;
@@ -131,10 +134,18 @@ static int pxa2xx_soc_platform_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id snd_soc_pxa_audio_match[] = {
+ { .compatible = "mrvl,pxa-pcm-audio" },
+ { }
+};
+#endif
+
static struct platform_driver pxa_pcm_driver = {
.driver = {
- .name = "pxa-pcm-audio",
- .owner = THIS_MODULE,
+ .name = "pxa-pcm-audio",
+ .owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(snd_soc_pxa_audio_match),
},
.probe = pxa2xx_soc_platform_probe,