Skip to content

Commit 3f3ac8d

Browse files
committed
module_adapter: Extend module_adapter_new_ext
Add dev_user parameter. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
1 parent c72675f commit 3f3ac8d

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/audio/module_adapter/module_adapter.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ LOG_MODULE_REGISTER(module_adapter, CONFIG_SOF_LOG_LEVEL);
4141
struct comp_dev *module_adapter_new(const struct comp_driver *drv,
4242
const struct comp_ipc_config *config, const void *spec)
4343
{
44-
return module_adapter_new_ext(drv, config, spec, NULL);
44+
return module_adapter_new_ext(drv, config, spec, NULL, NULL);
4545
}
4646

4747
/*
@@ -58,7 +58,7 @@ struct comp_dev *module_adapter_new(const struct comp_driver *drv,
5858
*/
5959
struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv,
6060
const struct comp_ipc_config *config, const void *spec,
61-
void *mod_priv)
61+
void *mod_priv, struct userspace_context* user_ctx)
6262
{
6363
int ret;
6464
struct comp_dev *dev;
@@ -100,6 +100,7 @@ struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv,
100100

101101
module_set_private_data(mod, mod_priv);
102102
mod->dev = dev;
103+
mod->user_ctx = user_ctx;
103104
dev->mod = mod;
104105

105106
list_init(&mod->raw_data_buffers_list);

src/include/sof/audio/module_adapter/module/generic.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,10 @@ int module_unbind(struct processing_module *mod, struct bind_info *unbind_data);
224224

225225
struct comp_dev *module_adapter_new(const struct comp_driver *drv,
226226
const struct comp_ipc_config *config, const void *spec);
227+
struct userspace_context;
227228
struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv,
228229
const struct comp_ipc_config *config, const void *spec,
229-
void *mod_priv);
230+
void *mod_priv, struct userspace_context* user_ctx);
230231
int module_adapter_prepare(struct comp_dev *dev);
231232
int module_adapter_params(struct comp_dev *dev, struct sof_ipc_stream_params *params);
232233
int module_adapter_copy(struct comp_dev *dev);

src/library_manager/lib_manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ static struct comp_dev *lib_manager_module_create(const struct comp_driver *drv,
641641
if (ops && comp_set_adapter_ops(drv, ops) < 0)
642642
goto err;
643643

644-
dev = module_adapter_new_ext(drv, config, spec, adapter_priv);
644+
dev = module_adapter_new_ext(drv, config, spec, adapter_priv, NULL);
645645
if (!dev)
646646
goto err;
647647

0 commit comments

Comments
 (0)