Commit 16e68f7
committed
ALSA: dmaengine: Always terminate DMA when a PCM is closed
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.
Signed-off-by: Hector Martin <marcan@marcan.st>1 parent 3b2ae5b commit 16e68f7
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
362 | 367 | | |
363 | 368 | | |
364 | 369 | | |
| |||
0 commit comments