-
Notifications
You must be signed in to change notification settings - Fork 8.3k
modules: Add zephyr lc3 codec #44225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
carlescufi
merged 2 commits into
zephyrproject-rtos:main
from
Casper-Bonde-Bose:41228_add_zephyr_lc3_codec_to_unicast_sample_c_version
Mar 30, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
10 changes: 10 additions & 0 deletions
10
samples/bluetooth/unicast_audio_client/boards/native_posix.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| CONFIG_LOG_MODE_IMMEDIATE=y | ||
| CONFIG_BT_TINYCRYPT_ECC=y | ||
|
|
||
| CONFIG_LIBLC3CODEC=y | ||
| CONFIG_FPU=y | ||
|
|
||
| # For LE-audio at 10ms intervals we need the tick counter to occur more frequently | ||
| # than every 10 ms as each PDU for some reason takes 2 ticks to process. | ||
| CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 | ||
| CONFIG_NATIVE_POSIX_SLOWDOWN_TO_REAL_TIME=y |
11 changes: 11 additions & 0 deletions
11
samples/bluetooth/unicast_audio_client/boards/nrf5340dk_nrf5340_cpuapp.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| CONFIG_BT_CTLR_ADV_EXT=y | ||
| CONFIG_BT_CTLR_ADV_PERIODIC=y | ||
|
|
||
| # For LC3 the following configs are needed | ||
| CONFIG_FPU=y | ||
| CONFIG_LIBLC3CODEC=y | ||
| # The LC3 codec uses a large amount of stack. This app runs the codec in the work-queue, hence | ||
| # inctease stack size for that thread. | ||
| CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 | ||
| # LC3 lib requires floating point support in the c-lib NEWLIB is one way of getting that. | ||
| CONFIG_NEWLIB_LIBC=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
samples/bluetooth/unicast_audio_server/boards/native_posix.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| CONFIG_LOG_MODE_IMMEDIATE=y | ||
| CONFIG_BT_TINYCRYPT_ECC=y | ||
|
|
||
| CONFIG_LIBLC3CODEC=y | ||
| CONFIG_FPU=y | ||
|
|
||
| # For LE-audio at 10ms intervals we need the tick counter to occur more frequently | ||
| # than every 10 ms as each PDU for some reason takes 2 ticks to process. | ||
| CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 | ||
| CONFIG_NATIVE_POSIX_SLOWDOWN_TO_REAL_TIME=y |
9 changes: 9 additions & 0 deletions
9
samples/bluetooth/unicast_audio_server/boards/nrf5340dk_nrf5340_cpuapp.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,11 @@ | ||
| CONFIG_BT_CTLR_ADV_EXT=y | ||
| CONFIG_BT_CTLR_ADV_PERIODIC=y | ||
|
|
||
| # For LC3 the following configs are needed | ||
| CONFIG_FPU=y | ||
| CONFIG_LIBLC3CODEC=y | ||
| # The LC3 codec uses a large amount of stack. This app runs the codec in the work-queue, hence | ||
| # inctease stack size for that thread. | ||
| CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 | ||
| # LC3 lib requires floating point support in the c-lib NEWLIB is one way of getting that. | ||
| CONFIG_NEWLIB_LIBC=y |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.