2025-05-14 3:23 AM
HI,
I download BLE_Audio_TMAP_Peripheral firmware to STM32WBA55G-DK1 board, and Headphones was select as Audio Configs on the borad.
When i start playing music, the audio quality was so bad. I previously sent the input data of the headset to the audio codec chip for output on my project, and the sound quality was very good.
So why is the sound quality so poor when playing music?
Is it a problem with the BLE codec or is the processing speed of the MCU too slow?
Solved! Go to Solution.
2025-05-15 8:28 AM
Hello,
The BLE codec and MCU should be able to process this stream, so we need more information to check this issue.
Which Central device is used to stream audio to the STM32WBA55G-DK1 TMAP_Peripheral ?
Which CubeWBA release have you used ? (which version)
Can you provide any information of the stream (quality, sampling frequency, frame duration ...) ? You can find this by enabling the logs.
If the define ENABLE_AUDIO_HIGH_RELIABILITY is set to 0, can you try with 1 ? It allows more retransmission to avoids the packets loss you seems to have.
Thanks,
2025-05-14 3:50 AM
2025-05-15 8:28 AM
Hello,
The BLE codec and MCU should be able to process this stream, so we need more information to check this issue.
Which Central device is used to stream audio to the STM32WBA55G-DK1 TMAP_Peripheral ?
Which CubeWBA release have you used ? (which version)
Can you provide any information of the stream (quality, sampling frequency, frame duration ...) ? You can find this by enabling the logs.
If the define ENABLE_AUDIO_HIGH_RELIABILITY is set to 0, can you try with 1 ? It allows more retransmission to avoids the packets loss you seems to have.
Thanks,
2025-05-16 12:01 AM - edited 2025-05-16 12:06 AM
Hi,
I use google pixe9 mobile phone or lenovo YOGA Pad Pro as central device, the sound quality of these central devices are same.
I used V1.61 version of CubeWBA.
The information of stream is as following:
CAP Event : 0x0D
Preferred Server QoS Settings is requested for ASE ID 1 (Type 0x00)
Target Latency : 3
Target Phy 2 to achieve the Target Latency
Codec ID
Coding format : 0x06
Company id : 0x0000
VS codec id : 0x0000
Frequency : 8
Frame Duration : 1
Octets Per Codec Frame : 120
Codec Frame Blocks Per SDU : 1
Min Controller Delay in Source role 5793 us
Max Controller Delay in Source role 110000 us
Min Controller Delay in Sink role 6272 us
Max Controller Delay in Sink role 70000 us
Calculated SDU Interval : 10000 us
Computed Min Controller Delay with 2 Snk ASEs and 1 Src ASEs : 14337 us
WARNING : Controller Delay Min ( 14337 us) could be higher than the frame duration (10 ms)
Submitted Min Presentation Delay 10010 us
Submitted Max Presentation Delay 70010 us
CAP Event : 0x13
ASE ID 1 [Type 0x00 ] with remote CAP Initiator on ConnHandle 0x0001 is in State 0x01
CAP Event : 0x13
ASE ID 1 [Type 0x00 ] with remote CAP Initiator on ConnHandle 0x0001 is in State 0x02
CAP Event : 0x14
Enable Operation Request for ASE ID 1 in state 2 is received from remote CAP Initiator on ConnHandle 0x0001
ASE ID 0x01 on ConnHandle 0x0001 would be associated to a Streaming Audio Contexts 0x0001
Previous Available Contexts are : Snk 0x06C7 - Src 0x0003
Calculated New Available Contexts are : Snk 0x06C7 - Src 0x0003
Set Available Snk Audio Contexts 0x06C7 and Available Src Audio Contexts 0x0003
CAP Event : 0x13
ASE ID 1 [Type 0x00 ] with remote CAP Initiator on ConnHandle 0x0001 is in State 0x03
Parse Metadata of ASE ID 0x01 (Type 0x00) in state 0x03 on ConnHandle 0x0001
ASE ID 0x01 on ConnHandle 0x0001 is associated to a Streaming Audio Contexts 0x0001
ASE ID 0x01 on ConnHandle 0x0001 was previously associated to a Streaming Audio Contexts 0x0000
Previous Available Contexts are : Snk 0x06C7 - Src 0x0003
Calculated New Available Contexts are : Snk 0x06C7 - Src 0x0003
Set Available Snk Audio Contexts 0x06C7 and Available Src Audio Contexts 0x0003
Enable Operation Response returns status 0x00 for ASE ID 1 on ConnHandle 0x0001
>>== ISOCHRONOUS_GROUP_EVENT
- Opcode: 0x001A
- CIG ID: 1 - cis_conn_handle: 0x0009
CAP Event : 0x01
Init Audio Clock with freq 8
Audio Clock Initialization
RCC AS is now properly initialized
>>== ISOCHRONOUS_GROUP_EVENT
- Opcode: 0x0019
- cis_conn_handle: 0x0009 - iso_interval: 16
==>> AUDIO_RegisterGroup()
CAP Event : 0x0E
Setup Audio Data Path is requested for ASE ID 1 (CIS Conn Handle 0x0009)
Output Audio Data Path Configuration is requested
Codec ID
Coding format : 0x06
Company id : 0x0000
VS codec id : 0x0000
Presentation Delay 10010 us
Min Controller Delay 6272 us
Max Controller Delay 70000 us
Setup Audio Peripheral for Sink Role at Sampling frequency 8
Audio Channels Allocation Configuration : 0x00000003
Number of Audio Channels 2
Configure Audio Periphal drivers at Sampling frequency 8
Register callback to Start Audio Peripheral Tx
==>> CODEC Configure Data Path with following parameters:
Direction : 1
Data Path ID : 0x01
Sample Depth : 16
Decimation : 2
==>> CODEC_ConfigureDataPath() : Success
==>> CODEC Setup ISO Data Path for CIS Connection Handle 0x0009
==>> CODEC_SetupIsoDataPath() : Success
CAP Event : 0x0F
Number of Output Channels Up: 2
Output Audio Data Path is up with status 0x00 for CIS Conn handle 0x0009
Controller Delay : 10000 us
Transport Latency : 18424 us
CAP Event : 0x13
ASE ID 1 [Type 0x00 ] with remote CAP Initiator on ConnHandle 0x0001 is in State 0x04
Parse Metadata of ASE ID 0x01 (Type 0x00) in state 0x04 on ConnHandle 0x0001
ASE ID 0x01 on ConnHandle 0x0001 is associated to a Streaming Audio Contexts 0x0001
Setup Unicast Audio Data Path for ASE ID 1 on CIS connection handle 0x0009 with controller delay at 10000 us returns status 0x00
Audio Data Path is complete with remaining Application delay for audio process to respect : 10us
>>== HCI_LE_CIS_ESTABLISHED_SUBEVT_CODE - CIS Connection handle: 0x0009 - Status 0x00
CAP Event : 0x15
Metadata of ASE ID 1 with remote CAP device on ConnHandle 0x0001 is updated
Parse Metadata of ASE ID 0x01 (Type 0x00) in state 0x04 on ConnHandle 0x0001
ASE ID 0x01 on ConnHandle 0x0001 is associated to a Streaming Audio Contexts 0x0080
ASE ID 0x01 on ConnHandle 0x0001 was previously associated to a Streaming Audio Contexts 0x0001
Add Audio Contexts 0x0001 to Available Snk Audio Contexts 0x06C7
Previous Available Contexts are : Snk 0x06C7 - Src 0x0003
Calculated New Available Contexts are : Snk 0x0646 - Src 0x0003
Set Available Snk Audio Contexts 0x0646 and Available Src Audio Contexts 0x0003
START AUDIO SINK (output)
CAP Event : 0x38
Media Control Meta Event 0x13 is received on ConnHandle 0x0001:
[MP 2] MCP Client receives Media State 0x01 from remote MCP Server
CAP Event : 0x36
Media Player Instance with CCID 2 is active to control Audio Stream with remote TMAP Device (ConnHandle 0x0001)
Playback Speed feature is supported on remote TMAP Device
Seeking Speed feature is supported on remote TMAP Device
Playing Order feature is supported on remote TMAP Device
Supported Playing Orders feature is supported on remote TMAP Device
Media Control Operation feature is supported on remote TMAP Device
Media Player Name update Notification feature is supported on remote TMAP Device
Track Title update Notification feature is supported on remote TMAP Device
Track Duration update Notification feature is supported on remote TMAP Device
Track Position update Notification feature is supported on remote TMAP Device
Playback Speed update Notification feature is supported on remote TMAP Device
Seeking Speed update Notification feature is supported on remote TMAP Device
Playing Order update Notification feature is supported on remote TMAP Device
Supported Media Control Operation update Notification feature is supported on remote TMAP Device
Success: MCP_CLIENT_ConfigureTrackTitleNotification with ConnHandle 0x0001 and CCID 2
CAP Event : 0x15
Metadata of ASE ID 1 with remote CAP device on ConnHandle 0x0001 is updated
Parse Metadata of ASE ID 0x01 (Type 0x00) in state 0x04 on ConnHandle 0x0001
ASE ID 0x01 on ConnHandle 0x0001 is associated to a Streaming Audio Contexts 0x0084
ASE ID 0x01 on ConnHandle 0x0001 was previously associated to a Streaming Audio Contexts 0x0080
Add Audio Contexts 0x0080 to Available Snk Audio Contexts 0x0646
Previous Available Contexts are : Snk 0x0646 - Src 0x0003
Calculated New Available Contexts are : Snk 0x0242 - Src 0x0003
Set Available Snk Audio Contexts 0x0242 and Available Src Audio Contexts 0x0003
CAP Event : 0x15
Metadata of ASE ID 1 with remote CAP device on ConnHandle 0x0001 is updated
Parse Metadata of ASE ID 0x01 (Type 0x00) in state 0x04 on ConnHandle 0x0001
ASE ID 0x01 on ConnHandle 0x0001 is associated to a Streaming Audio Contexts 0x0004
ASE ID 0x01 on ConnHandle 0x0001 was previously associated to a Streaming Audio Contexts 0x0084
Add Audio Contexts 0x06C4 to Available Snk Audio Contexts 0x0242
Previous Available Contexts are : Snk 0x0242 - Src 0x0003
Calculated New Available Contexts are : Snk 0x0242 - Src 0x0003
Set Available Snk Audio Contexts 0x0242 and Available Src Audio Contexts 0x0003
CAP Event : 0x38
Media Control Meta Event 0x07 is received on ConnHandle 0x0001:
[MP 2] MCP Client operation with connection handle 0x0001 is complete with status 0x00
Thanks
2025-05-16 12:15 AM
Hi,
When i set ENABLE_AUDIO_HIGH_RELIABILITY to 1, the quality of sound is very good. There is no more noise.
Best regard