Skip to content

Commit 49f3dc6

Browse files
lrgirdwoclaude
andcommitted
audio/topology: add multi-KPB WOV arbiter for 3-keyword DMIC capture
Adds a new WOV arbiter component and multi-KPB topology to support three simultaneous wake-word detectors sharing a single DMIC, with exclusive host PCM drain arbitration when any keyword fires. New component: src/audio/wov_arbiter/ - 3 input pins (one per KPB host-sink), 1 output pin (to host copier) - AMS subscriber for AMS_WOV_DETECT_MSG_UUID: activates the triggering slot and broadcasts WOV_CTRL PAUSE to sibling detectors - On trigger(STOP): deactivates and broadcasts WOV_CTRL RESUME so all detectors return to listening - Idle inputs are silently drained to prevent buffer stalls - UUID 4a5b6c7d-8e9f-4a1b-2c3d-4e5f60718293 registered in uuid-registry AMS additions (ams_msg.h): - AMS_WOV_DETECT_MSG_UUID: detector -> arbiter on keyword detect - AMS_WOV_CTRL_MSG_UUID: arbiter -> detectors for pause/resume control detect_test extensions: - IPC4_DETECT_TEST_SET_WOV_SLOT large-config param assigns a slot id (0-2) - On detection: also sends AMS_WOV_DETECT_MSG_UUID with slot_id to arbiter - AMS consumer for WOV_CTRL: sets paused flag; copy() drains buffer without running the detector when paused - The existing energy-threshold detector fires on a hand clap, making detect_test a ready-to-use lab test stub for this topology Topology: tools/topology/topology2/platform/intel/dmic-wov-multi.conf - Pipeline 100 (Core 0): DMIC Copier -> Mixin (fan-out to 3 Mixouts) - Pipelines 101-102 (Core 0): Mixout -> KPB -> detect_test (slots 0-1) - Pipeline 103 (Core 1): Mixout -> KPB -> detect_test (slot 2) - Pipeline 104 (Core 0): WOV Arbiter -> Host Copier (single PCM stream) - KPB output_pin_binding: pin 0 -> detector (sel_sink), pin 1 -> arbiter (host_sink) Requires: CONFIG_COMP_WOV_ARBITER, CONFIG_COMP_KPB, CONFIG_COMP_MIXIN_MIXOUT, CONFIG_AMS, CONFIG_COMP_KWD_DETECT Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8c0c11b commit 49f3dc6

11 files changed

Lines changed: 1294 additions & 3 deletions

File tree

src/audio/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
4141
if(CONFIG_COMP_DRC)
4242
add_subdirectory(drc)
4343
endif()
44+
if(CONFIG_COMP_FFMPEG_DEC)
45+
add_subdirectory(ffmpeg_dec)
46+
endif()
4447
if(CONFIG_COMP_FIR)
4548
add_subdirectory(eq_fir)
4649
endif()
@@ -107,6 +110,9 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
107110
if(CONFIG_COMP_VOLUME)
108111
add_subdirectory(volume)
109112
endif()
113+
if(CONFIG_COMP_WOV_ARBITER)
114+
add_subdirectory(wov_arbiter)
115+
endif()
110116
if(CONFIG_DTS_CODEC)
111117
add_subdirectory(codec)
112118
endif()

src/audio/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ config COMP_STUBS
102102
Select to force all 3P blocks to link against stubs rather than their libraries. This
103103
should only be used in testing environments like fuzzers or CI.
104104

105+
config COMP_WOV_ARBITER
106+
bool "WOV arbiter component"
107+
depends on COMP_KPB
108+
help
109+
Select to build the WOV (Wake-on-Voice) arbiter. The arbiter sits
110+
between multiple KPB host-drain outputs and a single host PCM copier.
111+
When a keyword is detected by one of the WOV detectors the arbiter
112+
routes that KPB's drain stream to the host and instructs the remaining
113+
detectors to pause. Requires CONFIG_AMS when used with IPC4.
114+
105115
config COMP_KPB
106116
bool "KPB component"
107117
default y
@@ -139,6 +149,7 @@ rsource "dcblock/Kconfig"
139149
rsource "drc/Kconfig"
140150
rsource "eq_fir/Kconfig"
141151
rsource "eq_iir/Kconfig"
152+
rsource "ffmpeg_dec/Kconfig"
142153
rsource "google/Kconfig"
143154
rsource "igo_nr/Kconfig"
144155
rsource "mfcc/Kconfig"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
3+
add_local_sources(sof wov_arbiter.c)

0 commit comments

Comments
 (0)