Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154830
b: refs/heads/master
c: 1bdd741
h: refs/heads/master
v: v3
  • Loading branch information
Janusz Krzysztofik authored and Mark Brown committed Jun 30, 2009
1 parent d671a97 commit d8afaee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40d9ec14e7e1f62d2379ecc1b5ee00ddfc2a5d0c
refs/heads/master: 1bdd7419910c1506151e7b9e2d60c6980e015f76
11 changes: 7 additions & 4 deletions trunk/sound/soc/omap/omap-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit d8afaee

Please sign in to comment.