From 3362f9b3395b9d9aa09aab0c5730109ef786f0d2 Mon Sep 17 00:00:00 2001 From: Libin Yang Date: Tue, 27 Nov 2018 09:58:06 +0800 Subject: [PATCH] host: release dw-dma channel when pcm free On byt-like platform, sof should release dw-dma channel which is got in set_params(). And in host_free(), it should not release any channel as host doesn't get any channel in host_new() Signed-off-by: Libin Yang --- src/audio/host.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/audio/host.c b/src/audio/host.c index 97e2512e6a0e..e4184ca7b3f3 100644 --- a/src/audio/host.c +++ b/src/audio/host.c @@ -398,9 +398,6 @@ static void host_free(struct comp_dev *dev) trace_host("fre"); -#if !defined CONFIG_DMA_GW - dma_channel_put(hd->dma, hd->chan); -#endif dma_put(hd->dma); dma_sg_free(&hd->config.elem_array); @@ -618,6 +615,7 @@ static int host_reset(struct comp_dev *dev) trace_host("res"); #if !defined CONFIG_DMA_GW + dma_channel_put(hd->dma, hd->chan); /* free all host DMA elements */ dma_sg_free(&hd->host.elem_array);