Skip to contentSkip to conversation

ASoC: SOF: topology: do not power down primary core during topology removal

PATCH In review Peter Ujfalusi 2 participants 2 messages Oct 6, 2021 – Oct 7, 2021

Subsystems (3)
lore
Share & tools
lore

Peter Ujfalusi

author maintainer
#0 lore raw

PATCH 1/1 ASoC: SOF: topology: do not power down primary core during topology removal

From: Ranjani Sridharan <[email protected]>

When removing the topology components, do not power down the primary core. Doing so will result in an IPC timeout when the SOF PCI device runtime suspends.

Fixes 0dcdf84289fb ("ASoC: SOF: add a "core" parameter to widget loading functions")
---
 sound/soc/sof/topology.c | 9 +++++++++
 1 file changed, 9 insertions(+)
sound/soc/sof/topology.c +9 -0
index 534f004f6162..1723dd11acd7 100644
@@ -2514,6 +2514,15 @@ static int sof_widget_unload(struct snd_soc_component *scomp,
 
 		/* power down the pipeline schedule core */
 		pipeline = swidget->private;
+
+		/*
+		 * Runtime PM should still function normally if topology loading fails and
+		 * it's components are unloaded. Do not power down the primary core so that the
+		 * CTX_SAVE IPC can succeed during runtime suspend.
+		 */
+		if (pipeline->core == SOF_DSP_PRIMARY_CORE)
+			break;
+
 		ret = snd_sof_dsp_core_power_down(sdev, 1 << pipeline->core);
 		if (ret < 0)
 			dev_err(scomp->dev, "error: powering down pipeline schedule core %d\n",
Signature · 1 line
2.33.0
maintainer
#1 lore raw
Quoted 9 lines · Peter Ujfalusi

From: Ranjani Sridharan <[email protected]>

When removing the topology components, do not power down the primary core. Doing so will result in an IPC timeout when the SOF PCI device runtime suspends.

Fixes 0dcdf84289fb ("ASoC: SOF: add a "core" parameter to widget loading functions")

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: SOF: topology: do not power down primary core during topology removal

      commit: ec626334eaffe101df9ed79e161eba95124e64ad

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark