Cyclic DMA - callback properties and tx_status residue

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


On Thu, 2012-05-10 at 10:42 +0100, Mark Brown wrote:
> On Thu, May 10, 2012 at 09:14:18AM +0530, Vinod Koul wrote:
> 
> > For audio needs I think it is fine if we miss, as long as subsequent
> > comes untill we get underrun/overrun.
> 
> No, - this is what Russell has been reporting.  Due to the lack of
> position callbacks the ASoC dmaengine stuff is counting completions to
> work out where it is in the buffer.  If we miss completions then the
> drivers will start to loose track of where they are in the buffer.  If
> we had usable position reporting this would work OK, or if the ASoC code
> were changed to remember where each buffer ends and get that information
> passed back in the completion argument then it could recover that way
> (but that's fairly painful).

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.

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.


-- 
~Vinod




More information about the linux-arm-kernel mailing list