alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: dmaengine_pcm: Reset pointer position when starting a stream
@ 2012-03-05 13:02 Lars-Peter Clausen
  2012-03-05 13:02 ` [PATCH 2/2] ASoC: ep93xx-pcm: Use dmaengine PCM helper functions Lars-Peter Clausen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Lars-Peter Clausen @ 2012-03-05 13:02 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, Vinod Koul
  Cc: Mika Westerberg, Lars-Peter Clausen, alsa-devel

From: Mika Westerberg <mika.westerberg@iki.fi>

Otherwise a wrong position will be reported after restarting a stream and the
first few samples might be skipped.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 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 0526cf8..4420b70 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),
-- 
1.7.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-03-12 19:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-05 13:02 [PATCH 1/2] ASoC: dmaengine_pcm: Reset pointer position when starting a stream Lars-Peter Clausen
2012-03-05 13:02 ` [PATCH 2/2] ASoC: ep93xx-pcm: Use dmaengine PCM helper functions Lars-Peter Clausen
2012-03-05 13:09 ` [PATCH 1/2] ASoC: dmaengine_pcm: Reset pointer position when starting a stream Mark Brown
2012-03-08 10:26   ` Lars-Peter Clausen
2012-03-12 18:57     ` Mika Westerberg
2012-03-12 19:04 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).