Repository navigation
Conversation
Member
Author
lgirdwood
force-pushed
the
topic/webrtc-tests
branch
from
November 17, 2026 21:32
d5b6626 to
7a71ef5
Compare
Add infrastructure for automated WebRTC module verification:
- tools/topo_webrtc_kcontrols.py: inspect .tplg binaries via tplgtool2.py
for webrtc-{hpf,vad,ns,ns2,agc,aec} widgets and mixer Switch kcontrols.
- tools/sof-webrtc-tool.py: generate deterministic chirp-synced stimuli
and run cross-correlation aligned DSP checks (HPF rumble rejection,
NS/NS2 noise attenuation, AGC compression & peak limiting, VAD pass-
through contrast, and AEC single-talk ERLE + double-talk preservation)
with numpy fast paths and stdlib-only DUT fallback.
- case-lib/webrtc.sh: topology control resolution, safe trap switch
restore, and unified SSP loopback / local USB card / SSH host PC
stimulus injection helpers.
Signed-off-by: Liam Girdwood <[email protected]>
Add test cases for upstreamed WebRTC processing modules supporting SSP loopback (-m ssp), local USB audio (-m usb), and external host PC injection (-m host), plus HDA/SDW analog loopback (-m loopback): - verify-webrtc-controls.sh: discover and toggle WebRTC Switch kcontrols under active streaming. - check-webrtc-hpf.sh: 40 Hz rumble attenuation vs 1 kHz passband A/B. - check-webrtc-ns.sh: stationary noise suppression and speech-band SNR for webrtc-ns (16 kHz) and webrtc-ns2 (48 kHz RNNoise). - check-webrtc-agc.sh: quiet boost + loud peak limiting (AGC ON vs OFF). - check-webrtc-vad.sh: VAD pass-through contrast across supported PCM formats and NOTIFIER_ID_VAD stability. - check-webrtc-aec.sh: single-source / dynamic mid-stream reference lifecycle plus single-talk ERLE and double-talk preservation. Signed-off-by: Liam Girdwood <[email protected]>
lgirdwood
force-pushed
the
topic/webrtc-tests
branch
from
November 17, 2026 21:34
7a71ef5 to
03e1f4d
Compare
lgirdwood
marked this pull request as ready for review
November 18, 2026 14:39
marc-hb
removed their request for review
November 18, 2026 17:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add automated
sof-testhelpers and functional test cases for the WebRTC processing modules (webrtc_hpf,webrtc_vad,webrtc_ns,webrtc_ns2,webrtc_agc,webrtc_aec) paired withthesofproject/sof#11426.Summary
tools/topo_webrtc_kcontrols.py: inspects compiled.tplgbinaries viatplgtool2.py(DapmType.EFFECT) forwebrtc-*widgets and theirMIXERSwitch kcontrols.tools/sof-webrtc-tool.py: generates deterministic chirp-synced test stimuli (450 -> 2800 Hzsync chirp + labeled payload segments) and performs cross-correlation-aligned objective DSP checks (hpf,ns,ns2,agc,vad,aec) withnumpyfast paths and stdlib-only (wave/array/math) fallback for bare DUTs.case-lib/webrtc.sh: topology kcontrol discovery (withamixerfallback), exit-safe mixer state save/restore chainingfunc_exit_handler, USB audio card auto-detection, and unified stimulus routing across:-m ssp: same-card nocodec SSP loopback (SSP0/SSP0+SSP2for AEC)-m usb: local DUT external USB sound card injection-m loopback: passive analog/acoustic speaker-to-mic loopback (--single-talk-onlywhen no external near-end mixer is present)-m host: remote host-PC playback stimulus via SSH / command hook (-H)test-case/)verify-webrtc-controls.sh: verifies WebRTC Switch kcontrol readback/toggling under active PCM streaming.check-webrtc-hpf.sh:40 Hzrumble rejection vs1 kHzpassband preservation (HPF Switch ON vs OFF A/B).check-webrtc-ns.sh: post-convergence noise reduction and speech-band SNR forwebrtc-ns(16 kHz) andwebrtc-ns2(48 kHz).check-webrtc-agc.sh: quiet-signal boost + near-full-scale limiting (AGC Switch ON vs OFF A/B).check-webrtc-vad.sh: VAD pass-through contrast across supported PCM formats (S16_LE/S32_LE) andNOTIFIER_ID_VADruntime stability.check-webrtc-aec.sh: Phase 1 capture-only / playback-only / dynamic mid-stream playback attach-detach lifecycle checks, plus Phase 2 single-talk ERLE & double-talk near-end preservation (AEC Switch ON vs OFF A/B).Validation Status
bash -non all shell scripts andpy_compileon both Python tools passed.topo_webrtc_kcontrols.pyverified against all 14*webrtc*.tplgtopologies fromthesofproject/sof#11426.hpf,ns,ns2,agc,vad,aec, plus uncancelled AEC failure check) passed under bothnumpy/scipyand pure-stdlib Python.shellcheck/pylintexecution.