Skip to content

Commit fea4ba4

Browse files
committed
Audio: STFT Process: Add new SOF module
This module provides analysis and synthesis filters for frequency domain processing. The used technique is short term Fourier transform (STFT) and inverse STFT. The FFT length, hop, and window type are configured with the bytes control configuration blob. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent 0bba636 commit fea4ba4

28 files changed

+1628
-3
lines changed

app/boards/intel_adsp_ace15_mtpm.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ CONFIG_COMP_MFCC=y
1515
CONFIG_COMP_MULTIBAND_DRC=y
1616
CONFIG_FORMAT_CONVERT_HIFI3=n
1717
CONFIG_SAMPLE_KEYPHRASE=y
18+
CONFIG_COMP_STFT_PROCESS=y
1819

1920
# SOF / audio modules / mocks
2021
# This mock is part of official sof-bin releases because the CI that

app/boards/intel_adsp_ace20_lnl.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ CONFIG_COMP_TESTER=m
1111
CONFIG_COMP_SRC_IPC4_FULL_MATRIX=y
1212
CONFIG_FORMAT_CONVERT_HIFI3=n
1313
CONFIG_SAMPLE_KEYPHRASE=y
14+
CONFIG_COMP_STFT_PROCESS=y
1415

1516
# SOF / infrastructure
1617
CONFIG_AMS=y

app/boards/intel_adsp_ace30_ptl.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ CONFIG_FORMAT_CONVERT_HIFI3=n
1414
# tests it can't use extra CONFIGs. See #9410, #8722 and #9386
1515
CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING=m
1616
CONFIG_GOOGLE_RTC_AUDIO_PROCESSING_MOCK=y
17+
CONFIG_COMP_STFT_PROCESS=y
1718

1819
# SOF / infrastructure
1920
CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n

app/boards/intel_adsp_ace30_wcl.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ CONFIG_FORMAT_CONVERT_HIFI3=n
1414
# tests it can't use extra CONFIGs. See #9410, #8722 and #9386
1515
CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING=m
1616
CONFIG_GOOGLE_RTC_AUDIO_PROCESSING_MOCK=y
17+
CONFIG_COMP_STFT_PROCESS=y
1718

1819
# SOF / infrastructure
1920
CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n

src/arch/host/configs/library_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ CONFIG_COMP_SEL=y
1919
CONFIG_COMP_SOUND_DOSE=y
2020
CONFIG_COMP_SRC=y
2121
CONFIG_COMP_SRC_IPC4_FULL_MATRIX=y
22+
CONFIG_COMP_STFT_PROCESS=y
2223
CONFIG_COMP_STUBS=y
2324
CONFIG_COMP_TDFB=y
2425
CONFIG_COMP_TONE=y

src/audio/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
8686
if(CONFIG_COMP_SRC)
8787
add_subdirectory(src)
8888
endif()
89+
if(CONFIG_COMP_STFT_PROCESS)
90+
add_subdirectory(stft_process)
91+
endif()
8992
if(CONFIG_COMP_TDFB)
9093
add_subdirectory(tdfb)
9194
endif()

src/audio/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ rsource "selector/Kconfig"
144144
rsource "smart_amp/Kconfig"
145145
rsource "sound_dose/Kconfig"
146146
rsource "src/Kconfig"
147+
rsource "stft_process/Kconfig"
147148
rsource "tdfb/Kconfig"
148149
rsource "template/Kconfig"
149150
rsource "tensorflow/Kconfig"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
3+
if(CONFIG_COMP_STFT_PROCESS STREQUAL "m" AND DEFINED CONFIG_LLEXT)
4+
add_subdirectory(llext ${PROJECT_BINARY_DIR}/stft_process_llext)
5+
add_dependencies(app stft_process)
6+
else()
7+
add_local_sources(sof stft_process.c)
8+
add_local_sources(sof stft_process_setup.c)
9+
add_local_sources(sof stft_process_common.c)
10+
add_local_sources(sof stft_process-generic.c)
11+
12+
if(CONFIG_IPC_MAJOR_4)
13+
add_local_sources(sof stft_process-ipc4.c)
14+
endif()
15+
endif()

src/audio/stft_process/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
3+
config COMP_STFT_PROCESS
4+
tristate "Template example component"
5+
default n
6+
select MATH_FFT
7+
select MATH_32BIT_FFT
8+
select MATH_FFT_MULTI
9+
help
10+
Select for stft_process component. Reason for existence
11+
is to provide a minimal component example and use as
12+
placeholder in processing pipelines. As example processing
13+
it swaps or reverses the channels when the switch control
14+
is enabled.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (c) 2025 Intel Corporation.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
sof_llext_build("stft_process"
5+
SOURCES ../stft_process.c
6+
../stft_process_setup.c
7+
../stft_process_common.c
8+
../stft_process-generic.c
9+
../stft_process-ipc4.c
10+
LIB openmodules
11+
)

0 commit comments

Comments
 (0)