Cyclic DMA - callback properties and tx_status residue

Mark Brown broonie at opensource.wolfsonmicro.com
Fri May 11 11:07:41 EDT 2012


On Fri, May 11, 2012 at 03:29:41PM +0100, Russell King - ARM Linux wrote:
> On Fri, May 11, 2012 at 03:18:35PM +0100, Mark Brown wrote:

> > I do think that (separately to what ALSA does) if we're going to have a
> > callback specified per request we really should make sure that they all
> > get run as best as we can since the way the API is written people using
> > non-cyclic transfers may run into the same surprise; for cyclic ones the
> > issue you identify is very real though.

> Please stop confusing non-cyclic with cyclic transfers.  We know what the
> required semantics are for non-cyclic transfers and they really aren't
> under discussion here.  I'm focusing 100% on the cyclic case here.

I'm not confusing them - I'm just pretty sure that all the issues which
you are identifying also apply to the non-cyclic case so while we're
looking at fixing things we (collectively, not particularly including
you as you're focused on the cyclic case) should look at that too.
Right now we're not handling either cyclic or non-cyclic cases well.

> That's my point.  And keeping count of N times to call the callback in
> the DMA engine driver is racy at best.

Yes, it'll always break down at some point - no argument there.

> Here's what I think.  I think the best solution for cyclic transfers
> is as follows:

I agree, for cyclic transfers this is a very good approach.  I'd
probably even set up a separate callback mechanism for cyclic transfers
to make this crystal clear and error out if an attempt was made to use
the linear one.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120511/b42d9312/attachment.sig>


More information about the linux-arm-kernel mailing list