-
Notifications
You must be signed in to change notification settings - Fork 140
Description
As documented in thesofproject/sof-docs#381 and discussed at length in thesofproject/sof-test#802 (comment) , current DMA trace is not designed to support the scenario where DMA tracing is started by user-space (sof-logger) while the DSP is in fact running. The current kernel driver allows to do this, but logs are provided in best-effort manner.
For development purposes, getting some traces is better than not getting any traces. When used for validation, lack of determinism is a problem. A specific problem for validation is how to capture early traces reliable. The sof-logger cannot be started when SOF driver is not loaded. But when SOF driver is loaded, then the DSP might be already be powered on. This leaves a race that cannot be easily handled in user-space.
Improve the kernel tracing interface to guarantee:
- sof-logger can be restarted independently of DSP state
- upon start, the initial traces are always read in the order DSP sent them
- driver needs to hide runtime-suspend transitions of DSP
- if the ringbuffer has wrapped while sof-logger was not running, the returned traces must still be in order