cancel
Showing results for 
Search instead for 
Did you mean: 

Can't change to ASE_STATE_QOS_CONFIGURED from ASE_STATE_CODEC_CONFIGURED

Xiaojie
Associate III

HI,

I am using the STM32WBA55G-DK1 board to develop my ble audio project referred to BLE_Audio_TMAP_Periopheral project.

But when my tablet pc connected to the board successfully, and started play the music. The ble audio stack posted CAP_UNICAST_SERVER_ASE_STATE_EVT. The state of CAP_UNICAST_SERVER_ASE_STATE_EVT were ASE_STATE_CODEC_CONFIGURED、ASE_STATE_RELEASING、ASE_STATE_IDLE。

As a comparison, the change rule of BLE_Audio_TMAP_Periopheral CAP-UNICAST_SRVER-ASE_STATEVT state is as follows: ASE_STATE_CODEC_CONFIGURED->ASE_STATE_QOS_CONFIGURED->ASE_STATE_ENABLING.

I don't know what factors led to this difference。

 

Best Regard

1 ACCEPTED SOLUTION

Accepted Solutions
Xiaojie
Associate III

HI, All

 

I solved the issue which originated from BLE_Audio_TMAP_Periopheral.

When handling the CAP_UNICAST_PREFERRED_QOS_REQ_EVT,  we need get the parameter from APP_QoSConf. 

        for(i = 0;i<15;i++)
        {
          if((frequency == APP_QoSConf[i+offset].freq) \
              && (sduInterval == APP_QoSConf[i+offset].sdu_interval) \
              && (octetsPerFrame == APP_QoSConf[i+offset].max_sdu))
          {
            info->pPrefQoSConfRsp->PrefRetransmissionNumber = APP_QoSConf[i+offset].rtx_num;
            info->pPrefQoSConfRsp->MaxTransportLatency = APP_QoSConf[i+offset].max_tp_latency;
          }

But there is a bug in the code above,APP_QoSConf array has a total of 32 members, we should change 15 to 16 as half. My QoS configuration corresponds exactly to a member with index number 15.

 

Best Regard

View solution in original post

3 REPLIES 3
Xiaojie
Associate III

The following is corresponding log:

1204.392 CAP Event: 0x0d
1204.392 Preferred Server QoS Settings is requested for ASE ID 1 (Type ASE_SINK)
1204.392 Target Latency : TARGET_LATENCY_BALANCED_RELIABILITY
1204.392 Target Phy TARGET_LE_2M_PHY to achieve the Target Latency
1204.393 Codec ID
1204.393 Coding format : AUDIO_CODING_FORMAT_LC3
1204.393 Company id : 0x0000
1204.393 VS codec id : 0x0000
1204.393 Frequency : SAMPLE_FREQ_48000_HZ
1204.393 Frame Duration : FRAME_DURATION_10_MS
1204.393 Octets Per Codec Frame : 155
1204.393 Codec Frame Blocks Per SDU : 1
1204.393 Min Controller Delay in Source role 8336 us
1204.393 Max Controller Delay in Source role 110000 us
1204.393 Min Controller Delay in Sink role 4136 us
1204.393 Max Controller Delay in Sink role 50000 us
1204.393 Calculated SDU Interval : 10000 us
1204.393 num_snk_ases:2 num_src_ases:1
1204.393 ==>> CODEC_ReadLocalSupportedControllerDelay result 0x00
1204.394 ==>> CODEC_ReadLocalSupportedControllerDelay result 0x00
1204.394 Computed Min Controller Delay with 2 Snk ASEs and 1 Src ASEs : 14608 us
1204.394 WARNING : Controller Delay Min ( 14608 us) could be higher than the frame duration (10 ms)
1204.394 Submitted Min Presentation Delay 10010 us
1204.394 Submitted Max Presentation Delay 50010 us
1204.394 ==>> CODEC_ReadLocalSupportedControllerDelay result 0x00
1204.394 ==>> CODEC_ReadLocalSupportedControllerDelay result 0x00
1204.394 ==>> CODEC_ReadLocalSupportedControllerDelay result 0x00
1204.394 CAP Event: 0x0d
1204.395 Preferred Server QoS Settings is requested for ASE ID 2 (Type ASE_SINK)
1204.395 Target Latency : TARGET_LATENCY_BALANCED_RELIABILITY
1204.395 Target Phy TARGET_LE_2M_PHY to achieve the Target Latency
1204.395 Codec ID
1204.395 Coding format : AUDIO_CODING_FORMAT_LC3
1204.395 Company id : 0x0000
1204.396 VS codec id : 0x0000
1204.396 Frequency : SAMPLE_FREQ_48000_HZ
1204.396 Frame Duration : FRAME_DURATION_10_MS
1204.396 Octets Per Codec Frame : 155
1204.396 Codec Frame Blocks Per SDU : 1
1204.396 Min Controller Delay in Source role 8336 us
1204.396 Max Controller Delay in Source role 110000 us
1204.396 Min Controller Delay in Sink role 4136 us
1204.396 Max Controller Delay in Sink role 50000 us
1204.396 Calculated SDU Interval : 10000 us
1204.396 num_snk_ases:2 num_src_ases:1
1204.396 ==>> CODEC_ReadLocalSupportedControllerDelay result 0x00
1204.396 ==>> CODEC_ReadLocalSupportedControllerDelay result 0x00
1204.396 Computed Min Controller Delay with 2 Snk ASEs and 1 Src ASEs : 14608 us
1204.397 WARNING : Controller Delay Min ( 14608 us) could be higher than the frame duration (10 ms)
1204.397 Submitted Min Presentation Delay 10010 us
1204.397 Submitted Max Presentation Delay 50010 us
1204.397 CAP Event: 0x13
1204.397 Preferred Server Configuration for QoS Configuration:
1204.397 Framing:BAP_FRAMING_UNFRAMED
1204.397 Preferred Phy:LE_2M_PHY_PREFERRED
1204.397 PrefRetransmissionNumber:2
1204.397 MaxTransportLatency:5 ms
1204.397 PresentationDelayMin:10010 us
1204.397 PresentationDelayMax:50010 us
1204.398 PrefPresentationDelayMin:10010 us
1204.398 PrefPresentationDelayMax:50010 us
1204.398 Codec specific configuration for the ASE:
1204.398 CodingFormat:AUDIO_CODING_FORMAT_LC3
1204.398 Audio Stream Endpoint State ASE_ID:1 Type:ASE_SINK State:ASE_STATE_CODEC_CONFIGURED
1204.399 CAP Event: 0x13
1204.399 Preferred Server Configuration for QoS Configuration:
1204.399 Framing:BAP_FRAMING_UNFRAMED
1204.399 Preferred Phy:LE_2M_PHY_PREFERRED
1204.399 PrefRetransmissionNumber:2
1204.399 MaxTransportLatency:5 ms
1204.399 PresentationDelayMin:10010 us
1204.399 PresentationDelayMax:50010 us
1204.399 PrefPresentationDelayMin:10010 us
1204.399 PrefPresentationDelayMax:50010 us
1204.399 Codec specific configuration for the ASE:
1204.399 CodingFormat:AUDIO_CODING_FORMAT_LC3
1204.400 Audio Stream Endpoint State ASE_ID:2 Type:ASE_SINK State:ASE_STATE_CODEC_CONFIGURED
1204.630 CAP Event: 0x13
1204.631 Audio Stream Endpoint State ASE_ID:1 Type:ASE_SINK State:ASE_STATE_RELEASING
1204.631 CAP Event: 0x13
1204.631 Audio Stream Endpoint State ASE_ID:1 Type:ASE_SINK State:ASE_STATE_IDLE
1204.631 CAP Event: 0x13
1204.631 Audio Stream Endpoint State ASE_ID:2 Type:ASE_SINK State:ASE_STATE_RELEASING
1204.631 CAP Event: 0x13
1204.631 Audio Stream Endpoint State ASE_ID:2 Type:ASE_SINK State:ASE_STATE_IDLE

Xiaojie
Associate III

Hi,

 

I obtained the log on the tablet side, which shows that the tablet released ASE, because CIS could not be created.

 

CigCreate: Group: 0xb400007858285710, id: 2 cig state: NONE (0x00)
isIntervalAndLatencyProperlySet: sdu_interval_us: 10000, max_latency_ms: 5
CigCreate: Latency and interval not properly set
AseStateMachineProcessCodecConfigured: Could not create CIG. Stop the stream for group 2

 

Best Regards

Xiaojie
Associate III

HI, All

 

I solved the issue which originated from BLE_Audio_TMAP_Periopheral.

When handling the CAP_UNICAST_PREFERRED_QOS_REQ_EVT,  we need get the parameter from APP_QoSConf. 

        for(i = 0;i<15;i++)
        {
          if((frequency == APP_QoSConf[i+offset].freq) \
              && (sduInterval == APP_QoSConf[i+offset].sdu_interval) \
              && (octetsPerFrame == APP_QoSConf[i+offset].max_sdu))
          {
            info->pPrefQoSConfRsp->PrefRetransmissionNumber = APP_QoSConf[i+offset].rtx_num;
            info->pPrefQoSConfRsp->MaxTransportLatency = APP_QoSConf[i+offset].max_tp_latency;
          }

But there is a bug in the code above,APP_QoSConf array has a total of 32 members, we should change 15 to 16 as half. My QoS configuration corresponds exactly to a member with index number 15.

 

Best Regard