From 76a700c1277068ec4a153f99e8b5c9713231c6a1 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 --- west.yml | 2 +- xtos/include/sof/lib/dai.h | 8 ++++---- zephyr/include/sof/lib/dai.h | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 zephyr/include/sof/lib/dai.h diff --git a/west.yml b/west.yml index e2f9502251c8..5f24a177e096 100644 --- a/west.yml +++ b/west.yml @@ -43,7 +43,7 @@ manifest: - name: zephyr repo-path: zephyr - revision: 689d1edee1d57f052b1d4572d67618c0b0e2b8a4 + revision: pull/78265/head remote: zephyrproject # Import some projects listed in zephyr/west.yml@revision 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__ */