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.

Trying to figure out the i2s to soc

Other Parts Discussed in Thread: DM3730, AM3517, TPS65950

I am trying to create a driver that connects a digital microphone the ADMP441 to the DM3730. The ADMP441 uses an I2S interface.  I assumed that I could create  a very simplified driver that would the ADMP441 like a 1 function sound card. I could then map that "ADMP441" sound card to the MCBSP3 DAI. The ADMP441 needs a SCK signal. I assumed I could get the I2S clock going on the MCBSP3 pins then drive the ADMP441  from those pins.  

Unfortunately I am either doing something wrong or am completely off on my approach. I never see any clock signals on the MCBSP3 pins. 

I have seen some posts about this microphone unfortunately I am not seeing anyone making any headway on getting this implemented.  

How does one get the MCBSP3 configured to use the I2 interface for an external device? Any examples ?

This is my pin configuration for the DM3730 


static void setup_mcbsp3_mux(void)
{
    omap_mux_init_signal("mcbsp3_clkx.mcbsp3_clkx", OMAP_PIN_OUTPUT);
    omap_mux_init_signal("mcbsp3_dr.mcbsp3_dr", OMAP_PIN_INPUT);
    omap_mux_init_signal("mcbsp3_fsx.mcbsp3_fsx", OMAP_PIN_OUTPUT);
}

Any help would be appreciated.

 

  • Hi Richard,

    I suggest you to read the following audio driver guide which should give you useful information about configurations, commonly used APIs and examples for writing audio applications:

    http://processors.wiki.ti.com/index.php/UserGuideAudioDriver_PSP_04.02.00.07

    An other way to create your own is to modify for your needs some existing driver.

    BR

    Tsvetolin Shulev

  • Thanks this is a very useful document I had not found yet. Still I am not clear about how one goes about setting up the direct interface to the I2S.  I get the impression I am missing some key document or information because I see comments below from that document below suggest that this is straightforward.  I should be able to mux the MCBSP3 pins to my device then be able to run the digital microphone via one of the ALSA capture applications. Yet I am not seeing any clocking signals on the MCBSP3 pins.

    "McBSP provides a full-duplex direct serial interface between the main processor (AM/DM37x, OMAP35x and AM3517) and other devices in the system such as the TPS65950 / AIC23 codec. It provides a direct interface to industry standard codecs, analog interface chips (AICs) and other serially connected A/D and D/A devices:

    • Inter-IC Sound (I2S) compliant devices"

    "Easy I2S/PCM audio interface setup between codec and SoC. Each SoC interface and codec registers it's audio interface capabilities with the core and are subsequently matched and configured when the application hw params are known."

  • In this post  http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/537/t/288258.aspx the response suggest using xilinx files (as example for a driver). Still I am confused.  It seems that the correct approach in the diagram in your guide suggest we are connecting to a DATA TRANSFER INTERFACE (MCBSP) yet the ADMP441 is an I2S  device. Since the ADMP441 is a hardware codec should I be connecting to the directly to the MCBSP driver or do I connect to the Data Transfer Interface hardware.  Sorry for my confusion  its not clear to me how best to connect the various components.  Specifically the writer of the post says to write a IS2 Driver yet from what I understand we should be connecting to a MCBSP driver or MCBSP based interface.

  • Hi Richard,

    The guide mentioned in the previous post is only for example but you can modify the source for work with I2C because the ADM441 use I2S interface for connection with the processor.

    BR

    Tsvetolin Shulev

  • My question concerns the approach.  It seems from the figure in your original design not is that the ADMP441 hardware should be connected to a modified MCBSP driver... am I correct? If so is there some source I can refer to create this driver. Sorry audio codecs are not my area of expertise.

    Again I refer to this statement

    "Easy I2S/PCM audio interface setup between codec and SoC. Each SoC interface and codec registers it's audio interface capabilities with the core and are subsequently matched and configured when the application hw params are known."  

    "Each Soc interface and codec registers its audio interface"   Is there a guide for this or example code that demonstrates this.

    Thanks

  • Hi

    I have additional questions concerning this issue. I was working on other tasks so I am only recently back on this task. I am trying to confirm some additional information. Again I am trying to drive the digital microphone using the McBSP3 as the Master.  It needs to generate a clockx signal that drives the microphone.   I think I have the registers configured correctly can you confirm this ? 

    Here is a register dump

    [ 1308.574249] omap-mcbsp omap-mcbsp.3: **** McBSP3 regs ****
    [ 1308.579986] omap-mcbsp omap-mcbsp.3: DRR2:  0xf8e747ac
    [ 1308.585357] omap-mcbsp omap-mcbsp.3: DRR1:  0x0000
    [ 1308.590332] omap-mcbsp omap-mcbsp.3: DXR2:  0x0000
    [ 1308.595336] omap-mcbsp omap-mcbsp.3: DXR1:  0x0000
    [ 1308.600341] omap-mcbsp omap-mcbsp.3: SPCR2: 0x02f0
    [ 1308.605346] omap-mcbsp omap-mcbsp.3: SPCR1: 0x0031
    [ 1308.610351] omap-mcbsp omap-mcbsp.3: RCR2:  0x00a1
    [ 1308.615325] omap-mcbsp omap-mcbsp.3: RCR1:  0x00a0
    [ 1308.620330] omap-mcbsp omap-mcbsp.3: XCR2:  0x00a1
    [ 1308.625335] omap-mcbsp omap-mcbsp.3: XCR1:  0x00a0
    [ 1308.630340] omap-mcbsp omap-mcbsp.3: SRGR2: 0x30ff
    [ 1308.635345] omap-mcbsp omap-mcbsp.3: SRGR1: 0x7f00
    [ 1308.640319] omap-mcbsp omap-mcbsp.3: PCR0:  0x0f8f
    [ 1308.645324] omap-mcbsp omap-mcbsp.3: ***********************