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 <libin.yang@intel.com>
This commit is contained in:
Libin Yang 2018-11-27 09:58:06 +08:00
parent 443233c9a0
commit 3362f9b339
1 changed files with 1 additions and 3 deletions

View File

@ -398,9 +398,6 @@ static void host_free(struct comp_dev *dev)
trace_host("fre"); trace_host("fre");
#if !defined CONFIG_DMA_GW
dma_channel_put(hd->dma, hd->chan);
#endif
dma_put(hd->dma); dma_put(hd->dma);
dma_sg_free(&hd->config.elem_array); dma_sg_free(&hd->config.elem_array);
@ -618,6 +615,7 @@ static int host_reset(struct comp_dev *dev)
trace_host("res"); trace_host("res");
#if !defined CONFIG_DMA_GW #if !defined CONFIG_DMA_GW
dma_channel_put(hd->dma, hd->chan);
/* free all host DMA elements */ /* free all host DMA elements */
dma_sg_free(&hd->host.elem_array); dma_sg_free(&hd->host.elem_array);