alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Vinod Koul <vinod.koul@linux.intel.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Ryan Mallon <rmallon@gmail.com>,
	alsa-devel@alsa-project.org,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Wolfram Sang <w.sang@pengutronix.de>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Mika Westerberg <mika.westerberg@iki.fi>,
	Shawn Guo <shawn.guo@linaro.org>, Liam Girdwood <lrg@ti.com>
Subject: Re: [RFC 4/7] ASoC: Add dmaengine PCM helper functions
Date: Wed, 22 Feb 2012 14:22:36 +0000	[thread overview]
Message-ID: <20120222142236.GF22562@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20120222133939.GK7340@opensource.wolfsonmicro.com>

On Wed, Feb 22, 2012 at 01:39:39PM +0000, Mark Brown wrote:
> Well, Vinod seemed to also think that dmaengine ought to be able to cope
> with emulating this and I really don't see why it shouldn't be.  It does
> know the capabilities of the underlying driver and it gets to look at
> all the calls going into the driver before the driver does.  If ASoC can
> interpose itself I don't see why dmaengine can't.

Have you ever looked at the DMA engine drivers?  It's a total mess.
Even something as basic as the DMA engine driver assigning a cookie to
the descriptor is implemented in each driver in their own unique way.

Completion of DMA descriptors is a similar thing - every driver implements
this in their own unique way.

The only really common thing in the DMA engine drivers is that they all
share the same API.  Nothing much more than that is shared.

It's something I have been chipping away at for a while, trying to extract
out common parts into a library, but it's really not that easy.

So, there's no way in hell that I want to see any more stuff pushed down
into the DMA engine drivers until we have a proper DMA engine library in
place to stop all this idiotic code duplication throughout every driver.
Especially if it means everyone will be implementing their own cyclic
emulation in their individual drivers.

And lets not forget that it's not just a question of "oh we can just queue
up buffer after buffer".  Doing it properly for audio does need to ensure
that the DMA engine driver is capable of getting the next buffer chained
into the hardware before the previous buffer has completed, so the transfer
continues across a buffer boundary without needing the intervention of an
interrupt handler.  Otherwise you get glitches in the audio.

So, there's a lot more here that DMA engine stuff needs to get fixed than
just a simple "layer on top".

  reply	other threads:[~2012-02-22 14:23 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 [this message]
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
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=20120222142236.GF22562@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lars@metafoo.de \
    --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 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).