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
4 changes: 4 additions & 0 deletions src/audio/module_adapter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ if(zephyr) ### Zephyr ###
library/native_system_service.c
)

zephyr_library_sources_ifdef(CONFIG_SOF_USERSPACE_PROXY
library/userspace_proxy.c
)

zephyr_library_sources_ifdef(CONFIG_PASSTHROUGH_CODEC
module/passthrough.c
)
Expand Down
12 changes: 7 additions & 5 deletions src/audio/module_adapter/iadk/system_agent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <iadk_module_adapter.h>
#include <system_agent.h>
#include <sof/audio/module_adapter/library/native_system_service.h>
#include <sof/audio/module_adapter/library/native_system_agent.h>

using namespace intel_adsp;
using namespace intel_adsp::system;
Expand Down Expand Up @@ -124,16 +125,17 @@ int SystemAgent::CheckIn(ProcessingModuleFactoryInterface& module_factory,
typedef int (*create_instance_f)(uint32_t module_id, uint32_t instance_id, uint32_t core_id,
void *mod_cfg, void *parent_ppl, void **mod_ptr);

int system_agent_start(uintptr_t entry_point, uint32_t module_id, uint32_t instance_id,
uint32_t core_id, uint32_t log_handle, void* mod_cfg,
int system_agent_start(const struct system_agent_params *params,
const void **adapter)
{
uint32_t ret;
SystemAgent system_agent(module_id, instance_id, core_id, log_handle);
SystemAgent system_agent(params->module_id, params->instance_id, params->core_id,
params->log_handle);
void* system_agent_p = reinterpret_cast<void*>(&system_agent);

create_instance_f ci = (create_instance_f)(entry_point);
ret = ci(module_id, instance_id, core_id, mod_cfg, NULL, &system_agent_p);
create_instance_f ci = (create_instance_f)(params->entry_point);
ret = ci(params->module_id, params->instance_id, params->core_id, params->mod_cfg, NULL,
&system_agent_p);

IadkModuleAdapter* module_adapter = reinterpret_cast<IadkModuleAdapter*>(system_agent_p);
*adapter = module_adapter;
Expand Down
15 changes: 7 additions & 8 deletions src/audio/module_adapter/library/native_system_agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,20 @@ typedef void* (*native_create_instance_f)(void *mod_cfg, void *parent_ppl,

struct native_system_agent native_sys_agent;

int native_system_agent_start(uintptr_t entry_point, uint32_t module_id, uint32_t instance_id,
uint32_t core_id, uint32_t log_handle, void *mod_cfg,
int native_system_agent_start(const struct system_agent_params *params,
const void **iface)
{
native_sys_agent.module_id = module_id;
native_sys_agent.instance_id = instance_id;
native_sys_agent.core_id = core_id;
native_sys_agent.log_handle = log_handle;
native_sys_agent.module_id = params->module_id;
native_sys_agent.instance_id = params->instance_id;
native_sys_agent.core_id = params->core_id;
native_sys_agent.log_handle = params->log_handle;
const void *ret;

void *system_agent_p = &native_sys_agent;

native_create_instance_f ci = (native_create_instance_f)entry_point;
native_create_instance_f ci = (native_create_instance_f)params->entry_point;

ret = ci(mod_cfg, NULL, &system_agent_p);
ret = ci(params->mod_cfg, NULL, &system_agent_p);
if (!ret)
return -EINVAL;

Expand Down
Loading
Loading