Attached are 4 files of for a test case to try to make edma with the McASP work on our hardware, and Logic PD zoom OMAP_L138 EVM
This is a modification of the source found at
http://software-dl.ti.com/dsps/dsps_public_sw/c6000/web/c6747_audio_edma_app/latest/index_FDS.html
c6747_audio_edma_v4.zip
There are 4 test cases that can be activated at compile time with the following 3 defines
_OMAP_L138 tells the #defines to use the codecs and hardware for the Logic PD zoom OMAP_L138 EVM
_NORGE_CODECS tells the #defines to use the codecs and hardware of our design
_DO_AUDIO_EDMA tells the defines to use edma with McASP instead of a
simple polling loop to transfer the audio from rec to transmit.
Observation:
When using _OMAP_L138 alone on evm works fine i.e the simple polling loop.
When using _NORGE_CODECS alone works fine i.e the simple polling loop.
When using _OMAP_L138 with _DO_AUDIO_EDMA on evm works fine.
When using _NORGE_CODECS with _DO_AUDIO_EDMA on our hardware I am missing / dropping samples... etc.
The only real changes I can see, other the using different ports / clocks / pins etc., on the hardware,
is we are using a 24 bit converter and the evm is using 16 bit converters, hence the change to
MCASP->XFMT and MCASP->XFMT in local_OMALP_L138_MCASP_init().
Note:
The audio_edma_c6747.tcf file has not been modified
Changes to mcasp.c
#ifdef _OMAP_L138
void *mcasp_xmt0_register = (void *)(MCASP_REG_BASE + 0x022C); // mcasp->XBUF11 xmit on 11
void *mcasp_rcv0_register = (void *)(MCASP_REG_BASE + 0x02B0); // mcasp->RBUF12 rec on 12
#else
#ifdef _NORGE_CODECS
void *mcasp_xmt0_register = (void *)(MCASP_REG_BASE + 0x0220); // mcasp->XBUF8 xmit on 8
#ifdef _NO_AUX9_XMIT
#else
void *mcasp_xmt1_register = (void *)(MCASP_REG_BASE + 0x0224); // mcasp->XBUF9 xmit on 9
#endif
void *mcasp_rcv0_register = (void *)(MCASP_REG_BASE + 0x0280); // mcasp->RBUF0 rec on 0
#endif
#endif
Changes when using _NORGE_CODECS
in local_OMALP_L138_MCASP_init();
MCASP->RFMT = 0x000080F8; //is 32 bit
MCASP->AFSRCTL = 0x00000000; // Not using reciever for frame sync generation
MCASP->ACLKRCTL = 0x00000000; // Not using the Reciever Clock for
any clock generation although the OMAP_MCLK is connected to AHCLKR
MCASP->RCLKCHK = 0x00000000; // Not doing any clock checking or
McASP AMUTE control so safe to ignore and use defualt for RCLKCHK NOTE:
Makes no difference if it's set like _OMAP_L138 or not.
MCASP->XFMT = 0x000080F8; //is 32 bit
MCASP->ACLKXCTL = 0x000000A7; // divide by 8 for NORGE
MCASP->XCLKCHK = 0x00000000; // Not doing any clock checking or
McASP AMUTE control so safe to ignore and use defualt for RCLKCHK NOTE:
Makes no difference if it's set like _OMAP_L138 or not.
MCASP->SRCTL8 = 0x000D; // 8 = xmit
MCASP->SRCTL0 = 0x000E; // 0 = rec
MCASP->PDIR = 0x14000100; // aux 8 out NO aux9 //
see changes in mcasp_open() when _NORGE_CODECS is actave
There are no changes in audio.c
There are no changes in edma3.c
Changes to edma.h
#ifdef _OMAP_L137
#define EDMA_MCASPTXCH 3 // EDMA channel for McASP1 TX
#define EDMA_MCASPRXCH 2 // EDMA channel for McASP1 RX
#endif
#ifdef _OMAP_L138
#define EDMA_MCASPTXCH 1 // EDMA channel for McASP0 TX
#define EDMA_MCASPRXCH 0 // EDMA channel for McASP0 RX
#endif
#ifdef _NORGE_CODECS
#define EDMA_MCASPTXCH 1 // EDMA channel for McASP0 TX
#define EDMA_MCASPRXCH 0 // EDMA channel for McASP0 RX
#endif
I am at a loss of where to look to address or fix this problem. i.e. missing / dropping samples... etc. with edma on our hardware.
I have observed that RDMAERR bit in RSTAT is not set and
no XDMAERR bit set in XSTAT.
Please help !
Thanks