diff --git a/app/boards/intel_adsp_ace15_mtpm.conf b/app/boards/intel_adsp_ace15_mtpm.conf index 4084a6b5d2b3..31009202196a 100644 --- a/app/boards/intel_adsp_ace15_mtpm.conf +++ b/app/boards/intel_adsp_ace15_mtpm.conf @@ -2,7 +2,6 @@ CONFIG_METEORLAKE=y CONFIG_IPC_MAJOR_4=y CONFIG_IPC4_BASE_FW_INTEL=y -CONFIG_COMP_SRC=y CONFIG_COMP_SRC_IPC4_FULL_MATRIX=y CONFIG_COMP_SRC_LITE=y CONFIG_COMP_DRC=m diff --git a/app/boards/intel_adsp_ace20_lnl.conf b/app/boards/intel_adsp_ace20_lnl.conf index e2d92511d336..a5d7ce9ce269 100644 --- a/app/boards/intel_adsp_ace20_lnl.conf +++ b/app/boards/intel_adsp_ace20_lnl.conf @@ -2,7 +2,6 @@ CONFIG_LUNARLAKE=y CONFIG_IPC_MAJOR_4=y CONFIG_IPC4_BASE_FW_INTEL=y -CONFIG_COMP_SRC=y CONFIG_COMP_SRC_IPC4_FULL_MATRIX=y CONFIG_COMP_DRC=m diff --git a/app/configs/lnl/modules.conf b/app/configs/lnl/modules.conf index cab858609c28..90002ad32c08 100644 --- a/app/configs/lnl/modules.conf +++ b/app/configs/lnl/modules.conf @@ -1,4 +1,8 @@ +CONFIG_SAMPLE_SMART_AMP=m CONFIG_COMP_MIXIN_MIXOUT=m +CONFIG_COMP_FIR=m CONFIG_COMP_IIR=m -CONFIG_SAMPLE_SMART_AMP=m CONFIG_COMP_DRC=m +CONFIG_COMP_SRC=m +CONFIG_COMP_ASRC=m +CONFIG_COMP_VOLUME=m diff --git a/app/configs/mtl/modules.conf b/app/configs/mtl/modules.conf index 1fb5549e9d82..90002ad32c08 100644 --- a/app/configs/mtl/modules.conf +++ b/app/configs/mtl/modules.conf @@ -1,4 +1,8 @@ CONFIG_SAMPLE_SMART_AMP=m CONFIG_COMP_MIXIN_MIXOUT=m +CONFIG_COMP_FIR=m CONFIG_COMP_IIR=m CONFIG_COMP_DRC=m +CONFIG_COMP_SRC=m +CONFIG_COMP_ASRC=m +CONFIG_COMP_VOLUME=m diff --git a/src/audio/asrc/Kconfig b/src/audio/asrc/Kconfig index 7bdbf68d2a94..b9b8604e667e 100644 --- a/src/audio/asrc/Kconfig +++ b/src/audio/asrc/Kconfig @@ -1,7 +1,8 @@ # SPDX-License-Identifier: BSD-3-Clause config COMP_ASRC - bool "ASRC component" + tristate "ASRC component" + default m if LIBRARY_DEFAULT_MODULAR default y help Select for Asynchronous sample rate conversion (ASRC) @@ -14,7 +15,7 @@ config COMP_ASRC not have pre-computed filter coefficients for every conversion fraction that SRC does. -if COMP_ASRC +if COMP_ASRC != n rsource "Kconfig.simd" diff --git a/src/audio/asrc/asrc.c b/src/audio/asrc/asrc.c index 4df5a5afd17f..b67ac3e8518d 100644 --- a/src/audio/asrc/asrc.c +++ b/src/audio/asrc/asrc.c @@ -318,7 +318,7 @@ static int asrc_free(struct processing_module *mod) struct comp_data *cd = module_get_private_data(mod); struct comp_dev *dev = mod->dev; - comp_info(dev, "asrc_free()"); + comp_dbg(dev, "asrc_free()"); rfree(cd->buf); asrc_release_buffers(cd->asrc_obj); @@ -850,8 +850,7 @@ static int asrc_reset(struct processing_module *mod) struct comp_dev *dev = mod->dev; struct comp_data *cd = module_get_private_data(mod); - comp_info(dev, "asrc_reset(), skew_min=%d, skew_max=%d", cd->skew_min, cd->skew_max); - + comp_dbg(dev, "asrc_reset(), skew_min=%d, skew_max=%d", cd->skew_min, cd->skew_max); /* If any resources feasible to stop */ if (cd->track_drift) @@ -879,3 +878,21 @@ static const struct module_interface asrc_interface = { DECLARE_MODULE_ADAPTER(asrc_interface, ASRC_UUID, asrc_tr); SOF_MODULE_INIT(asrc, sys_comp_module_asrc_interface_init); + +#if CONFIG_COMP_ASRC_MODULE +/* modular: llext dynamic link */ + +#include +#include +#include + +#define UUID_ASRC 0x2d, 0x40, 0xb4, 0x66, 0x68, 0xb4, 0xf2, 0x42, \ + 0x81, 0xa7, 0xb3, 0x71, 0x21, 0x86, 0x3d, 0xd4 +SOF_LLEXT_MOD_ENTRY(asrc, &asrc_interface); + +static const struct sof_man_module_manifest mod_manifest[] __section(".module") __used = { + SOF_LLEXT_MODULE_MANIFEST("ASRC", asrc_llext_entry, 1, UUID_ASRC, 2), +}; + +SOF_LLEXT_BUILDINFO; +#endif diff --git a/src/audio/asrc/asrc.toml b/src/audio/asrc/asrc.toml index 0bf6ace59bd9..ace84d85e733 100644 --- a/src/audio/asrc/asrc.toml +++ b/src/audio/asrc/asrc.toml @@ -1,3 +1,7 @@ +#ifndef LOAD_TYPE +#define LOAD_TYPE "0" +#endif + [[module.entry]] name = "ASRC" uuid = "66B4402D-B468-42F2-81A7-B37121863DD4" @@ -5,7 +9,7 @@ instance_count = "2" domain_types = "0" - load_type = "0" + load_type = LOAD_TYPE module_type = "9" auto_start = "0" sched_caps = [1, 0x00008000] diff --git a/src/audio/asrc/llext/CMakeLists.txt b/src/audio/asrc/llext/CMakeLists.txt new file mode 100644 index 000000000000..93f26a228913 --- /dev/null +++ b/src/audio/asrc/llext/CMakeLists.txt @@ -0,0 +1,10 @@ +# Copyright (c) 2024 Intel Corporation. +# SPDX-License-Identifier: Apache-2.0 + +sof_llext_build("asrc" + SOURCES ../asrc.c + ../asrc_farrow_hifi3.c + ../asrc_farrow.c + ../asrc_farrow_generic.c + ../asrc_ipc4.c +) diff --git a/src/audio/asrc/llext/llext.toml.h b/src/audio/asrc/llext/llext.toml.h new file mode 100644 index 000000000000..680a68ece6d8 --- /dev/null +++ b/src/audio/asrc/llext/llext.toml.h @@ -0,0 +1,6 @@ +#include +#define LOAD_TYPE "2" +#include "../asrc.toml" + +[module] +count = __COUNTER__ diff --git a/src/audio/data_blob.c b/src/audio/data_blob.c index 3e6415d5d22e..7e1bc11f1f17 100644 --- a/src/audio/data_blob.c +++ b/src/audio/data_blob.c @@ -58,6 +58,7 @@ void comp_data_blob_set_validator(struct comp_data_blob_handler *blob_handler, blob_handler->validator = validator; } +EXPORT_SYMBOL(comp_data_blob_set_validator); void *comp_get_data_blob(struct comp_data_blob_handler *blob_handler, size_t *size, uint32_t *crc) diff --git a/src/audio/eq_fir/Kconfig b/src/audio/eq_fir/Kconfig index 49ae33e98c81..0ac2074e499b 100644 --- a/src/audio/eq_fir/Kconfig +++ b/src/audio/eq_fir/Kconfig @@ -1,10 +1,11 @@ # SPDX-License-Identifier: BSD-3-Clause config COMP_FIR - bool "FIR component" + tristate "FIR component" select MATH_FIR select COMP_BLOB depends on COMP_MODULE_ADAPTER + default m if LIBRARY_DEFAULT_MODULAR default y help Select for FIR component. FIR performance can differ between DSP diff --git a/src/audio/eq_fir/eq_fir.c b/src/audio/eq_fir/eq_fir.c index adf649743cea..13871815ffdb 100644 --- a/src/audio/eq_fir/eq_fir.c +++ b/src/audio/eq_fir/eq_fir.c @@ -309,7 +309,7 @@ static int eq_fir_free(struct processing_module *mod) { struct comp_data *cd = module_get_private_data(mod); - comp_info(mod->dev, "eq_fir_free()"); + comp_dbg(mod->dev, "eq_fir_free()"); eq_fir_free_delaylines(cd); comp_data_blob_handler_free(cd->model_handler); @@ -456,7 +456,7 @@ static int eq_fir_reset(struct processing_module *mod) int i; struct comp_data *cd = module_get_private_data(mod); - comp_info(mod->dev, "eq_fir_reset()"); + comp_dbg(mod->dev, "eq_fir_reset()"); comp_data_blob_set_validator(cd->model_handler, NULL); @@ -481,3 +481,22 @@ static const struct module_interface eq_fir_interface = { DECLARE_MODULE_ADAPTER(eq_fir_interface, eq_fir_uuid, eq_fir_tr); SOF_MODULE_INIT(eq_fir, sys_comp_module_eq_fir_interface_init); + +#if CONFIG_COMP_FIR_MODULE +/* modular: llext dynamic link */ + +#include +#include +#include + +#define UUID_EQFIR 0xe7, 0x0c, 0xa9, 0x43, 0xa5, 0xf3, 0xdf, 0x41, \ + 0xac, 0x06, 0xba, 0x98, 0x65, 0x1a, 0xe6, 0xa3 + +SOF_LLEXT_MOD_ENTRY(eq_fir, &eq_fir_interface); + +static const struct sof_man_module_manifest mod_manifest __section(".module") __used = + SOF_LLEXT_MODULE_MANIFEST("EQFIR", eq_fir_llext_entry, 1, UUID_EQFIR, 40); + +SOF_LLEXT_BUILDINFO; + +#endif diff --git a/src/audio/eq_fir/eq_fir.toml b/src/audio/eq_fir/eq_fir.toml index 2e647fe97ab8..416c068e95ce 100644 --- a/src/audio/eq_fir/eq_fir.toml +++ b/src/audio/eq_fir/eq_fir.toml @@ -1,11 +1,15 @@ +#ifndef LOAD_TYPE +#define LOAD_TYPE "0" +#endif + REM # eq fir module config [[module.entry]] name = "EQFIR" - uuid = "43A90CE7-f3A5-41Df-AC06-BA98651AE6A3" + uuid = "43A90CE7-F3A5-41DF-AC06-BA98651AE6A3" affinity_mask = "0x1" instance_count = "40" domain_types = "0" - load_type = "0" + load_type = LOAD_TYPE module_type = "9" auto_start = "0" sched_caps = [1, 0x00008000] @@ -15,6 +19,7 @@ 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + REM # identical for MTL and LNL mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] index = __COUNTER__ diff --git a/src/audio/eq_fir/llext/CMakeLists.txt b/src/audio/eq_fir/llext/CMakeLists.txt new file mode 100644 index 000000000000..9b4f47308c49 --- /dev/null +++ b/src/audio/eq_fir/llext/CMakeLists.txt @@ -0,0 +1,10 @@ +# Copyright (c) 2024 Intel Corporation. +# SPDX-License-Identifier: Apache-2.0 + +sof_llext_build("eq_fir" + SOURCES ../eq_fir_hifi3.c + ../eq_fir_hifi2ep.c + ../eq_fir_generic.c + ../eq_fir.c + ../eq_fir_ipc4.c +) diff --git a/src/audio/eq_fir/llext/llext.toml.h b/src/audio/eq_fir/llext/llext.toml.h new file mode 100644 index 000000000000..4a73c827c860 --- /dev/null +++ b/src/audio/eq_fir/llext/llext.toml.h @@ -0,0 +1,6 @@ +#include +#define LOAD_TYPE "2" +#include "../eq_fir.toml" + +[module] +count = __COUNTER__ diff --git a/src/audio/module_adapter/module/generic.c b/src/audio/module_adapter/module/generic.c index ef87c101b8a3..5f6dc96fe236 100644 --- a/src/audio/module_adapter/module/generic.c +++ b/src/audio/module_adapter/module/generic.c @@ -491,6 +491,7 @@ int module_set_configuration(struct processing_module *mod, return ret; } +EXPORT_SYMBOL(module_set_configuration); int module_bind(struct processing_module *mod, void *data) { diff --git a/src/audio/sink_source_utils.c b/src/audio/sink_source_utils.c index 3b79c8c2d5e1..cc75c3b848d3 100644 --- a/src/audio/sink_source_utils.c +++ b/src/audio/sink_source_utils.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -71,3 +72,4 @@ int source_to_sink_copy(struct sof_source *source, sink_commit_buffer(sink, INT_MAX); return 0; } +EXPORT_SYMBOL(source_to_sink_copy); diff --git a/src/audio/source_api_helper.c b/src/audio/source_api_helper.c index 03d7b216936e..a6dc56249ee3 100644 --- a/src/audio/source_api_helper.c +++ b/src/audio/source_api_helper.c @@ -3,6 +3,8 @@ * Copyright(c) 2023 Intel Corporation. All rights reserved. */ +#include + #include #include #include @@ -97,6 +99,7 @@ int source_set_alignment_constants(struct sof_source *source, return source->ops->set_alignment_constants(source, byte_align, frame_align_req); return 0; } +EXPORT_SYMBOL(source_set_alignment_constants); void source_set_min_available(struct sof_source *source, size_t min_available) { diff --git a/src/audio/src/Kconfig b/src/audio/src/Kconfig index ef651703a252..0b08e6358a98 100644 --- a/src/audio/src/Kconfig +++ b/src/audio/src/Kconfig @@ -2,6 +2,7 @@ config COMP_SRC tristate "SRC component" + default m if LIBRARY_DEFAULT_MODULAR default y help Select for SRC component diff --git a/src/audio/src/llext/CMakeLists.txt b/src/audio/src/llext/CMakeLists.txt new file mode 100644 index 000000000000..84a0bc4465df --- /dev/null +++ b/src/audio/src/llext/CMakeLists.txt @@ -0,0 +1,25 @@ +# Copyright (c) 2024 Intel Corporation. +# SPDX-License-Identifier: Apache-2.0 + +if(CONFIG_COMP_SRC_LITE) +sof_llext_build("src" + SOURCES ../src_hifi2ep.c + ../src_generic.c + ../src_hifi3.c + ../src_hifi4.c + ../src.c + ../src_common.c + ../src_ipc4.c + ../src_lite.c +) +else() +sof_llext_build("src" + SOURCES ../src_hifi2ep.c + ../src_generic.c + ../src_hifi3.c + ../src_hifi4.c + ../src.c + ../src_common.c + ../src_ipc4.c +) +endif() diff --git a/src/audio/src/llext/llext.toml.h b/src/audio/src/llext/llext.toml.h new file mode 100644 index 000000000000..cfb334ca24e7 --- /dev/null +++ b/src/audio/src/llext/llext.toml.h @@ -0,0 +1,6 @@ +#include +#define LOAD_TYPE "2" +#include "../src.toml" + +[module] +count = __COUNTER__ diff --git a/src/audio/src/src.c b/src/audio/src/src.c index b064a180b690..d75b1eb53822 100644 --- a/src/audio/src/src.c +++ b/src/audio/src/src.c @@ -81,3 +81,31 @@ static const struct module_interface src_interface = { DECLARE_MODULE_ADAPTER(src_interface, SRC_UUID, src_tr); SOF_MODULE_INIT(src, sys_comp_module_src_interface_init); + +#if CONFIG_COMP_SRC_MODULE +/* modular: llext dynamic link */ + +#include +#include +#include + +#define UUID_SRC 0x8D, 0xB2, 0x1B, 0xE6, 0x9A, 0x14, 0x1F, 0x4C, \ + 0xB7, 0x09, 0x46, 0x82, 0x3E, 0xF5, 0xF5, 0xAE +SOF_LLEXT_MOD_ENTRY(src, &src_interface); + +#if CONFIG_COMP_SRC_LITE +#define UUID_SRC_LITE 0x51, 0x10, 0x44, 0x33, 0xCD, 0x44, 0x6A, 0x46, \ + 0x83, 0xA3, 0x17, 0x84, 0x78, 0x70, 0x8A, 0xEA +extern const struct module_interface src_lite_interface; +SOF_LLEXT_MOD_ENTRY(src_lite, &src_lite_interface); +#endif + +static const struct sof_man_module_manifest mod_manifest[] __section(".module") __used = { + SOF_LLEXT_MODULE_MANIFEST("SRC", src_llext_entry, 1, UUID_SRC, 1), +#if CONFIG_COMP_SRC_LITE + SOF_LLEXT_MODULE_MANIFEST("SRC_LITE", src_lite_llext_entry, 1, UUID_SRC_LITE, 1), +#endif +}; + +SOF_LLEXT_BUILDINFO; +#endif diff --git a/src/audio/src/src.toml b/src/audio/src/src.toml index 9cd67f28d9ce..448739cf2f19 100644 --- a/src/audio/src/src.toml +++ b/src/audio/src/src.toml @@ -1,10 +1,14 @@ +#ifndef LOAD_TYPE +#define LOAD_TYPE "0" +#endif + [[module.entry]] name = "SRC" uuid = "E61BB28D-149A-4C1F-B709-46823EF5F5AE" affinity_mask = "0x1" REM #instance_count = "10" domain_types = "0" - load_type = "0" + load_type = LOAD_TYPE module_type = "7" auto_start = "0" sched_caps = [1, 0x00008000] @@ -77,7 +81,7 @@ affinity_mask = "0x1" REM #instance_count = "10" domain_types = "0" - load_type = "0" + load_type = LOAD_TYPE module_type = "0x1F" auto_start = "0" sched_caps = [1, 0x00008000] diff --git a/src/audio/src/src_lite.c b/src/audio/src/src_lite.c index 249c6a57d2de..35423dad9225 100644 --- a/src/audio/src/src_lite.c +++ b/src/audio/src/src_lite.c @@ -53,7 +53,7 @@ static int src_lite_prepare(struct processing_module *mod, return src_prepare_general(mod, sources[0], sinks[0]); } -static const struct module_interface src_lite_interface = { +const struct module_interface src_lite_interface = { .init = src_init, .prepare = src_lite_prepare, .process = src_process, diff --git a/src/audio/volume/Kconfig b/src/audio/volume/Kconfig index 35f71cd68e05..bed49b6403f9 100644 --- a/src/audio/volume/Kconfig +++ b/src/audio/volume/Kconfig @@ -1,10 +1,11 @@ # SPDX-License-Identifier: BSD-3-Clause - config COMP_VOLUME - bool "Volume component" - default y - help - Select for Volume component +config COMP_VOLUME + tristate "Volume component" + default m if LIBRARY_DEFAULT_MODULAR + default y + help + Select for Volume component if COMP_VOLUME @@ -78,4 +79,4 @@ config COMP_GAIN This option enables gain to change volume. It works as peak volume without updating peak vol to host -endif # volume \ No newline at end of file +endif # volume diff --git a/src/audio/volume/gain.toml b/src/audio/volume/gain.toml deleted file mode 100644 index 1bd8defc4e2b..000000000000 --- a/src/audio/volume/gain.toml +++ /dev/null @@ -1,33 +0,0 @@ - [[module.entry]] - name = "GAIN" - uuid = "61BCA9A8-18D0-4A18-8E7B-2639219804B7" - affinity_mask = "0x1" - instance_count = "40" - domain_types = "0" - load_type = "0" - module_type = "9" - auto_start = "0" - sched_caps = [1, 0x00008000] - - REM # pin = [dir, type, sample rate, size, container, channel-cfg] - pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, - 1, 0, 0xfeef, 0xf, 0xf, 0x45ff] - - REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] -#if CONFIG_METEORLAKE - mod_cfg = [1, 0, 0, 0, 416, 12100000, 1536, 1536, 0, 12100, 0, - 2, 0, 0, 0, 416, 10183000, 384, 384, 0, 10183, 0, - 3, 0, 0, 0, 416, 8192000, 512, 512, 0, 8192, 0, - 4, 0, 0, 0, 416, 10091000, 128, 128, 0, 10091, 0, - 5, 0, 0, 0, 416, 5908000, 768, 768, 0, 5908, 0] -#elif defined(CONFIG_LUNARLAKE) || defined(CONFIG_PANTHERLAKE) - mod_cfg = [0, 0, 0, 0, 416, 914000, 48, 64, 0, 0, 0, - 1, 0, 0, 0, 416, 1321600, 192, 256, 0, 0, 0, - 2, 0, 0, 0, 416, 1786000, 192, 256, 0, 0, 0, - 3, 0, 0, 0, 416, 2333000, 48, 64, 0, 0, 0, - 4, 0, 0, 0, 416, 2910000, 192, 256, 0, 0, 0, - 5, 0, 0, 0, 416, 3441000, 192, 256, 0, 0, 0, - 6, 0, 0, 0, 416, 4265000, 192, 256, 0, 0, 0] -#endif - - index = __COUNTER__ diff --git a/src/audio/volume/llext/CMakeLists.txt b/src/audio/volume/llext/CMakeLists.txt new file mode 100644 index 000000000000..74a78873eba6 --- /dev/null +++ b/src/audio/volume/llext/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2024 Intel Corporation. +# SPDX-License-Identifier: Apache-2.0 + +sof_llext_build("volume" + SOURCES ../volume_generic.c + ../volume_hifi3.c + ../volume_hifi4.c + ../volume_generic_with_peakvol.c + ../volume_hifi3_with_peakvol.c + ../volume_hifi4_with_peakvol.c + ../volume.c + ../volume_ipc4.c +) diff --git a/src/audio/volume/llext/llext.toml.h b/src/audio/volume/llext/llext.toml.h new file mode 100644 index 000000000000..98db03706286 --- /dev/null +++ b/src/audio/volume/llext/llext.toml.h @@ -0,0 +1,6 @@ +#include +#define LOAD_TYPE "2" +#include "../volume.toml" + +[module] +count = __COUNTER__ diff --git a/src/audio/volume/peakvol.toml b/src/audio/volume/peakvol.toml deleted file mode 100644 index c7a3bea647f3..000000000000 --- a/src/audio/volume/peakvol.toml +++ /dev/null @@ -1,33 +0,0 @@ - [[module.entry]] - name = "PEAKVOL" - uuid = "8A171323-94A3-4E1D-AFE9-FE5DBAA4C393" - affinity_mask = "0x1" - instance_count = "10" - domain_types = "0" - load_type = "0" - module_type = "4" - auto_start = "0" - sched_caps = [1, 0x00008000] - - REM # pin = [dir, type, sample rate, size, container, channel-cfg] - pin = [0, 0, 0xfeef, 0xf, 0xa, 0x45ff, - 1, 0, 0xfeef, 0xf, 0xa, 0x45ff] - - REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] -#if CONFIG_METEORLAKE - mod_cfg = [1, 0, 0, 0, 480, 11667000, 384, 384, 0, 11667, 0, - 2, 0, 0, 0, 480, 5943000, 192, 192, 0, 5943, 0, - 3, 0, 0, 0, 480, 12567000, 720, 720, 0, 12567, 0, - 4, 0, 0, 0, 480, 7360000, 768, 768, 0, 7360, 0, - 5, 0, 0, 0, 480, 12236000, 1536, 1536, 0, 12236, 0] -#elif defined(CONFIG_LUNARLAKE) || defined(CONFIG_PANTHERLAKE) - mod_cfg = [0, 0, 0, 0, 480, 1114000, 48, 64, 0, 0, 0, - 1, 0, 0, 0, 480, 3321600, 192, 256, 0, 0, 0, - 2, 0, 0, 0, 480, 3786000, 192, 256, 0, 0, 0, - 3, 0, 0, 0, 480, 4333000, 48, 64, 0, 0, 0, - 4, 0, 0, 0, 480, 4910000, 192, 256, 0, 0, 0, - 5, 0, 0, 0, 480, 5441000, 192, 256, 0, 0, 0, - 6, 0, 0, 0, 480, 6265000, 192, 256, 0, 0, 0] -#endif - - index = __COUNTER__ diff --git a/src/audio/volume/volume.c b/src/audio/volume/volume.c index 0cbbcdde925a..de7ae63d1116 100644 --- a/src/audio/volume/volume.c +++ b/src/audio/volume/volume.c @@ -800,3 +800,34 @@ static const struct module_interface gain_interface = { DECLARE_MODULE_ADAPTER(gain_interface, gain_uuid, gain_tr); SOF_MODULE_INIT(gain, sys_comp_module_gain_interface_init); #endif + +#if CONFIG_COMP_VOLUME_MODULE +/* modular: llext dynamic link */ + +#include +#include +#include + +#if CONFIG_COMP_PEAK_VOL +#define UUID_PEAKVOL 0x23, 0x13, 0x17, 0x8a, 0xa3, 0x94, 0x1d, 0x4e, \ + 0xaf, 0xe9, 0xfe, 0x5d, 0xba, 0xa4, 0xc3, 0x93 +SOF_LLEXT_MOD_ENTRY(peakvol, &volume_interface); +#endif + +#if CONFIG_COMP_GAIN +#define UUID_GAIN 0xa8, 0xa9, 0xbc, 0x61, 0xd0, 0x18, 0x18, 0x4a, \ + 0x8e, 0x7b, 0x26, 0x39, 0x21, 0x98, 0x04, 0xb7 +SOF_LLEXT_MOD_ENTRY(gain, &gain_interface); +#endif + +static const struct sof_man_module_manifest mod_manifest[] __section(".module") __used = { +#if CONFIG_COMP_PEAK_VOL + SOF_LLEXT_MODULE_MANIFEST("PEAKVOL", peakvol_llext_entry, 1, UUID_PEAKVOL, 10), +#endif +#if CONFIG_COMP_GAIN + SOF_LLEXT_MODULE_MANIFEST("GAIN", gain_llext_entry, 1, UUID_GAIN, 40), +#endif +}; + +SOF_LLEXT_BUILDINFO; +#endif diff --git a/src/audio/volume/volume.toml b/src/audio/volume/volume.toml new file mode 100644 index 000000000000..7ba4fc53ae83 --- /dev/null +++ b/src/audio/volume/volume.toml @@ -0,0 +1,75 @@ +#ifndef LOAD_TYPE +#define LOAD_TYPE "0" +#endif + +#if CONFIG_COMP_PEAK_VOL + [[module.entry]] + name = "PEAKVOL" + uuid = "8A171323-94A3-4E1D-AFE9-FE5DBAA4C393" + affinity_mask = "0x1" + instance_count = "10" + domain_types = "0" + load_type = LOAD_TYPE + module_type = "4" + auto_start = "0" + sched_caps = [1, 0x00008000] + + REM # pin = [dir, type, sample rate, size, container, channel-cfg] + pin = [0, 0, 0xfeef, 0xf, 0xa, 0x45ff, + 1, 0, 0xfeef, 0xf, 0xa, 0x45ff] + + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] +#if CONFIG_METEORLAKE + mod_cfg = [1, 0, 0, 0, 480, 11667000, 384, 384, 0, 11667, 0, + 2, 0, 0, 0, 480, 5943000, 192, 192, 0, 5943, 0, + 3, 0, 0, 0, 480, 12567000, 720, 720, 0, 12567, 0, + 4, 0, 0, 0, 480, 7360000, 768, 768, 0, 7360, 0, + 5, 0, 0, 0, 480, 12236000, 1536, 1536, 0, 12236, 0] +#elif CONFIG_LUNARLAKE || CONFIG_PANTHERLAKE + mod_cfg = [0, 0, 0, 0, 480, 1114000, 48, 64, 0, 0, 0, + 1, 0, 0, 0, 480, 3321600, 192, 256, 0, 0, 0, + 2, 0, 0, 0, 480, 3786000, 192, 256, 0, 0, 0, + 3, 0, 0, 0, 480, 4333000, 48, 64, 0, 0, 0, + 4, 0, 0, 0, 480, 4910000, 192, 256, 0, 0, 0, + 5, 0, 0, 0, 480, 5441000, 192, 256, 0, 0, 0, + 6, 0, 0, 0, 480, 6265000, 192, 256, 0, 0, 0] +#endif + + index = __COUNTER__ +#endif + +#if CONFIG_COMP_GAIN + [[module.entry]] + name = "GAIN" + uuid = "61BCA9A8-18D0-4A18-8E7B-2639219804B7" + affinity_mask = "0x1" + instance_count = "40" + domain_types = "0" + load_type = LOAD_TYPE + module_type = "9" + auto_start = "0" + sched_caps = [1, 0x00008000] + + REM # pin = [dir, type, sample rate, size, container, channel-cfg] + pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, + 1, 0, 0xfeef, 0xf, 0xf, 0x45ff] + + REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] +#if CONFIG_METEORLAKE + mod_cfg = [1, 0, 0, 0, 416, 12100000, 1536, 1536, 0, 12100, 0, + 2, 0, 0, 0, 416, 10183000, 384, 384, 0, 10183, 0, + 3, 0, 0, 0, 416, 8192000, 512, 512, 0, 8192, 0, + 4, 0, 0, 0, 416, 10091000, 128, 128, 0, 10091, 0, + 5, 0, 0, 0, 416, 5908000, 768, 768, 0, 5908, 0] +#elif CONFIG_LUNARLAKE || CONFIG_PANTHERLAKE + mod_cfg = [0, 0, 0, 0, 416, 914000, 48, 64, 0, 0, 0, + 1, 0, 0, 0, 416, 1321600, 192, 256, 0, 0, 0, + 2, 0, 0, 0, 416, 1786000, 192, 256, 0, 0, 0, + 3, 0, 0, 0, 416, 2333000, 48, 64, 0, 0, 0, + 4, 0, 0, 0, 416, 2910000, 192, 256, 0, 0, 0, + 5, 0, 0, 0, 416, 3441000, 192, 256, 0, 0, 0, + 6, 0, 0, 0, 416, 4265000, 192, 256, 0, 0, 0] +#endif + + index = __COUNTER__ +#endif diff --git a/src/math/fir_generic.c b/src/math/fir_generic.c index 0b19c6e14da1..24fbdc665988 100644 --- a/src/math/fir_generic.c +++ b/src/math/fir_generic.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -33,6 +34,7 @@ void fir_reset(struct fir_state_32x16 *fir) * reset so omitting setting also fir->delay to NULL. */ } +EXPORT_SYMBOL(fir_reset); int fir_delay_size(struct sof_fir_coef_data *config) { @@ -49,6 +51,7 @@ int fir_delay_size(struct sof_fir_coef_data *config) */ return (config->length + 4) * sizeof(int32_t); } +EXPORT_SYMBOL(fir_delay_size); int fir_init_coef(struct fir_state_32x16 *fir, struct sof_fir_coef_data *config) @@ -60,12 +63,14 @@ int fir_init_coef(struct fir_state_32x16 *fir, fir->coef = ASSUME_ALIGNED(&config->coef[0], 4); return 0; } +EXPORT_SYMBOL(fir_init_coef); void fir_init_delay(struct fir_state_32x16 *fir, int32_t **data) { fir->delay = *data; *data += fir->length; /* Point to next delay line start */ } +EXPORT_SYMBOL(fir_init_delay); int32_t fir_32x16(struct fir_state_32x16 *fir, int32_t x) { diff --git a/src/math/fir_hifi2ep.c b/src/math/fir_hifi2ep.c index f95b039a15fa..7f3a2d42a829 100644 --- a/src/math/fir_hifi2ep.c +++ b/src/math/fir_hifi2ep.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -32,6 +33,7 @@ void fir_reset(struct fir_state_32x16 *fir) * reset so omitting setting also fir->delay to NULL. */ } +EXPORT_SYMBOL(fir_reset); int fir_delay_size(struct sof_fir_coef_data *config) { @@ -47,6 +49,7 @@ int fir_delay_size(struct sof_fir_coef_data *config) */ return (config->length + 2) * sizeof(int32_t); } +EXPORT_SYMBOL(fir_delay_size); int fir_init_coef(struct fir_state_32x16 *fir, struct sof_fir_coef_data *config) @@ -62,6 +65,7 @@ int fir_init_coef(struct fir_state_32x16 *fir, fir->coef = (ae_p16x2s *)&config->coef[0]; return 0; } +EXPORT_SYMBOL(fir_init_coef); void fir_init_delay(struct fir_state_32x16 *fir, int32_t **data) { @@ -70,6 +74,7 @@ void fir_init_delay(struct fir_state_32x16 *fir, int32_t **data) fir->rwp = (ae_p24x2f *)(fir->delay + fir->length - 1); *data += fir->length; /* Point to next delay line start */ } +EXPORT_SYMBOL(fir_init_delay); void fir_get_lrshifts(struct fir_state_32x16 *fir, int *lshift, int *rshift) @@ -77,6 +82,7 @@ void fir_get_lrshifts(struct fir_state_32x16 *fir, int *lshift, *lshift = (fir->out_shift < 0) ? -fir->out_shift : 0; *rshift = (fir->out_shift > 0) ? fir->out_shift : 0; } +EXPORT_SYMBOL(fir_get_lrshifts); /* HiFi EP has the follow number of reqisters that should not be exceeded * 4x 56 bit registers in register file Q diff --git a/src/math/fir_hifi3.c b/src/math/fir_hifi3.c index 30be6b8196cc..a9cb19e3072f 100644 --- a/src/math/fir_hifi3.c +++ b/src/math/fir_hifi3.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -32,6 +33,7 @@ void fir_reset(struct fir_state_32x16 *fir) * reset so omitting setting also fir->delay to NULL. */ } +EXPORT_SYMBOL(fir_reset); int fir_delay_size(struct sof_fir_coef_data *config) { @@ -48,6 +50,7 @@ int fir_delay_size(struct sof_fir_coef_data *config) */ return (config->length + 2) * sizeof(int32_t); } +EXPORT_SYMBOL(fir_delay_size); int fir_init_coef(struct fir_state_32x16 *fir, struct sof_fir_coef_data *config) @@ -63,6 +66,7 @@ int fir_init_coef(struct fir_state_32x16 *fir, fir->coef = (ae_f16x4 *)&config->coef[0]; return 0; } +EXPORT_SYMBOL(fir_init_coef); void fir_init_delay(struct fir_state_32x16 *fir, int32_t **data) { @@ -71,6 +75,7 @@ void fir_init_delay(struct fir_state_32x16 *fir, int32_t **data) fir->rwp = (ae_int32 *)(fir->delay + fir->length - 1); *data += fir->length; /* Point to next delay line start */ } +EXPORT_SYMBOL(fir_init_delay); void fir_get_lrshifts(struct fir_state_32x16 *fir, int *lshift, int *rshift) @@ -78,6 +83,7 @@ void fir_get_lrshifts(struct fir_state_32x16 *fir, int *lshift, *lshift = (fir->out_shift < 0) ? -fir->out_shift : 0; *rshift = (fir->out_shift > 0) ? fir->out_shift : 0; } +EXPORT_SYMBOL(fir_get_lrshifts); /* HiFi EP has the follow number of reqisters that should not be exceeded * 4x 56 bit registers in register file Q @@ -245,5 +251,6 @@ void fir_32x16_2x_hifi3(struct fir_state_32x16 *fir, ae_int32 x0, ae_int32 x1, AE_S32_L_I(AE_ROUND32F48SSYM(b), (ae_int32 *)y1, 0); AE_S32_L_I(AE_ROUND32F48SSYM(a), (ae_int32 *)y0, 0); } +EXPORT_SYMBOL(fir_32x16_2x_hifi3); #endif diff --git a/src/math/numbers.c b/src/math/numbers.c index bd2fa67ffa69..76179b954533 100644 --- a/src/math/numbers.c +++ b/src/math/numbers.c @@ -179,4 +179,7 @@ uint32_t crc32(uint32_t base, const void *data, uint32_t bytes) #if !CONFIG_64BIT uint64_t __udivdi3(uint64_t a, uint64_t b); EXPORT_SYMBOL(__udivdi3); + +int64_t __divdi3(int64_t a, int64_t b); +EXPORT_SYMBOL(__divdi3); #endif diff --git a/src/module/audio/sink_api.c b/src/module/audio/sink_api.c index 856a6bb5689e..5ec904d61b2f 100644 --- a/src/module/audio/sink_api.c +++ b/src/module/audio/sink_api.c @@ -97,6 +97,7 @@ int sink_set_rate(struct sof_sink *sink, unsigned int rate) return sink->ops->on_audio_format_set(sink); return 0; } +EXPORT_SYMBOL(sink_set_rate); int sink_set_channels(struct sof_sink *sink, unsigned int channels) { @@ -114,6 +115,7 @@ int sink_set_buffer_fmt(struct sof_sink *sink, uint32_t buffer_fmt) return sink->ops->on_audio_format_set(sink); return 0; } +EXPORT_SYMBOL(sink_set_buffer_fmt); int sink_set_overrun(struct sof_sink *sink, bool overrun_permitted) { @@ -129,6 +131,7 @@ int sink_set_params(struct sof_sink *sink, struct sof_ipc_stream_params *params, return sink->ops->audio_set_ipc_params(sink, params, force_update); return 0; } +EXPORT_SYMBOL(sink_set_params); int sink_set_alignment_constants(struct sof_sink *sink, const uint32_t byte_align, const uint32_t frame_align_req) @@ -137,3 +140,4 @@ int sink_set_alignment_constants(struct sof_sink *sink, const uint32_t byte_alig return sink->ops->set_alignment_constants(sink, byte_align, frame_align_req); return 0; } +EXPORT_SYMBOL(sink_set_alignment_constants); diff --git a/tools/rimage/config/lnl.toml.h b/tools/rimage/config/lnl.toml.h index 3386f06fe074..247a4975f9c8 100644 --- a/tools/rimage/config/lnl.toml.h +++ b/tools/rimage/config/lnl.toml.h @@ -32,12 +32,8 @@ #include