Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/audio/webrtc_ns2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ else()
"${SOF_RNNOISE_SRC_DIR}/src/celt_lpc.c"
"${SOF_RNNOISE_SRC_DIR}/src/kiss_fft.c"
)
set(_rnnoise_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
)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR
CMAKE_C_COMPILER_ID STREQUAL "Clang" OR
CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
list(APPEND _rnnoise_compile_options -ffp-contract=fast)
endif()
set_source_files_properties(
"${SOF_RNNOISE_SRC_DIR}/src/denoise.c"
"${SOF_RNNOISE_SRC_DIR}/src/rnn.c"
Expand All @@ -36,7 +50,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.

"${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 "${_rnnoise_compile_options}"
)
endif()
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Define {
PLATFORM "none"
SSP0_PCM_ID 0
SSP0_PCM_NAME "Port0"
# RNNoise requires a fixed 48 kHz DAI/graph rate
SSP0_RATE 48000
}

IncludeByKey.PLATFORM {
Expand Down Expand Up @@ -85,7 +87,8 @@ Object.Dai.SSP [
Object.Base.hw_config.1 {
name "SSP0"
id 0
# 48 kHz × 2ch × 32-bit = 3.072 MHz BCLK
# Keep FSYNC locked to SSP0_RATE (48 kHz for RNNoise): 48 kHz × 2ch × 32-bit = 3.072 MHz BCLK
fsync_freq $SSP0_RATE
bclk_freq 3072000
tdm_slot_width 32
Object.Base.link_config.1 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ Class.Widget."webrtc-ns2" {
uuid "dc:ac:cf:ea:87:2a:42:c9:97:e8:94:c9:17:a7:40:db"
type "effect"
no_pm "true"
cpc 5000
# Default DP budget for 48 kHz / 480-sample RNNoise frames (5000 under-budgets on DSP; override per widget if needed)
cpc 100000
scheduler_domain "DP"
stack_bytes_requirement 16384
heap_bytes_requirement 163840
Expand Down
Loading