lib: dma: make dma stop op optional

In preparation for adding a reset op that could be used in place of the
stop op for DAI's that support the two-step stop option.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
Ranjani Sridharan 2021-10-06 10:41:06 -07:00 committed by Liam Girdwood
parent 6b420fd538
commit aa2cf1fc94
1 changed files with 4 additions and 1 deletions

View File

@ -311,7 +311,10 @@ static inline int dma_start(struct dma_chan_data *channel)
static inline int dma_stop(struct dma_chan_data *channel)
{
return channel->dma->ops->stop(channel);
if (channel->dma->ops->stop)
return channel->dma->ops->stop(channel);
return 0;
}
/** \defgroup sof_dma_copy_func static int dma_copy (struct dma_chan_data * channel, int bytes, uint32_t flags)