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.

McBSP2 (slave mode) settings - Audio RX is okay. TX is muted/silence



Hi All-

I have cellular modem (PCM audio line) connected to OMAP4470 McBSP2 line. I made many changes to McBSP2 registry settings and finally got to a point where my speaker is working (RX is working). However, I don't hear anything on the other end (TX is broken).

Modem requirements for PCM line:

-----------------------------------------------

Master mode

2048 kHz clock
Short frame
External clock will be provided only during digital audio activity (non-permanent)
PCM data is always formatted as 16-bit uncompressed two's complement.
PCM data and frame synchronization signals are written to the CM bus on the rising clock edge and read on the falling edge.

Here is a dump of McBSP2 registry from OMAP4470-Android:

[   87.105041] omap-mcbsp omap-mcbsp.2: **** McBSP2 regs ****
[   87.110961] omap-mcbsp omap-mcbsp.2: DRR2:  0x0000
[   87.116210] omap-mcbsp omap-mcbsp.2: DRR1:  0x0000
[   87.121398] omap-mcbsp omap-mcbsp.2: DXR2:  0x0000
[   87.126586] omap-mcbsp omap-mcbsp.2: DXR1:  0x0000
[   87.131805] omap-mcbsp omap-mcbsp.2: SPCR2: 0x0235
[   87.136993] omap-mcbsp omap-mcbsp.2: SPCR1: 0x0031
[   87.142242] omap-mcbsp omap-mcbsp.2: RCR2:  0x0042
[   87.147430] omap-mcbsp omap-mcbsp.2: RCR1:  0x0040
[   87.152679] omap-mcbsp omap-mcbsp.2: XCR2:  0x0040
[   87.157836] omap-mcbsp omap-mcbsp.2: XCR1:  0x0040
[   87.163055] omap-mcbsp omap-mcbsp.2: SRGR2: 0x000f
[   87.168273] omap-mcbsp omap-mcbsp.2: SRGR1: 0x0180
[   87.173461] omap-mcbsp omap-mcbsp.2: PCR0:  0x0003

I do have the correct McBSP2 pad configuration and is as below:

OMAP4_MUX(ABE_MCBSP2_CLKX, OMAP_PIN_INPUT | OMAP_MUX_MODE0),
OMAP4_MUX(ABE_MCBSP2_DR, OMAP_PIN_INPUT_PULLDOWN | OMAP_PIN_OFF_OUTPUT_LOW | OMAP_MUX_MODE0),
OMAP4_MUX(ABE_MCBSP2_DX, OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
OMAP4_MUX(ABE_MCBSP2_FSX, OMAP_PIN_INPUT_PULLDOWN | OMAP_PIN_OFF_INPUT_PULLDOWN | OMAP_MUX_MODE0),

Any help is highly appreciated to enable TX data.

Srinath

  • Can you verify that the modes you are trying to set are the same when you try to use the McBSP2 port?

    ie run: omapconf read 0x4A1000F8

    I am getting the value 0x010C010C

    So Rx and Tx are not in Mode0 because something else is changing it.

    After that if it is not in mode0 you can try change the mode using omapconf write <address> <value> and try again your test.

    Please let me know how it goes

  • ICe,

    I believe I have two problems currently.

    1. My DMIC is path is not set up correctly - you are already helping me on other thread

    2. Once I fix my DMIC then I need to come back to Voice call TX case that I mentioned in this thread. I am hoping fixing DMIC will automatically fix this one? Any thoughts here? Currently my RX is working though for both system sounds and voice call audio.

    One more question for temporary testing:

    -----------------------------------------------------

    Can you give me some commands (Tiny mix) which I can try so that I can hear the audio (TX) through DMIC while I am in voice call? In my case modem audio is connected to VX-DL and VX-UL. VX-DL seems to be working fine ( I am able to hear other party's voice). Basically I am wondering if there are any commands that I can run on device when I am in voice call so that my DMIC0 path is connected to VX-UL. This is for testing purpose.

    Srinath

  • Hi Srinath,

    Because the connection of the modem it is not that easy as give some commands, it would need also imply the application to open other FE ports and send the audio from one to the other, ie capture voice from DMIC0 using MM_UL2 and write it to the VX_DL port to go to McBSP2.

    So if you see you need to set the path but also read from one FE port to another FE port.

    Try using the alsa tools or write your application based on tinyplay and tinycap.

  • Hi ICe and Srinath,

    Following up on this thread as well as I guess root problem is the same as in http://e2e.ti.com/support/omap/f/849/p/251579/944393.aspx#944393?

    Did you manage to solve the problem? Namely routing DMIC0 to McBSP2. From this post it seems that it's needed to read data from one FE and then write them back to another FE. Is this correct? And for me to ensure that I got stuff right, can you confirm that it's only the AMIC path which can be routed by ABE from AMIC to McBSP2 without any "manual interaction (reading/writing) other than initial configuration", or can the DMIC path as well be setup for this in any way (or will it require ABE FW changes)? In general, can you please explain where the limitation for this is?

    Last but not least, comparing the figure at http://www.omappedia.com/wiki/Audio_Drive_Arch to the FE available in alsa, it's not clear to me how a FE like 18 (DMIC0) fit into the big Picture compared to i.e. FE 9 (DMIC capture)? For the architecture figure I get the feeling that the DMIC capture devices shouldn't exists, but only the MM-UL, MM-UL2 and VX-UL. Which part did I miss here? Hoping you can help me to get the understanding of the bigger picture of this as I find it kind of hard to find?

    From "cat /proc/asound/pcm" on ICS:
    00-09: DMIC Capture dmic-hifi-9 :  : capture 1
    ...
    00-18: DMIC0 Capture dmic-hifi-18 :  : capture 1
    00-19: DMIC1 Capture dmic-hifi-19 :  : capture 1
    00-20: DMIC2 Capture dmic-hifi-20 :  : capture 1  

    Best regards and thanks in advance - Any pointers will be highly appreciated
      Søren

  • Hi Again,

    Hereby please find an update that I managed to route DMIC0 path to McBSP2 MODEM. It turned out that my main problem was related to McBSP config compared to the configuration of the modem, but not knowing exactly initially this (and the other) post brought me a bit off topic based on the fear that only AMIC could be routed to McBSP2 using the direct path in ABE, but luckily that seems to be not the case :-)

    Best regards
      Søren

  • Soren,

    I don't know much about ABE, but for I have read in

    http://www.ti.com/litv/pdf/swpu245h

    The test case you describe is the one mentioned in this document using DMIC.

    You may try contacting TI representative and check if they have some other information about ABE that could help.

    I corrected the link to use the ABE link from http://www.ti.com/product/omap4470.

  • Hi Manuel,

    I agree getting detailed info on the ABE isn't easy (at least not in public). Just wanted to make it clear that I actually solved my problem, and that I can confirm that it is possible routing DMIC to McBSP2. I as well saw the example in the doc above, but figuring out 100% how this link to Linux and Android took a Little additional Work :-)

    I guess much of the "confusion" is caused by the audio architecture drawing not having the McBSP ports included for one to easily see how they get into the bigger picture. AFAIU you will need to open PCM port 5 for McBSP2 to get activated and linked to VX ports. Opening PCM port 2 (AFAIR) will on the other hand make it possible for you to record VX port into memory buffers. Secondly it seems like you can't open both at a time although I'm not 100% sure on that one :-)...

    Best regards
      Søren