deepin-kernel/sound
Arun Raghavan c9eb52013f ASoC: fsl_sai: Force a software reset when starting in consumer mode
commit dc78f7e59169d3f0e6c3c95d23dc8e55e95741e2 upstream.

On an imx8mm platform with an external clock provider, when running the
receiver (arecord) and triggering an xrun with xrun_injection, we see a
channel swap/offset. This happens sometimes when running only the
receiver, but occurs reliably if a transmitter (aplay) is also
concurrently running.

It seems that the SAI loses track of frame sync during the trigger stop
-> trigger start cycle that occurs during an xrun. Doing just a FIFO
reset in this case does not suffice, and only a software reset seems to
get it back on track.

This looks like the same h/w bug that is already handled for the
producer case, so we now do the reset unconditionally on config disable.

Signed-off-by: Arun Raghavan <arun@asymptotic.io>
Reported-by: Pieterjan Camerlynck <p.camerlynck@televic.com>
Fixes: 3e3f8bd569 ("ASoC: fsl_sai: fix no frame clk in master mode")
Cc: stable@vger.kernel.org
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://patch.msgid.link/20250626130858.163825-1-arun@arunraghavan.net
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b9e50a5169b086dd5915ae117c8a53cd75403574)
2025-07-28 15:19:08 +08:00
..
ac97 ALSA: ac97: set variables dev_attr_vendor_id to static 2023-08-02 09:27:39 +02:00
aoa ALSA: aoa: Fix typos in PCM fix patch 2023-08-18 09:09:39 +02:00
arm ASoC: arm: convert not to use asoc_xxx() 2024-04-26 20:47:52 +08:00
atmel ALSA: Explicitly include correct DT includes 2023-07-16 14:50:56 +02:00
core ALSA: pcm: Fix race of buffer access at PCM OSS layer 2025-06-10 16:18:03 +08:00
drivers ALSA: pcmtest: stop timer before buffer is released 2024-01-20 11:51:42 +01:00
firewire ALSA: firewire-lib: fix return value on fail in amdtp_tscm_init() 2024-12-10 20:43:42 +08:00
hda ASoC: Intel: sst: Support LPE0F28 ACPI HID 2024-12-10 20:44:14 +08:00
i2c
isa ALSA: sb: Force to disable DMAs once when DMA mode is changed 2025-07-14 10:42:16 +08:00
mips
oss
parisc
pci ALSA: hda/realtek: Add quirk for ASUS ROG Strix G712LWS 2025-07-28 15:19:02 +08:00
pcmcia
ppc ALSA: Explicitly include correct DT includes 2023-07-16 14:50:56 +02:00
sh ALSA: sh: SND_AICA should depend on SH_DMA_API 2025-05-26 10:36:08 +08:00
soc ASoC: fsl_sai: Force a software reset when starting in consumer mode 2025-07-28 15:19:08 +08:00
sparc ALSA: Explicitly include correct DT includes 2023-07-16 14:50:56 +02:00
spi
synth ALSA: emux: improve patch ioctl data validation 2024-12-10 20:38:51 +08:00
usb ALSA: usb-audio: Fix out-of-bounds read in snd_usb_get_audioformat_uac3() 2025-07-09 09:50:00 +08:00
virtio sound/virtio: Fix cancel_sync warnings on uninitialized work_structs 2025-05-09 23:02:45 +08:00
x86
xen ALSA: xen: Fix -Wformat-truncation warning 2023-09-15 13:21:35 +02:00
Kconfig sound: Make CONFIG_SND depend on INDIRECT_IOMEM instead of UML 2024-12-10 20:43:48 +08:00
Makefile
ac97_bus.c
last.c
sound_core.c