diff options
| author | David S. Miller <davem@davemloft.net> | 2010-04-13 00:28:45 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-04-13 00:28:45 -0700 |
| commit | 9343af084c7e8911897b0883042ee690cee3aaef (patch) | |
| tree | 6211a4bdc84690bec6530d27a3abb19f5e8bb8f3 /sound/soc/imx/imx-pcm-dma-mx2.c | |
| parent | e182c77cc291456eed127b1472952ddb59a81a9d (diff) | |
| parent | 0d0fb0f9c5fddef4a10242fe3337f00f528a3099 (diff) | |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
lib/Kconfig.debug
Diffstat (limited to 'sound/soc/imx/imx-pcm-dma-mx2.c')
| -rw-r--r-- | sound/soc/imx/imx-pcm-dma-mx2.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c index 19452e44afdc..2e79d7136298 100644 --- a/sound/soc/imx/imx-pcm-dma-mx2.c +++ b/sound/soc/imx/imx-pcm-dma-mx2.c @@ -19,6 +19,7 @@ #include <linux/interrupt.h> #include <linux/module.h> #include <linux/platform_device.h> +#include <linux/slab.h> #include <sound/core.h> #include <sound/initval.h> @@ -83,11 +84,13 @@ static void snd_imx_dma_err_callback(int channel, void *data, int err) static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct imx_pcm_dma_params *dma_params = rtd->dai->cpu_dai->dma_data; + struct imx_pcm_dma_params *dma_params; struct snd_pcm_runtime *runtime = substream->runtime; struct imx_pcm_runtime_data *iprtd = runtime->private_data; int ret; + dma_params = snd_soc_get_dma_data(rtd->dai->cpu_dai, substream); + iprtd->dma = imx_dma_request_by_prio(DRV_NAME, DMA_PRIO_HIGH); if (iprtd->dma < 0) { pr_err("Failed to claim the audio DMA\n"); @@ -192,10 +195,12 @@ static int snd_imx_pcm_prepare(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct imx_pcm_dma_params *dma_params = rtd->dai->cpu_dai->dma_data; + struct imx_pcm_dma_params *dma_params; struct imx_pcm_runtime_data *iprtd = runtime->private_data; int err; + dma_params = snd_soc_get_dma_data(rtd->dai->cpu_dai, substream); + iprtd->substream = substream; iprtd->buf = (unsigned int *)substream->dma_buffer.area; iprtd->period_cnt = 0; |
