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.

Linux/CC2564: PCM problem with Bluetopia stack

Part Number: CC2564
Other Parts Discussed in Thread: AM5728,

Tool/software: Linux

my device connect like this .

1 )Now I can hear the music playing on am5728 via bluetooth headset. like http://processors.wiki.ti.com/index.php/WL18xx_TI_Bluetooth_Stack_AUDM_Demo_App

now i hace some  question  about AUDM DEMO APP to get audio from the microphone of a bluetooth headset.

But how do I get an audio message from a bluetooth headset?

2 ) I tried another way, linke  http://processors.wiki.ti.com/index.php?title=WL18xx_TI_Bluetooth_Stack_HFPM_Demo_App

       I can make phone calls through the mobile phone connected to am5728, but there is no sound. Does the PCM port need a separate configuration?

  • Hello,

    hello said:

    1 )Now I can hear the music playing on am5728 via bluetooth headset. like http://processors.wiki.ti.com/index.php/WL18xx_TI_Bluetooth_Stack_AUDM_Demo_App

    now i hace some  question  about AUDM DEMO APP to get audio from the microphone of a bluetooth headset.

    But how do I get an audio message from a bluetooth headset?

    The AUDM Demo App implements A2DP profile. When the application is configured in Sink role, you can connect the app to a smartphone or any other source and play music. Similarly, when the application is configured as Source, you can play a locally stored music file to a remote Sink like a Bluetooth headphone or speaker. Is this something what you are trying to do?

    hello said:

    2 ) I tried another way, linke  http://processors.wiki.ti.com/index.php?title=WL18xx_TI_Bluetooth_Stack_HFPM_Demo_App

           I can make phone calls through the mobile phone connected to am5728, but there is no sound. Does the PCM port need a separate configuration?

    Yes, the PCM port (McASP) on the AM5728 must be separately configured. Unlike the A2DP implementation, the data path for HFP/HSP is over the PCM interface. 

    Best regards,

    Vihang

  • Hi Vihang,
    Thanks for your answer,

    I configured PCM interface like this:
    HFP model
    BCLK:454.546kHz
    FCLK:14.2045kHz
    then I connect an android phone with the following command:

    Hands Free wl18xx>1 1

    BTPM_Initialize() Success: 0.
    DEVM_RegisterEventCallback() Success: 5.
    Hands Free wl18xx>9 1

    echo 136 > /sys/class/gpio/export
    echo out > /sys/class/gpio/gpio136/direction
    echo 0 > /sys/class/gpio/gpio136/value
    echo 1 > /sys/class/gpio/gpio136/value
    echo 0 > /sys/class/gpio/gpio136/value
    echo 1 > /sys/class/gpio/gpio136/value
    BT COMM PORT (/dev/ttyS9): 1
    Changing HCI baud rate to 3000000
    Status: Executing BTS Script /lib/firmware/TIInit_6.7.16.bts.
    Status: BTS Script successfully executed.
    DEVM_PowerOnDevice() Success: 0.
    Set CODEC PCM Configuration to 16KHz and Route the GStreamer
    [GCBT] PM_VS_PCM_Codec_Config BT is Slave
    Device Powered On.
    Hands Free wl18xx>killall: gst-launch-1.0: no process killed
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstAudioSrcClock
    GStreamer route 16KHz success
    Hands Free wl18xx>Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstAudioSrcClock


    Hands Free wl18xx>RegisterAuthentication

    DEVM_RegisterAuthentication() Success: 5.
    Hands Free wl18xx>HFRRegisterEventCallback 1

    HFRM_Register_Event_Callback() Success: 1.
    Hands Free wl18xx>HFRRegisterDataCallback

    HFRM_Register_Data_Event_Callback() Success: 2.
    Next, I connected to cc2564 via bluetooth,and success.


    Next, I control the phone to make a call

    Hands Free wl18xx>DialNumber 2047DAEACE87 13126576341

    HFRM_Dial_Phone_Number: Function Successful.
    Hands Free wl18xx>
    hetHFRCommandResult, BD_ADDR: 2047DAEACE87, Type 0 Code 0.
    Hands Free wl18xx>
    hetHFRControlIndicatorStatusIndication, BD_ADDR: 2047DAEACE87, Description: CALLSETUP, Value: 2.
    Hands Free wl18xx>
    Remote Device Properties Changed.
    BD_ADDR: 2047DAEACE87
    Device Flags: 0x8000049D
    Hands Free wl18xx>
    hetHFRCodecSelectIndication, BD_ADDR: 2047DAEACE87, Codec: 2
    [GCBT] PM_VS_PCM_Codec_Config BT is Slave
    Hands Free wl18xx>
    hetHFRControlIndicatorStatusIndication, BD_ADDR: 2047DAEACE87, Description: CALLSETUP, Value: 3.
    Hands Free wl18xx>
    hetHFRCommandResult, BD_ADDR: 2047DAEACE87, Type 0 Code 0.
    Hands Free wl18xx>
    Remote Device Properties Changed.
    BD_ADDR: 2047DAEACE87
    COD: 0x0C025A
    Hands Free wl18xx>
    hetHFRAudioConnected, BD_ADDR: 2047DAEACE87, Type: hctHandsFree.

    Configure PCM 16KHz
    [GCBT] PM_VS_PCM_Codec_Config BT is Slave
    Hands Free wl18xx>
    hetHFRAudioConnected, BD_ADDR: 2047DAEACE87, Type: hctHandsFree.

    Configure PCM 16KHz
    [GCBT] PM_VS_PCM_Codec_Config BT is Slave
    Hands Free wl18xx>
    Remote Device Properties Changed.
    BD_ADDR: 2047DAEACE87
    Device Flags: 0x800004BD
    Hands Free wl18xx>

    The telephone can be connected, but there is no sound. What shoule i do ?
  • Do, you have the alsa hw plugins configured correctly for both the BT PCM from the CC2564x controller?
    I would also suggest to check, if there are any ALSA interrupt count getting updated.
  • Hi ,

    1>Do you mean configuring the BT PCM interface via the LinuxHFRM_HF. C file? And  how do I determine if the PCM port is working properly after I finish this demo?

    #ifdef wl18xx
    					/* Send Vendor Specific command to the Wilink Bluetooth FW. Configure the PCM   *
    					*  interface parameters to: 16KHz sample rate, PCM clock rate 1.6MHz, PCM slave *
    					*  FSynch- 1 clock with inverted polarity, 16 bit sample with no offset. The    *
    					*  WL18xx Bluetooth PCM has 8/16 and 16/8 sample rate converted. The PCM  is    *
    					*  allays on 16KHz.	Route the PCM lines with the GStreamer to 16KHz             */
    					ret_val = PM_VS_PCM_Codec_Config(&PCMCodecConfig16k);
    					RouteGStreamer(SAMPLE_RATE_16KHZ);


    2>

     The picture below is my two audio devices.

    I changed the LinuxHFRM_HF. C   #define ROUTE_GSTREAMER_WL_TO_AM335_SPK_16K "gst-launch-1.0 alsasrc device=plughw:WILINK8BT ! audio/x-raw,channels=1,rate=16000 ! alsasink device=plughw:AM335xEVM &"   to  

    #define ROUTE_GSTREAMER_WL_TO_AM335_SPK_16K "gst-launch-1.0 alsasrc device=plughw:WILINK8BT ! audio/x-raw,channels=1,rate=16000 ! alsasink device=plughw:BeagleBoardX15 &"

     

    3> Finally, trouble to ask, how to check the ALSA interrupt count?

  • Generally, you can check the interrupts in linux with

    #cat /proc/interrupts

    Please, check if the interrupts are incrementing..

    Thanks