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.

WL18xx HFP example HCI cmd sequence for PCM path setup

Other Parts Discussed in Thread: WL1837

Hi,

could you send us an example sequence of VS HCI commands for setting up the PCM path for the HFP? This if for porting to a MSFT BT stack HFP.

Essentially using these commands:

            HCI_VS_BT_IP_Set_Audio_Path (0xFD95)

            HCI_VS_Write_CODEC_Config (0xFD06)

            HCI_VS_Write_CODEC_Config_Enhanced (0xFD07)

            HCI_VS_BT_IP_Audio_Rate_Conversion (0xFDFD)

            HCI_VS_AVPR_Enable (0xFD92)

 

Thanks,

--Gunter

  • Hi Gunter,

    HCI_VS_Write_CODEC_Config is the only command you need. The parameters are explained in: www.ti.com/.../swru442

    Regards,
    Gigi Joseph.
  • Joseph,

    Gunter submitted this forum post on my behalf.  

    I would like to configure the PCM interface of the WL1837 BT module to act as a slave.  Using the HCI_VS_Write_CODEC_Config command I believe I have correctly configured the PCM interface as slave, but I have clearly see that it is still acting as the master.  The following is the raw command data I am sending to the module:

    0x01,                                     // HCI packet type = Command
    0x06, 0xFD,                         // HCI opcode = HCI_VS_Write_CODEC_Config
    0x23,                                    // HCI param length
    0x40, 0x08,                          // PCM clock rate = 2.112M (48kHz * 44clks)
    0x01,                                    // PCM clock direction = slave
    0x80, 0xBB, 0x00, 0x00,  // PCM frame sync = 48kHz
    0x01, 0x00,                         // PCM frame sync duty cycle = 1 clk
    0x00,                                   // PCM frame edge = rising edge
    0x00,                                  // PCM frame polarity = active high
    0x01,                                  // PCM direction = slave
    0x10, 0x00,                      // PCM channel 1 out size = 16
    0x01, 0x00,                       // PCM channel 1 out offset = 1
    0x00,                                // PCM channel 1 out edge = rising
    0x10, 0x00,                     // PCM channel 1 in size = 16
    0x01, 0x00,                    // PCM channel 1 in offset = 1
    0x00,                               // PCM channel 1 out edge = rising
    0x00,                               // Reserved
    0x10, 0x00,                   // PCM channel 2 out size = 16
    0x11, 0x00,                   // PCM channel 2 out offset = 17
    0x00,                             // PCM channel 2 out edge = rising
    0x10, 0x00,                  // PCM channel 2 in size = 16
    0x11, 0x00,                  // PCM channel 2 in offset = 17
    0x00,                             // PCM channel 2 out edge = rising
    0x00,                             // Reserved

    Is the HCI command above correct?  Is there another command I need to send to put the module into slave mode?  Do you have a snipit of code that configures this that I could use as an example?

  • Hi,

    And what does the device return? Does it succeed?
    Can you share a logger log so I can see if the command is received with and responded to correctly?

    Regards,
    Gigi Joseph.
  • Hello,

    After running some additional tests I found that I had modified the wrong portion of the BTS file.  Now that I have the file setup correctly.  The PCM interface seems to be acting at a slave.

    Thanks for your help.