From: Mika Westerberg Date: Mon, 5 Mar 2012 13:02:14 +0000 (+0100) Subject: ASoC: dmaengine_pcm: Reset pointer position when starting a stream X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7a08cf7022b3f6863cff004cf0531f3e44a772ea;p=linux.git 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 Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-dmaengine-pcm.c b/sound/soc/soc-dmaengine-pcm.c index 0526cf82b54f3..4420b7030c837 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) 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),