Skip to content

Commit

Permalink
Merge pull request #275 from mmaka1/glk-2nd-pl
Browse files Browse the repository at this point in the history
dma: hda: 2nd playback with existing topology fixed
  • Loading branch information
lgirdwood authored Aug 29, 2018
2 parents 678cf3f + c7ee208 commit 0ead9e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit 0ead9e7

Please sign in to comment.