API Documentation#
The Sound Open Firmware (SOF) C application programming interface (API) documentation is generated directly from the firmware source code comments and header files using Doxygen. This ensures that the documentation is always synchronized with the actual implementation across all supported audio components, pipeline infrastructure, hardware abstraction layers, and IPC protocols.
Sound Open Firmware Doxygen API Documentation
Browse the complete, interactive C API reference generated directly from the SOF firmware codebase, including data structures, function declarations, macros, enumerations, file hierarchies, and dependency call graphs.
Open Doxygen API Reference →Overview of Documented Modules#
The Doxygen documentation covers the entire public firmware and host-shared interface:
Audio Processing Components & Modules: Unified processing module interface (
module/interface.h), lifecycle callbacks, streaming endpoints (sink_api.h,source_api.h), dynamic LLEXT symbols, and built-in audio components (Volume, Mixer, EQ FIR/IIR, DRC, SRC, ASRC, Crossover, Smart Amp, Sound Dose).Audio Pipelines & Buffers: Audio pipeline DAG graphs (
pipeline.h), component driver lifecycle and ops (component.h,component_ext.h), interconnect and lockless ring buffers (buffer.h,audio_buffer.h,ring_buffer.h,audio_stream.h), and channel mapping routines (channel_map.h).Hardware Drivers & Interfaces: Direct Memory Access (
dma.h), Digital Audio Interfaces for I2S/SSP, SoundWire/ALH, DMIC/PDM, and HDA (dai.h), Power Management runtime (pm_runtime.h), and platform hardware timers and interrupt controllers (platform.h).Core RTOS & System Services: Spinlocks, mutexes, condition variables, clocks, and component/pipeline UUID declarations (
uuid.h).Scheduling Infrastructure: Real-time task schedulers (Low-Latency Timer and DMA in
ll_schedule.handll_schedule_domain.h, Data Processing preemptible threads indp_schedule.h, Thread With Budget intwb_schedule.h, and task state machines inschedule.handrtos/task.h).Memory Management Infrastructure: Multi-tier system heaps and flags (
rtos/alloc.h), Virtual Memory Heap (regions_mm.h), virtual regions (vregion.h), cold DRAM staging (fast-get.h), and virtual page mapping (vpage.h).IPC & Host Interfaces: User/Kernel IPC ABI protocols and messaging envelopes (
ipc/header.h,ipc/control.h), and SRAM Window 0 firmware status registers and telemetry offsets (kernel/mailbox.h).Telemetry, Logging & Probes: High-throughput host DMA trace streaming (
dma-trace.h), dictionary-based logger (trace-soflogger.h), audio extraction/injection tap points (probe/probe.h,probe_dma_frame.h), performance monitoring and cycle utilization (telemetry.h,performance_monitor.h), and Memory Window 2 debug streams (debug_stream.h).Source Code Graphs & File Browsing: Full source file tree, header include dependency graphs, and function call/caller graphs.
Subsystem C API References#
Building API Documentation Locally#
To build or refresh the Doxygen documentation alongside the Sphinx documentation:
# From the sof-docs repository root
make apidocs # Generates Doxygen XML and HTML
make html # Generates Sphinx site and stages Doxygen at _build/html/doxygen/
Alternatively, Doxygen can be built directly inside the SOF firmware repository:
# From the sof firmware repository root
cmake -GNinja -S doc -B build_doxygen
ninja -C build_doxygen doc