ASoC: dmaengine_pcm: Reset pointer position when starting a stream
authorMika Westerberg <mika.westerberg@iki.fi>
Mon, 5 Mar 2012 13:02:14 +0000 (14:02 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 12 Mar 2012 19:03:22 +0000 (19:03 +0000)
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>
sound/soc/soc-dmaengine-pcm.c

index 0526cf82b54f3deb95dd38ddce64afa7d399e35f..4420b7030c837a477eb8d143c0d8ec99b7d64913 100644 (file)
@@ -142,6 +142,7 @@ static int dmaengine_pcm_prepare_and_submit(struct snd_pcm_substream *substream)
 
        direction = snd_pcm_substream_to_dma_direction(substream);
 
+       prtd->pos = 0;
        desc = chan->device->device_prep_dma_cyclic(chan,
                substream->runtime->dma_addr,
                snd_pcm_lib_buffer_bytes(substream),