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.

wl1271 audio loopback

Other Parts Discussed in Thread: WL1271, OMAP-L138, OMAPL138, OMAP3530, AM3715

I am trying to get the wl1271 audio pcm interface into loopback (well, perhaps wiggling at all).  It seemed to be working last week, but today yields different results.

My omap-l138 is the I2S master.  All data lines are active other than data from the bluetooth chip.

I have brought up the bluetooth interface using bluez 4.87 (with the TI init script).  I then sent the HCI_VS_Write_CODEC_Config command followed by the HCI_VS_Set_PCM_Loopback_Enable command.  Am I missing something?  At some point in time the data line started moving, but then stopped again.

  • As you said,  to use the PCM interface the HCI command "HCI_VS_Write_CODEC_Config (0xFD06)" must be used by the host. Additionally, there is "HCI_VS_Write_CODEC_Config_Enhanced (0xFD07)" that may not be required, if you are o.k with the default values. To setup the PCM loopback, there are two commands available, HCI_VS_Set_PCM_Loopback_Enable (0xFE28) and HCI_VS_Set_PCM_Loopback_Configuration (0xFD04). The first command starts/stops PCM loopback and the second one configures the default PCM loopback delay on the bus between the PCM input data and the PCM output data. When you use HCI_VS_Write_CODEC_Config (0xFD06), make sure that both sides are aligned (i.e. the same CLK rate, FS rate, etc). In your case WL1271 is the slave, both sides must be configured and aligned. After giving HCI_VS_Set_PCM_Loopback_Enable, the other side must be able to provide clk and samples in right format.

     

     

     

  • So I just did a quick test.  Deactivated the level-shifter between my omap-l138 and the bluetooth chip.  I then booted the board and talked directly to the chip using HCITester.  Put the bluetooth chip into loopback mode as I2S master, and I could wiggle the audio output based on arbitrary input (connecting a wire to level high and removing, etc).  So, there must be something different about having the OMAP-L138 drive the I2S clock and data lines.

     

    Here are the commands used to set the bluetooth chip as I2S slave in loopback:

    hcitool cmd 0x3F 0x0106 0x80 0x0C 0x01 0x00 0xFA 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x00 0x01 0x00 0x10 0x00 0x22 0x00 0x00 0x10 0x00 0x22 0x00 0x01 0x00

    hcitool cmd 0x3F 0x0228 0x01

     

    The I2S bus is configured to a 3.2 MHz bit clock, 64 KHz frame clock.  The intended data is 2 channels of 16-bit data.  This gives a 50-bit per frame clock in order to get the correct divider.  The above codec configuration is not correct for the second channel, but that's largely not used so I was playing with that one a bit.  I'm thinking this is what I used last Friday when it was working, but in any case, I would think I would see the data output at least move a bit.

     

  • I'll note that I'm actually using a PAN1315 module.  I mentioned wl1271 since for the most part it's identical, but perhaps this minor difference will have bearing on this issue.

  •  

    Currently, we do not support WL1271 on the OMAP-L13 8 EVM. Please refer to the Connectivity Wiki for updates on OMAPL13x software plans : http://processors.wiki.ti.com/index.php/ARM_Processor_Wireless_Connectivity

  • Sinoj,

    I don't need help with the software stack, so the choice of processor should not matter.  The I2S bus is being read in on the omap-l138 by a custom DSP application anyhow.  My issue is at the hardware level.  I see what I think are good bit clock and frame clocks, but do not see the bluetooth chip responding.

    Mike

  • Mike,

    The team needs a HW setup to investigate further.

    From the posting, both the Processor (OMAPL138) and the Connectivity Device( PAN1315) are not part of a platform offering so it is not possible for us to investigate this further.

    Adnan

  • Adnan,

    Can this be tested with the WL1271?  It's the same bluetooth core as the PAN1315.

    Mike

  • Mike,

    On which Processor? What is the test you are requesting us to run?

    Adnan

  • Adnan,

    Processor does not matter much.  The issue I am having is that I am not able to get the bluetooth module to operate as an I2S slave.  If you can configure it as an I2S slave (and enable loopback), start clocking the clock and frame signals.  The problem I have is that the module does not return any data.  It seemed to work one day, but I am unable to reproduce those results.  It has always worked when the bleutooth module is I2S master.

    Mike

  • Hi Mike,

    We have supported HSP/HFP profile on OMAP3xxx platform and PCM interface of the WL1271 act as Master mode on OMAP3530 & AM3715 platform.

    Please find the procedure to test HSP/HFP on OMAP3xxx platform.

    1.    Bring-up BT using below command.

    # ./BT_Demo.sh

    2.    Scan for HSP supported devices (Select the option 1 in BT main menu).

    3.    Pair the HSP supported device using BT address (Select option 8 in BT main menu).

    4.    Select HSP test (select option 6 in BT main menu).

    a.    Start HFP and enter the BD address (select option 1 in HFP play menu)

    b.    Record Audio (Select option 2 in HFP play sub menu).

    c.    Enter the Audio file name to store the audio.

    d.    On completion of audio recording, Play Audio (Select option 1 in HFP play sub menu)

     

    Best Regards

    Sanjay

  • Sanjay,

    Which chip was the I2S master, wl1271 or omap3xxx?  I am able to get it working with the bluetooth chip as master, but I'd prefer it to be slave, which I am unable to get working.

    Mike

  • Mike,

    Here WL1271 chip is working as master. We have not configure WL1271 as slave on OMAP3xxx platform.

     

    Best Regards

    Sanjay

  • Please note that the reference to HFP/HSP Profile above was for test purpose only. This profile is currently not supported on the platform.