-
Notifications
You must be signed in to change notification settings - Fork 322
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
west.yml: update Zephyr (subset of PR8804 , no SMP changes) #8805
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 |
---|---|---|
|
@@ -121,9 +121,28 @@ static int chain_host_stop(struct comp_dev *dev) | |
int err; | ||
|
||
err = dma_stop(cd->chan_host->dma->z_dev, cd->chan_host->index); | ||
if (err < 0) | ||
if (err < 0) { | ||
if (err == -EBUSY) { | ||
int retries = 100; | ||
|
||
comp_warn(dev, "dma_stop() fail chan_index = %u, retrying...", | ||
cd->chan_link->index); | ||
|
||
/* | ||
* FIXME: ugly workaround for | ||
* https://github.com/thesofproject/sof/issues/8686 | ||
*/ | ||
while (err == -EBUSY && --retries) { | ||
k_busy_wait(10); | ||
err = dma_stop(cd->chan_link->dma->z_dev, cd->chan_link->index); | ||
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. Actually, @ujfalusi noted this is likely not doing actual stop from second iterations onwards, so this is a no-op operation (with the HD-DMA driver). Let me revise the workaround to be more explicit... 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. I guess this would be identical and more explicit: diff --git a/src/audio/chain_dma.c b/src/audio/chain_dma.c
index 696973146404..cea2a2e5c8f3 100644
--- a/src/audio/chain_dma.c
+++ b/src/audio/chain_dma.c
@@ -121,7 +121,7 @@ static int chain_host_stop(struct comp_dev *dev)
int err;
err = dma_stop(cd->chan_host->dma->z_dev, cd->chan_host->index);
- if (err < 0)
+ if (err < 0 && err != -EBUSY)
return err;
comp_info(dev, "chain_host_stop(): dma_stop() host chan_index = %u", With added comment |
||
if (!err) | ||
goto out; | ||
} | ||
} | ||
return err; | ||
} | ||
|
||
out: | ||
comp_info(dev, "chain_host_stop(): dma_stop() host chan_index = %u", | ||
cd->chan_host->index); | ||
|
||
|
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.
you probably want to fix the misplaced brace at line 143, and while at it (optionally) you could also consider doing