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
17 changes: 11 additions & 6 deletions src/math/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,17 @@ if(CONFIG_MATH_FFT)
add_subdirectory(fft)
endif()

if(CONFIG_MATH_IIR_DF2T)
list(APPEND base_files iir_df2t_generic.c iir_df2t_hifi3.c iir_df2t.c)
endif()

if(CONFIG_MATH_IIR_DF1)
list(APPEND base_files iir_df1_generic.c iir_df1_hifi3.c iir_df1_hifi4.c iir_df1_hifi5.c iir_df1.c)
if(CONFIG_MATH_IIR STREQUAL "m")
add_subdirectory(iir_llext ${PROJECT_BINARY_DIR}/iir_llext)
add_dependencies(app iir)
elseif(CONFIG_MATH_IIR)
if(CONFIG_MATH_IIR_DF2T)
list(APPEND base_files iir_df2t_generic.c iir_df2t_hifi3.c iir_df2t.c)
endif()

if(CONFIG_MATH_IIR_DF1)
list(APPEND base_files iir_df1_generic.c iir_df1_hifi3.c iir_df1_hifi4.c iir_df1_hifi5.c iir_df1.c)
endif()
endif()

if(CONFIG_MATH_WINDOW)
Expand Down
9 changes: 9 additions & 0 deletions src/math/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,24 @@ config MATH_FIR
filter calculates a convolution of input PCM sample and a configurable
impulse response.

config MATH_IIR
tristate "Select IIR filter library build method"
default m if LIBRARY_DEFAULT_MODULAR
default y
help
A helper option for MATH_IIR_DF2T and MATH_IIR_DF1

config MATH_IIR_DF2T
bool "IIR DF2T filter library"
depends on MATH_IIR != "n"
default n
help
Select this to build IIR (Infinite Impulse Response) filter
or type 2-transposed library.

config MATH_IIR_DF1
bool "IIR DF1 filter library"
depends on MATH_IIR != "n"
default n
help
Select this to build IIR (Infinite Impulse Response) filter
Expand Down
2 changes: 1 addition & 1 deletion src/math/fir_llext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

sof_llext_build("fir"
SOURCES ../fir_common.c
SOURCES fir_common.c
../fir_generic.c
../fir_hifi2ep.c
../fir_hifi3.c
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions src/math/iir.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[module.entry]]
name = "IIR"
uuid = "B0CDCD9E-EF8B-404F-8480-0F287FC9D44D"
load_type = "3"

index = __COUNTER__
22 changes: 22 additions & 0 deletions src/math/iir_llext/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (c) 2024 Intel Corporation.
# SPDX-License-Identifier: Apache-2.0

if(CONFIG_MATH_IIR_DF1)
set(df1 ../iir_df1.c ../iir_df1_generic.c ../iir_df1_hifi3.c
../iir_df1_hifi4.c ../iir_df1_hifi5.c)
else()
set(df1 "")
endif()
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need to change this PR, but please take a look at https://github.com/orgs/thesofproject/discussions/9899 and join the effort (for new files at least).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kv2019i PTL didn't test... So, instead of re-testing, let me fix this and re-push


if(CONFIG_MATH_IIR_DF2T)
set(df2t ../iir_df2t.c ../iir_df2t_generic.c ../iir_df2t_hifi3.c)
else()
set(df2t "")
endif()

if(CONFIG_MATH_IIR_DF1 OR CONFIG_MATH_IIR_DF2T)
sof_llext_build("iir"
SOURCES iir.c ${df1} ${df2t}
LIB openmodules
)
endif()
17 changes: 17 additions & 0 deletions src/math/iir_llext/iir.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright(c) 2025 Intel Corporation.

/* modular: llext dynamic link */

#include <sof/compiler_attributes.h>
#include <sof/lib/uuid.h>
#include <module/module/api_ver.h>
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

static const struct sof_man_module_manifest mod_manifest[] __section(".module") __used = {
SOF_LLEXT_AUX_MANIFEST("IIR", NULL, SOF_REG_UUID(iir)),
};

SOF_LLEXT_BUILDINFO;
5 changes: 5 additions & 0 deletions src/math/iir_llext/llext.toml.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <tools/rimage/config/platform.toml>
#include "../iir.toml"

[module]
count = __COUNTER__
1 change: 1 addition & 0 deletions uuid-registry.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ b780a0a6-269f-466f-b47723dfa05af758 google_rtc_audio_processing
a5dacb0e-88dc-415c-a1b53e8df77f1976 idc_cmd_task
b90f5a4e-5537-4375-a1df95485472ff9e idc_task
696ae2bc-2877-11eb-adc10242ac120002 igo_nr
b0cdcd9e-ef8b-404f-84800f287fc9d44d iir
fa00558c-d653-4851-a03ab21f125a9524 interrupt
2f520e85-49ba-4284-90d83def24af313b intc_mt8196
be60f97d-78df-4796-a0ee435cb56b720a ipc
Expand Down
Loading