diff --git a/src/platform/mtk/platform.c b/src/platform/mtk/platform.c index 2c1444aa670f..3b53998ae703 100644 --- a/src/platform/mtk/platform.c +++ b/src/platform/mtk/platform.c @@ -12,6 +12,7 @@ #include #include #include +#include void mtk_dai_init(struct sof *sof); @@ -24,10 +25,24 @@ static void mtk_ipc_send(const void *msg, size_t sz) mtk_adsp_mbox_signal(MBOX0, 0); } +static void mbox0_fn(const struct device *mbox, void *arg) +{ + printk("ANDY %s:%d\n", __func__, __LINE__); + ipc_schedule_process(ipc_get()); +} + +static void mbox1_fn(const struct device *mbox, void *arg) +{ + printk("ANDY %s:%d\n", __func__, __LINE__); + ipc_get()->is_notification_pending = false; +} + int platform_ipc_init(struct ipc *ipc) { - printk("ANDY %s:%d (FIXME: register mbox handlers)\n", __func__, __LINE__); - // FIXME + printk("ANDY %s:%d\n", __func__, __LINE__); + mtk_adsp_mbox_set_handler(MBOX0, 1, mbox0_fn, NULL); + mtk_adsp_mbox_set_handler(MBOX1, 1, mbox1_fn, NULL); + return 0; }