File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 );
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments