Skip to content
Closed
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
1 change: 1 addition & 0 deletions app/boards/intel_adsp_ace15_mtpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ CONFIG_WATCHDOG=y
CONFIG_TIMESLICE_PER_THREAD=y
CONFIG_THREAD_RUNTIME_STATS=y
CONFIG_SCHED_THREAD_USAGE=y
CONFIG_RTIO=y

# Zephyr / device drivers
CONFIG_CLOCK_CONTROL=y
Expand Down
1 change: 1 addition & 0 deletions app/boards/intel_adsp_ace20_lnl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ CONFIG_LLEXT_STORAGE_WRITABLE=y
CONFIG_LLEXT_EXPERIMENTAL=y
CONFIG_MODULES=y
CONFIG_TIMING_FUNCTIONS=y
CONFIG_RTIO=y

# Zephyr / device drivers
CONFIG_CLOCK_CONTROL=y
Expand Down
1 change: 1 addition & 0 deletions app/boards/intel_adsp_ace30_ptl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ CONFIG_LLEXT=y
CONFIG_LLEXT_STORAGE_WRITABLE=y
CONFIG_LLEXT_EXPERIMENTAL=y
CONFIG_MODULES=y
CONFIG_RTIO=y

# Zephyr / device drivers
CONFIG_CLOCK_CONTROL=y
Expand Down
4 changes: 1 addition & 3 deletions src/audio/aria/aria.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,8 @@ static const struct module_interface aria_interface = {
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

SOF_LLEXT_MOD_ENTRY(aria, &aria_interface);

static const struct sof_man_module_manifest mod_manifest __section(".module") __used =
SOF_LLEXT_MODULE_MANIFEST("ARIA", aria_llext_entry, 1, SOF_REG_UUID(aria), 8);
SOF_LLEXT_MODULE_MANIFEST("ARIA", &aria_interface, 1, SOF_REG_UUID(aria), 8);

SOF_LLEXT_BUILDINFO;

Expand Down
4 changes: 1 addition & 3 deletions src/audio/asrc/asrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,10 +892,8 @@ static const struct module_interface asrc_interface = {
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

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, SOF_REG_UUID(asrc4), 2),
SOF_LLEXT_MODULE_MANIFEST("ASRC", &asrc_interface, 1, SOF_REG_UUID(asrc4), 2),
};

