dai: fix error handling when DMA is stuck

When the DMA is stuck, e.g. in slave mode when the external clock is
not active, the Linux kernel will trigger a stop after a
timeout. Since the DMA will never complete, the current code returns
an IPC error on stop (DMA completion fails) and will not reset DMA
channel status and reference counts.

Force the DMA and DAI to be stopped to solve the problem. We probably
need to look at all error handling since it's likely to be a recurring
issue.

Also simplify the Xrun code, no need for an extra return.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
1 file changed