mbox series

[0/2] ASoC: SOF: Extend the enabled DSP core handling

Message ID 20231124135743.24674-1-peter.ujfalusi@linux.intel.com (mailing list archive)
Headers show
Series ASoC: SOF: Extend the enabled DSP core handling | expand

Message

Peter Ujfalusi Nov. 24, 2023, 1:57 p.m. UTC
Hi,

In the current code, we enable a widget core when it is set up and
disable it when it is freed. This is problematic with IPC4 because
widget free is essentially a NOP and all widgets are freed in the
firmware when the pipeline is deleted. This results in a crash during
pipeline deletion when one of it's widgets is scheduled to run on a
secondary core and is powered off when widget is freed. So, change the
logic to enable all cores needed by all the modules in a pipeline when
the pipeline widget is set up and disable them after the pipeline
widget is freed.

Regards,
Peter
---
Ranjani Sridharan (2):
  ASoC: SOF: ipc4-topology: Add core_mask in struct snd_sof_pipeline
  ASoC: SOF: sof-audio: Modify logic for enabling/disabling topology
    cores

 sound/soc/sof/ipc3-topology.c |  2 ++
 sound/soc/sof/ipc4-topology.c |  9 +++++
 sound/soc/sof/sof-audio.c     | 65 ++++++++++++++++++++++-------------
 sound/soc/sof/sof-audio.h     |  2 ++
 4 files changed, 54 insertions(+), 24 deletions(-)

Comments

Mark Brown Nov. 25, 2023, 11:37 a.m. UTC | #1
On Fri, 24 Nov 2023 15:57:41 +0200, Peter Ujfalusi wrote:
> In the current code, we enable a widget core when it is set up and
> disable it when it is freed. This is problematic with IPC4 because
> widget free is essentially a NOP and all widgets are freed in the
> firmware when the pipeline is deleted. This results in a crash during
> pipeline deletion when one of it's widgets is scheduled to run on a
> secondary core and is powered off when widget is freed. So, change the
> logic to enable all cores needed by all the modules in a pipeline when
> the pipeline widget is set up and disable them after the pipeline
> widget is freed.
> 
> [...]

Applied to

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

Thanks!

[1/2] ASoC: SOF: ipc4-topology: Add core_mask in struct snd_sof_pipeline
      commit: 0376b995bb7a65fb0c056f3adc5e9695ad0c1805
[2/2] ASoC: SOF: sof-audio: Modify logic for enabling/disabling topology cores
      commit: 31ed8da1c8e5e504710bb36863700e3389f8fc81

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