Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/audio/dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,8 @@ static int dai_reset(struct comp_dev *dev)

trace_dai("res");

dma_channel_put(dd->dma, dd->chan);

list_for_item_safe(elist, tlist, &config->elem_list) {
elem = container_of(elist, struct dma_sg_elem, list);
list_item_del(&elem->list);
Expand Down
6 changes: 4 additions & 2 deletions src/audio/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,14 +674,16 @@ static int host_reset(struct comp_dev *dev)
struct dma_sg_elem, list);
/*
* here free dma_sg_elem those allocated in create_local_elems(),
* we should keep header and the first local elem after reset
* we should keep header and the first local elem after reset (but only
* for dw-dma since hda-dma allocates the full list again)
*/
list_for_item_safe(elist, tlist, &e->list) {
e = container_of(elist, struct dma_sg_elem, list);

#if !defined CONFIG_DMA_GW
/* should not free the header, finished */
if (elist == &hd->config.elem_list)
break;
#endif
list_item_del(&e->list);
rfree(e);
}
Expand Down