Bluetooth: LC3: Addition of liblc3codec for LE-Audio as a module

Initial addition of the LC3 codec as a module. Usage of the module
will be seperate commits.

Even though this codec is a generic audio codec, it is tagged with
Bluetooth: as it can only be used for LE-Audio. Using the codec for
other purposes is a violation of the granted rights for the codec.

Signed-off-by: Casper Bonde <casper_bonde@bose.com>
This commit is contained in:
Casper Bonde 2021-12-06 21:14:37 +01:00 committed by Carles Cufí
parent f2c40a5802
commit d03d2d854b
4 changed files with 36 additions and 0 deletions

View file

@ -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

View file

@ -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()

View file

@ -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

View file

@ -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: