2025-03-20 7:31 PM
Hi,
I am testing ble audio with STM32WBA55G-DK1 board. I develop my ble audio application with tmap profile. I referred to BLE_Audio_TMAP_Periopheral project provided by ST. It can be paired and enable le audio.
But when i play the music on the android tablet, CAP_UNICAST_PREFERRED_QOS_REQ_EVT event was posted from ble audio stack, but the pameters was so abnormal as following:
68.818 Preferred Server QoS Settings is requested for ASE ID 1 (Type ASE_SINK)
68.819 Target Latency : TARGET_LATENCY_BALANCED_RELIABILITY
68.819 Target Phy TARGET_LE_2M_PHY to achieve the Target Latency
68.819 Codec ID
68.819 Coding format : AUDIO_CODING_FORMAT_LC3
68.819 Company id : 0x0000
68.819 VS codec id : 0x0000
68.819 Frequency : SAMPLE_FREQ_48000_HZ
68.819 Frame Duration : FRAME_DURATION_10_MS
68.819 Octets Per Codec Frame : 155
68.819 Codec Frame Blocks Per SDU : 1
68.819 Min Controller Delay in Source role 134278377 us
68.819 Max Controller Delay in Source role 536897392 us
68.819 Min Controller Delay in Sink role 537001136 us
68.819 Max Controller Delay in Sink role 20 us
68.820 Calculated SDU Interval : 10000 us
The Min Controller Delay in Source role and Max Controller Delay in Source role are so big. The Min Controller Delay in Sink is so big and bigger than Max Controller Delay in Sink role.
As a comparison,the BLE_Audio_TMAP_Peripheral does not have such issue.
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.
I don't know which factors casue this issue?
Thanks
2025-03-21 3:05 AM
Hello,
Controller delay min is depending on various things such as ASE numbers & direction and codec configuration.
The maximum is based on the RAM memory provided to the codec manager at the initialization.
But looking at the strange values in hexa, it seems to be some pointers (to both RAM and Flash), so not linked to the "capabilities". Could you provide more information on your setup: IDE used, Cube Firmware version, changes done ?
Best regards,
2025-03-21 8:59 AM
Hi,TMANE.1
Thank you very much first.
68.819 Min Controller Delay in Source role 134278377 us
68.819 Max Controller Delay in Source role 536897392 us
68.819 Min Controller Delay in Sink role 537001136 us
These strange values will not be changed event if i rebuild the project several times. I am using STM32CubeIDE as my develop tool and the latest STM32Cube_FW_WBA_V1.6.0. I set up the project with STM32CubeIDE and copy almost needed code from BLE_Audio_TMAP_Periopheral, so there are some differences in the code structure,but the ble configures are same as BLE_Audio_TMAP_Periopheral project.
I check the parameter of CODEC_ManagerInit function, the media_packet_pool_size and the CODEC_LC3Config_t(SessionSize ChannelSize StackSize) are same as BLE_Audio_TMAP_Periopheral project.
And i don't implement read out the data from ble memory yet.
I am trying to reduce unrelated code in BLE_Audio_TMAP_Periopheral so that can find the root reason.
And i also hope you can provide me some detail information that how the Delay was calcuted in the ble audio stack lib.
Thanks
Best regards
2025-03-21 10:07 AM
Hello,
Could you check sanity of values exchanged in ble_codec.c (BLE_ReadLocalSupportedControllerDelay()) ?
(value for a single ASE).
Here, minimum value is linked to the LC3 configuration (computation time) + CODEC_PROC_MARGIN_US + CODEC_RF_SETUP_US (source ASE only).
Note that the log you provided is corresponding to a mix of several ASEs configuration managed by the audio stack
Best regards,