Repository navigation
ASoC: SOF: stop trace dma during suspend and re-init upon resume #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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); | ||
| if (ret < 0) { | ||
| /* non fatal */ | ||
| dev_warn(sdev->dev, | ||
|
|
@@ -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); | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this sequence change really important? can you try keep the place where it is but only change from snd_sof_dma_trace_release() to snd_sof_release_trace()? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
|
|
@@ -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); | ||
|
|
||
There was a problem hiding this comment.
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.