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
8 changes: 4 additions & 4 deletions sound/soc/sof/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ static int sof_resume(struct device *dev, int runtime_resume)
}

/* init DMA trace */
ret = snd_sof_init_trace_ipc(sdev);
ret = snd_sof_init_trace(sdev);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can you make snd_sof_init_trace_ipc static? we shouldn't call it directly.

if (ret < 0) {
/* non fatal */
dev_warn(sdev->dev,
Expand Down Expand Up @@ -324,6 +324,9 @@ static int sof_suspend(struct device *dev, int runtime_suspend)
if (!sdev->ops->suspend)
return 0;

/* release trace */
snd_sof_release_trace(sdev);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

is this sequence change really important?
I think sof_suspend_streams is only for those topology defined pipelines, so make sure snd_sof_release_trace() is called before dsp_suspend() should be enough.

can you try keep the place where it is but only change from snd_sof_dma_trace_release() to snd_sof_release_trace()?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

sorry, better to make it before SOF_IPC_PM_CTX_SAVE ipc sending.

/*
* Suspend running pcm streams.
* They will be restarted by ALSA resume trigger call.
Expand All @@ -342,9 +345,6 @@ static int sof_suspend(struct device *dev, int runtime_suspend)
/* drop all ipc */
sof_ipc_drop_all(sdev->ipc);

/* release trace */
snd_sof_dma_trace_release(sdev);

/* power down DSP */
if (runtime_suspend)
ret = snd_sof_dsp_runtime_suspend(sdev, 0);
Expand Down