ASoC: SOF: Intel: hda: reset link DMA state in prepare
authorKai Vehmanen <kai.vehmanen@linux.intel.com>
Mon, 22 Jul 2019 14:13:58 +0000 (09:13 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 23 Jul 2019 11:22:02 +0000 (12:22 +0100)
commita3ebccb52efdfb3459fa51516238cc464ee310c9
tree01bcd3867f5322630b977b66b0b428292c7bc28a
parent672ff5e3596ee27b64edcc73251f4ae1c8ab12ac
ASoC: SOF: Intel: hda: reset link DMA state in prepare

When application goes through SUSPEND/STOP->PREPARE->START
cycle, we should always reprogram the DAI link DMA to ensure
it is in sync with the host PCM DMA.

Use same state tracking logic to handle both restart and
system resume flows. Use link_prepared field of
'struct hdac_ext_stream' to store the state, instead of
adding redundant fields to SOF specific structs.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190722141402.7194-18-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-dai.c
sound/soc/sof/intel/hda-dsp.c
sound/soc/sof/intel/hda.h