linux/sound
Peter Ujfalusi c40aad7c81
ASoC: SOF: ipc4-pcm: Workaround for crashed firmware on system suspend
When the system is suspended while audio is active, the
sof_ipc4_pcm_hw_free() is invoked to reset the pipelines since during
suspend the DSP is turned off, streams will be re-started after resume.

If the firmware crashes during while audio is running (or when we reset
the stream before suspend) then the sof_ipc4_set_multi_pipeline_state()
will fail with IPC error and the state change is interrupted.
This will cause misalignment between the kernel and firmware state on next
DSP boot resulting errors returned by firmware for IPC messages, eventually
failing the audio resume.
On stream close the errors are ignored so the kernel state will be
corrected on the next DSP boot, so the second boot after the DSP panic.

If sof_ipc4_trigger_pipelines() is called from sof_ipc4_pcm_hw_free() then
state parameter is SOF_IPC4_PIPE_RESET and only in this case.

Treat a forced pipeline reset similarly to how we treat a pcm_free by
ignoring error on state sending to allow the kernel's state to be
consistent with the state the firmware will have after the next boot.

Link: https://github.com/thesofproject/sof/issues/8721
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://msgid.link/r/20240213115233.15716-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-13 13:28:44 +00:00
..
ac97 ALSA: ac97: fix build regression 2024-01-03 11:47:04 +01:00
aoa ALSA: aoa: Replace with __packed attribute 2023-10-26 09:43:11 +02:00
arm ASoC: arm: convert not to use asoc_xxx() 2023-09-25 14:16:16 +02:00
atmel ALSA: Explicitly include correct DT includes 2023-07-16 14:50:56 +02:00
core sound updates for 6.8-rc1 2024-01-12 11:55:28 -08:00
drivers sound fixes for 6.8-rc1 2024-01-19 12:30:29 -08:00
firewire ALSA: firewire: Fix -Wformat-truncation warning for MIDI stream names 2023-09-15 13:22:06 +02:00
hda ALSA: mark all struct bus_type as const 2023-12-30 10:10:41 +01:00
i2c
isa ALSA: wavefront: copy userspace array safely 2023-11-20 12:38:31 +01:00
mips
oss OSS: dmasound/paula: Convert to platform remove callback returning void 2023-11-09 17:44:52 +01:00
parisc
pci ASoC: tas2781: add module parameter to tascodec_init() 2024-02-05 14:31:37 +00:00
pcmcia
ppc ALSA: Explicitly include correct DT includes 2023-07-16 14:50:56 +02:00
sh ALSA: sh: Convert to generic PCM copy ops 2023-08-18 12:18:24 +02:00
soc ASoC: SOF: ipc4-pcm: Workaround for crashed firmware on system suspend 2024-02-13 13:28:44 +00:00
sparc ALSA: Explicitly include correct DT includes 2023-07-16 14:50:56 +02:00
spi
synth
usb ALSA: scarlett2: Fix yet more -Wformat-truncation warnings 2024-01-15 12:41:14 +01:00
virtio ALSA: virtio: use ack callback 2023-10-27 11:25:07 +02:00
x86 drm/edid: include drm_eld.h only where required 2023-11-09 16:47:31 +02:00
xen ALSA: xen: Fix -Wformat-truncation warning 2023-09-15 13:21:35 +02:00
ac97_bus.c ALSA: mark all struct bus_type as const 2023-12-30 10:10:41 +01:00
Kconfig This pull request contains the following changes for UML: 2023-09-04 11:32:21 -07:00
last.c
Makefile
sound_core.c sound: make all 'class' structures const 2023-06-21 07:29:10 +02:00