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.

OMAP 4460 Bluetooth Audio PCM Interface

Other Parts Discussed in Thread: TWL6040

Hello , I want to disconnect the ABE_McBSP1_* from the onboard bluetooth chip and reconnect it to an external bluetooth chip to test the PCM interface of my chip . What are the software changes needed ?Where should I start ?

I am running Android ICS on pandaboard ES.

  • Hi,

    There should be so much changes at SW if you will use it same way. Only if you need to change the protocol you will need to make modification in the sdp4430_mcbsp_hw_params function in sound/soc/omap/sdp4430.c file.

  • Hi, 

    I followed the steps you mentioned in another post to enable audio over SCO link using your bluetooth chip before disconnecting the lines and reconnecting them to my chip to make sure everything is working before hacking the hardware but I can't hear any sound.

    Thanks,

    Ahmed

    Israel Cepeda said:

    There is an app to enable audio bluetooth, but it will only work if you have your display connected to the DVI port, because if you connect HDMI all the audio will go to the HDMI.

    Try connecting the display/monitor/TV to the DVI port and pair your bluetooth device.

    Then open the BluetoothSCOA application and check the "Enable Music via Media Player" option

    Finally go to the Music Player app and start playback

    You should be able to listen your music.

  • Output of : cat /proc/asound/card0/pcm13p/sub0/info 

    card: 0 
    device: 13 
    subdevice: 0 
    stream: PLAYBACK 
    id: BT Capture Bluetooth-13 
    name: 
    subname: subdevice #0 
    class: 0 
    subclass: 0 
    subdevices_count: 1 
    subdevices_avail: 1

    Output of:cat /proc/asound/card0/pcm13p/sub0/hw_params 

    closed



    Output of : tinymix

    0 ENUM 1 DL1 Equalizer Flat response
    1 ENUM 1 DL2 Left Equalizer High-pass 0dB
    2 ENUM 1 DL2 Right Equalizer High-pass 0dB
    3 ENUM 1 Sidetone Equalizer Flat response
    4 ENUM 1 AMIC Equalizer High-pass 0dB
    5 ENUM 1 DMIC Equalizer High-pass 0dB
    6 INT 1 DL1 Media Playback Volume 118
    7 INT 1 DL1 Tones Playback Volume 0
    8 INT 1 DL1 Voice Playback Volume 120
    9 INT 1 DL1 Capture Playback Volume 0
    10 INT 1 DL2 Media Playback Volume 118
    11 INT 1 DL2 Tones Playback Volume 0
    12 INT 1 DL2 Voice Playback Volume 120
    13 INT 1 DL2 Capture Playback Volume 0
    14 INT 1 VXREC Media Volume 0
    15 INT 1 VXREC Tones Volume 0
    16 INT 1 VXREC Voice DL Volume 0
    17 INT 1 VXREC Voice UL Volume 0
    18 INT 1 AUDUL Media Volume 0
    19 INT 1 AUDUL Tones Volume 0
    20 INT 1 AUDUL Voice UL Volume 120
    21 INT 1 AUDUL Voice DL Volume 0
    22 INT 1 SDT UL Volume 101
    23 INT 1 SDT DL Volume 120
    24 INT 2 DMIC1 UL Volume 120 120
    25 INT 2 DMIC2 UL Volume 120 120
    26 INT 2 DMIC3 UL Volume 120 120
    27 INT 2 AMIC UL Volume 120 120
    28 INT 2 BT UL Volume 120 120
    29 BOOL 1 DL1 Mono Mixer Off
    30 BOOL 1 DL2 Mono Mixer Off
    31 BOOL 1 AUDUL Mono Mixer Off
    32 BOOL 1 DL1 MM_EXT Switch Off
    33 BOOL 1 DL1 BT_VX Switch Off
    34 BOOL 1 DL1 PDM Switch On
    35 BOOL 1 Sidetone Mixer Capture Off
    36 BOOL 1 Sidetone Mixer Playback On
    37 BOOL 1 Capture Mixer Tones Off
    38 BOOL 1 Capture Mixer Voice Playback Off
    39 BOOL 1 Capture Mixer Voice Capture Off
    40 BOOL 1 Capture Mixer Media Playback Off
    41 BOOL 1 Voice Capture Mixer Tones Playback Off
    42 BOOL 1 Voice Capture Mixer Media Playback Off
    43 BOOL 1 Voice Capture Mixer Capture Off
    44 BOOL 1 DL2 Mixer Tones Off
    45 BOOL 1 DL2 Mixer Voice Off
    46 BOOL 1 DL2 Mixer Capture Off
    47 BOOL 1 DL2 Mixer Multimedia On
    48 BOOL 1 DL1 Mixer Tones Off
    49 BOOL 1 DL1 Mixer Voice Off
    50 BOOL 1 DL1 Mixer Capture Off
    51 BOOL 1 DL1 Mixer Multimedia Off
    52 ENUM 1 MUX_VX1 None
    53 ENUM 1 MUX_VX0 None
    54 ENUM 1 MUX_UL11 None
    55 ENUM 1 MUX_UL10 None
    56 ENUM 1 MUX_UL07 None
    57 ENUM 1 MUX_UL06 None
    58 ENUM 1 MUX_UL05 None
    59 ENUM 1 MUX_UL04 None
    60 ENUM 1 MUX_UL03 None
    61 ENUM 1 MUX_UL02 None
    62 ENUM 1 MUX_UL01 None
    63 ENUM 1 MUX_UL00 None
    64 INT 2 Capture Preamplifier Volume 1 1
    65 INT 2 Capture Volume 4 4
    66 INT 2 Aux FM Volume 3 3
    67 INT 2 Headset Playback Volume 15 15
    68 INT 2 Handsfree Playback Volume 26 26
    69 INT 1 Earphone Playback Volume 15
    70 ENUM 1 Headset Power Mode High-Performane
    71 BOOL 1 Earphone Enable Switch Off
    72 ENUM 1 HS Right Playback Off
    73 ENUM 1 HS Left Playback Off
    74 ENUM 1 HF Right Playback HF DAC
    75 ENUM 1 HF Left Playback HF DAC
    76 ENUM 1 Analog Right Capture Route Off
    77 ENUM 1 Analog Left Capture Route Off
    78 ENUM 1 TWL6040 Power Mode Low-Power




  • How are you testing?

    Basically what you have to do is:

    1) Use the DVI port if you are using a Pandaboard

    2) Pair your BT headset or device

    3) Go to the BluetoothSCOA application and check the option to enable music via media player

    4) Open media player and start the playback

    You should hear the music in the BT only

  • I tried it exactly this way and nothing is heard.

    I only hear audio when I route the audio myself using tinymix. I spent some time reading the code and enabling log messages and found out this part is called  inside audio_hw.c:select_output_device whenever I play audio :

    if(adev->board_type == PANDA) {
    headset_on = 0;
    speaker_on = 1;
    mixer_ctl_set_value(adev->mixer_ctls.mm_dl1, 0, 1);
    set_route_by_array(adev->mixer, hs_output, 1);
    set_input_volumes(adev, 0,
    headset_on, speaker_on);

    }else{ ....}

    How this code will route to bluetooth ???

  • Hi Ahmed,

    Look for the variable bt_on, inside that function it is set when from higher level you set the audio to go to bluetooth, then it should set the path.

  • Hi ,

    I think I am missing something , even if bt_on is set the whole routing logic is inside the else{} part which will never be executed ?

  • Hi Ahmed,

    Is that an if you added?, or where did you get the code from?

    Because I am using the code I downloaded from: http://www.omappedia.org/wiki/4AI.1.4_OMAP4_Icecream_Sandwich_Panda_Notes  and http://www.omappedia.org/wiki/4AI.1.7_OMAP4_Icecream_Sandwich_Panda_Notes but I don't see that if. Because it is forcing the audio hw to always set the path to the speaker when it is a Panda board.

  • I checkout the code from google master branch , Here is the latest commit in /device/ti/panda

    https://android.googlesource.com/device/ti/panda/+/66d3e192ea68d266a00307b23b40a44eff8d01af%5E1/audio/audio_hw.c

    Have a look at line 1016 . This code is Jelly bean but it is the same since ICS (I don't know before that) .

  • Ok, I see..

    As I previously mention it is forcing Panda to always use speaker, previously device/ti/common-open/audio/audio_hw.c was used and for this it was allowed to use other audio ports, even bluetooth was working, but you needed a patch to add Panda support (see https://gforge.ti.com/gf/download/user/9174/5776/commonopenpanda.patch), but this new audio hw in device/ti/panda/audio seems to be limiting the Panda, so you would need to implement the routing of the path to the bluetooth port. Or you can try changing the audio_hw.c for the one in device/ti/common-open/audio + the patch to add the support (and fix any compilation error if any).

  • Hi, 

    Where can I get audio_hw.c you mentioned ? There is no common-open/ dir in the official source tree .

  • Try getting the branch from the repo: http://www.omapzoom.org/?p=device/ti/common-open.git;a=summary