diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-07-01 21:45:47 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-07-01 21:45:47 +0100 |
commit | 2115d2c17369df4b70fd161623a40ce98c261989 (patch) | |
tree | c672922435427d7fb304eee41fca52bd369924fc /sound/soc/omap | |
parent | 1dcf98ff8e2a4571a2accb852686023b47ca629a (diff) | |
parent | da9ff1f796e81976935407251815838bef9868d4 (diff) |
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.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 6454e15f7d2..84a1950880e 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; |