Cyclic DMA - callback properties and tx_status residue

Lars-Peter Clausen lars at metafoo.de
Wed May 9 08:35:59 EDT 2012


On 05/09/2012 11:27 AM, Linus Walleij wrote:
> On Wed, May 2, 2012 at 6:27 PM, Russell King - ARM Linux
> <linux at arm.linux.org.uk> wrote:
> [...]
>>> IIRC had pointed Lars to this API, but quick check of code reveals that
>>> this is unused. I think returning residue as remaining bytes of current
>>> "block" makes sense. This easily gives knowledge of where DMA pointer is
>>> wrt current ongoing transaction. Was that your meaning of end of cyclic
>>> buffer, not sure what end means here?
>>
>> I think the residue thing was something Linus created, which is why he's
>> included in this thread...
> 
> Lars-Peter Clausen is the person writing the ALSA SoC wrapper.
> Lars-Peter: do you have plans to implement residue calls for
> getting buffer position?
> 

At the time the ALSA wrapper was written there were no DMA engine
implementations which actually provided residue information, so that's why I
left it out. But it is really straight forward to add it, given that we can
agree on a common definition of what the residue should be for cyclic
transfers. Russel's suggestion to define it as the number of bytes until the
end of the buffer is in my opinion the best option.

- Lars




More information about the linux-arm-kernel mailing list