Hi Sivaraj:
Unfortunately, I have not made it yet. I tried different ways. From following test, I think mcasp abstract physical layer holds too much time in mcaspPlayBk.c, and does not release time interval quickly from buffer to buffer when dealing with Tx /Rx, so it does not have enought time slot to do process, Please correct me if I am warong. If it is, please tel me which parameters in mcasp, I could twist so I can have longer processig time.
The following is my test to show my thought,
In mcaspPlayBk.c, when run loopback without do any processing as TI released, it works, Then still do loopback as exactly as before, just put real FFT /IFFT before
BufferTxDMAActivate(lastSentTxBuf, NUM_SAMPLES_PER_AUDIO_BUF,
(unsignedshort)parToSend,
(unsignedshort)parToLink);
to comsume computing cycles. it starts have 'click' noise.
// Real FFT of length N/2
for (j = 0; j < N / 2; j++)
{
pRFFT_In[2 * j] = (
float) buf_rx[2 * j]; //arrange real input sequence to
pRFFT_In[2 * j + 1] = (
float) buf_rx[2 * j + 1]; //N/2 complex sequence..
}
memcpy (pRFFT_InOrig, pRFFT_In, N * sizeof (float));
// Forward FFT Calculation using N/2 complex FFT..
DSPF_sp_fftSPxSP (N / 2, pRFFT_In, twiddle, pTemp, brev, rad, 0, N / 2);
// FFT Split call to get complex FFT out of length N..
FFT_Split (N / 2, pTemp, A, B, pRFFT_Out);
// Inverse FFT calculation
// IFFT Split call to get complex Inv FFT out of length N..
IFFT_Split (N / 2, pRFFT_Out, A, B, pTemp);
// Inverse FFT Calculation using N/2 complex IFFT..
DSPF_sp_ifftSPxSP (N / 2, pTemp, twiddle, pRFFT_InvOut, brev, rad, 0, N / 2);