Skip to content

Commit bb97220

Browse files
committed
progress
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
1 parent a75633b commit bb97220

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/audio/module_adapter/library/userspace_proxy.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ DECLARE_TR_CTX(userspace_proxy_tr, SOF_UUID(userspace_proxy_uuid), LOG_LEVEL_INF
4949

5050
static const struct module_interface userspace_proxy_interface;
5151

52-
#if !IS_ENABLED(CONFIG_SOF_USERSPACE_MOD_IPC_BY_DP_THREAD)
52+
#if IS_ENABLED(CONFIG_SOF_USERSPACE_MOD_IPC_BY_DP_THREAD)
53+
#include <sof/audio/module_adapter/iadk/system_agent.h>
54+
#else
5355
/* IPC requests targeting userspace modules are handled through a user work queue.
5456
* Each userspace module provides its own work item that carries the IPC request parameters.
5557
* The worker thread is switched into the module's memory domain and receives the work item.
@@ -336,8 +338,8 @@ static int userspace_proxy_start_agent(struct userspace_context *user_ctx,
336338

337339
*agent_interface = params->ext.agent.out_interface;
338340
return params->status;
339-
}
340341
#endif
342+
}
341343
return 0;
342344
}
343345

@@ -439,8 +441,10 @@ static int userspace_proxy_init(struct processing_module *mod)
439441
if (ret)
440442
return ret;
441443

442-
*agent_interface = params->ext.agent.out_interface;
443-
mod->user_ctx->interface = *ops;
444+
if (params->ext.agent.start_fn == system_agent_start)
445+
module_set_private_data(mod, params->ext.agent.out_interface);
446+
else
447+
mod->user_ctx->interface = params->ext.agent.out_interface;
444448
}
445449
#endif
446450

src/include/sof/audio/module_adapter/library/userspace_proxy_user.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct module_agent_params {
1313
system_agent_start_fn start_fn;
1414
struct system_agent_params params;
1515
byte_array_t mod_cfg;
16-
const void *out_interface;
16+
void *out_interface;
1717
};
1818

1919
struct module_large_cfg_set_params {

0 commit comments

Comments
 (0)