All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: SOF: topology: do not power down primary core during topology removal
@ 2021-10-06 10:40 Peter Ujfalusi
  2021-10-07 21:37 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Ujfalusi @ 2021-10-06 10:40 UTC (permalink / raw)
  To: lgirdwood, broonie, pierre-louis.bossart
  Cc: guennadi.liakhovetski, alsa-devel, ranjani.sridharan, kai.vehmanen

From: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>

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")

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
---
 sound/soc/sof/topology.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index 534f004f6162..1723dd11acd7 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -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",
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: SOF: topology: do not power down primary core during topology removal
  2021-10-06 10:40 [PATCH] ASoC: SOF: topology: do not power down primary core during topology removal Peter Ujfalusi
@ 2021-10-07 21:37 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-10-07 21:37 UTC (permalink / raw)
  To: lgirdwood, Peter Ujfalusi, pierre-louis.bossart
  Cc: guennadi.liakhovetski, alsa-devel, Mark Brown, ranjani.sridharan,
	kai.vehmanen

On Wed, 6 Oct 2021 13:40:41 +0300, Peter Ujfalusi wrote:
> From: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
> 
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-07 21:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06 10:40 [PATCH] ASoC: SOF: topology: do not power down primary core during topology removal Peter Ujfalusi
2021-10-07 21:37 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.