aboutsummaryrefslogtreecommitdiff
path: root/lib/crypto/mpi/mpi-internal.h
diff options
context:
space:
mode:
authorShengjiu Wang <[email protected]>2024-06-20 10:40:18 +0800
committerTakashi Iwai <[email protected]>2024-06-25 11:55:45 +0200
commit6a7db25aad8ce6512b366d2ce1d0e60bac00a09d (patch)
tree387404c5df204a29ef24303a916b891cf2de8ce8 /lib/crypto/mpi/mpi-internal.h
parent1d091a98c399c17d0571fa1d91a7123a698446e4 (diff)
ALSA: dmaengine_pcm: terminate dmaengine before synchronize
When dmaengine supports pause function, in suspend state, dmaengine_pause() is called instead of dmaengine_terminate_async(), In end of playback stream, the runtime->state will go to SNDRV_PCM_STATE_DRAINING, if system suspend & resume happen at this time, application will not resume playback stream, the stream will be closed directly, the dmaengine_terminate_async() will not be called before the dmaengine_synchronize(), which violates the call sequence for dmaengine_synchronize(). This behavior also happens for capture streams, but there is no SNDRV_PCM_STATE_DRAINING state for capture. So use dmaengine_tx_status() to check the DMA status if the status is DMA_PAUSED, then call dmaengine_terminate_async() to terminate dmaengine before dmaengine_synchronize(). Signed-off-by: Shengjiu Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-internal.h')
0 files changed, 0 insertions, 0 deletions