Re: [PATCH 06/28] ALSA: dmaengine: Always terminate DMA when a PCM is closed
From: Mark Brown
Date: Tue Sep 22 2026 - 06:15:17 EST
On Sun, Sep 20, 2026 at 02:53:45PM +1000, James Calligeros wrote:
> From: Hector Martin <marcan@xxxxxxxxx>
>
> When a PCM is suspended, we pause the DMA. If the PCM is then closed
> while in this state, it does not receive the STOP trigger (as it is not
> running). In this case, we fail to properly terminate the DMA, calling
> dmaengine_synchronize() nonetheless, which is undefined behavior.
>
> Make sure we always call dmaengine_terminate_async() on PCM close,
> regardless of whether it has been called previously or not in the
> trigger callbacks.
See 6a7db25aad8ce (ALSA: dmaengine_pcm: terminate dmaengine before
synchronize) - we should already be handling anything that's already
saying it's paused.
Attachment:
signature.asc
Description: PGP signature