diff options
| -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) | |||
| 216 | dma_addr_t ptr; | 216 | dma_addr_t ptr; |
| 217 | snd_pcm_uframes_t offset; | 217 | snd_pcm_uframes_t offset; |
| 218 | 218 | ||
| 219 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 219 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { |
| 220 | ptr = omap_get_dma_src_pos(prtd->dma_ch); | ||
| 221 | else | ||
| 222 | ptr = omap_get_dma_dst_pos(prtd->dma_ch); | 220 | ptr = omap_get_dma_dst_pos(prtd->dma_ch); |
| 221 | offset = bytes_to_frames(runtime, ptr - runtime->dma_addr); | ||
| 222 | } else if (!(cpu_is_omap1510())) { | ||
| 223 | ptr = omap_get_dma_src_pos(prtd->dma_ch); | ||
| 224 | offset = bytes_to_frames(runtime, ptr - runtime->dma_addr); | ||
| 225 | } else | ||
| 226 | offset = prtd->period_index * runtime->period_size; | ||
| 223 | 227 | ||
| 224 | offset = bytes_to_frames(runtime, ptr - runtime->dma_addr); | ||
| 225 | if (offset >= runtime->buffer_size) | 228 | if (offset >= runtime->buffer_size) |
| 226 | offset = 0; | 229 | offset = 0; |
| 227 | 230 | ||
