Skip to content

docs: developer_guides: add how-to guide on customizing multi-slot wov and ecns pipelines - #531

Merged
lgirdwood merged 1 commit into
thesofproject:masterfrom
lgirdwood:topic/howto-wov-ecns-guide
Sep 20, 2026
Merged

lgirdwood merged 1 commit into
thesofproject:masterfrom
lgirdwood:topic/howto-wov-ecns-guide

Conversation

@lgirdwood

Copy link
Copy Markdown
Member

Description

Adds a comprehensive developer guide under Developer Guides Section 1 (Firmware Development) detailing the architecture, component interfaces, SOF Notifier event coordination, scheduling domains, and topology customization for multi-slot Wake-on-Voice (WOV) and Echo Cancellation & Noise Suppression (ECNS) pipelines based on the wcl-uaol-wov branch:

  1. Subsystem Architecture & Signal Flow:
    • 4-channel native 16 kHz DMIC capture with concurrent ECNS communication stream (ALSA PCM 10 / hw:0,10) and WOV keyword audio stream (ALSA PCM 11 / hw:0,11).
    • Detailed mapping of all 8 pipelines (DAI, ECNS, KPB, Slots 0..2, Arbiter, Host Copiers).
  2. SOF Notifier Inter-Module Event Bus:
    • Zero-IPC, lockless synchronous dispatch using NOTIFIER_ID_WOV_DETECT, NOTIFIER_ID_KPB_CLIENT_EVT, and NOTIFIER_ID_WOV_CTRL.
    • Complete C implementation patterns for detector registration and drain triggering.
  3. Step-by-Step Customization Runbooks:
    • Replacing ECNS: Multi-pin contract (Pin 0 mono to KPB, Pin 1 stereo to Host Copier 10), component implementation template, and Topology 2.0 buffer sizing.
    • Replacing Keyword Detectors: Arbiter pause/resume handling, drain invocation, and Topology 2.0 configuration.
  4. Scheduling, Periods & Core Affinity in Topology 2.0:
    • Low-Latency (LL, 1ms, lp_mode 0) vs Data Processing (DP, 10ms/20ms, lp_mode 1) domains.
    • Buffer calculation formula: Buffer Size = Rate * (Period / 1000) * Channels * Bytes.
    • Buffer lookup matrix for 16 kHz S16_LE.
    • Cross-core affinity offloading (e.g. assigning Slot 2 to core_id 1).
  5. Building, Deploying & Verifying:
    • Topology compilation with alsatplg using the NHLT preprocessor plugin.
    • NHLT ACPI BIOS override configuration (sof_use_tplg_nhlt=1).
    • Dual-stream verification commands with arecord and wov_capture_app.
    • Comprehensive developer "Watch Out" checklist.
  6. Architecture Diagrams:
    • developer_guides/firmware/images/wov_ecns_pipeline_architecture.svg
    • developer_guides/firmware/images/wov_scheduling_periods.svg

Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com

…v and ecns pipelines

Add a comprehensive developer guide under Developer Guides Section 1
(Firmware Development) detailing the architecture and step-by-step
customization of complex multi-slot Wake-on-Voice (WOV) and Echo
Cancellation & Noise Suppression (ECNS) pipelines based on the
wcl-uaol-wov branch:

- Document the 4-channel native 16 kHz DMIC dual-stream architecture
  (ECNS communication stream on PCM 10 and multi-slot WOV keyword/audio
  capture stream on PCM 11).
- Detail the lockless, zero-IPC SOF Notifier event bus contracts
  (NOTIFIER_ID_KPB_CLIENT_EVT, NOTIFIER_ID_WOV_DETECT, and
  NOTIFIER_ID_WOV_CTRL) for inter-module arbitration.
- Provide step-by-step implementation templates for replacing the ECNS
  module (multi-pin audio contract: mono clean speech to KPB, stereo
  clean speech to Host Copier 10) and replacing keyword spotters.
- Explain ALSA Topology 2.0 scheduling domains: Low-Latency (LL, 1ms,
  lp_mode 0) vs. Data Processing (DP, 10ms/20ms, lp_mode 1), mathematical
  buffer sizing rules (IBS/OBS), and multi-core affinity (core_id).
- Provide topology compilation, NHLT ACPI BIOS override instructions
  (sof_use_tplg_nhlt=1), hardware capture verification, and a developer
  watch-out checklist.
- Include two detailed SVG diagrams illustrating the 8-pipeline
  signal flow architecture and the multi-period scheduling timeline.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
@lgirdwood
lgirdwood merged commit 80691eb into thesofproject:master Sep 20, 2026
5 checks passed
@lgirdwood
lgirdwood deleted the topic/howto-wov-ecns-guide branch September 20, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants