We have been trying to get the unassisted HFP up and running with CC2564C and STM32F413 with the Bluetopia stack. To begin with we wanted just the loopback to work so we tried the following. Eventually we want unassisted HFP over HCI to work - so if you could guide/point us to the right sequence to enable this - it would be of great help.
Note: We have searched over the e2e forum across multiple posts - but could not find much.
- Stack API calls for HFP enabling
- HFP is up and can be connected through a phone - service level connection is active
- When a call comes - we receive the indication, caller number etc. info
- Loopback over HCI through MCU
- Configure SCO to HCI: HCI_VS_Write_SCO_Configuration 0x01 0xFF 0x01 0x00 0x01
- Set voice settings: HCI_Write_Voice_Setting 0x63. Following bits are set
- HCI_VOICE_SETTING_INPUT_DATA_FORMAT_2_COMPLEMENT
- HCI_VOICE_SETTING_INPUT_SAMPLE_SIZE_16_BIT
- HCI_VOICE_SETTING_AIR_CODING_FORMAT_TRANSPARENT_DATA
- Observations:
- HFP connection successful
- etHFRE_Audio_Data_indication event comes regularly
- Same data sent back using HFRE_Send_Audio_Data API function
- BTPS_ERROR_INSUFFICIENT_BUFFER_SPACE is returned after 4 calls
- etHFRE_Audio_Transmit_Buffer_Empty_Indication event never occurs
- No audio received back
- Loopback over I2S using HCI_VS_Set_Pcm_Loopback_Enable
- Configure SCO to Codec : HCI_VS_Write_SCO_Configuration 0x00 0xFF 0x01 0x00 0x01
- Set voice settings: HCI_Write_Voice_Setting 0x63. Following bits are set
- HCI_VOICE_SETTING_INPUT_DATA_FORMAT_2_COMPLEMENT
- HCI_VOICE_SETTING_INPUT_SAMPLE_SIZE_16_BIT
- HCI_VOICE_SETTING_AIR_CODING_FORMAT_TRANSPARENT_DATA
- Set Codec config: HCI_VS_Write_CODEC_Config
- Tried with 16kHz/16bit, 8kHz/8bit
- Enable PCM loopback: HCI_VS_Set_Pcm_Loopback_Enable 0x01
- Observations:
- PCM clock was active
- Repetitive data of 0x10 was received at left channel for all frames
- No audio received back