Skip to content

Commit d56ccf9

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 11f80ab commit d56ccf9

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
@@ -234,6 +234,17 @@ struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv,
234234

235235
struct comp_dev *dev = mod->dev;
236236

237+
dst = &mod->priv.cfg;
238+
/*
239+
* NOTE: dst->ext_data points to stack variable and contains
240+
* pointers to IPC payload mailbox, so its only valid in
241+
* functions that called from this function. This why
242+
* the pointer is set NULL before this function exits.
243+
*/
244+
#if CONFIG_IPC_MAJOR_4
245+
dst->ext_data = &ext_data;
246+
#endif
247+
237248
#if CONFIG_ZEPHYR_DP_SCHEDULER
238249
/* create a task for DP processing */
239250
if (config->proc_domain == COMP_PROCESSING_DOMAIN_DP) {
@@ -246,16 +257,6 @@ struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv,
246257
}
247258
#endif /* CONFIG_ZEPHYR_DP_SCHEDULER */
248259

249-
dst = &mod->priv.cfg;
250-
/*
251-
* NOTE: dst->ext_data points to stack variable and contains
252-
* pointers to IPC payload mailbox, so its only valid in
253-
* functions that called from this function. This why
254-
* the pointer is set NULL before this function exits.
255-
*/
256-
#if CONFIG_IPC_MAJOR_4
257-
dst->ext_data = &ext_data;
258-
#endif
259260
ret = module_adapter_init_data(dev, dst, config, &spec);
260261
if (ret) {
261262
comp_err(dev, "%d: module init data failed",

0 commit comments

Comments
 (0)