diff --git a/modules/Kconfig b/modules/Kconfig index 6033be2c7c4..e8afc5d1e98 100644 --- a/modules/Kconfig +++ b/modules/Kconfig @@ -53,6 +53,9 @@ comment "hal_gigadevice module not available." comment "hal_nordic module not available." depends on !ZEPHYR_HAL_NORDIC_MODULE +comment "liblc3codec module not available." + depends on !ZEPHYR_LIBLC3CODEC_MODULE + comment "LittleFS module not available." depends on !ZEPHYR_LITTLEFS_MODULE diff --git a/modules/liblc3codec/CMakeLists.txt b/modules/liblc3codec/CMakeLists.txt new file mode 100644 index 00000000000..3d31ac0c4d8 --- /dev/null +++ b/modules/liblc3codec/CMakeLists.txt @@ -0,0 +1,22 @@ +if(CONFIG_LIBLC3CODEC) + +zephyr_library_named(liblc3codec) +zephyr_library_compile_options(-O3 -ffast-math -Wno-array-bounds) + +zephyr_include_directories(${ZEPHYR_LIBLC3CODEC_MODULE_DIR}/include) +zephyr_include_directories(${ZEPHYR_LIBLC3CODEC_MODULE_DIR}/src) + +zephyr_library_sources(${ZEPHYR_LIBLC3CODEC_MODULE_DIR}/src/attdet.c) +zephyr_library_sources(${ZEPHYR_LIBLC3CODEC_MODULE_DIR}/src/bits.c) +zephyr_library_sources(${ZEPHYR_LIBLC3CODEC_MODULE_DIR}/src/bwdet.c) +zephyr_library_sources(${ZEPHYR_LIBLC3CODEC_MODULE_DIR}/src/energy.c) +zephyr_library_sources(${ZEPHYR_LIBLC3CODEC_MODULE_DIR}/src/lc3.c) +zephyr_library_sources(${ZEPHYR_LIBLC3CODEC_MODULE_DIR}/src/ltpf.c) +zephyr_library_sources(${ZEPHYR_LIBLC3CODEC_MODULE_DIR}/src/mdct.c) +zephyr_library_sources(${ZEPHYR_LIBLC3CODEC_MODULE_DIR}/src/plc.c) +zephyr_library_sources(${ZEPHYR_LIBLC3CODEC_MODULE_DIR}/src/sns.c) +zephyr_library_sources(${ZEPHYR_LIBLC3CODEC_MODULE_DIR}/src/spec.c) +zephyr_library_sources(${ZEPHYR_LIBLC3CODEC_MODULE_DIR}/src/tables.c) +zephyr_library_sources(${ZEPHYR_LIBLC3CODEC_MODULE_DIR}/src/tns.c) + +endif() diff --git a/modules/liblc3codec/Kconfig b/modules/liblc3codec/Kconfig new file mode 100644 index 00000000000..ff611dba169 --- /dev/null +++ b/modules/liblc3codec/Kconfig @@ -0,0 +1,8 @@ +# Copyright (c) 2022 Bose Corporation +# SPDX-License-Identifier: Apache-2.0 + +config LIBLC3CODEC + bool "liblc3codec Support" + depends on FPU + help + This option enables the Android liblc3codec library for Bluetooth LE Audio diff --git a/west.yml b/west.yml index 20a9e845cca..da541aacbae 100644 --- a/west.yml +++ b/west.yml @@ -153,6 +153,9 @@ manifest: path: modules/hal/libmetal groups: - hal + - name: liblc3codec + revision: 3951cf1b71ff3be086c9b9b595e473e12301337c + path: modules/lib/liblc3codec - name: littlefs path: modules/fs/littlefs groups: