Repository navigation
Conversation
18e650d to
1713a8d
Compare
|
@naveen-manohar fyi - 6 patches now. |
There was a problem hiding this comment.
🟡 Changes recommended
Critical allocation and floating-point fault risks, bypassed 16 kHz codec processing, and non-interoperable mSBC, G.722, and aptX implementations remain unresolved.
6 open issues
Compile codec sources with soft-float on ACE3 · New Use module allocators in user-context callbacks · New Implement the documented 16 kHz codec path · New Replace the nonconforming mSBC codec cores · New Replace the nonconforming G.722 codec cores · New Implement aptX or name the private codec format · New
What changed in this PR
Extends SOF’s SSP2 Bluetooth offload support from #11432 with Transparent-mode DSP codec modules and deep-buffer playback, plus topology integration and hardware testing documentation.
Changes:
- Adds four codec modules, liblc3 integration, S32_LE processing, and PTL/WCL firmware registration.
- Adds PCM 36 deep-buffer playback and shared mixing with PCM 20, with dedicated Bluetooth topology variants.
- Documents topology IDs, build configuration, and hardware validation procedures.
| File | Description |
|---|---|
| west.yml | Imports Zephyr’s liblc3 module. |
| uuid-registry.txt | Registers four Bluetooth codec UUIDs. |
| tools/topology/topology2/sof-hda-generic.conf | Adds optional Bluetooth topology integration. |
| tools/topology/topology2/README.md | Documents Bluetooth PCM and pipeline IDs. |
| tools/topology/topology2/production/tplg-targets-hda-generic.cmake | Adds HDA Bluetooth topology variants. |
| tools/topology/topology2/production/tplg-targets-ace3.cmake | Adds PTL/WCL Bluetooth targets and aliases. |
| tools/topology/topology2/platform/intel/bt-ssp-config.conf | Enables stereo SSP capture slots. |
| tools/topology/topology2/platform/intel/bt-generic.conf | Integrates codecs and shared playback mixing. |
| tools/topology/topology2/platform/intel/bt-default.conf | Defines codec and deep-buffer defaults. |
| tools/topology/topology2/platform/intel/bt-deep-buffer.conf | Adds PCM 36 low-power playback. |
| tools/topology/topology2/include/formats/bt_ssp_s16_output_audio_formats.conf | Defines S16_LE wire formats. |
| tools/topology/topology2/include/formats/bt_s32_output_audio_formats.conf | Defines internal S32_LE output formats. |
| tools/topology/topology2/include/formats/bt_s32_input_audio_formats.conf | Defines internal S32_LE input formats. |
| tools/topology/topology2/include/formats/bt_host_input_audio_formats.conf | Defines supported host playback formats. |
| tools/topology/topology2/include/components/bt-msbc.conf | Defines the mSBC module widget. |
| tools/topology/topology2/include/components/bt-lc3.conf | Defines the LC3 module widget. |
| tools/topology/topology2/include/components/bt-g722.conf | Defines the G.722 module widget. |
| tools/topology/topology2/include/components/bt-codec-formats.conf | Shares codec widget format declarations. |
| tools/topology/topology2/include/components/bt-aptx.conf | Defines the aptX module widget. |
| tools/topology/topology2/cavs-sdw.conf | Imports Bluetooth codec and mixer classes. |
| tools/rimage/config/wcl.toml.h | Includes WCL codec manifest entries. |
| tools/rimage/config/ptl.toml.h | Includes PTL codec manifest entries. |
| src/audio/Kconfig | Includes Bluetooth codec configuration. |
| src/audio/CMakeLists.txt | Conditionally builds Bluetooth codecs. |
| src/audio/bt_codec/README.md | Adds architecture and hardware testing guidance. |
| src/audio/bt_codec/lc3_math_shim.h | Adds local floating-point math helpers. |
| src/audio/bt_codec/Kconfig | Defines the codec build option. |
| src/audio/bt_codec/CMakeLists.txt | Integrates codec and liblc3 sources. |
| src/audio/bt_codec/bt_codec.toml | Declares four IPC4 module entries. |
| src/audio/bt_codec/bt_codec.c | Implements module lifecycle and stream processing. |
| src/audio/bt_codec/bt_codec_algos.h | Implements codec algorithms and packet framing. |
| app/boards/intel_adsp_ace30_wcl.conf | Enables Bluetooth codecs on WCL. |
| app/boards/intel_adsp_ace30_ptl.conf | Enables Bluetooth codecs on PTL. |
| app/boards/intel_adsp_ace15_mtpm.conf | Enables DMA FIFO partitioning on ACE1.5. |
Review effort: Balanced
lgirdwood
left a comment
There was a problem hiding this comment.
We have some patches that alter previously introduces files and these can be squashed into the patch that introduces the new file.
5859b00 to
3e9fbc6
Compare
|
Addressed all review comments (including the top-level squashing note and all 11 inline threads — now resolved) and re-verified CI (43/43 passing):
|
PR 11444: test resultsRun date: 2026-11-21 21:19 UTC Tested commit: e88e0fe95416d7f6ee15c6930b2d11d948829099 |
d7e0832 to
ce83129
Compare
Add SOF DSP Bluetooth Transparent eSCO/SCO codec modules supporting both 16 kHz wideband (120 samples / 7.5 ms) and 8 kHz narrowband (60 samples / 7.5 ms) host PCM over a 64 kbps (8 kHz 1ch S16_LE) SSP2-BT wire link in both S16_LE and S32_LE pipeline formats: - bt_lc3: Bluetooth LC3-SWB/WB/NB wrapper backed by Zephyr's Apache-2.0 liblc3 module (30-byte 32 kbps payload framed into 60 wire words per 7.5 ms with native liblc3 PLC on corrupted eSCO slots), including a self-contained freestanding lc3_math_shim.h and Clang soft-float (-fp) target flags when CONFIG_FPU=n. - bt_msbc: Bluetooth SIG HFP v1.8 / A2DP v1.3 standard-conforming mSBC codec (80-tap Proto_8_80 8-subband polyphase filterbanks, LOUDNESS offset8 bitpool=26 allocation, table-driven CRC-8, and H2 sync header). - bt_g722: ITU-T Rec. G.722 standard-conforming 24-tap QMF subband ADPCM codec (2-pole / 6-zero adaptive predictor, Mode 1/2/3 raw and Mode-2 56 kbps framed transport). - bt_sb4: Experimental BSD-3-Clause 4-band 24-tap tree-QMF subband ADPCM codec over Transparent eSCO. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
…nd Deepbuffer (PCM 36)
Add Bluetooth Transparent DSP codec topologies (lc3, msbc, g722, sb4) and
Deepbuffer Bluetooth playback offload (PCM 36, pipeline 204) alongside
low-latency Bluetooth (PCM 20) across ACE 3.0 SoundWire and HDA Generic:
- Configure asymmetric Transparent audio formats: 8/16 kHz mono S16_LE/
S32_LE on the host FE pipelines paired with fixed 8 kHz mono S16_LE
(64 kbps) on the SSP2-BT wire link, while preserving existing 8/16/48 kHz
controller offload formats when BT_TRANSP_CODEC is 'none'.
- Add platform/intel/bt-deep-buffer.conf (100 ms L2 SRAM buffer, lp_mode=1,
D0i3 compatible) feeding a shared S32_LE mixout -> gain -> [bt_codec.1]
-> dai-copier (SSP2-BT) playback DAI pipeline.
- Generate -bt-{lc3,msbc,g722,sb4} production topologies for PTL, WCL, and
HDA Generic ACE 3.0 targets.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Document the SOF Bluetooth offload topologies, DSP Transparent codecs (bt_lc3, bt_msbc, bt_g722, bt_sb4), standard conformance, PCM 20 low-latency and PCM 36 deepbuffer ALSA pipelines, and end-to-end over-the-air Linux BTPROTO_SCO (BT_CODEC / BT_DEFER_SETUP) test steps. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
ce83129 to
e88e0fe
Compare


