Repository navigation
audio: bt_codec, topology2: add BT Transparent DSP codecs and Deepbuffer Bluetooth (PCM 36) #11444
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
Open
lgirdwood
wants to merge
6
commits into
thesofproject:main
Choose a base branch
from
lgirdwood:topic/sof-bt-transparent-codecs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,127
−191
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e881e3c
topology2: bt-ssp-config: enable rx_slots on 48 kHz hw_config.3
lrgirdwo f547745
topology2: hda-generic, ace3: add SSP2-BT offload topologies
lrgirdwo 0f0ed9a
app/boards: ace15_mtpm: enable CONFIG_DMA_DW_FIFO_PARTITION
lrgirdwo 3c11053
audio: bt_codec: add Bluetooth Transparent LC3, mSBC, G.722, SB4
lrgirdwo 0599c11
topology2: bt-generic, ace3, hda-generic: add BT Transparent codecs a…
lrgirdwo 3e9fbc6
doc: audio: bt_codec: add README and hardware test guide
lrgirdwo 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
Some comments aren't visible on the classic Files Changed page.
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 |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ CONFIG_FORMAT_CONVERT_HIFI3=n | |
| CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING=m | ||
| CONFIG_GOOGLE_RTC_AUDIO_PROCESSING_MOCK=y | ||
| CONFIG_COMP_STFT_PROCESS=y | ||
| CONFIG_COMP_BT_CODEC=y | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be an overlay or at least a module? |
||
|
|
||
| # SOF / infrastructure | ||
| CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n | ||
|
|
||
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
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,74 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| set(LIBLC3_DIR "") | ||
| if(DEFINED ZEPHYR_LIBLC3_MODULE_DIR) | ||
| if(EXISTS "${ZEPHYR_LIBLC3_MODULE_DIR}/include/lc3.h") | ||
| set(LIBLC3_DIR "${ZEPHYR_LIBLC3_MODULE_DIR}") | ||
| endif() | ||
| endif() | ||
|
|
||
| if("${LIBLC3_DIR}" STREQUAL "") | ||
| cmake_path(SET LIBLC3_DIR NORMALIZE "${CMAKE_CURRENT_LIST_DIR}/../../../../modules/lib/liblc3") | ||
| endif() | ||
|
|
||
| zephyr_include_directories( | ||
| ${LIBLC3_DIR}/include | ||
| ${LIBLC3_DIR}/src | ||
| ) | ||
|
|
||
| set(LIBLC3_SOURCES | ||
| ${LIBLC3_DIR}/src/attdet.c | ||
| ${LIBLC3_DIR}/src/bits.c | ||
| ${LIBLC3_DIR}/src/bwdet.c | ||
| ${LIBLC3_DIR}/src/energy.c | ||
| ${LIBLC3_DIR}/src/lc3.c | ||
| ${LIBLC3_DIR}/src/ltpf.c | ||
| ${LIBLC3_DIR}/src/mdct.c | ||
| ${LIBLC3_DIR}/src/plc.c | ||
| ${LIBLC3_DIR}/src/sns.c | ||
| ${LIBLC3_DIR}/src/spec.c | ||
| ${LIBLC3_DIR}/src/tables.c | ||
| ${LIBLC3_DIR}/src/tns.c | ||
| ) | ||
|
|
||
| zephyr_compile_definitions( | ||
| LC3_PLUS=0 | ||
| LC3_PLUS_HR=0 | ||
| ) | ||
|
|
||
| add_local_sources(sof | ||
| bt_codec.c | ||
| bt_codec_algos.c | ||
| ${LIBLC3_SOURCES} | ||
| ) | ||
|
|
||
| set(BT_CODEC_COMPILE_OPTIONS | ||
| -O3 | ||
| -ffast-math | ||
| -fno-finite-math-only | ||
| -Wno-array-bounds | ||
| -Wno-double-promotion | ||
| -include | ||
| ${CMAKE_CURRENT_LIST_DIR}/lc3_math_shim.h | ||
| ) | ||
|
|
||
| # When building with Clang on platforms where hardware FPU is disabled (e.g. | ||
| # ACE 3.0 PTL / WCL with CONFIG_FPU=n), strip the Xtensa FP0 feature so liblc3 | ||
| # and bt_codec emit software floating-point calls instead of hardware FP0 | ||
| # instructions that fault when CPENABLE bit 0 is cleared. | ||
| if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT CONFIG_FPU) | ||
| list(APPEND BT_CODEC_COMPILE_OPTIONS | ||
| -Xclang | ||
| -target-feature | ||
| -Xclang | ||
| -fp | ||
| ) | ||
| endif() | ||
|
|
||
| set_source_files_properties( | ||
| ${CMAKE_CURRENT_LIST_DIR}/bt_codec.c | ||
| ${CMAKE_CURRENT_LIST_DIR}/bt_codec_algos.c | ||
| ${LIBLC3_SOURCES} | ||
| TARGET_DIRECTORY modules_sof | ||
| PROPERTIES COMPILE_OPTIONS "${BT_CODEC_COMPILE_OPTIONS}" | ||
| ) |
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 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| config COMP_BT_CODEC | ||
| bool "Bluetooth Transparent Mode DSP Codec components (LC3, mSBC, G.722, SB4)" | ||
| depends on COMP_MODULE_ADAPTER && IPC_MAJOR_4 | ||
| help | ||
| Select to include Bluetooth Transparent Mode (0x03) DSP audio codec | ||
| offload components for SSP2-BT playback and capture pipelines. | ||
| Provides bt_lc3 (Zephyr liblc3 7.5 ms codec), bt_msbc (Bluetooth HFP | ||
| H2-framed mSBC), bt_g722 (ITU-T Rec. G.722 SB-ADPCM), and bt_sb4 | ||
| (experimental 4-band tree-QMF subband ADPCM). |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good catch. This was enabled in old ipc4_native_drivers_overlay.conf (now removed), but never enabled on this platform.