Cyclic DMA - callback properties and tx_status residue

Vinod Koul vinod.koul at linux.intel.com
Tue May 15 01:07:26 EDT 2012


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.

> 
> I think that's totally pointless and wasteful too from the ALSA core code
> point of view - all the ALSA cares about is that "some periods have
> completed" and ALSA will then ask the low level driver where the DMA is,
> and update things according to the current DMA position.
> 
> It is my opinion that having this emulation of the current position in
> soc-dmaengine-pcm is not only causing a wrong direction to be taken here,
> but is potentially causing inefficiency by forcing conditions into the API
> which we really don't need.
> 
> > One way to do this would be to ensure that the descriptor is marked in
> > irq_handler and then all descriptor completed notified in tasklet.
> 
> No.  You're assuming that for each IRQ you have the tasklet run exactly
> once.  There is no such guarantee.
No, I am assuming IRQ is called everytime and takslet sometimes!
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


-- 
~Vinod




More information about the linux-arm-kernel mailing list