aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/omap/omap-pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-07-02 17:48:31 +0200
committerTakashi Iwai <tiwai@suse.de>2009-07-02 17:48:31 +0200
commitdc8a4f3fc3c32954c9fd46cb027b959380be2d65 (patch)
tree71899d9d8fddbd5ef528067da06933c51d2da164 /sound/soc/omap/omap-pcm.c
parent9ea5ca75a2aebb7172094a7d77acf6ff7600cc56 (diff)
parentda9ff1f796e81976935407251815838bef9868d4 (diff)
Merge branch 'fix/asoc' into for-linus
* fix/asoc: ASoC: Only disable pxa2xx-i2s clocks if we enabled them ASoC: OMAP: fix OMAP1510 broken PCM pointer callback ASoC: remove BROKEN from Efika and pcm030 fabric drivers ASoC: Fix typo in MPC5200 PSC AC97 driver Kconfig
Diffstat (limited to 'sound/soc/omap/omap-pcm.c')
-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 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;