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.

BT PCM porting issues?

Other Parts Discussed in Thread: TWL6040

I am using a custom board with OMAP4. PCM interface is McBSP2.

I tried the following:

a) Pair my BT device & turn off the BT media audio and turn on Phone Audio

b) When i enable BTSCO App checkbox, I get a message saying "BT Sco Music is now disabled." Always

c) when i play audio using media player i get audio in my speaker and not on my BT.

d) Now, Do i need to make any modifications in audio_hw.c for OMAP4 PCM interface if i use McBSP2.

e) In the kernel i have made muxing for mcbsp2 only. Do i need to make any other change in the kernel to get this working

Can you provide me some pointers so that i can debug and find out what is causing the issue.

Thank you very much.

/ryan

  • Hello,

    I made some progress on this. Now, The BT Sco app says it is connected.

    The bt_on variable is having a value of 32.

    I get lots of messages like below. When i play audio in the media player.

    It plays music. The slide bar keeps moving But i dont hear anything on the BT.

    I continue to get the  below messages as and when it plays music.

    Also i wanted to know what is the difference between Phone Audio and media audio.

    Why do i need to disable Media Audio.

    Can anyone comment on this please.

    Messages on the console.


    <3> SDP4430 Media LP: dsp: no backend DAIs enabled for SDP4430 Media LP
    [ 1724.736755]  SDP4430 Media LP: dsp: no backend DAIs enabled for SDP4430 Media LP
    <3> SDP4430 Media LP: dsp: no backend DAIs enabled for SDP4430 Media LP
    [ 1724.792877]  SDP4430 Media LP: dsp: no backend DAIs enabled for SDP4430 Media LP
    <3> SDP4430 Media LP: dsp: no backend DAIs enabled for SDP4430 Media LP
    [ 1724.849487]  SDP4430 Media LP: dsp: no backend DAIs enabled for SDP4430 Media LP
    <3> SDP4430 Media LP: dsp: no backend DAIs enabled for SDP4430 Media LP
    [ 1724.905975]  SDP4430 Media LP: dsp: no backend DAIs enabled for SDP4430 Media LP
    <3> SDP4430 Media LP: dsp: no backend DAIs enabled for SDP4430 Media LP
    [ 1724.962554]  SDP4430 Media LP: dsp: no backend DAIs enabled for SDP4430 Media LP
    <3> SDP4430 Media LP: dsp: no backend DAIs enabled for SDP4430 Media LP
    [ 1725.019104]  SDP4430 Media LP: dsp: no backend DAIs enabled for SDP4430 Media LP
    <3> SDP4430 Media LP: dsp: no backend DAIs enabled for SDP4430 Media LP
    [ 1725.075622]  SDP4430 Media LP: dsp: no backend DAIs enabled for SDP4430 Media LP

    Thanks,

    /Ryan

  • Any help on this please. Kind of struck on this. I am trying to find out why routing does not take place.

    Any pointers on what should i be checking. McBSP or TWL registers.

    Can anyone help me with some debug information on these which can help me in debugging.

    Thanks,

    /Ryan

  • Hello,

    What i did is i configured in sdp4430.c to take mcbsp2 instead of mcbsp1. by changing the following

    .cpu_dai_name = "omap-mcbsp-dai.1" for "BT Playback"

    I am seeing signals coming from BT chip and am not seeing any data in McBSP Dx from OMAP.

    Not sure, why omap is not sending data to chip. Could anyone advice me?

    Am appending the tinymix and McBsp settings.

    The tinymix settings is as follows:

    root@android:/ # tinymix
    Number of controls: 73
    ctl    type    num    name                                     value
    0    ENUM    1    DL1 Equalizer                            Flat response
    1    ENUM    1    DL2 Left Equalizer                       Flat response
    2    ENUM    1    DL2 Right Equalizer                      Flat response
    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    VXREC Media Volume                       0
    11    INT    1    VXREC Tones Volume                       0
    12    INT    1    VXREC Voice DL Volume                    0
    13    INT    1    VXREC Voice UL Volume                    0
    14    INT    1    AUDUL Media Volume                       0
    15    INT    1    AUDUL Tones Volume                       0
    16    INT    1    AUDUL Voice UL Volume                    120
    17    INT    1    AUDUL Voice DL Volume                    0
    18    INT    1    SDT UL Volume                            101
    19    INT    1    SDT DL Volume                            120
    20    INT    2    DMIC1 UL Volume                          120 120
    21    INT    2    DMIC2 UL Volume                          120 120
    22    INT    2    DMIC3 UL Volume                          120 120
    23    INT    2    AMIC UL Volume                           120 120
    24    INT    2    BT UL Volume                             126 126
    25    BOOL    1    DL1 Mono Mixer                           On
    26    BOOL    1    AUDUL Mono Mixer                         Off
    27    BOOL    1    DL1 MM_EXT Switch                        Off
    28    BOOL    1    DL1 BT_VX Switch                         On
    29    BOOL    1    DL1 PDM_DL2 Switch                       Off
    30    BOOL    1    DL1 PDM Switch                           Off
    31    BOOL    1    Sidetone Mixer Capture                   Off
    32    BOOL    1    Sidetone Mixer Playback                  On
    33    BOOL    1    Capture Mixer Tones                      Off
    34    BOOL    1    Capture Mixer Voice Playback             Off
    35    BOOL    1    Capture Mixer Voice Capture              Off
    36    BOOL    1    Capture Mixer Media Playback             Off
    37    BOOL    1    Voice Capture Mixer Tones Playback       Off
    38    BOOL    1    Voice Capture Mixer Media Playback       Off
    39    BOOL    1    Voice Capture Mixer Capture              Off
    40    BOOL    1    DL1 Mixer Tones                          Off
    41    BOOL    1    DL1 Mixer Voice                          Off
    42    BOOL    1    DL1 Mixer Capture                        Off
    43    BOOL    1    DL1 Mixer Multimedia                     On
    44    ENUM    1    MUX_VX1                                  None
    45    ENUM    1    MUX_VX0                                  None
    46    ENUM    1    MUX_UL11                                 None
    47    ENUM    1    MUX_UL10                                 None
    48    ENUM    1    MUX_UL07                                 None
    49    ENUM    1    MUX_UL06                                 None
    50    ENUM    1    MUX_UL05                                 None
    51    ENUM    1    MUX_UL04                                 None
    52    ENUM    1    MUX_UL03                                 None
    53    ENUM    1    MUX_UL02                                 None
    54    ENUM    1    MUX_UL01                                 None
    55    ENUM    1    MUX_UL00                                 None
    56    INT    2    Capture Preamplifier Volume              1 1
    57    INT    2    Capture Volume                           4 4
    58    INT    2    Aux FM Volume                            3 3
    59    INT    2    Headset Playback Volume                  15 15
    60    INT    2    Handsfree Playback Volume                26 26
    61    INT    1    Earphone Playback Volume                 14
    62    ENUM    1    Headset Power Mode                       Low-Power
    63    BOOL    1    Earphone Playback Switch                 Off
    64    BOOL    1    Aux Right Playback Switch                Off
    65    BOOL    1    Aux Left Playback Switch                 Off
    66    ENUM    1    Headset Right Playback                   Off
    67    ENUM    1    Headset Left Playback                    Off
    68    ENUM    1    Handsfree Right Playback                 Off
    69    ENUM    1    Handsfree Left Playback                  Off
    70    ENUM    1    Analog Right Capture Route               Off
    71    ENUM    1    Analog Left Capture Route                Off
    72    ENUM    1    TWL6040 Power Mode                       Low-Power

    <7> SDP4430 Media LP: playback_trigger: MultiMedia1 LP 0
    [ 4466.386657]  SDP4430 Media LP: playback_trigger: MultiMedia1 LP 0
    <7> BT-VX-DL: mute_be: omap-mcbsp-dai.1 0
    [ 4466.397033]  BT-VX-DL: mute_be: omap-mcbsp-dai.1 0
    <7> BT-VX-DL: enable_be_port: omap-mcbsp-dai.1 0
    [ 4466.406646]  BT-VX-DL: enable_be_port: omap-mcbsp-dai.1 0
    <7>omap-mcbsp omap-mcbsp.2: **** McBSP2 regs ****
    [ 4466.417907] omap-mcbsp omap-mcbsp.2: **** McBSP2 regs ****
    <7>omap-mcbsp omap-mcbsp.2: DRR2:  0xcd8180d7
    [ 4466.427947] omap-mcbsp omap-mcbsp.2: DRR2:  0xcd8180d7
    <7>omap-mcbsp omap-mcbsp.2: DRR1:  0x0000
    [ 4466.437286] omap-mcbsp omap-mcbsp.2: DRR1:  0x0000
    <7>omap-mcbsp omap-mcbsp.2: DXR2:  0x0000
    [ 4466.446197] omap-mcbsp omap-mcbsp.2: DXR2:  0x0000
    <7>omap-mcbsp omap-mcbsp.2: DXR1:  0x0000
    [ 4466.455200] omap-mcbsp omap-mcbsp.2: DXR1:  0x0000
    <7>omap-mcbsp omap-mcbsp.2: SPCR2: 0x0233
    [ 4466.464111] omap-mcbsp omap-mcbsp.2: SPCR2: 0x0233
    <7>omap-mcbsp omap-mcbsp.2: SPCR1: 0x0030
    [ 4466.473083] omap-mcbsp omap-mcbsp.2: SPCR1: 0x0030
    <7>omap-mcbsp omap-mcbsp.2: RCR2:  0x0040
    [ 4466.482025] omap-mcbsp omap-mcbsp.2: RCR2:  0x0040
    <7>omap-mcbsp omap-mcbsp.2: RCR1:  0x0040
    [ 4466.490936] omap-mcbsp omap-mcbsp.2: RCR1:  0x0040
    <7>omap-mcbsp omap-mcbsp.2: XCR2:  0x0040
    [ 4466.499938] omap-mcbsp omap-mcbsp.2: XCR2:  0x0040
    <7>omap-mcbsp omap-mcbsp.2: XCR1:  0x0040
    [ 4466.508850] omap-mcbsp omap-mcbsp.2: XCR1:  0x0040
    <7>omap-mcbsp omap-mcbsp.2: SRGR2: 0x000f
    [ 4466.517822] omap-mcbsp omap-mcbsp.2: SRGR2: 0x000f
    <7>omap-mcbsp omap-mcbsp.2: SRGR1: 0x0000
    [ 4466.526733] omap-mcbsp omap-mcbsp.2: SRGR1: 0x0000
    <7>omap-mcbsp omap-mcbsp.2: PCR0:  0x000f
    [ 4466.535736] omap-mcbsp omap-mcbsp.2: PCR0:  0x000f
    <7>omap-mcbsp omap-mcbsp.2: ***********************
    [ 4466.545532] omap-mcbsp omap-mcbsp.2: ***********************
    <7> BT-VX-DL: unmute_be: omap-mcbsp-dai.1 0
    [ 4466.555541]  BT-VX-DL: unmute_be: omap-mcbsp-dai.1 0
    <7> SDP4430 Media LP: enable_fe_port: MultiMedia1 LP 0
    [ 4466.565887]  SDP4430 Media LP: enable_fe_port: MultiMedia1 LP 0
    <7> SDP4430 Media LP: unmute_fe_port: MultiMedia1 LP 0
    [ 4466.577239]  SDP4430 Media LP: unmute_fe_port: MultiMedia1 LP 0
    <7> SDP4430 Media LP: mute_fe_port_playback: unmute FE SDP4430 Media LP
    [ 4466.590087]  SDP4430 Media LP: mute_fe_port_playback: unmute FE SDP4430 Media LP

  • Hi Rayn,

    Seems like you have more of the way walked.

    What you have made is the connection between drivers, now what you need to do is the connection of the memory with the physical port, that is done in sound/soc/omap/omap-abe.c

    Look at the function enable_be_port, there you will see how BT_VX_DL and BT_VX_UL ports are connected to MCBSP1_TX and MCBSP1_RX ports respectively, now what you have to do is change that 1 by 2. That should make it work now.

  • Israel,

    That was it! Thank you very much.

    I have been trying to understand the drivers sdp4430.c omap-abe. omap-mcbsp.c., omap-abe-dsp.c. is there any document which explains the design of these drivers.

    It would be very helpful to understand how these work and how they interact with each other and so on. I am trying to understand the data flow and control flow across the sound drivers.  Any help on this any where i can refer to understand the software organisation of these drivers and what needs to be done and how it is being done.

    thank you once again

  • Ryan,

    Great!

    The first you have to understand is the Audio Driver Arch http://www.omappedia.org/wiki/Audio_Drive_Arch in order to know what you will look for, because unfortunatelly there isn't any like a detailed description on how drivers works, what functions are called, etc, but the picture in that site is what we used for reference when looking for customizations, audio paths in certain test cases, etc.

  • Hi All,

    We have already ported Jelly bean 4.2.2 & kernel 3.4 onto to OMAP4430 based custom board, based on 4AJ.2.5P1 release notes.

    We have connected BT to McBsp 2 lines instead of McBsp 1.

    In kernel, BT Capture & Playback are mapped to mcbsp2.

    When we turn on BT SCO app to enable Music audio profile, the system & the console freezes

    If we disconnect the BT headset, the system resumes back.

    Any inputs?

    Thanks in  advance.

    Regards,

    Ramya.