Skip to content

Commit 76a700c

Browse files
kv2019ipillo79
authored andcommitted
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: #9015 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent d00561e commit 76a700c

3 files changed

Lines changed: 22 additions & 5 deletions

File tree

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ manifest:
4343

4444
- name: zephyr
4545
repo-path: zephyr
46-
revision: 689d1edee1d57f052b1d4572d67618c0b0e2b8a4
46+
revision: pull/78265/head
4747
remote: zephyrproject
4848

4949
# Import some projects listed in zephyr/west.yml@revision

xtos/include/sof/lib/dai.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
* \author Keyon Jie <yang.jie@linux.intel.com>
1414
*/
1515

16+
#ifdef __ZEPHYR__
17+
#error "Please use zephyr/include/sof/lib/dai.h instead"
18+
#endif
19+
1620
#ifndef __SOF_LIB_DAI_H__
1721
#define __SOF_LIB_DAI_H__
1822

19-
#ifdef CONFIG_ZEPHYR_NATIVE_DRIVERS
20-
#include <sof/lib/dai-zephyr.h>
21-
#else
2223
#include <sof/lib/dai-legacy.h>
23-
#endif
2424

2525
#endif /* __SOF_LIB_DAI_H__ */

zephyr/include/sof/lib/dai.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* SPDX-License-Identifier: BSD-3-Clause
2+
*
3+
* Copyright(c) 2024 Intel Corporation.
4+
*/
5+
6+
#ifndef __SOF_LIB_DAI_H__
7+
#define __SOF_LIB_DAI_H__
8+
9+
/* no-op on Zephyr */
10+
11+
#ifdef CONFIG_ZEPHYR_NATIVE_DRIVERS
12+
#include <sof/lib/dai-zephyr.h>
13+
#else
14+
#include <sof/lib/dai-legacy.h>
15+
#endif
16+
17+
#endif /* __SOF_LIB_MEMORY_H__ */

0 commit comments

Comments
 (0)