mirror of https://github.com/thesofproject/sof.git
zephyr: add notifier_register(ipc_send_queued_msg) in task_main_start()
Fixes #4356 In XTOS SOF, ipc_send_queued_msg() is run by task_main_primary_core(), the initialization of which has a hard and circular dependency with the initialization of the EDF scheduler. This EDF scheduler is not part of Zephyr. Because of the circular dependency it does not seem possible (nor desirable?) to refactor this code and make it compatible with Zephyr. So schedule ipc_send_queued_msg() differently in Zephyr: using a notifier triggered by the periodic Low Latency scheduler. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
cf3a7d1604
commit
c194125b83
|
@ -406,6 +406,15 @@ unsigned int _xtos_ints_off(unsigned int mask)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void ipc_send_queued_msg(void);
|
||||
|
||||
static void ipc_send_queued_callback(void *private_data, enum notify_id event_type,
|
||||
void *caller_data)
|
||||
{
|
||||
if (!ipc_get()->pm_prepare_D3)
|
||||
ipc_send_queued_msg();
|
||||
}
|
||||
|
||||
/*
|
||||
* Audio components.
|
||||
*
|
||||
|
@ -528,6 +537,10 @@ int task_main_start(struct sof *sof)
|
|||
/* init pipeline position offsets */
|
||||
pipeline_posn_init(sof);
|
||||
|
||||
(void)notifier_register(NULL, scheduler_get_data(SOF_SCHEDULE_LL_TIMER),
|
||||
NOTIFIER_ID_LL_POST_RUN,
|
||||
ipc_send_queued_callback, 0);
|
||||
|
||||
/* let host know DSP boot is complete */
|
||||
ret = platform_boot_complete(0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue