-
Notifications
You must be signed in to change notification settings - Fork 349
dma: disable hda when pipeline is reset #7439
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 |
|---|---|---|
|
|
@@ -557,13 +557,10 @@ int host_zephyr_trigger(struct host_data *hd, struct comp_dev *dev, int cmd) | |
| break; | ||
| case COMP_TRIGGER_STOP: | ||
| case COMP_TRIGGER_XRUN: | ||
| if (dev->state == COMP_STATE_ACTIVE) { | ||
| ret = dma_stop(hd->chan->dma->z_dev, hd->chan->index); | ||
| if (ret < 0) | ||
| comp_err(dev, "host_trigger(): dma stop failed: %d", | ||
| ret); | ||
| } | ||
|
|
||
| ret = dma_stop(hd->chan->dma->z_dev, hd->chan->index); | ||
| if (ret < 0) | ||
| comp_err(dev, "host_trigger(): dma stop failed: %d", | ||
| ret); | ||
| break; | ||
| default: | ||
| break; | ||
|
|
@@ -1015,8 +1012,7 @@ static int host_position(struct comp_dev *dev, | |
| void host_zephyr_reset(struct host_data *hd, uint16_t state) | ||
| { | ||
| if (hd->chan) { | ||
| if (state == COMP_STATE_ACTIVE) | ||
| dma_stop(hd->chan->dma->z_dev, hd->chan->index); | ||
| dma_stop(hd->chan->dma->z_dev, hd->chan->index); | ||
paulstelian97 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| dma_release_channel(hd->dma->z_dev, hd->chan->index); | ||
| hd->chan = NULL; | ||
| } | ||
|
|
||
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.
The description is a bit misleading as it assume this code is always used with HD-DMA, while this code is in fact generic and could be used with a wide variety of DMA hardware and drivers.
But this does explain why this is important step to do (and explains what e.g. happens on HD-DMA hardware when not done), so not a blocker.