Skip to content

[FEATURE] Ability to start DMA-trace while DSP is running #3275

@kv2019i

Description

@kv2019i

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

FYI @marc-hb @ujfalusi @plbossart @lgirdwood

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestsuspend resumeIssues related to suspend resume (e.g. rtcwake)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions