Closed
Conversation
DMA trace has been stopped and released at this point, so a wake_up() is not needed anymore. Fixes: 2291b8c ("ASoC: SOF: force end-of-file for debugfs trace at suspend") Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Trace must be stopped when the DSP suspends to a D0 substate. Move the call to snd_sof_release_trace() so that it can be released for all D0 substates and add the call to re-init trace when resuming from a low-power D0 substate. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
4103ef8 to
e63a9a1
Compare
When the stream is cleared during the suspend trigger, the dma_data must be set to NULL and snd_hdac_ext_stream_release() must be called to release the link dev. Without this, some platforms run into issues with triggering the host DMA during system resume. Add the missing sequences to both hda_link_pcm_trigger() to handle all streams that get suspended and to hda_dsp_set_hw_params_upon_resume() to handle paused streams that are reset during system suspend. Also, because the dma_data is set to NULL during suspend, add the checks to ensure link_dev is not NULL during hw_params and hw_free to prevent NULL pointer dereferences. BugLink: thesofproject/sof#4779 Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
e63a9a1 to
1328342
Compare
kv2019i
requested changes
Sep 20, 2021
Collaborator
kv2019i
left a comment
There was a problem hiding this comment.
Partial review, commenting on the first patch.
| sdev->dtrace_is_enabled = false; | ||
| sdev->dtrace_draining = true; | ||
| wake_up(&sdev->trace_sleep); | ||
| } |
Collaborator
There was a problem hiding this comment.
Hmm, how can you be sure the user-space thread is not in sof_wait_trace_avail() ? The release trace can be called when sof-logger is still running and waiting for traces.
| @@ -279,7 +279,7 @@ static int hda_link_pcm_prepare(struct snd_pcm_substream *substream, | |||
| struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); | |||
Collaborator
There was a problem hiding this comment.
typo in commit: dma_sata in subject
Member
plbossart
added a commit
to plbossart/sof
that referenced
this pull request
Sep 20, 2021
This reverts commit 9fadef7. After multiple trials on a CometLake SoundWire device, this revert to bring the trace back to what it was seems to be the only solution, the suggested PR thesofproject/linux#3166 does not help on this SoundWire device. We had similar issues with SD offset timeouts and a similar revert with thesofproject#4578 at the end of July, there's something that we are missing on what the trace does and how it impacts the DMA handling. BugLink: thesofproject#4779 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Collaborator
Author
|
to be replaced with a better fix |
lgirdwood
pushed a commit
to thesofproject/sof
that referenced
this pull request
Sep 21, 2021
This reverts commit 9fadef7. After multiple trials on a CometLake SoundWire device, this revert to bring the trace back to what it was seems to be the only solution, the suggested PR thesofproject/linux#3166 does not help on this SoundWire device. We had similar issues with SD offset timeouts and a similar revert with #4578 at the end of July, there's something that we are missing on what the trace does and how it impacts the DMA handling. BugLink: #4779 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes thesofproject/sof#4558
But it should also fix thesofproject/sof#4779 and possibly even #3034
And if it does fix #3034, it is replacement for #3099