[PATCH 06/28] ALSA: dmaengine: Always terminate DMA when a PCM is closed

Mark Brown broonie at kernel.org
Tue Sep 22 03:12:25 PDT 2026


On Sun, Sep 20, 2026 at 02:53:45PM +1000, James Calligeros wrote:
> From: Hector Martin <marcan at marcan.st>
> 
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260922/bfd1bb78/attachment.sig>


More information about the linux-arm-kernel mailing list