This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CC2564MODN: Audio configuration for HFPDemo_HF

Part Number: CC2564MODN
Other Parts Discussed in Thread: TLV320AIC3254, CC3200AUDBOOST, CC2564

Tool/software: Code Composer Studio

There is one thing in HFPDemo_HF inside http://www.ti.com/tool/CC256XMS432BTBLESW which I don't understand when it comes to configuring the audio codec inside BTmod:

static void ConfigureControllerAudioCodec(unsigned int BluetoothStackID, unsigned long SamplingFrequency, unsigned int NumChannels)
{
   Word_t Channel1Offset;
   Word_t Channel2Offset;

   union
   {
      VS_Write_Codec_Config_Params_t          WriteCodecConfigParams;
      VS_Write_Codec_Config_Enhanced_Params_t WriteCodecConfigEnhancedParams;
   } u;

   /* Set the codec config parameters.  The PCM clock rate is set to 80 */
   /* times faster than the frame sync clock frequency in order to match*/
   /* the BCLK/WCLK ratio expected by the CC3200AUDBOOST's audio codec  */
   /* (the TLV320AIC3254).                                              */
   Channel1Offset = (NumChannels == 1) ? 17 : 1;
   Channel2Offset = Channel1Offset + 16 + 24;

My questions are about the Channel{1|2}Offset: why is channel 1 being shifted by 17 bits in case of HFP?

And why is Channel2 being shifted by (16 + 24) bits? The first number is clear: 16 bits from channel 1 sample. But why 24 additional bits?

Finally, I'm able to hear the audio of incoming call but the other side (the caller) does either hear nothing or only squelsh... I couldn't find any hints in the http://processors.wiki.ti.com/index.php/CC256x_VS_HCI_Commands how to configure the codec inside BTmod for the various audio use cases (HFP, A2DP).

  • Hi,

    The unusual channel offset is since the codec used by default in the MSP432 demos, the TLV320AIC3254, is being set in DSP mode and not I2S mode. Take a look at section 2.6.4 of ti.com/lit/slaa408 or an explanation of the DSP mode timing diagram. If you are using that codec, reading that application guide as well as the default register configuration in CodecInit() of CC3200AUDBOOST.c would be useful.

    For debugging audio issues, it may be helpful to set the interface in loopback mode. This will allow you to see if your codec config settings + I2S settings are correct, since if everything is configured properly whatever audio you provide into the CC2564 should come out of it and be played back without issues. Please give that a try.

    Regards,

    Michael

  • Okay, I think I understand. In HFPDemo the audio from BTmod comes with LR-clock signal (instead of frame sync as in I2S-audio, used in A3DPSink demo).

    Allow me to rephrase my question: when operating in handsfree assisted mode (WBS), which audio channel from BTmod is being used to transmit audio over bluetooth, i.e. for output? I can hear the input very clear so both configurations should be okay. However, audio is being properly transmitted only in one direction: from BTmod to Codec.

  • Hi,

    If you are using the MSP432 HFPDemo with the cc3200audboost, there shouldn't be any issues with hearing bidirectional audio. I tested out the HFPDemo as per the setup instruction at ti.com/lit/swru497 as well as the example instructions at https://processors.wiki.ti.com/index.php/CC256x_STM32_TI_Bluetooth_Stack_HFPDemo_App with good audio on both ends.

    The BTmod will be the master if you're using the default configuration in the demo, so it will use the AUDIN signal as the input to the bluetooth transmission to the caller. 

    Regards,

    Michael