Skip to content

test-case, tools: add WebRTC DSP, SSP loopback AEC, and stereo MIMO regression tests - #1370

Closed
lgirdwood wants to merge 3 commits into
thesofproject:mainfrom
lgirdwood:topic/webrtc-tests
Closed

lgirdwood wants to merge 3 commits into
thesofproject:mainfrom
lgirdwood:topic/webrtc-tests

Conversation

@lgirdwood

Copy link
Copy Markdown
Member

Summary

Full WebRTC audio processing test suite and stimulus/analysis tooling (webrtc-hpf, webrtc-vad, webrtc-ns, webrtc-ns2, webrtc-agc, webrtc-aec) including stereo-independent MIMO AEC validation and SSP digital loopback (lbm_mode) support.

Note: A standalone SSP-loopback-only AEC subset is also staged separately on topic/webrtc-aec-ssp-loopback so AEC SSP loopback validation can run first on main.

Changes

  • tools/topo_webrtc_kcontrols.py, case-lib/webrtc.sh: WebRTC control discovery and SSP / loopback / USB / host stimulus helpers.
  • tools/sof-webrtc-tool.py: Deterministic stimuli and DSP metrics verification across HPF, NS, NS2, AGC, VAD, and AEC (--stereo-independent, --mic-channels, --ref-channels, anti-cloning ch0 != ch1).
  • test-case/{verify-webrtc-controls,check-webrtc-hpf,check-webrtc-ns,check-webrtc-agc,check-webrtc-vad,check-webrtc-aec}.sh: Lifecycle and DSP verification suites.

Verification Done Locally

  • bash -n test-case/check-webrtc-aec.sh case-lib/webrtc.sh and py_compile passed.
  • sof-webrtc-tool.py generate/analyze --profile aec --stereo-independent verified on synthetic valid and ch0-cloned stereo WAVs.
  • Full on-target execution on Spider (tgl) / Aphid (ptl) pending DUT run.

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 <liam.r.girdwood@linux.intel.com>
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 <liam.r.girdwood@linux.intel.com>
…ic ref options

Add --stereo-independent, --mic-channels, and --ref-channels to sof-webrtc-tool.py and -R/-I plus comma-separated delay sweeps (-d) to check-webrtc-aec.sh for SSP loopback multi-channel AEC validation.

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

lgirdwood commented Nov 26, 2026 •

Copy link
Copy Markdown
Member Author

Closing as superseded: the original WebRTC test commits landed in main as 56ae42c and d43ff6f, and the remaining SSP loopback / stereo-independent MIMO AEC updates are cleanly rebased onto main in #1369.

@lgirdwood lgirdwood closed this Nov 26, 2026
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