Skip to content

Commit 02f847a

Browse files
author
Jyri Sarha
committed
module-adapter: Move pipeline_comp_dp_task_init() after mod struct inits
Move pipeline_comp_dp_task_init() call after module private data initializations so that the struct module_config is available already at pipeline_comp_dp_task_init() init time. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent 3f7738d commit 02f847a

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

src/audio/module_adapter/module_adapter.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,17 @@ struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv,
250250

251251
struct comp_dev *dev = mod->dev;
252252

253+
dst = &mod->priv.cfg;
254+
/*
255+
* NOTE: dst->ext_data points to stack variable and contains
256+
* pointers to IPC payload mailbox, so its only valid in
257+
* functions that called from this function. This why
258+
* the pointer is set NULL before this function exits.
259+
*/
260+
#if CONFIG_IPC_MAJOR_4
261+
dst->ext_data = &ext_data;
262+
#endif
263+
253264
#if CONFIG_ZEPHYR_DP_SCHEDULER
254265
/* create a task for DP processing */
255266
if (config->proc_domain == COMP_PROCESSING_DOMAIN_DP) {
@@ -262,16 +273,6 @@ struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv,
262273
}
263274
#endif /* CONFIG_ZEPHYR_DP_SCHEDULER */
264275

265-
dst = &mod->priv.cfg;
266-
/*
267-
* NOTE: dst->ext_data points to stack variable and contains
268-
* pointers to IPC payload mailbox, so its only valid in
269-
* functions that called from this function. This why
270-
* the pointer is set NULL before this function exits.
271-
*/
272-
#if CONFIG_IPC_MAJOR_4
273-
dst->ext_data = &ext_data;
274-
#endif
275276
ret = module_adapter_init_data(dev, dst, config, &spec);
276277
if (ret) {
277278
comp_err(dev, "%d: module init data failed",

0 commit comments

Comments
 (0)