diff options
author | Mika Westerberg <mika.westerberg@iki.fi> | 2012-03-05 08:02:14 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-12 15:03:22 -0400 |
commit | 7a08cf7022b3f6863cff004cf0531f3e44a772ea (patch) | |
tree | 5929090a9e0ae91d4409cb0ec9f01824ac502357 | |
parent | c986564b3115ebd24a907515ac0b7ca2bef794f9 (diff) |
ASoC: dmaengine_pcm: Reset pointer position when starting a stream
Otherwise a wrong position will be reported after restarting a stream and the
first few samples might be skipped.
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/soc-dmaengine-pcm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/soc-dmaengine-pcm.c b/sound/soc/soc-dmaengine-pcm.c index 0526cf82b54f..4420b7030c83 100644 --- a/sound/soc/soc-dmaengine-pcm.c +++ b/sound/soc/soc-dmaengine-pcm.c | |||
@@ -142,6 +142,7 @@ static int dmaengine_pcm_prepare_and_submit(struct snd_pcm_substream *substream) | |||
142 | 142 | ||
143 | direction = snd_pcm_substream_to_dma_direction(substream); | 143 | direction = snd_pcm_substream_to_dma_direction(substream); |
144 | 144 | ||
145 | prtd->pos = 0; | ||
145 | desc = chan->device->device_prep_dma_cyclic(chan, | 146 | desc = chan->device->device_prep_dma_cyclic(chan, |
146 | substream->runtime->dma_addr, | 147 | substream->runtime->dma_addr, |
147 | snd_pcm_lib_buffer_bytes(substream), | 148 | snd_pcm_lib_buffer_bytes(substream), |