Leo's Audio DSP project

Wednesday, January 31, 2007

CODEC registers

I analyzed the Codec registers and how they get intitialized. This gave me some insights on how to change sampling rate etc. and control audio from the Codec level.

Wednesday, January 24, 2007

audio traffic in I2S mode and delay line work

I verified that the first sample that gets to the DSP chip from the codec is the right channel. This is by default in I2S mode but can be changed using different flags.

I read about the flags that configure the audio I/O trarric in the SHARC hardware manual.

I did more work on the delay line: created an imaginary audio delay line with manually entered numbers representing audio samples and given thought to an actual delay line implementation.

Friday, January 19, 2007

New board is on its way

Thanks to Harman Music Group [title] Vince [lastname], I got in touch with our local Analog Devices representative Jared Bates. He agreed to take the defective board and supply a new one next week.

The best part is that I requested a slightly different eval board with a sister SHARC chip: ADSP-21364. This DSP chip is optimized for pro audio. The old chip (ADSP-21369) was more of a general purpose chip. The new chip has more internal memory (6MB). That means I can keep more samples of audio in the DSP chip without accessing external memory.

Another difference is that the new evaluation board is simpler and has DRAM instead of SDRAM. The old board has too many features and hardware expansion boards for which I have no use for.

oh no! audio died on the proto board!

I encountered a hardware problem. The audio part of my evalution board suddenly died (I could actually hear loud hissing coming out of the codec while I was playing music).

I, with some help, did basic hardware troubleshooting: made sure all chips were powered and checked clock signals coming to the codec. However, due to the complexity of this board, I decided to go with a new board.

Left and right channels seperated, delay line implemented

I seperated my left and right channels in my DSP code. Initially the audio signal was interlaced ie. the left and right channels were getting processed in the LRLRLRLR... fashion.

Also, I tried reading samples off of my delay line ie. tried to access past samples but discovered that only the sample before the current one is being read into the delay buffer. A simple code change should fix this.

At this point, I want to consult somebody and ask them if I'm doing things in a clean way before I go on.

Wednesday, January 10, 2007

Left/Right channel mystery

The template C code that manages the I/O traffic on my board processes left and right samples. So, whatever I do the the left channel seems to happen to the right channel as well. However, after talking to DSP engineers Mike and Brandon, I was warned that I might face problems.

I decided to do some more investigation and find out how my left and right channels are processed.

Analog.com Tech Support

Today, I received a response from Analog.com Tech Support regarding the questions I asked on reading and processing audio samples. Looks like my questions made sense to them since I got satisfying answers.

SHARC architecture and CODEC Master Clock

I briefly visited Harman Hardware Engineer Brian Parker to go over the hardware diagrams of my SHARC (DSP chip) and asked about the master clock in CODECs. Learned the following:

* Master clock to the CODEC needs to be changed to change the sampling rate.

* Gained more insight on the SHARC hardware architecture.

* Documentation is the primary reference to find out about hardware. It's not always possible to guess things intuitively.

I went though the hardware manual to see how things are happening in the low-level world.

First steps in creating a delay

I visited HMG engineer Chris Belcher to go over the basic concepts of delay lines.

Implemented a delay line in theory in C. It compiled with no errors. I still need to think about it before I pass audio through it. I prefer to think things through instead of "try and see what happens".

Friday, January 05, 2007

Tremolo effect implemented

I successfully created the tremolo effect. This effects modulates the sound with a 1Hz sine wave.

Also, I'm getting more and more familiar with my compiler and improving my debugging skills.

Thursday, January 04, 2007

VisualDSP++ tutorial

* created a simple C project to calculate a dot product (using the DSP chip) to familarize with the compiler and debugging features

* found a key document to boot from flash memory (this will be necessary to make the board a stand-alone device in the future so I can take it away from my desk and show off how my effects sound)

Wednesday, January 03, 2007

creating waves, counters

added a sine wave to the code, this slow sine wave will modulate the signal. the problem is that that the counter doesn't work. in the process of debugging.

a lowpass filter function has also been implemented but there's a slight problem passing data.

this all requires better mastery of my compiler and some debugging time