aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/at91/at91-pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/at91/at91-pcm.c')
-rw-r--r--sound/soc/at91/at91-pcm.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/soc/at91/at91-pcm.c b/sound/soc/at91/at91-pcm.c
index e88b12e7cc40..b39b95a47040 100644
--- a/sound/soc/at91/at91-pcm.c
+++ b/sound/soc/at91/at91-pcm.c
@@ -21,6 +21,7 @@
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/slab.h> 22#include <linux/slab.h>
23#include <linux/dma-mapping.h> 23#include <linux/dma-mapping.h>
24#include <linux/atmel_pdc.h>
24 25
25#include <sound/driver.h> 26#include <sound/driver.h>
26#include <sound/core.h> 27#include <sound/core.h>
@@ -30,7 +31,6 @@
30 31
31#include <asm/arch/hardware.h> 32#include <asm/arch/hardware.h>
32#include <asm/arch/at91_ssc.h> 33#include <asm/arch/at91_ssc.h>
33#include <asm/arch/at91_pdc.h>
34 34
35#include "at91-pcm.h" 35#include "at91-pcm.h"
36 36
@@ -83,7 +83,7 @@ static void at91_pcm_dma_irq(u32 ssc_sr,
83 params->name, ssc_sr, count); 83 params->name, ssc_sr, count);
84 84
85 /* re-start the PDC */ 85 /* re-start the PDC */
86 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_disable); 86 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_disable);
87 87
88 prtd->period_ptr += prtd->period_size; 88 prtd->period_ptr += prtd->period_size;
89 if (prtd->period_ptr >= prtd->dma_buffer_end) { 89 if (prtd->period_ptr >= prtd->dma_buffer_end) {
@@ -94,7 +94,7 @@ static void at91_pcm_dma_irq(u32 ssc_sr,
94 at91_ssc_write(params->ssc_base + params->pdc->xcr, 94 at91_ssc_write(params->ssc_base + params->pdc->xcr,
95 prtd->period_size / params->pdc_xfer_size); 95 prtd->period_size / params->pdc_xfer_size);
96 96
97 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_enable); 97 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_enable);
98 } 98 }
99 99
100 if (ssc_sr & params->mask->ssc_endx) { 100 if (ssc_sr & params->mask->ssc_endx) {
@@ -143,7 +143,7 @@ static int at91_pcm_hw_free(struct snd_pcm_substream *substream)
143 struct at91_pcm_dma_params *params = prtd->params; 143 struct at91_pcm_dma_params *params = prtd->params;
144 144
145 if (params != NULL) { 145 if (params != NULL) {
146 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_disable); 146 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_disable);
147 prtd->params->dma_intr_handler = NULL; 147 prtd->params->dma_intr_handler = NULL;
148 } 148 }
149 149
@@ -158,7 +158,7 @@ static int at91_pcm_prepare(struct snd_pcm_substream *substream)
158 at91_ssc_write(params->ssc_base + AT91_SSC_IDR, 158 at91_ssc_write(params->ssc_base + AT91_SSC_IDR,
159 params->mask->ssc_endx | params->mask->ssc_endbuf); 159 params->mask->ssc_endx | params->mask->ssc_endbuf);
160 160
161 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_disable); 161 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_disable);
162 return 0; 162 return 0;
163} 163}
164 164
@@ -192,7 +192,7 @@ static int at91_pcm_trigger(struct snd_pcm_substream *substream,
192 at91_ssc_write(params->ssc_base + AT91_SSC_IER, 192 at91_ssc_write(params->ssc_base + AT91_SSC_IER,
193 params->mask->ssc_endx | params->mask->ssc_endbuf); 193 params->mask->ssc_endx | params->mask->ssc_endbuf);
194 194
195 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_enable); 195 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_enable);
196 196
197 DBG("sr=%lx imr=%lx\n", at91_ssc_read(params->ssc_base + AT91_SSC_SR), 197 DBG("sr=%lx imr=%lx\n", at91_ssc_read(params->ssc_base + AT91_SSC_SR),
198 at91_ssc_read(params->ssc_base + AT91_SSC_IER)); 198 at91_ssc_read(params->ssc_base + AT91_SSC_IER));
@@ -201,12 +201,12 @@ static int at91_pcm_trigger(struct snd_pcm_substream *substream,
201 case SNDRV_PCM_TRIGGER_STOP: 201 case SNDRV_PCM_TRIGGER_STOP:
202 case SNDRV_PCM_TRIGGER_SUSPEND: 202 case SNDRV_PCM_TRIGGER_SUSPEND:
203 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 203 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
204 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_disable); 204 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_disable);
205 break; 205 break;
206 206
207 case SNDRV_PCM_TRIGGER_RESUME: 207 case SNDRV_PCM_TRIGGER_RESUME:
208 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 208 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
209 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_enable); 209 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_enable);
210 break; 210 break;
211 211
212 default: 212 default:
@@ -379,7 +379,7 @@ static int at91_pcm_suspend(struct platform_device *pdev,
379 379
380 /* disable the PDC and save the PDC registers */ 380 /* disable the PDC and save the PDC registers */
381 381
382 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_disable); 382 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_disable);
383 383
384 prtd->pdc_xpr_save = at91_ssc_read(params->ssc_base + params->pdc->xpr); 384 prtd->pdc_xpr_save = at91_ssc_read(params->ssc_base + params->pdc->xpr);
385 prtd->pdc_xcr_save = at91_ssc_read(params->ssc_base + params->pdc->xcr); 385 prtd->pdc_xcr_save = at91_ssc_read(params->ssc_base + params->pdc->xcr);
@@ -408,7 +408,7 @@ static int at91_pcm_resume(struct platform_device *pdev,
408 at91_ssc_write(params->ssc_base + params->pdc->xnpr, prtd->pdc_xnpr_save); 408 at91_ssc_write(params->ssc_base + params->pdc->xnpr, prtd->pdc_xnpr_save);
409 at91_ssc_write(params->ssc_base + params->pdc->xncr, prtd->pdc_xncr_save); 409 at91_ssc_write(params->ssc_base + params->pdc->xncr, prtd->pdc_xncr_save);
410 410
411 at91_ssc_write(params->ssc_base + AT91_PDC_PTCR, params->mask->pdc_enable); 411 at91_ssc_write(params->ssc_base + ATMEL_PDC_PTCR, params->mask->pdc_enable);
412 return 0; 412 return 0;
413} 413}
414#else 414#else