From 8c619cf740503e1f47c6323244e0761462672704 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Tue, 10 Sep 2024 17:43:07 +0300 Subject: [PATCH] rtos: add Zephyr implementation of sof/lib/dai.h Implement sof/lib/dai.h for Zephyr build and do not rely o the xtos version for Zephyr builds. Add a warning to catch invalid build configurations. Link: https://github.com/thesofproject/sof/issues/9015 Signed-off-by: Kai Vehmanen --- xtos/include/sof/lib/dai.h | 8 ++++---- zephyr/include/sof/lib/dai.h | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 zephyr/include/sof/lib/dai.h diff --git a/xtos/include/sof/lib/dai.h b/xtos/include/sof/lib/dai.h index 27f593dd32ec..d1fd463eef3f 100644 --- a/xtos/include/sof/lib/dai.h +++ b/xtos/include/sof/lib/dai.h @@ -13,13 +13,13 @@ * \author Keyon Jie */ +#ifdef __ZEPHYR__ +#error "Please use zephyr/include/sof/lib/dai.h instead" +#endif + #ifndef __SOF_LIB_DAI_H__ #define __SOF_LIB_DAI_H__ -#ifdef CONFIG_ZEPHYR_NATIVE_DRIVERS -#include -#else #include -#endif #endif /* __SOF_LIB_DAI_H__ */ diff --git a/zephyr/include/sof/lib/dai.h b/zephyr/include/sof/lib/dai.h new file mode 100644 index 000000000000..a0531e47ff95 --- /dev/null +++ b/zephyr/include/sof/lib/dai.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * + * Copyright(c) 2024 Intel Corporation. + */ + +#ifndef __SOF_LIB_DAI_H__ +#define __SOF_LIB_DAI_H__ + +/* no-op on Zephyr */ + +#ifdef CONFIG_ZEPHYR_NATIVE_DRIVERS +#include +#else +#include +#endif + +#endif /* __SOF_LIB_MEMORY_H__ */