Skip to content

Commit 0ead9e7

Browse files
authored
Merge pull request #275 from mmaka1/glk-2nd-pl
dma: hda: 2nd playback with existing topology fixed
2 parents 678cf3f + c7ee208 commit 0ead9e7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/audio/dai.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,8 @@ static int dai_reset(struct comp_dev *dev)
495495

496496
trace_dai("res");
497497

498+
dma_channel_put(dd->dma, dd->chan);
499+
498500
list_for_item_safe(elist, tlist, &config->elem_list) {
499501
elem = container_of(elist, struct dma_sg_elem, list);
500502
list_item_del(&elem->list);

src/audio/host.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,14 +674,16 @@ static int host_reset(struct comp_dev *dev)
674674
struct dma_sg_elem, list);
675675
/*
676676
* here free dma_sg_elem those allocated in create_local_elems(),
677-
* we should keep header and the first local elem after reset
677+
* we should keep header and the first local elem after reset (but only
678+
* for dw-dma since hda-dma allocates the full list again)
678679
*/
679680
list_for_item_safe(elist, tlist, &e->list) {
680681
e = container_of(elist, struct dma_sg_elem, list);
681-
682+
#if !defined CONFIG_DMA_GW
682683
/* should not free the header, finished */
683684
if (elist == &hd->config.elem_list)
684685
break;
686+
#endif
685687
list_item_del(&e->list);
686688
rfree(e);
687689
}

0 commit comments

Comments
 (0)