Cyclic DMA - callback properties and tx_status residue

Vinod Koul vinod.koul at linux.intel.com
Tue May 15 04:58:32 EDT 2012


On Tue, 2012-05-15 at 08:37 +0100, Russell King - ARM Linux wrote:
> 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.
My bad mixed my reply to generic case where you can mark descriptor that
interrupt is triggered and later in tasklet call pending notifications.

Said that, nothing prevents the driver from keeping the count of
interrupts and calling the callbacks. BUT it makes no sense in cyclic
case where ALSA wouldn't need this and would need just a notification
and current position.


-- 
~Vinod




More information about the linux-arm-kernel mailing list