Skip to content

Commit c867c73

Browse files
committed
ASoC: SOF: ipc3-dtrace: 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 ec86d80 commit c867c73

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sound/soc/sof/ipc3-dtrace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,14 +447,14 @@ static int ipc3_dtrace_enable(struct snd_sof_dev *sdev)
447447
}
448448

449449
start:
450+
sdev->dtrace_state = SOF_DTRACE_ENABLED;
451+
450452
ret = snd_sof_dma_trace_trigger(sdev, SNDRV_PCM_TRIGGER_START);
451453
if (ret < 0) {
452454
dev_err(sdev->dev, "Host dtrace trigger start failed: %d\n", ret);
453455
goto trace_release;
454456
}
455457

456-
sdev->dtrace_state = SOF_DTRACE_ENABLED;
457-
458458
return 0;
459459

460460
trace_release:

0 commit comments

Comments
 (0)