Skip to content

audio: webrtc_ns2: enable FMA contraction, raise DP CPC, and set SSP fsync - #11601

Merged
lgirdwood merged 3 commits into
thesofproject:mainfrom
lgirdwood:topic/webrtc-ns2-fma-cpc
Dec 3, 2026
Merged

lgirdwood merged 3 commits into
thesofproject:mainfrom
lgirdwood:topic/webrtc-ns2-fma-cpc

Conversation

@lgirdwood

Copy link
Copy Markdown
Member

Summary

  • Pass -ffp-contract=fast when compiling external RNNoise C sources in src/audio/webrtc_ns2/CMakeLists.txt so HiFi FP multiply-add instructions are generated for WebRTC NS2.
  • Raise the webrtc-ns2 DP widget cpc budget from 5000 to 100000 in tools/topology/topology2/include/components/webrtc-ns2.conf to prevent DP budget overruns during real-time processing.
  • Set fsync_freq 48000 on SSP0 in tools/topology/topology2/development/cavs-nocodec-webrtc-ns2.conf.

Related

Testing

  • Built and validated sof-tgl-nocodec-webrtc-ns2.tplg via alsatplg (0 errors).
  • Built GCC intel_adsp/ace15_mtpm with llext_relocatable.conf and webrtc_overlay.conf.
  • Verified live playback/capture with sof-mtl-nocodec-webrtc-ns2.tplg on Intel ARL-S (Dragon Fly).

@lgirdwood
lgirdwood requested a balanced review from Copilot December 2, 2026 21:58
@lgirdwood
lgirdwood marked this pull request as ready for review December 2, 2026 21:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
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=fast when compiling external RNNoise C sources for WebRTC NS2.
  • Increase webrtc-ns2 DP widget cpc budget from 5000 to 100000.
  • Set fsync_freq 48000 for 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

Comment thread src/audio/webrtc_ns2/CMakeLists.txt Outdated
"${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
@intel-sofci

intel-sofci commented Dec 2, 2026 •

Copy link
Copy Markdown

PR 11601: test results

Run date: 2026-12-03 13:48 UTC

Tested commit: eddc8c7edf52bb3dc9ce7d831bbeb064d0b6ce31

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

kv2019i
kv2019i previously requested changes Dec 3, 2026

@kv2019i kv2019i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commits need to be split

@@ -36,7 +36,7 @@ else()
"${SOF_RNNOISE_SRC_DIR}/src/celt_lpc.c"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please split the commits, code and topology changes should not be mixed in same commits.

@lgirdwood
lgirdwood force-pushed the topic/webrtc-ns2-fma-cpc branch from 1cd29b6 to c0152c3 Compare December 3, 2026 11:58
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>
@lgirdwood
lgirdwood force-pushed the topic/webrtc-ns2-fma-cpc branch from c0152c3 to eddc8c7 Compare December 3, 2026 11:58
@lgirdwood

Copy link
Copy Markdown
Member Author

CI unrelated.

@lgirdwood
lgirdwood merged commit 0e495f8 into thesofproject:main Dec 3, 2026
44 of 47 checks passed
@lgirdwood
lgirdwood deleted the topic/webrtc-ns2-fma-cpc branch December 3, 2026 14:52
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.

5 participants