]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: ipc3-dtrace: Introduce SOF_DTRACE_INITIALIZING state
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Fri, 10 Jun 2022 08:01:17 +0000 (11:01 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 10 Jun 2022 12:31:45 +0000 (13:31 +0100)
commit2875dcd700eca9ef84a7d200b4effe342ec880c2
tree3e5c5d68b624cb559d17fd64c18ad1d9172bc04b
parent80d9b783d5695ae9add41c4fdade538d617d3931
ASoC: SOF: ipc3-dtrace: Introduce SOF_DTRACE_INITIALIZING state

With the new state we can make sure we are not missing the first
host_offset update.

In case the dtrace is small, the DMA copy will be fast and depending on
the moonphase it might be done before we set the sdev->dtrace_state  to
SOF_DTRACE_ENABLED.

The DMA will start the copy as soon as the host starts the DMA. Set the
dtrace to enabled before we let the DMA to run in order to avoid missing
the position update.

The new state is needed to cover architectures where the host side
snd_sof_dma_trace_trigger() is a NOP and the dtrace in the firmware is
ready as soon as the IPC message has been processed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220610080119.30880-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc3-dtrace.c