Hi All,
I am using omapl138 evm board and trying to run AudioSample provided by psp driver( Version 01_30_01).
My problems are the following:
1 Based on my understanding of this example, the frequency (on LINE OUT) should be the same with that on LINE IN. However, scope shows they are different. (LINE IN matches the input wave, but LINE OUT is a mess). Also, I noticed that slot width of the Codec is set to 16 bits while the slot size of McASP Channel is set to 32 bits. Is this correct? Could this be the reason for the mess on LINE OUT?
2 I experimented some setting on Codec and McASP. Seems like the AudioSample stopped working with anything I changed.
a) I want to try to set the codec to 32 bits, matches the Mcasp slot size, with the following change in audioSample_main.c.
Void audioUserAic31Init(Void)
{
Aic31_init();
audioAic31Params = Aic31_PARAMS;
audioAic31Params.acCtrlBusName = "/i2c0";
audioAic31Params.acSlotWidth = ICodec_SlotWidth_32; <--- this is added to set the slot size of codec.
}
With this change, the output is empty (I could hear anything on the LINEOUT).
b) With a) not working, so I tried to change McASP instead of codec with the following configuration in audioSample_io.c
Mcasp_HwSetupData mcaspRcvSetup = {
/* .rmask = */ 0xFFFFFFFF, /* All the data bits are to be used */
/* .rfmt = */ 0x00008070, /* <---- changed from 0x000080F0 -- from slot size 32 to 16 */
/* .afsrctl = */ 0x00000000,
/* .rtdm = */ 0x00000001,
/* .rintctl = */ 0x00000003,
/* .rstat = */ 0x000001FF,
/* .revtctl = */ 0x00000000, /* DMA request is enabled or disabled */
{
/* .aclkrctl = */ 0x00000000,
/* .ahclkrctl = */ 0x00000000,
/* .rclkchk = */ 0x00000000
}
} ;
Mcasp_HwSetupData mcaspXmtSetup = {
/* .xmask = */ 0xFFFFFFFF, /* All the data bits are to be used */
/* .xfmt = */ 0x00008070, /* <---- changed from 0x000080F0 -- from slot size 32 to 16 */
/* .xtdm = */ 0x00000001, /* slot 1 is active (DSP) */
/* .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_12, }, /* serialiser index */
&mcaspRcvSetup,
TRUE,
Mcasp_OpMode_TDM, /* Mode (TDM/DIT) */
Mcasp_WordLength_16, <---- changed, since slot size can NOT be less than word length.
//Mcasp_WordLength_32,
NULL,
0,
NULL,
NULL,
1, /* number of TDM channels */
//Mcasp_BufferFormat_1SER_MULTISLOT_NON_INTERLEAVED,
Mcasp_BufferFormat_1SER_1SLOT,
TRUE,
TRUE
},
{
0x0001, /* number of serialisers */
{Mcasp_SerializerNum_11,},
&mcaspXmtSetup,
TRUE,
Mcasp_OpMode_TDM,
Mcasp_WordLength_16, <---- changed, since slot size can NOT be less than word length.
//Mcasp_WordLength_32, /* word width */
NULL,
0,
NULL,
NULL,
1, /* number of TDM channels */
Mcasp_BufferFormat_1SER_1SLOT,
TRUE,
TRUE
}
};
LINEOUT is still nothing with this change. Did I missing something that need to change?
3 How is the buffer size handled? Do I need different buffer size with 32 bits or 16 bits configuration?
The tools that I am using:
CCS V4.2.1.00004
BIOS 5_41_10_36
EDMA edma3_lld_01_10_00_01
pspdrivers_01_30_01
Any help would be greatly appreciated,
Sarah