Skip to content

Commit

Permalink
llext: add maximum instance count support
Browse files Browse the repository at this point in the history
Maximum instance count cannot be zero, they have to be supplied by
respective modules.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
  • Loading branch information
lyakh committed Jul 16, 2024
1 parent 1f3b74f commit ebdab32
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/audio/eq_iir/eq_iir.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ SOF_MODULE_INIT(eq_iir, sys_comp_module_eq_iir_interface_init);
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, UUID_EQIIR);
SOF_LLEXT_MODULE_MANIFEST("EQIIR", eq_iir_llext_entry, 1, UUID_EQIIR, 40);

SOF_LLEXT_BUILDINFO;

Expand Down
4 changes: 2 additions & 2 deletions src/audio/mixin_mixout/mixin_mixout.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,8 +982,8 @@ 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, UUID_MIXIN),
SOF_LLEXT_MODULE_MANIFEST("MIXOUT", mixout_llext_entry, 1, UUID_MIXOUT),
SOF_LLEXT_MODULE_MANIFEST("MIXIN", mixin_llext_entry, 1, UUID_MIXIN, 30),
SOF_LLEXT_MODULE_MANIFEST("MIXOUT", mixout_llext_entry, 1, UUID_MIXOUT, 30),
};

SOF_LLEXT_BUILDINFO;
Expand Down
3 changes: 2 additions & 1 deletion src/include/module/module/llext.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
#ifndef MODULE_LLEXT_H
#define MODULE_LLEXT_H

#define SOF_LLEXT_MODULE_MANIFEST(manifest_name, entry, affinity, mod_uuid) \
#define SOF_LLEXT_MODULE_MANIFEST(manifest_name, entry, affinity, mod_uuid, instances) \
{ \
.module = { \
.name = manifest_name, \
.uuid = {mod_uuid}, \
.entry_point = (uint32_t)(entry), \
.instance_max_count = instances, \
.type = { \
.load_type = SOF_MAN_MOD_TYPE_LLEXT, \
.domain_ll = 1, \
Expand Down
1 change: 1 addition & 0 deletions src/samples/audio/smart_amp_test_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ static const struct sof_man_module_manifest main_manifest __section(".module") _
.uuid = {0x1E, 0x96, 0x7A, 0x16, 0xE4, 0x8A, 0xEA, 0x11,
0x89, 0xF1, 0x00, 0x0C, 0x29, 0xCE, 0x16, 0x35},
.entry_point = (uint32_t)smart_amp_test_llext_entry,
.instance_max_count = 1,
.type = {
#ifdef __SOF_MODULE_SERVICE_BUILD__
.load_type = SOF_MAN_MOD_TYPE_MODULE,
Expand Down

0 comments on commit ebdab32

Please sign in to comment.