alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lrg@ti.com>,
	Vinod Koul <vinod.koul@linux.intel.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>,
	Lars-Peter Clausen <lars@metafoo.de>,
	alsa-devel@alsa-project.org
Subject: [PATCH 1/2] ASoC: dmaengine_pcm: Reset pointer position when starting a stream
Date: Mon,  5 Mar 2012 14:02:14 +0100	[thread overview]
Message-ID: <1330952535-30614-1-git-send-email-lars@metafoo.de> (raw)

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

             reply	other threads:[~2012-03-05 13:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-05 13:02 Lars-Peter Clausen [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1330952535-30614-1-git-send-email-lars@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@ti.com \
    --cc=mika.westerberg@iki.fi \
    --cc=vinod.koul@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).