Developer Guides#

Sound Open Firmware (SOF) provides comprehensive architectural specifications, developer runbooks, and implementation guides covering the entire audio stack: from low-level DSP firmware and Zephyr RTOS integration to mainline Linux kernel drivers, embedded microcontroller audio bridges, and automated verification suites.

The developer documentation is organized into six core technical pillars:

  1. 1. Firmware Development (FW)

  2. 2. Audio Algorithm Tuning, Calibration & Runtime Control (Tuning)

  3. 3. Kernel & Host Driver Development (Kernel)

  4. 4. Hardware & Platform Bringup (HW)

  5. 5. Testing, Simulation & Toolchains (SDK & Test)

  6. 6. DSP Telemetry, Logging & Diagnostics (Debug)

—

1. Firmware Development (FW)#

Guides and specifications for developing, compiling, and debugging DSP firmware components, Zephyr RTOS integration, audio processing algorithms, dynamic modules, and firmware image signing.

Upstream Firmware Feature Specifications#

The SOF firmware repository maintains detailed, up-to-date specifications for each audio processing module, pipeline feature, and subsystem directly alongside the source code in thesofproject/sof:

Core Infrastructure & Pipeline#

Audio Processing Modules & Algorithms#

Firmware Packaging, Dynamic Modules & Subsystems#

Firmware image packaging, cryptographic signing, loadable modules, and standalone hostless embedded firmware:

  • Rimage Firmware Packaging & Signing Architecture (Firmware binary packaging, Intel cAVS and ACE partition manifests, cryptographic signing with MeCSS / CSE, hardware authorization keys, and multi-module extended manifest structures)

  • LLEXT Dynamic Loadable Modules Architecture (Zephyr Loadable Linkable Extensions (LLEXT) dynamic loading framework, ELF relocation mechanics, manifest export, and runtime on-demand module binding over IPC4)

  • Hostless Embedded Firmware Architecture (Embedded standalone firmware architecture for microcontrollers without a host processor, autonomous pipeline creation, clock provider/consumer bridges, and interactive Zephyr shell diagnostics)

How-To Developer Guides & Module Integration#

Step-by-step developer runbooks for authoring new audio components, porting third-party audio algorithms, configuring builds, declaring topology widgets, and verifying execution:

  • How-To Guide: Creating and Integrating Audio Processing Modules (End-to-end walkthrough on authoring a new DSP audio processing module or integrating third-party algorithms: header structures, CMakeLists.txt, Kconfig, UUID registration, cold-code memory placement, SIMD vector data alignment, ALSA Topology 2.0 configuration, multi-toolchain compilation, device deployment, and simulation with Host Testbench and Cadence xt-run)

  • How-To Guide: Customizing Multi-Slot WOV & ECNS Pipelines (Architectural walkthrough on customizing complex multi-pipeline Wake-on-Voice (WOV) and Echo Cancellation & Noise Suppression (ECNS) topologies from the wcl-uaol-wov branch: replacing keyword detectors and acoustic echo cancellers, managing SOF Notifier inter-module arbitration, tuning Data Processing (DP) scheduling periods, cross-core affinity, and ALSA Topology 2.0 graph routing)

—

2. Audio Algorithm Tuning, Calibration & Runtime Control (Tuning)#

Comprehensive workflows, filter coefficient synthesis, offline tuning tools (GNU Octave, MATLAB, Python), ALSA byte control packaging, Topology 2 and UCM2 integration, and live parameter injection via sof-ctl, amixer, and the Linux kernel ALSA subsystem:

Core Runtime Tuning & Control Infrastructure#

Dynamics & Transducer Protection Tuning#

Acoustic, Transducer & Array Tuning#

Machine Learning & Speech Feature Extraction#

—

3. Kernel & Host Driver Development (Kernel)#

