From 214518edea7f70349c1208fbab44679bb1497c56 Mon Sep 17 00:00:00 2001 From: Iuliana Prodan Date: Tue, 20 Jul 2021 22:24:43 +0300 Subject: [PATCH] zephyr: wrapper: add notifier_register(ipc_send_queued_msg) for SOF_SCHEDULE_LL_DMA In XTOS SOF, ipc_send_queued_msg() is run by task_main_primary_core(). In Zephyr we need to schedule ipc_send_queued_msg() using a notifier triggered by the periodic ll_scheduler. This is similar to commit c194125b83c2 ("zephyr: add notifier_register(ipc_send_queued_msg) in task_main_start()") For i.MX we need to use this temporary fix for SOF_SCHEDULE_LL_DMA, also. Signed-off-by: Iuliana Prodan --- zephyr/wrapper.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zephyr/wrapper.c b/zephyr/wrapper.c index cf4a6b329..9128d6371 100644 --- a/zephyr/wrapper.c +++ b/zephyr/wrapper.c @@ -611,8 +611,14 @@ int task_main_start(struct sof *sof) /* init pipeline position offsets */ pipeline_posn_init(sof); +#if defined(CONFIG_IMX) +#define SOF_IPC_QUEUED_DOMAIN SOF_SCHEDULE_LL_DMA +#else +#define SOF_IPC_QUEUED_DOMAIN SOF_SCHEDULE_LL_TIMER +#endif + /* Temporary fix for issue #4356 */ - (void)notifier_register(NULL, scheduler_get_data(SOF_SCHEDULE_LL_TIMER), + (void)notifier_register(NULL, scheduler_get_data(SOF_IPC_QUEUED_DOMAIN), NOTIFIER_ID_LL_POST_RUN, ipc_send_queued_callback, 0);