summaryrefslogtreecommitdiff
path: root/sound/soc/at91/at91-pcm.c
diff options
context:
space:
mode:
authorFrank Mandarino <fmandarino@endrelia.com>2007-02-02 17:19:24 +0100
committerJaroslav Kysela <perex@suse.cz>2007-02-09 09:03:44 +0100
commit6297027629a9349301e08442b67deb9783a5e984 (patch)
treede1d9282e225c9d835a21d2bf4f34598fe9aaf71 /sound/soc/at91/at91-pcm.c
parent171eb8f81d7b0706c1085d272e4955251ed9f05f (diff)
[ALSA] soc - ASoC 0.13 AT91xxxx DMA
This patch updates the AT91xxxx audio DMA driver to the new API in ASoC 0.13. Changes:- o Updated to use new 0.13 data structures. o Suspend and Resume now conditionally compiled. o #include guard around at91-pcm.h header. Signed-off-by: Frank Mandarino <fmandarino@endrelia.com> Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/soc/at91/at91-pcm.c')
-rw-r--r--sound/soc/at91/at91-pcm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/at91/at91-pcm.c b/sound/soc/at91/at91-pcm.c
index fd9d7327b239..e88b12e7cc40 100644
--- a/sound/soc/at91/at91-pcm.c
+++ b/sound/soc/at91/at91-pcm.c
@@ -125,7 +125,7 @@ static int at91_pcm_hw_params(struct snd_pcm_substream *substream,
snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);
runtime->dma_bytes = params_buffer_bytes(params);
- prtd->params = rtd->cpu_dai->dma_data;
+ prtd->params = rtd->dai->cpu_dai->dma_data;
prtd->params->dma_intr_handler = at91_pcm_dma_irq;
prtd->dma_buffer = runtime->dma_addr;
@@ -363,6 +363,7 @@ static void at91_pcm_free_dma_buffers(struct snd_pcm *pcm)
}
}
+#ifdef CONFIG_PM
static int at91_pcm_suspend(struct platform_device *pdev,
struct snd_soc_cpu_dai *dai)
{
@@ -410,6 +411,10 @@ static int at91_pcm_resume(struct platform_device *pdev,
at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_enable);
return 0;
}
+#else
+#define at91_pcm_suspend NULL
+#define at91_pcm_resume NULL
+#endif
struct snd_soc_platform at91_soc_platform = {
.name = "at91-audio",