Skip to content

Commit 736afaa

Browse files
committed
ipc: move standalone-test check later in ipc_init()
If CONFIG_SOF_BOOT_TEST_STANDALONE is set, ipc_init() is terminated early. This ensures SOF will not start to generate or respond to IPC messages that could potentially interfere with standalone test cases (some of which send and receive IPCs). The current implementation leaves the component list uninitialized and this can cause trouble to standalone tests that want to utilzie common IPC code to build messages. Fix this problem by executing more of ipc_init() also in the standalone mode. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent c450dc0 commit 736afaa

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/ipc/ipc-common.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -506,11 +506,6 @@ __cold int ipc_init(struct sof *sof)
506506

507507
tr_dbg(&ipc_tr, "entry");
508508

509-
#if CONFIG_SOF_BOOT_TEST_STANDALONE
510-
LOG_INF("SOF_BOOT_TEST_STANDALONE, skipping platform IPC init.");
511-
return 0;
512-
#endif
513-
514509
#ifdef CONFIG_SOF_USERSPACE_LL
515510
heap = zephyr_ll_user_heap();
516511

@@ -560,6 +555,11 @@ __cold int ipc_init(struct sof *sof)
560555
io_perf_monitor_init_data(&ipc->io_perf_out_msg_count, &init_data);
561556
#endif
562557

558+
#if CONFIG_SOF_BOOT_TEST_STANDALONE
559+
LOG_INF("SOF_BOOT_TEST_STANDALONE, disabling IPC.");
560+
return 0;
561+
#endif
562+
563563
#ifdef __ZEPHYR__
564564
k_tid_t thread;
565565

0 commit comments

Comments
 (0)