From: Lars-Peter Clausen <lars@metafoo.de>
To: Mika Westerberg <mika.westerberg@iki.fi>
Cc: Vinod Koul <vinod.koul@linux.intel.com>,
Russell King <linux@arm.linux.org.uk>,
Ryan Mallon <rmallon@gmail.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
alsa-devel@alsa-project.org, Wolfram Sang <w.sang@pengutronix.de>,
Shawn Guo <shawn.guo@linaro.org>, Liam Girdwood <lrg@ti.com>
Subject: Re: [RFC 7/7] ASoC: ep93xx-pcm: Use dmaengine PCM helper functions
Date: Tue, 28 Feb 2012 09:47:50 +0100 [thread overview]
Message-ID: <4F4C94B6.4050508@metafoo.de> (raw)
In-Reply-To: <20120227190159.GC3868@mwesterb-mobl.ger.corp.intel.com>
On 02/27/2012 08:01 PM, Mika Westerberg wrote:
> 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@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.
>
Ah, nice :)
Thanks,
- Lars
> 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),
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2012-02-28 8:46 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-22 9:49 [RFC 0/7] ASoC: Introduce dmaengine pcm helper functions Lars-Peter Clausen
2012-02-22 9:49 ` [RFC 1/7] ASoC: imx-ssi: Set dma data early Lars-Peter Clausen
2012-02-22 13:22 ` Mark Brown
2012-02-22 9:49 ` [RFC 2/7] ASoC: imx-pcm: Request DMA channel early Lars-Peter Clausen
2012-02-22 13:22 ` Mark Brown
2012-02-22 9:49 ` [RFC 3/7] ASoC: mxs-pcm: " Lars-Peter Clausen
2012-02-22 13:22 ` Mark Brown
2012-02-22 9:49 ` [RFC 4/7] ASoC: Add dmaengine PCM helper functions Lars-Peter Clausen
2012-02-22 10:01 ` Russell King - ARM Linux
2012-02-22 12:52 ` Lars-Peter Clausen
2012-02-22 13:00 ` Mark Brown
2012-02-22 13:21 ` Mark Brown
2012-02-22 13:30 ` Vinod Koul
2012-02-22 13:30 ` Mark Brown
2012-02-22 13:32 ` Russell King - ARM Linux
2012-02-22 13:39 ` Mark Brown
2012-02-22 14:22 ` Russell King - ARM Linux
2012-02-22 15:04 ` Mark Brown
2012-02-22 15:23 ` Russell King - ARM Linux
2012-02-22 15:39 ` Mark Brown
2012-02-23 6:57 ` Vinod Koul
2012-03-02 13:59 ` Mark Brown
2012-03-05 12:30 ` Lars-Peter Clausen
2012-03-05 12:41 ` Mark Brown
2012-03-07 0:38 ` Kuninori Morimoto
2012-03-07 11:42 ` Mark Brown
2012-02-22 9:49 ` [RFC 5/7] ASoC: imx-pcm-dma: Use " Lars-Peter Clausen
2012-02-22 9:49 ` [RFC 6/7] ASoC: mxs-pcm: " Lars-Peter Clausen
2012-02-22 9:49 ` [RFC 7/7] ASoC: ep93xx-pcm: " Lars-Peter Clausen
2012-02-27 8:19 ` Mika Westerberg
2012-02-27 8:51 ` Lars-Peter Clausen
2012-02-27 19:01 ` Mika Westerberg
2012-02-28 8:47 ` Lars-Peter Clausen [this message]
2012-02-28 12:52 ` Mark Brown
2012-02-28 14:17 ` Lars-Peter Clausen
2012-02-28 14:30 ` Mark Brown
2012-02-28 19:23 ` Mika Westerberg
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=4F4C94B6.4050508@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux@arm.linux.org.uk \
--cc=lrg@ti.com \
--cc=mika.westerberg@iki.fi \
--cc=rmallon@gmail.com \
--cc=s.hauer@pengutronix.de \
--cc=shawn.guo@linaro.org \
--cc=vinod.koul@linux.intel.com \
--cc=w.sang@pengutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.