diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-07-01 22:45:47 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-07-01 22:45:47 +0200 |
commit | 2115d2c17369df4b70fd161623a40ce98c261989 (patch) | |
tree | c672922435427d7fb304eee41fca52bd369924fc /sound/soc/omap | |
parent | ASoC: Add WM8523 CODEC driver (diff) | |
parent | ASoC: Only disable pxa2xx-i2s clocks if we enabled them (diff) | |
download | linux-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.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 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; |