linux-stable/sound/soc
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
..
adi
amd ASoC: amd: yc: Fix non-functional mic on Lenovo 82UU 2024-02-12 16:03:08 +00:00
apple
atmel
au1x
bcm
cirrus ASoC: cirrus: edb93xx: Drop legacy include 2023-12-01 16:59:22 +00:00
codecs ASoC: rt5645: Add DMI quirk for inverted jack-detect on MeeGoPad T8 2024-02-12 13:41:29 +00:00
dwc
fsl sound updates for 6.8-rc1 2024-01-12 11:55:28 -08:00
generic ASoC: audio-graph-card2: fix index check on graph_parse_node_multi_nm() 2024-01-12 14:13:53 +00:00
google
hisilicon ASoC: hisilicon: Drop GPIO include 2023-12-18 14:03:29 +00:00
img
intel ASoC: Intel: cht_bsw_rt5645: Cleanup codec_name handling 2024-02-11 16:57:24 +00:00
jz4740
kirkwood
loongson
mediatek ASoC: Fixes for v6.8 2024-01-16 17:37:17 +01:00
meson ASoC: meson: g12a-tohdmitx: Fix event generation for S/PDIF mux 2024-01-03 18:37:02 +00:00
mxs
pxa ASoC: pxa: sspa: Don't select SND_ARM 2023-12-29 17:41:15 +00:00
qcom ASoC: q6dsp: fix event handler prototype 2024-02-13 13:28:43 +00:00
rockchip i2c: make i2c_bus_type const 2024-01-18 21:10:43 +01:00
samsung ASoC: samsung: odroid: don't need DUMMY Platform 2023-12-19 13:23:43 +00:00
sh ASoC: sh: convert not to use dma_request_slave_channel() 2023-11-27 13:44:06 +00:00
sof ASoC: SOF: ipc4-pcm: Workaround for crashed firmware on system suspend 2024-02-13 13:28:44 +00:00
spear
sprd ASoC: sprd: Simplify memory allocation in sprd_platform_compr_dma_config() 2023-12-19 14:02:50 +00:00
starfive
sti ASoC: sti-uniperf: Use default pcm_config instead 2023-11-13 01:26:07 +00:00
stm
sunxi ASoC: sunxi: sun4i-spdif: Add support for Allwinner H616 2024-01-29 16:55:18 +00:00
tegra ASoC: tegra: tegra20_ac97: Convert to use GPIO descriptors 2023-12-18 14:03:32 +00:00
ti ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings 2023-10-30 13:30:20 +00:00
uniphier
ux500
xilinx
xtensa
Kconfig
Makefile
soc-ac97.c
soc-acpi.c
soc-card.c
soc-component.c
soc-compress.c
soc-core.c ASoC: allow up to eight CPU/codec DAIs 2024-01-22 15:31:16 +00:00
soc-dai.c ASoC: Merge up workaround for CODECs that play noise on stopped stream 2023-10-27 22:33:15 +01:00
soc-dapm.c ASoC: makes CPU/Codec channel connection map more generic 2023-11-27 13:44:00 +00:00
soc-devres.c
soc-generic-dmaengine-pcm.c
soc-jack.c
soc-link.c
soc-ops.c ASoC: ops: add correct range check for limiting volume 2023-12-04 16:20:25 +00:00
soc-pcm.c ASoC: Updates for v6.8 2024-01-08 08:18:02 +01:00
soc-topology-test.c ASoC: topology: Replace fake root_device with kunit_device in tests 2023-12-18 13:28:08 -07:00
soc-topology.c
soc-utils-test.c
soc-utils.c