[alsa-devel] [RFC 7/7] ASoC: ep93xx-pcm: Use dmaengine PCM helper functions

Mika Westerberg mika.westerberg at iki.fi
Mon Feb 27 20:01:59 CET 2012

On Mon, Feb 27, 2012 at 09:51:57AM +0100, Lars-Peter Clausen wrote:
> On 02/27/2012 09:19 AM, Mika Westerberg wrote:
> > On Wed, Feb 22, 2012 at 10:49:11AM +0100, Lars-Peter Clausen wrote:
> >> Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>
> > 
> > For some reason, this doesn't work on my ep93xx based Sim.One board. On
> > playback with mpg123 when I press stop, it continues to play whatever was on
> > the ring-buffer forever. Without the patches it works fine.
> > 
> > I'll try to find some time to debug this further.
> Hm, that’s interesting. The original ep93xx pcm driver was almost identical
> to what the common helper functions do. The only difference I can spot right
> now is, that it doesn't call dma_issue_pending after submitting the
> descriptor. Could you try to comment out the dma_issue_pending in
> soc-dmaengine-pcm.c and test whether it makes a difference?

I did try that but there was no effect, unfortunately.

However, I noticed that prtd->pos was never set to zero as it was in the
original ep93xx-pcm driver. With following addition to your patch, playback
works fine.

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,

More information about the Alsa-devel mailing list