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.

OMAP4470-McBSP2 slave mode settings/configuration settings

Hi All-

I am new to this website and didn't find a better place post this query. I am using OMAP4470 (Android) and connected  a cellular modem pcm audio to the McBSP2 line. In my case I need to make the McBSP2 line as TDM slave mode and modem needs to be the master. I also need to make some changes to polarity, words length etc. I did develop same on Windows Mobile too and there I can set all these registers using registry file. I am struggle to make similar changes on Android side to McBSP2 line.

Additionally, is there a configuration file(similar to reg file on Windows mobile side)on Android for making below changes?

Below is the code reference that I made on WM which works fine.

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MCBSP2\Profile\TDMSlave]     

"PhaseMode"=dword:0                                 ; XCR2.XPHASE,RCR2.RPHASE: Either 0 (single) or 1 (dual)     

 "WordsPerFrame"=dword:1                             ; XCR1.XFRLEN1,RCR1.RFRLEN1, XCR2.XFRLEN2, RCR2.RFRLEN2: 1 - 128 words      "WordLength"=dword:10                               ; RCR1.RWDLEN1, XCR1.XWDLEN1: 8, 12, 16, 20, 24, or 32 bits     

 "WordLength2"=dword:10                              ; RCR2.RWDLEN2,XCR2.XWDLEN2: 8, 12, 16, 20, 24, or 32 bits     

"DataDelayRx"=dword:2                               ; RCR2.RDATDLY:0, 1, or 2 bits     

"DataDelayTx"=dword:0     

 "JustificationMode"=dword:0                         ; SPCR.RJUST: 0 (right, zero fill), 1 (right, sign fill), or 2 (left)    

  "FifoThresholdTx"=dword:0                           ; TX fifo max value can be up to 0x7f (128 - 1) - 0     

 "FifoThresholdRx"=dword:0                           ; RX fifo max value can be up to 0x7f (128 - 1) - 0

     ;Slave mode configuration     

 "FrameSyncSourceTx"=dword:0                         ; PCR.FSXM, SRGR2.FSGM: 0 (ext), 2 (xmit), or 3 (int SRG)    

  "ClockModeTx"=dword:0                               ; PRC.CLKXM: 0 (external) or 1 (internal - SRG)     

 "FrameSyncSourceRx"=dword:0                         ; PCR.FSRM: Either 0 (external) or 1 (internal)     

 "ClockModeRx"=dword:0                               ; PRC.CLKRM: 0 (external), 1 (SRG), 2 (CLKXM - DLB mode)

     "Frequency"=dword:1F40                              ; target frequency is 8khz      "ClockPolarityTx"=dword:1                           ; PCR.CLKXP: 0 (rising edge) or 1 (falling edge)      "ClockPolarityRx"=dword:1                           ; PCR.CLKRP: 0 (falling edge) or 1 (rising edge)      "FrameSyncPolarityTx"=dword:0                       ; PCR.FSXP: 0 (active high), 1 (active low)      "FrameSyncPolarityRx"=dword:0                       ; PCR.FSRP: 0 (active high), 1 (active low)      "ReverseModeTx"=dword:0                             ; XCR2.XREVERSE: 0 (MSB first) or 1 (LSB first)      "ReverseModeRx"=dword:0                             ; RCR2.RREVERSE: 0 (MSB first) or 1 (LSB first)

     "LoopbackMode"=dword:0                              ; SPCR1.ALB: 0 (disabled) or 1 (loopback)      "ClockSourceSrg"=dword:2                            ; 0 (rising CLKS), 1, (falling CLKS), 2 (MCBSP_ICLK), 3 (CLKR), or 4 (CLKX)      "ClockDividerSrg"=dword:80                          ; SRGR1.CLKGDV: 1-255      "FrameWidthSrg"=dword:1                             ; SRGR1.FWID: 1-256      "ClockResyncSrg"=dword:0                            ; SRGR2.GSYNC: 0 (no resync) or 1 (resync)      "PartitionMode"=dword:0                             ; 0-> 2-partition mode, 1-> 8-partition mode      "NumOfActiveTxChannels"=dword:0                     ; Number of TX channels to be enabled      "EnableMcBSPTxChannels"=multi_sz:"0"      "NumOfActiveRxChannels"=dword:0                     ; Number of RX channels to be enabled      "EnableMcBSPRxChannels"=multi_sz:"0"