Hi!
The audio sample application contains the code to record one channel (left from Line-in1) and playback one channel (left from line-out1 it seems). I am using PSP 02.00.01 for DA830. How can I configure the audio, to record both left and right channel and playback also both channels on line out. Below is the configuration section of the code to be setup. I could manage the other parts of the code, but there is hardly any documentation on these. How to configure it so that two channels are returned interleaved for both recording and playback? Where do I specify which audio channel on the board (LineIn, LineOut, Mic, etc...) is to be recorded/played back? Later I would like to extend this to four channels for playback and four for recording. Other parameters (sampling frequency, bits etc.. are OK as they are).
Thanks!
Atmapuri
Mcasp_HwSetupData mcaspRcvSetup = {
/* .rmask = */ 0xFFFFFFFF, /* All the data bits are to be used */
/* .rfmt = */ 0x000080F0, /*
* 0 bit delay from framsync
* MSB first
* No extra bit padding
* Padding bit (ignore)
* slot Size is 32
* Reads from DMA port
* NO rotation
*/
/* .afsrctl = */ 0x00000000, /* burst mode,
* Frame sync is one bit
* Rising edge is start of frame
* externally generated frame sync
*/
/* .rtdm = */ 0x00000001, /* slot 1 is active (DSP) */
/* .rintctl = */ 0x00000003, /* sync error and overrun error */
/* .rstat = */ 0x000001FF, /* reset any existing status bits */
/* .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 = */ 0x000080F0, /*
* 0 bit delay from framsync
* MSB first
* No extra bit padding
* Padding bit (ignore)
* slot Size is 32
* Reads from DMA port
* NO rotation
*/
/* .afsxctl = */ 0x00000000, /* burst mode,
* Frame sync is one bit
* Rising edge is start of frame
* externally generated frame sync
*/
/* .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
},
};
/* McAsp 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_32,
NULL,
0,
NULL,
NULL,
1, /* number of TDM channels */
Mcasp_BufferFormat_1SER_1SLOT,
TRUE,
TRUE
},
{
0x0001, /* number of serialisers */
{Mcasp_SerializerNum_5,},
&mcaspXmtSetup,
TRUE,
Mcasp_OpMode_TDM,
Mcasp_WordLength_32, /* word width */
NULL,
0,
NULL,
NULL,
1, /* number of TDM channels */
Mcasp_BufferFormat_1SER_1SLOT,
TRUE,
TRUE
}
};
Audio_ChannelConfig audioIfChanDefaultInfo[2]=
{
/* channel 0 (RX) */
&mcasp_chanparam[0], /* channel params */
{ /* codec [0] */
{
44100, /* sampling rate */
30, /* gain */
0x00,
0x00
}
},
/* channel 1 (TX) */
&mcasp_chanparam[1], /* channel params */
{
/* codec [0] */
{
44100, /* sampling rate */
70, /* gain */
0x00,
0x00
}
}
};