mirror of https://github.com/thesofproject/sof.git
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:
parent
4cc0556ce3
commit
9f403d683e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue