Subject: Cyclic DMA - callback properties and tx_status residue

From: [email-masked] (Russell King - ARM Linux)
Date: Tue, 15 May 2012 08:37:12 +0100

On Tue, May 15, 2012 at 10:37:26AM +0530, Vinod Koul wrote:
> On Fri, 2012-05-11 at 15:07 +0100, Russell King - ARM Linux wrote:
> > On Thu, May 10, 2012 at 04:31:15PM +0530, Vinod Koul wrote:
> > > This should not be in ASoC library. The driver should be able to detect
> > > if a tasklet was called for many dma completions and notify the client
> > > (soc-lib) accordingly.
> > 
> > No.  Think about the cyclic case.  How do you correctly record how many
> > 'periods' have completed so that when your tasklet eventually gets called,
> > you call its callback the correct number of times?
> In ISR you can find which descriptors the interupt is for and then use
> this info in tasklet.

What descriptors?  With cyclic DMA you only have one descriptor.  Your
DMA engine may only need to be programmed once to do this too.