Repository navigation
audio: webrtc_ns2: enable FMA contraction, raise DP CPC, and set SSP fsync - #11601
Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open issues
-ffp-contract=fastis compiler-specific and can break builds on toolchains that don't recognize… · New Raisingcpcfrom 5000 to 100000 is a large increase and can materially change DP budget… · New Withfsync_freqnow hard-coded, this can drift out of sync if the topology’s sample rate (or link… · New
What changed in this PR
This PR tunes the WebRTC NS2 integration for better real-time performance and predictable DSP scheduling by enabling FP FMA contraction for RNNoise sources, increasing NS2 DP compute budget, and explicitly configuring SSP0 frame sync.
Changes:
- Enable
-ffp-contract=fastwhen compiling external RNNoise C sources for WebRTC NS2. - Increase
webrtc-ns2DP widgetcpcbudget from5000to100000. - Set
fsync_freq 48000for SSP0 in the cavs nocodec development topology.
| File | Description |
|---|---|
| tools/topology/topology2/include/components/webrtc-ns2.conf | Raises DP CPC budget for the webrtc-ns2 widget to avoid budget overruns. |
| tools/topology/topology2/development/cavs-nocodec-webrtc-ns2.conf | Adds explicit SSP0 FSYNC frequency to match 48 kHz operation. |
| src/audio/webrtc_ns2/CMakeLists.txt | Adds FP contraction compile flag to improve RNNoise math performance/codegen. |
Review effort: Lite
| "${SOF_RNNOISE_SRC_DIR}/src/kiss_fft.c" | ||
| TARGET_DIRECTORY modules_sof | ||
| PROPERTIES COMPILE_OPTIONS "-Wno-double-promotion;-Wno-implicit-function-declaration;-Wno-unused-function;-DFLOAT_APPROX;-Dmalloc=webrtc_ns2_malloc;-Dcalloc=webrtc_ns2_calloc;-Dfree=webrtc_ns2_free" | ||
| PROPERTIES COMPILE_OPTIONS "-Wno-double-promotion;-ffp-contract=fast;-Wno-implicit-function-declaration;-Wno-unused-function;-DFLOAT_APPROX;-Dmalloc=webrtc_ns2_malloc;-Dcalloc=webrtc_ns2_calloc;-Dfree=webrtc_ns2_free" |
| # UUID: eacfacdc-2a87-c942-97e894c917a740db | ||
| uuid "dc:ac:cf:ea:87:2a:42:c9:97:e8:94:c9:17:a7:40:db" | ||
| type "effect" | ||
| no_pm "true" |
| @@ -86,6 +86,7 @@ Object.Dai.SSP [ | |||
| name "SSP0" | |||
| id 0 | |||
| # 48 kHz × 2ch × 32-bit = 3.072 MHz BCLK | |||
PR 11601: test resultsRun date: 2026-12-03 13:48 UTC Tested commit: eddc8c7edf52bb3dc9ce7d831bbeb064d0b6ce31 |
kv2019i
left a comment
There was a problem hiding this comment.
Commits need to be split
| @@ -36,7 +36,7 @@ else() | |||
| "${SOF_RNNOISE_SRC_DIR}/src/celt_lpc.c" | |||
There was a problem hiding this comment.
Please split the commits, code and topology changes should not be mixed in same commits.
1cd29b6 to
c0152c3
Compare
Pass -ffp-contract=fast when compiling external RNNoise C sources in src/audio/webrtc_ns2/CMakeLists.txt (guarded on GNU/Clang compiler IDs) so HiFi FP multiply-add contractions are generated when building with Clang as well as GCC. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Raise the default webrtc-ns2 DP widget cpc budget from 5000 to 100000 in tools/topology/topology2/include/components/webrtc-ns2.conf. 5000 CPC under-budgets 48 kHz / 480-sample RNNoise frame execution on ACE/cAVS DSPs; 100000 provides headroom across targets and remains overridable per widget instance. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Define SSP0_RATE 48000 in cavs-nocodec-webrtc-ns2.conf and bind SSP0 fsync_freq to $SSP0_RATE so SSP0 frame sync matches RNNoise's required 48 kHz graph rate. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
c0152c3 to
eddc8c7
Compare
|
CI unrelated. |


Summary
-ffp-contract=fastwhen compiling external RNNoise C sources insrc/audio/webrtc_ns2/CMakeLists.txtso HiFi FP multiply-add instructions are generated for WebRTC NS2.webrtc-ns2DP widgetcpcbudget from5000to100000intools/topology/topology2/include/components/webrtc-ns2.confto prevent DP budget overruns during real-time processing.fsync_freq 48000onSSP0intools/topology/topology2/development/cavs-nocodec-webrtc-ns2.conf.Related
rnnoise: rnnoise: use single-precision float math functions and literals rnnoise#1 (awest.ymlpointer bump will follow once that PR merges).Testing
sof-tgl-nocodec-webrtc-ns2.tplgviaalsatplg(0 errors).intel_adsp/ace15_mtpmwithllext_relocatable.confandwebrtc_overlay.conf.sof-mtl-nocodec-webrtc-ns2.tplgon Intel ARL-S (Dragon Fly).