[alsa-devel] async between dmaengine_pcm_dma_complete and snd_pcm_release

Qiao Zhou zhouqiao at marvell.com
Thu Oct 10 07:54:12 CEST 2013

On 10/10/2013 10:56 AM, Vinod Koul wrote:
> On Thu, Oct 10, 2013 at 09:05:02AM +0800, Qiao Zhou wrote:
>> On 10/09/2013 07:00 PM, Lars-Peter Clausen wrote:
>>> I think we'll eventually need to versions of dmaengine_terminate_all(). A
>>> sync version which makes sure that the tasklet has finished and a non-sync
>>> version that only makes sure that no new callbacks are started. I think the
>>> sync version should be the default with an optional async version which must
>>> be used, if it can run from within the callback. So we'd call the async
>>> version in the pcm_trigger callback and the sync version in the pcm_close
>>> callback.
>> In our current dmaengine driver, the dma interrupt is disabled in
>> terminate_all, so there is no new callback after it. This is the
>> async version. Takashi also mentions the requirement for such sync
>> version. I'll investigate the sync version more. thanks a lot.
> Your issue seems to be more on the case callback has been onvoked while the
> terminate_all in processing and after that case when sound core freed the
> pointers. If you get a new callback after the terminate_all then taht would only
> be a driver bug!
Agree. No new callback should be invoked after terminate_all.
> --
> ~Vinod


Best Regards

More information about the Alsa-devel mailing list