Unverified Commit ec626334 authored by Ranjani Sridharan's avatar Ranjani Sridharan Committed by Mark Brown
Browse files

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



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: 0dcdf842 ("ASoC: SOF: add a "core" parameter to widget loading functions")

Signed-off-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20211006104041.27183-1-peter.ujfalusi@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent dc1fad25
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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",