summaryrefslogtreecommitdiffstats
path: root/sound/soc/omap
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-07-01 22:45:47 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-07-01 22:45:47 +0200
commit2115d2c17369df4b70fd161623a40ce98c261989 (patch)
treec672922435427d7fb304eee41fca52bd369924fc /sound/soc/omap
parentASoC: Add WM8523 CODEC driver (diff)
parentASoC: Only disable pxa2xx-i2s clocks if we enabled them (diff)
downloadlinux-2115d2c17369df4b70fd161623a40ce98c261989.tar.xz
linux-2115d2c17369df4b70fd161623a40ce98c261989.zip
Merge branch 'for-2.6.31' into for-2.6.32
Diffstat (limited to 'sound/soc/omap')
-rw-r--r--sound/soc/omap/omap-pcm.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 6454e15f7d28..84a1950880eb 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -216,12 +216,15 @@ static snd_pcm_uframes_t omap_pcm_pointer(struct snd_pcm_substream *substream)
dma_addr_t ptr;
snd_pcm_uframes_t offset;
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- ptr = omap_get_dma_src_pos(prtd->dma_ch);
- else
+ if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
ptr = omap_get_dma_dst_pos(prtd->dma_ch);
+ offset = bytes_to_frames(runtime, ptr - runtime->dma_addr);
+ } else if (!(cpu_is_omap1510())) {
+ ptr = omap_get_dma_src_pos(prtd->dma_ch);
+ offset = bytes_to_frames(runtime, ptr - runtime->dma_addr);
+ } else
+ offset = prtd->period_index * runtime->period_size;
- offset = bytes_to_frames(runtime, ptr - runtime->dma_addr);
if (offset >= runtime->buffer_size)
offset = 0;