kernel_samsung_a53x/sound
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
..
ac97
aoa
arm
atmel
core ALSA: dmaengine_pcm: terminate dmaengine before synchronize 2024-11-19 14:19:50 +01:00
drivers
firewire
hda ALSA: hda: intel-dspcfg: add filters for ARL-S and ARL 2024-11-18 12:13:18 +01:00
i2c
isa
mips
oss/dmasound
parisc
pci ALSA: hda/relatek: Enable Mute LED on HP Laptop 15-gw0xxx 2024-11-19 14:19:48 +01:00
pcmcia
ppc
sh ALSA: sh: aica: reorder cleanup operations to avoid UAF bugs 2024-11-19 09:22:42 +01:00
soc ASoC: ti: omap-hdmi: Fix too long driver name 2024-11-19 14:19:48 +01:00
sparc
spi
synth ALSA: emux: improve patch ioctl data validation 2024-11-19 14:19:32 +01:00
usb ALSA: line6: Zero-initialize message buffers 2024-11-19 11:32:44 +01:00
x86
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c