SOF_LLEXT_BUILDINFO;
Expand Down
4 changes: 1 addition & 3 deletions src/audio/codec/dts/dts.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,8 @@ static const struct module_interface dts_interface = {
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

SOF_LLEXT_MOD_ENTRY(dts, &dts_interface);

static const struct sof_man_module_manifest mod_manifest __section(".module") __used =
SOF_LLEXT_MODULE_MANIFEST("DTS", dts_llext_entry, 1, SOF_REG_UUID(dts), 40);
SOF_LLEXT_MODULE_MANIFEST("DTS", &dts_interface, 1, SOF_REG_UUID(dts), 40);

SOF_LLEXT_BUILDINFO;

Expand Down
4 changes: 1 addition & 3 deletions src/audio/crossover/crossover.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,10 +642,8 @@ static const struct module_interface crossover_interface = {
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

SOF_LLEXT_MOD_ENTRY(crossover, &crossover_interface);

static const struct sof_man_module_manifest mod_manifest __section(".module") __used =
SOF_LLEXT_MODULE_MANIFEST("XOVER", crossover_llext_entry, 1, SOF_REG_UUID(crossover), 40);
SOF_LLEXT_MODULE_MANIFEST("XOVER", &crossover_interface, 1, SOF_REG_UUID(crossover), 40);

SOF_LLEXT_BUILDINFO;

Expand Down
4 changes: 1 addition & 3 deletions src/audio/dcblock/dcblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,8 @@ static const struct module_interface dcblock_interface = {
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

SOF_LLEXT_MOD_ENTRY(dcblock, &dcblock_interface);

static const struct sof_man_module_manifest mod_manifest __section(".module") __used =
SOF_LLEXT_MODULE_MANIFEST("DCBLOCK", dcblock_llext_entry, 1, SOF_REG_UUID(dcblock), 40);
SOF_LLEXT_MODULE_MANIFEST("DCBLOCK", &dcblock_interface, 1, SOF_REG_UUID(dcblock), 40);

SOF_LLEXT_BUILDINFO;

Expand Down
4 changes: 1 addition & 3 deletions src/audio/drc/drc.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,8 @@ static const struct module_interface drc_interface = {
#include <module/module/api_ver.h>
#include <rimage/sof/user/manifest.h>

SOF_LLEXT_MOD_ENTRY(drc, &drc_interface);

static const struct sof_man_module_manifest mod_manifest __section(".module") __used =
SOF_LLEXT_MODULE_MANIFEST("DRC", drc_llext_entry, 1, SOF_REG_UUID(drc), 40);
SOF_LLEXT_MODULE_MANIFEST("DRC", &drc_interface, 1, SOF_REG_UUID(drc), 40);

SOF_LLEXT_BUILDINFO;

Expand Down
4 changes: 1 addition & 3 deletions src/audio/eq_fir/eq_fir.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,8 @@ static const struct module_interface eq_fir_interface = {
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

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, SOF_REG_UUID(eq_fir), 40);
SOF_LLEXT_MODULE_MANIFEST("EQFIR", &eq_fir_interface, 1, SOF_REG_UUID(eq_fir), 40);

SOF_LLEXT_BUILDINFO;

Expand Down
4 changes: 1 addition & 3 deletions src/audio/eq_iir/eq_iir.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,8 @@ static const struct module_interface eq_iir_interface = {
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

SOF_LLEXT_MOD_ENTRY(eq_iir, &eq_iir_interface);

static const struct sof_man_module_manifest mod_manifest __section(".module") __used =
SOF_LLEXT_MODULE_MANIFEST("EQIIR", eq_iir_llext_entry, 1, SOF_REG_UUID(eq_iir), 40);
SOF_LLEXT_MODULE_MANIFEST("EQIIR", &eq_iir_interface, 1, SOF_REG_UUID(eq_iir), 40);

SOF_LLEXT_BUILDINFO;

Expand Down
4 changes: 1 addition & 3 deletions src/audio/google/google_ctc_audio_processing.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,8 @@ static const struct module_interface google_ctc_audio_processing_interface = {
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

SOF_LLEXT_MOD_ENTRY(google_ctc_audio_processing, &google_ctc_audio_processing_interface);

static const struct sof_man_module_manifest mod_manifest __section(".module") __used =
SOF_LLEXT_MODULE_MANIFEST("CTC", google_ctc_audio_processing_llext_entry,
SOF_LLEXT_MODULE_MANIFEST("CTC", &google_ctc_audio_processing_interface,
1, SOF_REG_UUID(google_ctc_audio_processing), 40);

SOF_LLEXT_BUILDINFO;
Expand Down
4 changes: 1 addition & 3 deletions src/audio/google/google_rtc_audio_processing.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,10 +856,8 @@ static const struct module_interface google_rtc_audio_processing_interface = {
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

SOF_LLEXT_MOD_ENTRY(google_rtc_audio_processing, &google_rtc_audio_processing_interface);

static const struct sof_man_module_manifest mod_manifest __section(".module") __used =
SOF_LLEXT_MODULE_MANIFEST("RTC_AEC", google_rtc_audio_processing_llext_entry,
SOF_LLEXT_MODULE_MANIFEST("RTC_AEC", &google_rtc_audio_processing_interface,
7, SOF_REG_UUID(google_rtc_audio_processing), 1);

SOF_LLEXT_BUILDINFO;
Expand Down
4 changes: 1 addition & 3 deletions src/audio/igo_nr/igo_nr.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,10 +895,8 @@ static const struct module_interface igo_nr_interface = {
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

SOF_LLEXT_MOD_ENTRY(igo_nr, &igo_nr_interface);

static const struct sof_man_module_manifest mod_manifest __section(".module") __used =
SOF_LLEXT_MODULE_MANIFEST("IGO_NR", igo_nr_llext_entry, 1, SOF_REG_UUID(igo_nr), 40);
SOF_LLEXT_MODULE_MANIFEST("IGO_NR", &igo_nr_interface, 1, SOF_REG_UUID(igo_nr), 40);

SOF_LLEXT_BUILDINFO;

Expand Down
4 changes: 1 addition & 3 deletions src/audio/mfcc/mfcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,8 @@ static const struct module_interface mfcc_interface = {
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

SOF_LLEXT_MOD_ENTRY(mfcc, &mfcc_interface);

static const struct sof_man_module_manifest mod_manifest __section(".module") __used =
SOF_LLEXT_MODULE_MANIFEST("MFCC", mfcc_llext_entry, 1, SOF_REG_UUID(mfcc), 40);
SOF_LLEXT_MODULE_MANIFEST("MFCC", &mfcc_interface, 1, SOF_REG_UUID(mfcc), 40);

SOF_LLEXT_BUILDINFO;

Expand Down
7 changes: 2 additions & 5 deletions src/audio/mixin_mixout/mixin_mixout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1020,13 +1020,10 @@ static const struct module_interface mixout_interface = {
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

SOF_LLEXT_MOD_ENTRY(mixin, &mixin_interface);
SOF_LLEXT_MOD_ENTRY(mixout, &mixout_interface);

static const struct sof_man_module_manifest mod_manifest[] __section(".module") __used =
{
SOF_LLEXT_MODULE_MANIFEST("MIXIN", mixin_llext_entry, 1, SOF_REG_UUID(mixin), 30),
SOF_LLEXT_MODULE_MANIFEST("MIXOUT", mixout_llext_entry, 1, SOF_REG_UUID(mixout), 30),
SOF_LLEXT_MODULE_MANIFEST("MIXIN", &mixin_interface, 1, SOF_REG_UUID(mixin), 30),
SOF_LLEXT_MODULE_MANIFEST("MIXOUT", &mixout_interface, 1, SOF_REG_UUID(mixout), 30),
};

SOF_LLEXT_BUILDINFO;
Expand Down
71 changes: 61 additions & 10 deletions src/audio/module_adapter/module/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@
*/

#include <rtos/symbol.h>

#include <sof/audio/module_adapter/module/generic.h>
#include <sof/schedule/dp_schedule.h>
#if CONFIG_IPC_MAJOR_4
#include <ipc4/header.h>
#include <ipc4/module.h>
#include <ipc4/pipeline.h>
#endif

LOG_MODULE_DECLARE(module_adapter, CONFIG_SOF_LOG_LEVEL);

Expand Down Expand Up @@ -95,7 +100,13 @@ int module_init(struct processing_module *mod)
list_init(&md->memory.mem_list);

/* Now we can proceed with module specific initialization */
ret = interface->init(mod);
#if CONFIG_IPC_MAJOR_4
if (mod->dev->ipc_config.proc_domain == COMP_PROCESSING_DOMAIN_DP)
ret = scheduler_dp_rtio_ipc(mod, SOF_IPC4_MOD_INIT_INSTANCE, NULL);
else
#endif
ret = interface->init(mod);

if (ret) {
comp_err(dev, "module_init() error %d: module specific init failed, comp id %d",
ret, dev_comp_id(dev));
Expand Down Expand Up @@ -242,7 +253,27 @@ int module_prepare(struct processing_module *mod,
return -EPERM;
#endif
if (ops->prepare) {
int ret = ops->prepare(mod, sources, num_of_sources, sinks, num_of_sinks);
int ret;

if (mod->dev->ipc_config.proc_domain == COMP_PROCESSING_DOMAIN_DP) {
#if CONFIG_IPC_MAJOR_4
union scheduler_dp_rtio_ipc_param param = {
.pipeline_state = {
.trigger_cmd = COMP_TRIGGER_PREPARE,
.state = SOF_IPC4_PIPELINE_STATE_RUNNING,
.n_sources = num_of_sources,
.sources = sources,
.n_sinks = num_of_sinks,
.sinks = sinks,
},
};
ret = scheduler_dp_rtio_ipc(mod, SOF_IPC4_GLB_SET_PIPELINE_STATE, &param);
#else
ret = 0;
#endif
} else {
ret = ops->prepare(mod, sources, num_of_sources, sinks, num_of_sinks);
}

if (ret) {
comp_err(dev, "module_prepare() error %d: module specific prepare failed, comp_id %d",
Expand Down Expand Up @@ -366,11 +397,21 @@ int module_reset(struct processing_module *mod)
if (md->state < MODULE_IDLE)
return 0;
#endif
/* cancel task if DP task*/
if (mod->dev->ipc_config.proc_domain == COMP_PROCESSING_DOMAIN_DP && mod->dev->task)
schedule_task_cancel(mod->dev->task);

if (ops->reset) {
ret = ops->reset(mod);
if (mod->dev->ipc_config.proc_domain == COMP_PROCESSING_DOMAIN_DP) {
#if CONFIG_IPC_MAJOR_4
union scheduler_dp_rtio_ipc_param param = {
.pipeline_state.trigger_cmd = COMP_TRIGGER_STOP,
};
ret = scheduler_dp_rtio_ipc(mod, SOF_IPC4_GLB_SET_PIPELINE_STATE, &param);
#else
ret = 0;
#endif
} else {
ret = ops->reset(mod);
}

if (ret) {
if (ret != PPL_STATUS_PATH_STOP)
comp_err(mod->dev,
Expand Down Expand Up @@ -423,7 +464,7 @@ int module_free(struct processing_module *mod)
struct module_data *md = &mod->priv;
int ret = 0;

if (ops->free) {
if (ops->free && mod->dev->ipc_config.proc_domain != COMP_PROCESSING_DOMAIN_DP) {
ret = ops->free(mod);
if (ret)
comp_warn(mod->dev, "error: %d for %d",
Expand Down Expand Up @@ -570,8 +611,18 @@ int module_bind(struct processing_module *mod, struct bind_info *bind_data)
if (ret)
return ret;

if (ops->bind)
ret = ops->bind(mod, bind_data);
if (ops->bind) {
if (mod->dev->ipc_config.proc_domain == COMP_PROCESSING_DOMAIN_DP) {
#if CONFIG_IPC_MAJOR_4
union scheduler_dp_rtio_ipc_param param = {
.bind_data = bind_data,
};
ret = scheduler_dp_rtio_ipc(mod, SOF_IPC4_MOD_BIND, &param);
#endif
} else {
ret = ops->bind(mod, bind_data);
}
}

return ret;
}
Expand Down
4 changes: 1 addition & 3 deletions src/audio/module_adapter/module/waves/waves.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,10 +913,8 @@ static const struct module_interface waves_interface = {
#include <module/module/llext.h>
#include <rimage/sof/user/manifest.h>

SOF_LLEXT_MOD_ENTRY(waves, &waves_interface);

static const struct sof_man_module_manifest mod_manifest __section(".module") __used =
SOF_LLEXT_MODULE_MANIFEST("WAVES", waves_llext_entry, 7, SOF_REG_UUID(waves), 8);
SOF_LLEXT_MODULE_MANIFEST("WAVES", &waves_interface, 7, SOF_REG_UUID(waves), 8);

SOF_LLEXT_BUILDINFO;

Expand Down
Loading
Loading