This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C5515 ezDSP audio template project

Hello all,

I am attaching a project that could serve as a starting point for anyone trying to program an audio processing application on a C5515 eZDSP kit. I have not used the CSL library, since I could not make it work and no one from TI answered in my post seeking support. I have used register programming and I have tried to document the whole process step by step. I am using DMA transfers and ping-pong mode. I am also using hardware-accelerated FFTs and it seems that they work fine.

I have also included a simple weighted overlap-add implementation. The method works almost transparently when no processing is applied, but when I apply any spectral gain there are some distortions/discontinuities at the output which I cannot see where they come from. If anyone is interested in helping out debugging the overlap-add section it would be interesting.

This is not in any way optimal or thoroughly tested. If problems come out, post here or send an e-mail. I should also note I am not a TI expert and I have tried to make this project simple and easy to understand, since I have seen many questions on these forums regarding audio I/O, DMA and I2S functionality.

If anything is seriously wrong...well, we'll have to see!

6153.C5515_audio_template_with_WOLA.zip

  • Thanks Elias!

    Im trying to port this to the C5535 eZdsp - where I have to use DMA controller 1 and I2S2 - and I have a question:
    Is there a reason you decided to do processing outside of the ISR. I see that you set processing flags in the ISR, but you do the processing in a big while loop. Right now, Im doing processing in the ISR, but its not really working, and Im wondering if I should change it.

    Thanks!
    Nate 

  • Hey Nate, I haven't really thought about it, but I suppose putting all the processing inside the ISR will probably cause problems because the ISR will take much longer to be serviced and this might lead to unexpected behaviour or missing frames. Although I am no expert and this is just a thought...

  • Hi Elias,

    I have a question  about your project:
    Where are the hwafft functions defined in?

    hwafft_br and hwafft_256pts are not defined anywhere that I can see, but they are declared in your header file hwafft.h .  Because of this, I am getting compilation errors (unresolved symbols - basically the compiler is not seeing the functions defined anywhere). 

    Thanks!
    Nate 

  • Hi Nate, these functions utilise C5515's FFT co-processor and are defined in the chips ROM. The relevant addresses are included in the linker command file. I don't know if C5535 has an FFT co-processor to support this. You should take a look at this application note: http://e2e.ti.com/support/dsp/c5000/f/109/t/47456.aspx

  • HI Elias,

    I was wondering if you could explain why you chose to use this "OverlapIn" buffer. Why did you not just assign the DMA_Inp directly to the Buffer array, and then do processing on that? Is the OverlapIn buffer necessary? 

    Thanks!


    - Nate  

  • Hi Nate,

    DMA_Inp will hold the new samples. The OverlapIn buffer will hold the samples from the previous frame and the new samples from DMA_Inp. So, if in order to have overlap-add processing (with 50% overlap at this implementation) you need both buffers. Also, you need the extra buffer BufferL in order to do the windowing.

    I hope this makes sense.

  • Hi Elias,
    There has passed a lot of time since your last post on this thread.
    I'm trying to implement OLA method in order to demodulate a DSB-SC signal.
    I FFT the signal, shift frequencies from the carrier index back to zero, and IFFT the result. The output is ok, the demodulation is very precise, but i have discontinuities at the edges of every processed block of the input (modulated signal).
    Do you have any suggestion?

    Thanks a lot.
    Paolo