Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions sound/soc/sof/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wil help in debugging as well.


ret = snd_sof_dsp_core_power_down(sdev, 1 << pipeline->core);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about the case that the same secondary core is used by another active pipeline? we should add ref_count to DSP cores, then we don't need to treat this Primary core explicitly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but until then we need this change

if (ret < 0)
dev_err(scomp->dev, "error: powering down pipeline schedule core %d\n",
Expand Down