Skip to content

Commit a5edd6a

Browse files
MarkWangChinesecfriedt
authored andcommitted
libsbc: fix hiding headers to doxygen
remove CONFIG_LIBSBC_ENCODER and CONFIG_LIBSBC_DECODER from sbc.h, then include the required heders files path defaultly to fix building errors. Signed-off-by: Mark Wang <[email protected]>
1 parent 1186261 commit a5edd6a

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

include/zephyr/libsbc/sbc.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@
1010
#include <stdint.h>
1111
#include <stdbool.h>
1212
#include <string.h>
13-
#if defined(CONFIG_LIBSBC_ENCODER)
1413
#include "sbc_encoder.h"
15-
#endif
16-
#if defined(CONFIG_LIBSBC_DECODER)
1714
#include "oi_codec_sbc.h"
1815
#include "oi_status.h"
19-
#endif
2016

2117
/** @brief SBC channel mode */
2218
enum __packed sbc_ch_mode {
@@ -38,8 +34,6 @@ enum __packed sbc_alloc_mthd {
3834
SBC_ALLOC_MTHD_SNR,
3935
};
4036

41-
#if defined(CONFIG_LIBSBC_ENCODER)
42-
4337
/** @brief SBC encoder */
4438
struct sbc_encoder {
4539
/** @cond INTERNAL_HIDDEN */
@@ -112,9 +106,6 @@ int sbc_frame_bytes(struct sbc_encoder *encoder);
112106
* @return The encoded size of one frame in bytes or (negative) error code otherwise.
113107
*/
114108
int sbc_frame_encoded_bytes(struct sbc_encoder *encoder);
115-
#endif
116-
117-
#if defined(CONFIG_LIBSBC_DECODER)
118109

119110
/** @brief SBC decoder */
120111
struct sbc_decoder {
@@ -145,5 +136,4 @@ int sbc_setup_decoder(struct sbc_decoder *decoder);
145136
*/
146137
int sbc_decode(struct sbc_decoder *decoder, const void **in_data, uint32_t *in_size,
147138
void *out_data, uint32_t *out_size);
148-
#endif
149139
#endif /* ZEPHYR_INCLUDE_LIB_SBC_H_ */

modules/libsbc/CMakeLists.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ zephyr_compile_definitions(SBC_FOR_EMBEDDED_LINUX)
77
zephyr_compile_definitions(SBC_NO_PCM_CPY_OPTION)
88
zephyr_library_sources(sbc.c)
99

10+
zephyr_include_directories(
11+
${ZEPHYR_LIBSBC_MODULE_DIR}/encoder/include
12+
)
13+
14+
zephyr_include_directories(
15+
${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/include
16+
${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce
17+
)
18+
1019
if(CONFIG_LIBSBC_ENCODER)
1120
zephyr_library_sources(
1221
${ZEPHYR_LIBSBC_MODULE_DIR}/encoder/srce/sbc_analysis.c
@@ -18,9 +27,6 @@ zephyr_library_sources(
1827
${ZEPHYR_LIBSBC_MODULE_DIR}/encoder/srce/sbc_encoder.c
1928
${ZEPHYR_LIBSBC_MODULE_DIR}/encoder/srce/sbc_packing.c
2029
)
21-
zephyr_include_directories(
22-
${ZEPHYR_LIBSBC_MODULE_DIR}/encoder/include
23-
)
2430
endif()
2531

2632
if(CONFIG_LIBSBC_DECODER)
@@ -41,9 +47,5 @@ zephyr_library_sources(
4147
${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/synthesis-dct8.c
4248
${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce/synthesis-sbc.c
4349
)
44-
zephyr_include_directories(
45-
${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/include
46-
${ZEPHYR_LIBSBC_MODULE_DIR}/decoder/srce
47-
)
4850
endif()
4951
endif()

0 commit comments

Comments
 (0)