Summary
Depends on #11432 (stacked on
topic/sof-bt-offload).This series adds Sound Open Firmware (SOF) DSP Bluetooth
Transparentmode (0x03) audio codec offload components (LC3,mSBC,G.722,SB4), Deepbuffer Bluetooth (PCM 36,D0i3) playback +S32_LEmulti-stream mixing, asymmetric8 / 16 kHzhost ↔8 kHzSSP2-BTwire ACE 3.0 Panther Lake / Wildcat Lake feature topologies, and a comprehensiveREADME.mdhardware test guide:audio: bt_codec: add Bluetooth Transparent LC3, mSBC, G.722, SB4(3c110530fd):liblc3module (modules/lib/liblc3) inwest.ymlwith freestandinglc3_math_shim.h(truncf/roundfincluded) and Clang soft-float (-fp) target flags whenCONFIG_FPU=n.src/audio/bt_codec/(CONFIG_COMP_BT_CODEC=yon ACE 3.0ptlandwcl) providing four IPC4 processing modules supporting both16 kHzwideband (120PCM samples /7.5 ms) and8 kHznarrowband (60PCM samples /7.5 ms) inS16_LEandS32_LE(mod_zalloc/mod_free,init_config = "1", cache-line-aligned tables):bt_lc3(4c433301-b700-4a10-8000010203040501): Zephyrliblc37.5 msencoder/decoder (8/16 kHzPCM ↔30-byte32 kbpsLC3 payload framed into60wire words with nativeliblc3PLC on corrupted eSCO slots).bt_msbc(4d534243-b700-4a10-8000010203040502): Bluetooth SIG HFP v1.8 / A2DP v1.3 standard-conforming mSBC encoder/decoder (80-tapProto_8_808-subband polyphase filterbanks,LOUDNESSoffset8bitpool=26, table-driven CRC-80x1D, H2 header0x01/0xad,57-byteblock).bt_g722(47373232-b700-4a10-8000010203040503): ITU-T Rec. G.722 standard-conforming 24-tap QMF + 2-pole/6-zero adaptive ADPCM encoder/decoder (Mode 1/2/3raw +Mode-256 kbpsframed over64 kbpsTransparent eSCO).bt_sb4(53423401-b700-4a10-8000010203040504): Experimental BSD-3-Clause 4-band 24-tap tree-QMF subband ADPCM encoder/decoder over Transparent eSCO.0xA5 0x5Async + sequence + payload + CRC-80x1D) over the64 kbps(8 kHz1chS16_LE)SSP2-BTTransparenteSCO link for zero bit-slip DSP-to-DSP framing.topology2: bt-generic, ace3, hda-generic: add BT Transparent codecs and Deepbuffer (PCM 36)(0599c11f3b):BT_TRANSP_CODEC(lc3,msbc,g722,sb4) support inbt-generic.confwith asymmetric8 / 16 kHz1chS16_LE/S32_LEhost FE formats paired with fixed8 kHz1chS16_LEonSSP2-BT(while preserving8 / 16 / 48 kHz1ch / 2chwhenBT_TRANSP_CODECisnone), plus widget definitions ininclude/components/bt-{lc3,msbc,g722,sb4}.conf.platform/intel/bt-deep-buffer.conf(PCM 36: Deepbuffer Bluetooth, pipeline204,100 msL2 SRAMhost-copierDMA buffer,lp_mode = 1,playback_compatible_d0i3 = true) feeding a sharedS32_LEmixout -> gain -> [bt_codec.1] -> SSP2.OUTDAI pipeline (201) alongside low-latencyPCM 20(pipeline 200), enabling both hardwareD0i3streaming (MTL_HDA_VS_D0I3C = 0x4) and concurrent stream mixing.sof-{ptl,wcl}-rt722-4ch-bt-{lc3,msbc,g722,sb4}.tplgsof-{ptl,wcl}-ssp2-bt-id10-{lc3,msbc,g722,sb4}.tplgsof-hda-generic-ace3-bt-{lc3,msbc,g722,sb4}.tplgdoc: audio: bt_codec: add README and hardware test guide(3e9fbc698f):src/audio/bt_codec/README.mddocumenting architecture, Mermaid data flow, standard conformance, build/topology setup,BT_CODEC+BT_DEFER_SETUPsocket helpers, and step-by-step commands to verify all Bluetooth audio offload protocols.Validation
1. Standard Reference Codec Interoperability & Host Unit Suite
libsbc.so.1(SBC_MODE_MSBC) Interoperability:44.49 dBSNR (SOF bt_msbc -> BlueZ libsbc),44.63 dBSNR (BlueZ libsbc -> SOF bt_msbc).libavcodec(adpcm_g722) Interoperability:37.61 dBSNR bidirectional (64 kbpsMode 1),29.01 dBSNR (SOF Framed 56 kbps Mode-2 -> FFmpeg).0, 17, 43byte shifts): Passed across both16 kHzWB and8 kHzNB forbt_lc3,bt_msbc,bt_g722, andbt_sb4; 64-byte cache-line alignment verified across all lookup/filterbank/CRC tables;0hardware FP0 instructions emitted under Xtensa Clang soft-float (CONFIG_FPU=n).2. Over-the-Air DSP-to-DSP
SSP2-BTTransparent 0x03(ladybirdWCL ↔damsel-flyPTL)ladybird/damsel-fly)PCM 2016 kHzWB Duplex (1000 Hz/500 Hz)PCM 208 kHzNB (1000 Hz)PCM 3616 kHzDeepbuffer (1000 Hz)bt_lc3(Zephyrliblc3)*-bt-lc3.tplg1000.0 Hz(RMS 13298) /500.0 Hz(RMS 13340)1000.0 Hz(RMS 12801)1000.0 Hz(RMS 13327)bt_msbc(Bluetooth SIG mSBC)*-bt-msbc.tplg1000.0 Hz(RMS 12744) /500.0 Hz(RMS 12729)1000.0 Hz(RMS 12734)1000.0 Hz(RMS 12734)bt_g722(ITU-T Rec. G.722)*-bt-g722.tplg1000.0 Hz(RMS 12679) /500.0 Hz(RMS 12712)1000.0 Hz(RMS 12736)1000.0 Hz(RMS 12745)bt_sb4(Experimental 4-band SB-ADPCM)*-bt-sb4.tplg1000.0 Hz(RMS 12946) /500.0 Hz(RMS 12215)1000.0 Hz(RMS 12721)1000.0 Hz(RMS 13007)3. Deepbuffer Bluetooth (
PCM 36,D0i3 = 0x4) Audio, Mixing & 3-Way Power Benchmark (damsel-flyPTL →ladybirdWCL)PCM 36(>= 110 msperiod constraint,D0I3C = 0x4/HDA_PM_PG_STREAMING) acrossA2DP SBC(S16_LE67.4 dBSNR,S32_LE67.3 dBSNR),A2DP AAC-LC(71.8 dBSNR),eSCO mSBC(75.9 dBSNR),eSCO CVSD(23.3 dBSNR),LE Audio CIS LC3(46.0 dBSNR), concurrent440 Hz (PCM 36) + 1000 Hz (PCM 20)mixing (-6.0&-6.0 dBFS), and all 4 SOF Transparent DSP codecs (bt_lc3,bt_msbc,bt_g722,bt_sb4).CH2@19.96 VDC Wall Power + Intel RAPLpackage-0, IdleD3=8406.3 mWWall /1505.3 mWSoC Pkg):D0i3Mean (Standalone SSP2,A2DP SBC,A2DP AAC-LC,HFP mSBC TX,SOF bt_lc3 TX):PCM 36 (D0i3)=8459.1 mWWall /1558.6 mWSoC Pkg vs.PCM 20 (D0i0)=8469.7 mWWall /1590.2 mWSoC Pkg (-10.6 mWWall /-31.6 mWSoC Pkg additional savings fromD0i3).48 kHz 2ch):PCM 36 (D0i3)saves-112.6 mWWall /-215.6 mWSoC Pkg vs. Legacy Host (D3).48 kHz 2ch):PCM 36 (D0i3)saves-62.8 mWWall /-133.3 mWSoC Pkg vs. Legacy Host (D3).bt_lc3TX (live LC3 encode inD0i3):PCM 36 (D0i3)saves-128.4 mWWall /-177.8 mWSoC Pkg vs. Legacy Hostliblc3(D3).