host: reset dma channel to invalid by default

This will be helpful for error reporting at host dma channel management.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This commit is contained in:
Keyon Jie 2019-01-02 17:33:37 +08:00 committed by Liam Girdwood
parent 4cc0556ce3
commit 9f403d683e
1 changed files with 5 additions and 0 deletions

View File

@ -389,6 +389,8 @@ static struct comp_dev *host_new(struct sof_ipc_comp *comp)
goto error;
#endif
hd->chan = DMA_CHAN_INVALID;
/* init posn data. TODO: other fields */
hd->posn.comp_id = comp->id;
hd->pointer_init = 0;
@ -644,6 +646,9 @@ static int host_reset(struct comp_dev *dev)
dma_sg_free(&hd->config.elem_array);
#endif
/* reset dma channel as we have put it */
hd->chan = DMA_CHAN_INVALID;
host_pointer_reset(dev);
hd->pointer_init = 0;
#if !defined CONFIG_DMA_GW