linux/include/sound/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
..
ipc4 ASoC: SOF: ipc4: Add macro to get core ID from log buffer status message 2022-09-09 18:48:45 +01:00
channel_map.h treewide: Replace zero-length arrays with flexible-array members 2022-02-17 07:00:39 -06:00
control.h ASoC: SOF: control.h: Replace zero-length array with DECLARE_FLEX_ARRAY() helper 2022-09-27 12:08:00 +01:00
dai-amd.h ASoC: SOF: topology: add code to parse config params for ACPDMIC dai 2022-06-14 11:22:10 +01:00
dai-imx.h ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only 2020-05-01 17:45:24 +01:00
dai-intel.h ASoC: SOF: dai-intel: add SOF_DAI_INTEL_SSP_CLKCTRL_MCLK_AON bit 2022-07-25 22:37:02 +01:00
dai-mediatek.h ASoC: SOF: topology: Add support for Mediatek AFE DAI 2021-11-18 13:57:37 +00:00
dai.h ASoC: SOF: Adding amd HS functionality to the sof core 2022-09-20 19:38:03 +01:00
debug.h ipc: debug: Add shared memory heap to memory scan 2021-12-17 11:06:19 +00:00
ext_manifest4.h ASoC: SOF: Add header for IPC4 manifest 2022-05-12 11:41:27 +01:00
ext_manifest.h ASoC: SOF: ext_manifest: use explicit number for elem_type 2021-02-10 17:17:13 +00:00
header.h ASoC: SOF: fix 32 signed bit overflow 2022-03-07 13:12:52 +00:00
info.h ASoC: SOF: ipc3-topology: use old pipeline teardown flow with SOF2.1 and older 2022-11-01 18:28:07 +00:00
pm.h ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only 2020-05-01 17:45:24 +01:00
stream.h ASoC: SOF: Copy compress parameters into extended data 2022-07-12 15:22:07 +01:00
topology.h ASoC: SOF: make struct snd_sof_widget IPC agnostic 2022-03-09 13:30:02 +00:00
trace.h ASoC: SOF: trace: Add runtime trace filtering mechanism 2020-12-07 14:22:05 +00:00
xtensa.h ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only 2020-05-01 17:45:24 +01:00