diff options
author | Daniel Mack <zonque@gmail.com> | 2013-08-12 10:42:39 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-15 11:29:07 +0100 |
commit | d65a14587a9be853a887a1407db133df1fb68e29 (patch) | |
tree | 97e31a61fe5c8d567ccb4c6f97c5eaf95fe700ce /sound/arm/pxa2xx-ac97.c | |
parent | 2023c90c3a2c4c1aeb7f47649367d551c676da07 (diff) |
ASoC: pxa: use snd_dmaengine_dai_dma_data
Use snd_dmaengine_dai_dma_data for passing the dma parameters from
clients to the pxa pcm lib. This does no functional change, it's just an
intermedia step to migrate the pxa bits over to dmaengine.
The calculation of dcmd is a transition hack which will be removed again
in a later patch. It's just there to make the transition more readable.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/arm/pxa2xx-ac97.c')
-rw-r--r-- | sound/arm/pxa2xx-ac97.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index ce431e6e07c..5066a3768b2 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c @@ -14,12 +14,14 @@ #include <linux/io.h> #include <linux/module.h> #include <linux/platform_device.h> +#include <linux/dmaengine.h> #include <sound/core.h> #include <sound/pcm.h> #include <sound/ac97_codec.h> #include <sound/initval.h> #include <sound/pxa2xx-lib.h> +#include <sound/dmaengine_pcm.h> #include <mach/regs-ac97.h> #include <mach/audio.h> @@ -41,20 +43,20 @@ static struct snd_ac97_bus_ops pxa2xx_ac97_ops = { .reset = pxa2xx_ac97_reset, }; -static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_out = { - .name = "AC97 PCM out", - .dev_addr = __PREG(PCDR), - .drcmr = &DRCMR(12), - .dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG | - DCMD_BURST32 | DCMD_WIDTH4, +static unsigned long pxa2xx_ac97_pcm_out_req = 12; +static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_out = { + .addr = __PREG(PCDR), + .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, + .maxburst = 32, + .filter_data = &pxa2xx_ac97_pcm_out_req, }; -static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_in = { - .name = "AC97 PCM in", - .dev_addr = __PREG(PCDR), - .drcmr = &DRCMR(11), - .dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC | - DCMD_BURST32 | DCMD_WIDTH4, +static unsigned long pxa2xx_ac97_pcm_in_req = 11; +static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_in = { + .addr = __PREG(PCDR), + .addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES, + .maxburst = 32, + .filter_data = &pxa2xx_ac97_pcm_in_req, }; static struct snd_pcm *pxa2xx_ac97_pcm; |