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.

WL1835MOD: How do I configure PCM for A2DP and HFP profiles

Part Number: WL1835MOD

Hello everyone,

My team is working on a custom board that uses AM335x and this runs a custom version of Linux.  We have a WL1835MODGBMOCR module that can do both WiFi and Bluetooth, but we are having problems setting up the Bluetooth to work with the two following profiles:  HFP and A2DP.  Our custom distribution of Linux uses the Bluetopia stack and many attempts have been made following the demos here https://processors.wiki.ti.com/index.php/TI_Bluetooth_Stack_for_WL18xx_-_Demo_Guide#Audio_.28A2DP.29_Profile_Sample_Applications  Pairing and connecting work well for our custom board and we are able to reproduce audio from a Modem module to a Bluetooth device that uses HSP profile after configuring the PCM.  The Modem module can be configured to be the Master and to produce a PCM clock at 2.048 MHz and a Frame-sync frequency be at 8000 Hz.

Questions: 

What is the recommended demo to be used for HFP, HSP, and A2DP profiles simultaneously?  Currently we are mostly experimenting with LinuxAUDM and LinuxHFRM_AG_WL18XX.

What are the recommended PCM commands to configure the WL1835MODGBMOCR module to properly create clear audio for HFP and A2DP Bluetooh profiles?  We are currently experimenting with 0xFD06 from https://www.ti.com/lit/ug/swru442b/swru442b.pdf?ts=1597077059676 to set up for the HFP profile, but have not had any success.  I am also aware that for A2DP profile the commands 0xFD8E and 0xFD8C need to be used.  We use SS1Tool to send commands.

Thank you for help and time.

  • HFP will use the PCM interface as you mention.  However, on WL18xx, assisted A2DP is not supported.  Only unassisted A2DP is supported, which uses the UART interface to the host and not the PCM interface. 

    I'll ask our experts to chime in though on your more specific question.

    Regards,

    Travis

  • Hello Travis,

    Thank you for your reply; however, based on what I've read from the datasheet https://www.ti.com.cn/cn/lit/ds/swrs152m/swrs152m.pdf page 23.  WL18xx does support A3DP.  Please correct me if I am wrong.

    Furthermore, are there any updates regarding my questions and your team of experts?

    Thank you.

  • Hi Jesus,

    Some additional comments :

    The provided demos with Bluetopia stack, support HFP and a2dp demos. As, noted above with HFP demo voice is routed through PCM interface from the BT controller. For AUD/A2dp obviously, a Linux host codec is needed. For assisted a2dp, there are no Linux demo samples. However, the Bluetopia stack release for MCU (MSP432/STM32) have some examples for assisted a2dp. Please, check this e2e thread:

    It is not clear, if you are successful with HFRM_HF and HFRM_AG demos. These demos need host linux configuration for ALSA BT codec etc..

    Thanks

  • Hello Hari,

    I have read through that post and that is how I came to the conclusion that the commands 0xFD8E and 0xFD8C are needed for A3DP configuration.  One of our end goals is to be able to have an audio file within the AM335x and be able to stream it to a Bluetooth speaker that utilized A2DP profile. 
    Are there recommendations for this?  

    Also, I apologize for the confusion, we have had success with HFRM_AG, but the configuration for 0xFD06 produces audio that is not very clear. 
    Are there any suggestions for configuring this command, 0xFD06, to produce audio that will always be clear on Bluetooth speakers that use HFP profile?

    We want to be able to support both A2DP and HFP profiles.

    Thank you.

  • Hi,

    I see.. So, it appears you would like to use a2dp source profile to transmit audio. You can do it either with pure a2dp i.e ACL data packets for audio and use AAC codecs (and likely no transcoding) or use PCM stream, so that the controller encodes to SBC codec format and sends to the remote. The default BluetopiaPM examples support a2dp profile with AAC codec, so you can give it a try.

    https://processors.wiki.ti.com/index.php/WL18xx_TI_Bluetooth_Stack_AUDM_Demo_App#AAC_2

    For HFP profile, you can go through the PCM route to reduce voice latencies etc.. How are you routing the voice to the PCM interface on the Linux host? Is the voice really bad? If you have bad voice connection means, i would suggest looking at the McASP/DAI configuration to ensure it is matching the PCM configuration on the controller..

    Thanks

  • Hello,

    My team is investigating your suggestions and I will reach out to you when I have more information.  Thank you for your time and patience, Hari.