Skip to content

Commit b3af96e

Browse files
committed
ASoC: SOF: trace: 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. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent c26e1b0 commit b3af96e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sound/soc/sof/trace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,15 +437,15 @@ static int snd_sof_enable_trace(struct snd_sof_dev *sdev)
437437
}
438438

439439
start:
440+
sdev->dtrace_state = SOF_DTRACE_ENABLED;
441+
440442
ret = snd_sof_dma_trace_trigger(sdev, SNDRV_PCM_TRIGGER_START);
441443
if (ret < 0) {
442444
dev_err(sdev->dev,
443445
"error: snd_sof_dma_trace_trigger: start: %d\n", ret);
444446
goto trace_release;
445447
}
446448

447-
sdev->dtrace_state = SOF_DTRACE_ENABLED;
448-
449449
return 0;
450450

451451
trace_release:

0 commit comments

Comments
 (0)