[alsa-devel] [PATCH] ASoC: dmaengine: add runtime status checking in dmaengine_pcm_dma_complete
broonie at kernel.org
Wed Jun 12 16:39:44 CEST 2013
On Wed, Jun 12, 2013 at 02:15:24PM +0200, Lars-Peter Clausen wrote:
> On 06/12/2013 09:43 AM, Vinod Koul wrote:
> > Yes you need to call dmaengine_terminate_all(). But even then we might have
> > trasaction in flight or some dma controllers cant abort immediately (need to
> > wait till FIFOs are flushed etc). In general it is a good practice to call
> > dma_sync_wait() before you tear down the client.
> > If you still see an issue, then it a buggy driver :)
> Even though if the driver can't abort the transfer immediately, I'd still
> expect to not see any calls to the descriptors callback after
> dmaengine_terminate_all() has been called.
It'd certainly be much less surprising - if something's terminated it
really oughtn't to be generating callbacks.
> We should probably still call dma_sync_wait() though before we free any of
> the DMA transfer buffers. But I guess this will open a whole new can of
> bugs, since none of the drivers actually seem to mark a descriptor as
> completed if the transfer is aborted using dmaengine_terminate_all()
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: Digital signature
More information about the Alsa-devel