Repository navigation
Audio: DAI: ASRC: Fix DSP panic due to timestamping setup request in asrc_prepare() - #4095
Merged
lgirdwood merged 2 commits intoApr 28, 2021
Conversation
Collaborator
Author
|
This addresses issue #4068. |
lgirdwood
requested changes
Apr 26, 2021
Member
There was a problem hiding this comment.
Can we add a comment in the dai API header doxygen comments that state when this API can be called.
Collaborator
There was a problem hiding this comment.
@singalsu I would move the dd->chan check just at the top of the function and leave this line untouched.
E. g
if (!dd->chan) {
comp_err()...
return -EINVAL;
}
Contributor
There was a problem hiding this comment.
Fwiw, we seem to be lacking some general documentation in the DAI logic but AFAICT this fix should do the trick.
Collaborator
Author
There was a problem hiding this comment.
Yep, my add seemed to be only one there.
I'll test updated here and convert to non-draft if OK.
This patch adds error handling for case where DAI data pointer to DMA channel is not set. The situation can happen if ASRC tries to set up timestamping before DAI has been prepared. More specifically access to dd->chan->index with NULL in chan caused a DSP panic. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The asrc_dai_configure_timestamp() caused a DSP panic when called from asrc_prepare(). The reason is that DAI prepare now happens after ASRC prepare. Call from trigger start is after pipeline prepare so it avoids this problem. Fixes: thesofproject#4068 Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
singalsu
force-pushed
the
dai_asrc_fix_panic_due_to_timestamping_setup
branch
from
April 28, 2021 12:08
8af3963 to
53eafd4
Compare
singalsu
marked this pull request as ready for review
April 28, 2021 12:12
iuliana-prodan
approved these changes
Apr 28, 2021
lgirdwood
approved these changes
Apr 28, 2021
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.
The start sequence has changed to ASRC prepare before DAI, so there was as a null pointer access issue. The first patch adds check for null and the second patch moves setup to trigger start.