linux-stable/sound/soc/sof
Kai Vehmanen 003b786b67
ASoC: SOF: ipc3-topology: use old pipeline teardown flow with SOF2.1 and older
Originally in commit b2ebcf42a4 ("ASoC: SOF: free widgets in
sof_tear_down_pipelines() for static pipelines"), freeing of pipeline
components at suspend was only done with recent FW as there were known
limitations in older firmware versions.

Tests show that if static pipelines are used, i.e. all pipelines are
setup whenever firmware is powered up, the reverse action of freeing all
components at power down, leads to firmware failures with also SOF2.0
and SOF2.1 based firmware.

The problems can be specific to certain topologies with e.g. components
not prepared to be freed at suspend (as this did not happen with older
SOF kernels).

To avoid hitting these problems when kernel is upgraded and used with an
older firmware, bump the firmware requirement to SOF2.2 or newer. If an
older firmware is used, and pipeline is a static one, do not free the
components at suspend. This ensures the suspend flow remains backwards
compatible with older firmware versions. This limitation does not apply
if the product configuration is updated to dynamic pipelines.

The limitation is not linked to firmware ABI, as the interface to free
pipeline components has been available already before ABI3.19. The
problem is in the implementation, so firmware version should be used to
decide whether it is safe to use the newer flow or not. This patch adds
a new SOF_FW_VER() macro to compare SOF firmware release versions.

Link: https://github.com/thesofproject/sof/issues/6475
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20221101114913.1292671-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-01 18:28:07 +00:00
..
amd ASoC: SOF: amd: increase SRAM inbox and outbox size to 1024 2022-09-20 19:38:04 +01:00
imx ASoC: SOF: imx8ulp: add missing of_node_put() in imx8ulp_probe() 2022-08-24 12:21:28 +01:00
intel ASoC: SOF: Intel: hda-codec: fix possible memory leak in hda_codec_device_init() 2022-10-21 13:04:14 +01:00
mediatek ASoC: SOF: mediatek: mt8195: Add pcm_pointer callback 2022-09-26 16:10:28 +01:00
xtensa
compress.c ASoC: SOF: compress: Add copy function for capture case 2022-08-31 12:12:59 +01:00
control.c ASoC: SOF: control: use pm_runtime_resume_and_get() 2022-04-27 14:15:24 +01:00
core.c ASoC: SOF: add widget setup/free tracing 2022-09-19 15:44:03 +01:00
debug.c ASoC: SOF: debug: Fix potential buffer overflow by snprintf() 2022-08-05 12:57:23 +01:00
iomem-utils.c ASoC: SOF: Split up utils.c into sof-utils and iomem-utils 2022-02-10 15:19:04 +00:00
ipc.c ASoC: SOF: Compile and runtime IPC version selection 2022-06-14 11:22:12 +01:00
ipc3-control.c ASoC: SOF: ipc3: Remove the ipc3-ops.h header file 2022-05-04 15:31:18 +01:00
ipc3-dtrace.c ASoC: SOF: ipc3-dtrace: remove use of __func__ in dev_dbg 2022-06-17 10:46:41 +01:00
ipc3-loader.c ASoC: SOF: ipc3-loader: Print out the non matching ext_man magic number 2022-07-15 20:11:34 +01:00
ipc3-pcm.c ASoC: SOF: Adding amd HS functionality to the sof core 2022-09-20 19:38:03 +01:00
ipc3-priv.h ASoC: SOF: Modify the host trace_init parameter list to include dmab 2022-05-19 16:44:17 +01:00
ipc3-topology.c ASoC: SOF: ipc3-topology: use old pipeline teardown flow with SOF2.1 and older 2022-11-01 18:28:07 +00:00
ipc3.c ASoC: SOF: replace dev_vdbg with tracepoints 2022-09-19 15:44:07 +01:00
ipc4-control.c ASoC: SOF: ipc4-topology: Fix error code in sof_ipc4_volume_put() 2022-06-16 09:31:17 +01:00
ipc4-loader.c ASoC: SOF: replace ipc4-loader dev_vdbg with tracepoints 2022-09-19 15:44:08 +01:00
ipc4-mtrace.c ASoC: SOF: ipc4-mtrace: protect per-core nodes against multiple open 2022-10-18 21:17:21 +01:00
ipc4-pcm.c ASoC: SOF: ipc4-pcm: set pcm rate to dai setting 2022-07-15 20:11:31 +01:00
ipc4-priv.h ASoC: SOF: ipc4: Add support for mtrace log extraction 2022-09-09 18:48:48 +01:00
ipc4-topology.c ASoC: SOF: ipc4-topology: Free the ida when IPC fails in sof_ipc4_widget_setup() 2022-09-21 16:01:44 +01:00
ipc4-topology.h ASoC: SOF: ipc4-topology: set domain bit based on dp domain type 2022-07-15 20:11:33 +01:00
ipc4.c ASoC: SOF: ipc4: Call snd_sof_handle_fw_exception() in case of timeout 2022-09-23 14:53:23 +01:00
Kconfig ASoC: SOF: Kconfig: Make IPC_MESSAGE_INJECTOR depend on SND_SOC_SOF 2022-08-23 13:49:56 +01:00
loader.c ASoC: SOF: loader: Call optional query_fw_configuration on first boot 2022-04-29 13:06:17 +01:00
Makefile ASoC: SOF: ipc4: Add support for mtrace log extraction 2022-09-09 18:48:48 +01:00
nocodec.c ASOC: SOF: use devm_kcalloc() instead of devm_kzalloc() 2022-09-19 17:52:36 +01:00
ops.c ASoC: SOF: Switch to IPC generic firmware tracing 2022-05-19 16:44:15 +01:00
ops.h ASoC: SOF: Add ops_free 2022-06-10 13:32:05 +01:00
pcm.c ASoC: SOF: replace dev_vdbg with tracepoints 2022-09-19 15:44:07 +01:00
pm.c ASoC: SOF: pm: add definitions for S4 and S5 states 2022-06-17 10:46:13 +01:00
sof-acpi-dev.c ASoC: SOF: add IPC-dependent file names 2022-04-19 12:03:34 +01:00
sof-acpi-dev.h
sof-audio.c ASoC: SOF: don't unprepare widget used other pipelines 2022-09-20 19:07:34 +01:00
sof-audio.h ASoC: SOF: topology: add code to parse config params for ACPDMIC dai 2022-06-14 11:22:10 +01:00
sof-client-ipc-flood-test.c ASoC: SOF: sof-client-ipc-flood-test: use pm_runtime_resume_and_get() 2022-05-19 16:44:29 +01:00
sof-client-ipc-msg-injector.c ASoC: SOF: ipc-msg-injector: fix copy in sof_msg_inject_ipc4_dfs_write() 2022-07-14 13:26:37 +01:00
sof-client-probes.c ASoC: SOF: Remove strsplit_u32() and tokenize_input() 2022-09-05 14:51:47 +01:00
sof-client-probes.h ASoC: SOF: probes: rename assign/free callbacks as startup/shutdown 2022-07-15 20:11:38 +01:00
sof-client.c ASoC: SOF: sof-client: remove use of __func__ in dev_dbg 2022-06-17 10:46:46 +01:00
sof-client.h ASoC: SOF: sof-client: Add API to get the ipc_type 2022-05-09 18:17:58 +01:00
sof-of-dev.c ASoC: SOF: add IPC-dependent file names 2022-04-19 12:03:34 +01:00
sof-of-dev.h ASoC: SOF: Introduce function sof_of_machine_select 2022-08-23 18:22:29 +01:00
sof-pci-dev.c ASoC: SOF: pci: Change DMI match info to support all Chrome platforms 2022-09-19 17:52:44 +01:00
sof-pci-dev.h
sof-priv.h ASoC: SOF: add quirk to override topology mclk_id 2022-09-19 18:11:45 +01:00
sof-utils.c ASoC: SOF: remove unneeded dev_vdbg 2022-09-19 15:44:06 +01:00
sof-utils.h ASoC: SOF: Split up utils.c into sof-utils and iomem-utils 2022-02-10 15:19:04 +00:00
stream-ipc.c ASoC: SOF: Remove ipc_pcm_params() ops 2022-03-11 13:41:09 +00:00
topology.c ADD SOF support for rembrandt platform 2022-09-21 10:19:01 +01:00
trace.c ASoC: SOF: Switch to IPC generic firmware tracing 2022-05-19 16:44:15 +01:00