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.

Enabling I2S support to route audio from CC256x to an external codec.

Hi,

 We are using the TI CC256x chip for customer. We have a requirement to route the SBC encoded audio to an external decoder. We are struggling to configure the I2S path.

What I have tried till now:

I tried using the following vendor specific command:

Command Name: HCI_VS_BT_IP_Set_Audio_Path(0xFD95)

root@stratos:~# hcitool cmd 0x3f 0x195 02 FF 00 FF 22 22 FF 31 FF 12 FF 11 FF 11 FF 11
< HCI Command: ogf 0x3f, ocf 0x0195, plen 16
  02 FF 00 FF 22 22 FF 31 FF 12 FF 11 FF 11 FF 11
> HCI Event: 0x0e plen 4
  01 95 FD 01

Could someone help us to route the audio over I2S successfully.

 

Thanks,

Kumar B.

  • Hi,

    Have you taken care of the I2S interface, see http://processors.wiki.ti.com/index.php/CC256x_System_Design_Guide#PCM.2FI2S_Interface

    and to configures the codec interface parameters, use the below command http://processors.wiki.ti.com/index.php/CC256x_VS_HCI_Commands#HCI_VS_Write_CODEC_Config_.280xFD06.29
  • Hi Sundeep,

    Many thanks for your quick reply. We have taken care of the I2S interface as mentioned in the system design guide.
    I am confused on using the "HCI_VS_Write_CODEC_Config"
    What we are trying to use is the I2S interface, to an external codec. Why is the above Codec config for PCM required? Please Clarify.
    Also, is there a test utility to confirm the I2S support for the CC256x.

    Thanks,
    Kumar B
  • Hi Kumar,

    You should NOT use the command: HCI_VS_BT_IP_Set_Audio_Path.

    The two links that I provided should be perfect.

    To configure it to work in I2S (using the PCM HW lines of the device), you should configure the fsync duty cycle to 50% (as the spec dictates).

    We don’t have dedicated I2S and dedicated PCM lines in our device. It’s all about SW configuration.

     

  • Hi Sundeep,

    Thanks for the input. I am not clear about the usage of the Write_Codec command. What do channel 1 and channel 2 refer to in the command. If you have any sample "hcitool cmd" previously used and working, can you please post it here?

    Thanks,
    Kumar B
  • Hi,
    they are number of PCM channels.

    Below is the command with default values, you need to configure (Data out offset, PCM clock, Also make sure the Frame sync edge (and polarity) ) it as per your setup
    Send_HCI_VS_Write_CODEC_Config 0xFD06, 2048, 0x00, 8000, 0x0001, 0x00, 0x00, 0x00, 0x0010, 0x0001, 0x00, 0x0010, 0x0001, 0x01, 0x00, 0x0010, 0x0011, 0x00, 0x0010, 0x0011, 0x01, 0x00
    HCI tool command format
    hcitool cmd 0x3f 0x0106 0x00 0x08 0x00 0x40 0x1f 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x10 0x00 0x01 0x00 0x00 0x10 0x00 0x01 0x00 0x01 0x00 0x10 0x00 0x11 0x00 0x00 0x10 0x00 0x11 0x00 0x01 0x00
  • Hi Sundeep,
    Thanks for the quick response. I tried the command out, but unfortunately I don't see the audio data getting sent over the I2S. So, the above command doesn't work.

    Thanks for the input anyway.

    Regards,
    Kumar B.
  • Hi,

    have you taken care of the I2S interface as per my first post.
    It wont work as it is, you need to configure it as per your external codec.

    In addition In the above default parameters provided the Frame-sync duty cycle is set to 0x0001(PCM), which you need to change it to 0x0000 for I2S. which I have already mentioned in my above posts.

  • Hi Sundeep,

    I have taken care of the I2S interface as per your first post. Configured it according to external codec as well.
    Also, changed the F-Sync values according to your previous posts.

    Is there a way to set the CC256x as master when it is connected to another chip over I2S.(Understood that there is no specific I2S line and it is only a PCM line that has to be configured via software, from your previous posts).

    Is the CC256x always the master of the I2S line?

    Also, I sent the below command:

    hcitool cmd 0x3f 0x106 64 0x00 1638 0x0000 0x00 0x00 0 16 0x00 0x00 0x08 0x00 0x00 0 16 0x00 0x00 0x08 0x00 0x00 0

    And I get the following event:
    01 06 FD 00

    From the above event it can be seen that the command is working. But when I probed the lines using an oscilloscope, I did not see the CC256x's F-Sync and clock.

    Please let me know if I missed something.

    Thanks,
    Kumar B
  • Hi,

    You can try with higher PCM clock and frequency using the Clock direction you can set CC256x as master or slave. It is preferred to be master