Hi,
My platform is OMAPL137 EVM, CCS 3.3, BIOSPSP.
I tried to modify the audioSample program of BIOSPSP example to test I2S mode instead of DSP mode. But the output became noisy.
The following is my modification:
1. I modified audioAic31Params structure to change AIC31 mode to I2S in audioSample_main.c
Aic31_Params audioAic31Params = {
ICodec_CodecType_AIC31, /* acType */
ICodec_ControlBusType_I2C, /* acControlBusType */
"NONE", /* acCtrlBusName */
ICodec_OpMode_MASTER, /* acOpMode */
ICodec_DataType_I2S, /* acSerialDataType */
(Uint32)ICodec_SlotWidth_16, /* acSlotWidth */
ICodec_DataPath_TXRX, /* acDataPath */
0, /* isRxTxClockIndependent */
};
2. I modified some MCASP register value according to I2S standard in audioSample_io.c
Mcasp_HwSetupData mcaspRcvSetup = {
/* .rmask = */ 0xFFFFFFFF, /* All the data bits are to be used */
/* .rfmt = */ 0x00018070, /*
* 1 bit delay from framsync
* MSB first
* No extra bit padding
* Padding bit (ignore)
* slot Size is 16
* Reads from DMA port
* NO rotation
*/
/* .afsrctl = */ 0x00000110, /* 2-slot TDM(I2S),
* Frame sync is one word
* Rising edge is start of frame
* externally generated frame sync
*/
/* .rtdm = */ 0x00000003, /* slot 0 and slot 1 are active (I2S) */
/* .rintctl = */ 0x00000003, /* sync error and overrun error */
/* .rstat = */ 0x000001FF, /* reset any existing status bits */
/* .revtctl = */ 0x00000000, /* DMA request is enabled or disabled */
{
/* .aclkrctl = */ 0x00000080,
/* .ahclkrctl = */ 0x00000000,
/* .rclkchk = */ 0x00000000
}
} ;
Mcasp_HwSetupData mcaspXmtSetup = {
/* .xmask = */ 0xFFFFFFFF, /* All the data bits are to be used */
/* .xfmt = */ 0x00018070, /*
* 1 bit delay from framsync
* MSB first
* No extra bit padding
* Padding bit (ignore)
* slot Size is 16
* Reads from DMA port
* NO rotation
*/
/* .afsxctl = */ 0x00000110, /* 2-slot TDM(I2S),
* Frame sync is one word
* Rising edge is start of frame
* externally generated frame sync
*/
/* .xtdm = */ 0x00000003, /* slot 0 and slot 1 are active (I2S) */
/* .xintctl = */ 0x00000007, /* sync error,overrun error,clK error */
/* .xstat = */ 0x000001FF, /* reset any existing status bits */
/* .xevtctl = */ 0x00000000, /* DMA request is enabled or disabled */
{
/* .aclkxctl = */ 0x00000000,
/* .ahclkxctl = */ 0x00000000,
/* .xclkchk = */ 0x00000000
},
};
/* McBsp channel parameters */
Mcasp_ChanParams mcasp_chanparam[Audio_NUM_CHANS]=
{
{
0x0001, /* number of serialisers */
{Mcasp_SerializerNum_0, }, /* serialiser index */
&mcaspRcvSetup,
TRUE,
Mcasp_OpMode_TDM, /* Mode (TDM/DIT) */
Mcasp_WordLength_16,
NULL,
0,
NULL,
NULL,
2, /* number of TDM channels */
Mcasp_BufferFormat_1SER_MULTISLOT_INTERLEAVED,
TRUE,
TRUE
},
{
0x0001, /* number of serialisers */
{Mcasp_SerializerNum_5,},
&mcaspXmtSetup,
TRUE,
Mcasp_OpMode_TDM,
Mcasp_WordLength_16, /* word width */
NULL,
0,
NULL,
NULL,
2, /* number of TDM channels */
Mcasp_BufferFormat_1SER_MULTISLOT_INTERLEAVED,
TRUE,
TRUE
}
};
But something must be wrong of above program, because the output is noisy.
The original program in DSP mode runs quite well.
My project is here: 8816.audio_i2s.zip
Any help is appreciated !!!
Weiwei Zheng