diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-04-05 14:19:32 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-04-05 14:19:32 -0400 |
commit | 53a61d967a480307db4c8f7950ddb8bb1a0fda9b (patch) | |
tree | 6b3ce07b14db2986a175f30e6477ed40445c7c17 /sound/soc/omap | |
parent | 8876698406147986a9a7748586a54c4b14514c0e (diff) | |
parent | 5f712b2b73a9fc87fcc52124cfe8adefaa0c92f5 (diff) |
Merge branch 'for-2.6.34' into for-2.6.35
Conflicts due to context changes next to the backported DMA data change:
include/sound/soc.h
Diffstat (limited to 'sound/soc/omap')
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 39538c0f81f0..39456447132c 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c | |||
@@ -60,12 +60,11 @@ static void omap_pcm_dma_irq(int ch, u16 stat, void *data) | |||
60 | struct omap_runtime_data *prtd = runtime->private_data; | 60 | struct omap_runtime_data *prtd = runtime->private_data; |
61 | unsigned long flags; | 61 | unsigned long flags; |
62 | 62 | ||
63 | if ((cpu_is_omap1510()) && | 63 | if ((cpu_is_omap1510())) { |
64 | (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)) { | ||
65 | /* | 64 | /* |
66 | * OMAP1510 doesn't fully support DMA progress counter | 65 | * OMAP1510 doesn't fully support DMA progress counter |
67 | * and there is no software emulation implemented yet, | 66 | * and there is no software emulation implemented yet, |
68 | * so have to maintain our own playback progress counter | 67 | * so have to maintain our own progress counters |
69 | * that can be used by omap_pcm_pointer() instead. | 68 | * that can be used by omap_pcm_pointer() instead. |
70 | */ | 69 | */ |
71 | spin_lock_irqsave(&prtd->lock, flags); | 70 | spin_lock_irqsave(&prtd->lock, flags); |
@@ -191,8 +190,7 @@ static int omap_pcm_prepare(struct snd_pcm_substream *substream) | |||
191 | dma_params.frame_count = runtime->periods; | 190 | dma_params.frame_count = runtime->periods; |
192 | omap_set_dma_params(prtd->dma_ch, &dma_params); | 191 | omap_set_dma_params(prtd->dma_ch, &dma_params); |
193 | 192 | ||
194 | if ((cpu_is_omap1510()) && | 193 | if ((cpu_is_omap1510())) |
195 | (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)) | ||
196 | omap_enable_dma_irq(prtd->dma_ch, OMAP_DMA_FRAME_IRQ | | 194 | omap_enable_dma_irq(prtd->dma_ch, OMAP_DMA_FRAME_IRQ | |
197 | OMAP_DMA_LAST_IRQ | OMAP_DMA_BLOCK_IRQ); | 195 | OMAP_DMA_LAST_IRQ | OMAP_DMA_BLOCK_IRQ); |
198 | else | 196 | else |
@@ -250,14 +248,15 @@ static snd_pcm_uframes_t omap_pcm_pointer(struct snd_pcm_substream *substream) | |||
250 | dma_addr_t ptr; | 248 | dma_addr_t ptr; |
251 | snd_pcm_uframes_t offset; | 249 | snd_pcm_uframes_t offset; |
252 | 250 | ||
253 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { | 251 | if (cpu_is_omap1510()) { |
252 | offset = prtd->period_index * runtime->period_size; | ||
253 | } else if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { | ||
254 | ptr = omap_get_dma_dst_pos(prtd->dma_ch); | 254 | ptr = omap_get_dma_dst_pos(prtd->dma_ch); |
255 | offset = bytes_to_frames(runtime, ptr - runtime->dma_addr); | 255 | offset = bytes_to_frames(runtime, ptr - runtime->dma_addr); |
256 | } else if (!(cpu_is_omap1510())) { | 256 | } else { |
257 | ptr = omap_get_dma_src_pos(prtd->dma_ch); | 257 | ptr = omap_get_dma_src_pos(prtd->dma_ch); |
258 | offset = bytes_to_frames(runtime, ptr - runtime->dma_addr); | 258 | offset = bytes_to_frames(runtime, ptr - runtime->dma_addr); |
259 | } else | 259 | } |
260 | offset = prtd->period_index * runtime->period_size; | ||
261 | 260 | ||
262 | if (offset >= runtime->buffer_size) | 261 | if (offset >= runtime->buffer_size) |
263 | offset = 0; | 262 | offset = 0; |