kernel_samsung_a53x/sound/core
Shengjiu Wang 17496a14a5 ALSA: dmaengine_pcm: terminate dmaengine before synchronize
[ Upstream commit 6a7db25aad8ce6512b366d2ce1d0e60bac00a09d ]

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 <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/1718851218-27803-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 14:19:50 +01:00
..
oss Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
seq ALSA: seq: fix function cast warnings 2024-11-19 08:44:53 +01:00
compress_offload.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
control.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
control_compat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ctljack.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hrtimer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hwdep.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hwdep_compat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
info.c ALSA: info: Fix potential deadlock at disconnection 2024-11-18 11:43:26 +01:00
info_oss.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
init.c ALSA: core: Fix NULL module pointer assignment at card init 2024-11-19 12:26:51 +01:00
isadma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jack.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile ALSA: Drop leftover snd-rtctimer stuff from Makefile 2024-11-18 23:18:29 +01:00
memalloc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
memory.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
misc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm.c ALSA: pcm: fix out-of-bounds in snd_pcm_state_names 2024-11-18 12:11:41 +01:00
pcm_compat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_dmaengine.c ALSA: dmaengine_pcm: terminate dmaengine before synchronize 2024-11-19 14:19:50 +01:00
pcm_drm_eld.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_iec958.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_lib.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_local.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_memory.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_misc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_native.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_param_trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_timer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm_trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rawmidi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rawmidi_compat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
seq_device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sgbuf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sound.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sound_oss.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timer.c ALSA: timer: Set lower bound of start tick time 2024-11-19 12:27:11 +01:00
timer_compat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmaster.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00