Repository navigation
dai: fix error handling when DMA is stuck - #208
Merged
Merged
Conversation
When the DMA is stuck, e.g. in slave mode when the external clock is not active, the Linux kernel will trigger a stop after a timeout. Since the DMA will never complete, the current code returns an IPC error on stop (DMA completion fails) and will not reset DMA channel status and reference counts. Force the DMA and DAI to be stopped to solve the problem. We probably need to look at all error handling since it's likely to be a recurring issue. Also simplify the Xrun code, no need for an extra return. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Contributor
|
It looks OK to me, but I just wonder, if maybe we should never wait for the interrupt. |
lgirdwood
approved these changes
Aug 8, 2018
Member
|
@tlauda agree, we can update this to remove the irq wait. |
Member
Author
|
Sorry guys, are you asking for an update but the code was merged already ? Not sure I get the point here. |
Member
|
@plbossart I think the intention is to update incrementally if happy with suggested change. |
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.
When the DMA is stuck, e.g. in slave mode when the external clock is
not active, the Linux kernel will trigger a stop after a
timeout. Since the DMA will never complete, the current code returns
an IPC error on stop (DMA completion fails) and will not reset DMA
channel status and reference counts.
Force the DMA and DAI to be stopped to solve the problem. We probably
need to look at all error handling since it's likely to be a recurring
issue.
Also simplify the Xrun code, no need for an extra return.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com