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.

Problems with Delay-based Audio Effects based on spraaa5

Other Parts Discussed in Thread: TMS320C6727

Dear Mr. He,

currently I'm working with C672x and audio codec AIC23B. I use your example of "How to Create Delay-based Audio Effects on a TMS320C6727 DSP" in spraaa5.zip.

The codec runs with 12 MHz from CPU clock (external quarz oscillator) and is connected to McASP1. The codec input get a audio signal from CD player and the headphone output is connected to a headphine. I added a control file to init the codec with I2C (CSL library) - this works perfectly. I changed some initial parameters in "main.c" to work with this codec and I hear some audible sound from CD player over codec, but very noisy...

The McASP1 clocks the codec with 12 MHz and 32 bits at I2S format. I used a logic analyzer to analyze the I2S signals ACLK, FSX, FSR, AXR0 and AXR2.
I use internal DSP clock; he codec is the slave device. Next I change the lines 814 in "main.c" to "0" to get 12 MHz BSCLK:

  MCASP1HwCfg.rx.clk.clkSetupClk |= 0;   
  MCASP1HwCfg.tx.clk.clkSetupClk |= 0;


My aim is (at now) to loop back the incomming audio streem to the codec. So in "app.h" I set the currInBuf[i] = currOutBuf[i] . But the sound quality is very noisy and not normal :-(

I tested following: I set the DSP signal pin AXR2 from "output" to "input" (its the DAC signal line) and make a hardware short from digital output of the codec to it's digital input. BitClk and FrameSync are generated by DSP. So I can hear perfect audio - a sign that the McASP engine seems to work.

What in the code I should change to get a 32bit loopback on DSP side?

Please help me with this question.

Thank you very much,
Michael.

  • Hi Michael,

    Are you using the CSL provided below in your code? If not you might want to consider using that package which has been tested and verified.

    http://focus.ti.com/docs/toolsw/folders/print/sprc223.html

    Jeff

     

  • Hi Jeff,

     

    yes, I use the CSL in the spraaa5.zip file. It's not the CSL 3.x, but an older one.

    Currently I solved the actual problem. The codec works with the audio streem at nearly 96kHz (12 MHz xtal and AHCLKX divided by 4). Same address for ADC (dstReloadAddr0 and 1) and DAC (srcReloadAddr0 and 1). So dMAX streams audio data from ADC codec directly to DAC codec at now.

    Now I try to include the functionality of the fifo - to set different Reload addresses over a memory table without sound influences. I like to learn about dmax and so on...

    Any comments about this aim?

     

    Best Regards,

    Michael.