From: lars@metafoo.de (Lars-Peter Clausen)
To: linux-arm-kernel@lists.infradead.org
Subject: Cyclic DMA - callback properties and tx_status residue
Date: Wed, 09 May 2012 14:49:14 +0200 [thread overview]
Message-ID: <4FAA67CA.2050704@metafoo.de> (raw)
In-Reply-To: <20120509121945.GT26481@n2100.arm.linux.org.uk>
On 05/09/2012 02:19 PM, Russell King - ARM Linux wrote:
>
>> If we can resolve the issues with reading the current position in
>> dmaengine then this should be fairly simple to address more
>> comprehensively of course, though there will be some hardware imposed
>> limits on what we can do.
>
> The issue with doing that is it will break existing setups - have a look
> at the various DMA engine implementations of the tx_status method, and
> how many actually set the 'residue' bytes correctly (the answer at the
> moment is none of them do, according to the definition that we've now
> come up with in this thread.)
Due to the modular design of the ALSA dmaengine wrapper we can use two
different pcm_pointer callback implementations for now. One which does the
callback counting and the other which uses tx_status. And than we can switch
the ASoC drivers over, which are known to only use DMA engine
implementations which have a tx_status method with proper residue information.
>
> This is *exactly* the kind of issues we have with DMA engine at present;
> the implementations are at best poor quality, partly because the API is
> poorly documented and no one has particularly thought about these issues.
> Every DMA engine implementation implements the entire API using its own
> private code, so each one has its own differing behaviour.
>
> So, really we're not at the point where ASoC maintainers can insist on
> anything of DMA engine at present; we need to get DMA engine stuff sorted
> out so that we have guaranteed API conditions which can be relied upon by
> all users of the API across each DMA engine driver for any particular
> kernel version.
I think having the common ASoC wrapper here really helps to sort this out,
because it forces us to come up with DMA engine drivers which behave in the
same way in regards to their API. Before basically every DMA engine user was
in a SoC specific driver and people would get away with API variations in
their DMA engine drivers, because the user was only expecting to ever see
that one DMA engine with it's specific API.
>
> [...]
>
> DMA engine is slowly getting better (mainly through my efforts at trying
> to extract common code, and fix down the API issues) but it needs folk
> with strong and good review skills to ensure that we stop the influx of
> non-conforming code and get that non-conforming code fixed.
I totally agree and quite thankful for the cleanups you've done over the
past few months.
next prev parent reply other threads:[~2012-05-09 12:49 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-02 14:45 Cyclic DMA - callback properties and tx_status residue Russell King - ARM Linux
2012-05-02 16:01 ` Vinod Koul
2012-05-02 16:27 ` Russell King - ARM Linux
2012-05-04 12:26 ` Russell King - ARM Linux
2012-05-04 12:45 ` Vinod Koul
2012-05-10 22:54 ` Russell King - ARM Linux
2012-05-11 3:00 ` Vinod Koul
2012-05-11 12:24 ` Linus Walleij
2012-05-11 13:03 ` Russell King - ARM Linux
2012-05-15 5:02 ` Vinod Koul
2012-05-09 9:27 ` Linus Walleij
2012-05-09 9:33 ` Russell King - ARM Linux
2012-05-09 11:16 ` Mark Brown
2012-05-09 12:19 ` Russell King - ARM Linux
2012-05-09 12:49 ` Lars-Peter Clausen [this message]
2012-05-09 14:03 ` Mark Brown
2012-05-10 3:44 ` Vinod Koul
2012-05-10 7:44 ` Russell King - ARM Linux
2012-05-10 10:58 ` Vinod Koul
2012-05-10 13:19 ` Huang Shijie
2012-05-10 14:54 ` Vinod Koul
2012-05-10 9:42 ` Mark Brown
2012-05-10 11:01 ` Vinod Koul
2012-05-11 14:02 ` Mark Brown
2012-05-11 14:07 ` Russell King - ARM Linux
2012-05-11 14:18 ` Mark Brown
2012-05-11 14:29 ` Russell King - ARM Linux
2012-05-11 15:07 ` Mark Brown
2012-05-15 5:07 ` Vinod Koul
2012-05-15 7:37 ` Russell King - ARM Linux
2012-05-15 8:58 ` Vinod Koul
2012-05-09 12:35 ` Lars-Peter Clausen
2012-05-07 10:40 ` 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=4FAA67CA.2050704@metafoo.de \
--to=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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).