Guides for Linux ASoC kernel driver developers, machine drivers, DMI quirk authoring, topology configurations, and host testing utilities:

  • SOF Linux Driver (Linux kernel ASoC driver architecture, multi-vendor DSP core abstraction, IPC3/IPC4 protocol layers, ACPI/PCI platform probing, DMI machine quirks, runtime PM, and stream DMA management)

  • ALSA Topology 2.0 Architecture & Developer Guide (ALSA Topology 2.0 architecture, split functional model, pre-processor token parsing, widget and pipeline definition syntax, hardware DAI graph routing, and dynamic UCM2 integration)

  • Legacy Topology 1.0 (M4-Based) (Legacy ALSA Topology 1.0 architecture, M4 macro expansion templates, pipeline graph generation, and backward-compatibility guidelines)

  • ALSA Use Case Manager v2 (UCM2) Architecture & Runbook (ALSA Use Case Manager v2 (UCM2) architecture, card directory layouts, syntax versions 2–7, device definitions, jack detection, sequence verbs, volume mixer remapping, PipeWire/WirePlumber integration, and step-by-step authoring and debugging workflows)

  • Automated Kernel Testing and Bisection with ktest (Automated Linux kernel testing and bisection framework with ktest, rapid git bisect workflows, automated kernel build/deploy, and headless serial console validation)

—

4. Hardware & Platform Bringup (HW)#

Hardware integration, platform memory layouts, boot architectures, and bringup checklists across silicon vendors and embedded development boards:

  • SOF User Guide on NXP i.MX8 platforms (NXP i.MX8 platform integration, ARM Cortex-M and Tensilica DSP memory mappings, EDMA channel routing, SAI audio serial interfaces, and Linux BSP bringup)

  • Hostless Embedded Firmware Architecture (Embedded microcontroller platforms including Teensy 4.1, ESP32-P4, and ESP32-C6, GPIO pinout definitions, 1.8V to 3.3V level shifting, and autonomous audio bridging)

  • Hardware Audio Loopback Verification (Hardware loopback test harnesses, I2S and PDM clock provider/consumer synchronization, and rate/format verification matrices)

—

5. Testing, Simulation & Toolchains (SDK & Test)#

Unit testing with Zephyr Ztest and Twister runner, host audio pipeline simulation, automated hardware loopback verification, Zephyr CMake build flags, cycle-accurate simulation, and protocol fuzzing:

—

6. DSP Telemetry, Logging & Diagnostics (Debug)#

Comprehensive observability and diagnostic frameworks for hard real-time DSP firmware: real-time trace DMA streaming, compile-time string dictionary extraction (smex), offline and live log decoding (sof-logger), zero-IPC interactive Zephyr memory shells, post-mortem coredump crash analysis, live audio buffer probing, performance cycle budgeting, and firmware binary manifest validation.

Observability Portal & Framework Architecture#

Real-Time Tracing & Network Telemetry#

  • DSP Telemetry, Logging & Traces (Compile-time string dictionary extraction with smex and .ldc catalogs, lockless internal SRAM circular trace DMA buffers, Linux kernel debugfs interface, boot-time logging via snd-sof-probes, and live console decoding via sof-logger)

  • Audio Data Probes & Network Telemetry (Dynamic ALSA widget buffer injection and extraction tap points across processing DAGs, ALSA Compress Offload capture via crecord, stream demultiplexing with sof-probes -p, and high-throughput TCP network probe daemon on port 9999 streaming to dut-monitor)

Crash Diagnostics, Shell & Runtime Inspection#

  • DSP Crash Diagnostics & Zephyr Coredump (Native Zephyr RTOS coredump subsystem, Intel ADSP memory window backend, fatal CPU exception vector capture, register preservation, and interactive post-mortem GDB backtrace analysis with coredump_gdbserver.py)

  • Zephyr Interactive Shell (Zero-IPC interactive Zephyr shell over shared DSP SRAM memory windows, host cavstool.py pseudo-terminal bridge, real-time thread state and stack high-water mark inspection, and low-power D0ix/D3 suspend/resume resilience)

Performance Profiling, Binary Manifests & Identifiers#

  • Performance Counters & MCPS Profiling (Hardware cycle counters via Tensilica CCOUNT registers, 64-bit platform timers, mathematical Million Cycles Per Second (MCPS) budget formulation, and component benchmarking)

  • Firmware Binary Manifest & Security Inspection (sof-ri-info) (Signed firmware binary manifest formats across cAVS and ACE architectures, partition directories, CSE manifests, Intel digital signature certificates, and manifest inspection tooling)

  • UUID Subsystem & Component Identification (Universal Unique Identifier subsystem, global registry in uuid-registry.txt, little-endian word swap wire format translation, ALSA Topology 2.0 token declarations, and IPC4 on-demand dynamic module loading)