From e35a00b6fe096900b2dc2ba6cfc56d54ffa9c1e8 Mon Sep 17 00:00:00 2001 From: Serhiy Katsyuba Date: Wed, 18 Sep 2024 12:54:03 +0200 Subject: [PATCH 1/2] Enable CONFIG_XRUN_NOTIFICATIONS_ENABLE This is to test https://github.com/thesofproject/sof/pull/9486 Signed-off-by: Serhiy Katsyuba --- app/boards/intel_adsp_ace15_mtpm.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/boards/intel_adsp_ace15_mtpm.conf b/app/boards/intel_adsp_ace15_mtpm.conf index 822065633356..29df0d961670 100644 --- a/app/boards/intel_adsp_ace15_mtpm.conf +++ b/app/boards/intel_adsp_ace15_mtpm.conf @@ -111,3 +111,5 @@ CONFIG_GOOGLE_RTC_AUDIO_PROCESSING_MOCK=y CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=y CONFIG_TIMING_FUNCTIONS=y + +CONFIG_XRUN_NOTIFICATIONS_ENABLE=y From d88fab18f6b80cd1dca8b6d0ec0ad40e284e0ca9 Mon Sep 17 00:00:00 2001 From: Serhiy Katsyuba Date: Wed, 18 Sep 2024 12:47:02 +0200 Subject: [PATCH 2/2] chain_dma: fix compilation error Fixes compilation error when CONFIG_XRUN_NOTIFICATIONS_ENABLE is enabled. Signed-off-by: Serhiy Katsyuba --- src/audio/chain_dma.c | 2 +- src/include/ipc4/notification.h | 4 ++++ src/ipc/ipc4/notification.c | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/audio/chain_dma.c b/src/audio/chain_dma.c index 77081b962bb3..1f495c59d1b1 100644 --- a/src/audio/chain_dma.c +++ b/src/audio/chain_dma.c @@ -659,7 +659,7 @@ static struct comp_dev *chain_task_create(const struct comp_driver *drv, goto error_cd; #if CONFIG_XRUN_NOTIFICATIONS_ENABLE - cd->msg_xrun = ipc_msg_init(header.dat, + cd->msg_xrun = ipc_msg_init(cdma->primary.dat, sizeof(struct ipc4_resource_event_data_notification)); if (!cd->msg_xrun) goto error_cd; diff --git a/src/include/ipc4/notification.h b/src/include/ipc4/notification.h index 658cbcc50ce1..60a0341c75a7 100644 --- a/src/include/ipc4/notification.h +++ b/src/include/ipc4/notification.h @@ -255,3 +255,7 @@ struct ipc4_resource_event_data_notification { /* Detailed event data */ union ipc4_resource_event_data event_data; } __packed __aligned(8); + +#if CONFIG_XRUN_NOTIFICATIONS_ENABLE +void xrun_notif_msg_init(struct ipc_msg *msg_xrun, uint32_t resource_id, uint32_t event_type); +#endif diff --git a/src/ipc/ipc4/notification.c b/src/ipc/ipc4/notification.c index df7277f7dbce..b46c2015ccad 100644 --- a/src/ipc/ipc4/notification.c +++ b/src/ipc/ipc4/notification.c @@ -8,6 +8,7 @@ #include #include #include +#include #if CONFIG_XRUN_NOTIFICATIONS_ENABLE void xrun_notif_msg_init(struct ipc_msg *msg_xrun, uint32_t resource_id, uint32_t event_type)