Hello Hope you all had a beautiful day and have a little bit of energy left to help a newbie like me. I got a DSP-board for the first time some weeks ago and I have been playing with it since then. It's a TMS320C6713 DSK. I have made a small audio application that reads a sample from "line in" and sends it to "line out" ...so I guess I have some sort of loopback- thing going on...The source code is _very_ basic because that is the way I want to start out to begin with to get a better understanding of what's going on.....and I also wanna keep it as simple as possible... However, when I try to put some code between the reading and the writing of a sample the sound gets distorted and I don't really know what I should do about that...so I was hoping that maybe some of you clever folks could give me a hint or two? :o) The for-loop in the source code below is just to check what effect _any_ code between the reading and writing of a sample will have on the quality of the playback....it was my intention to replace the loop with some signal processing stuff later on... Thanks...and have a great day... Here is the simple source code that is in my main program: #include "dsk6713.h" #include "dsk6713_aic23.h" DSK6713_AIC23_Config config = {0x0017,0x0017,0x01f9,0x01f9,0x0011,0x0000,0x0000,0x0043,0x001d,0x000 1}; DSK6713_AIC23_CodecHandle hCodec; unsigned int mySample; void main() { DSK6713_init(); hCodec=DSK6713_AIC23_openCodec(0,&config); while(1) { DSK6713_AIC23_read(hCodec, &mySample); for (i=0;i<1000;i++); while(!DSK6713_AIC23_write(hCodec , mySample)); } } |
TMS320C6713: Audio Application, distortion problems
Started by ●March 16, 2005
Reply by ●March 17, 20052005-03-17
Hi, I don't know anything about the codec. But I asume it works like this: The code has a trigger signal for write data and read data. Your code doesn't seam to take care of these signals. I would do it thisway: - read the codec data via EDMA to an input buffer - write the code data via EDMA from an output buffer - after each read trigger an IRQ which processes the data (copies it forn input to output buffer) HTH Gustl jakobashtar wrote: > > > Hello > > Hope you all had a beautiful day and have a little bit of energy > left to > help a newbie like me. I got a DSP-board for the first time some > weeks ago > and I have been playing with it since then. It's a TMS320C6713 DSK. > > I have made a small audio application that reads a sample from "line > in" and > sends it to "line out" ...so I guess I have some sort of loopback- > thing > going on...The source code is _very_ basic because that is the way I > want to > start out to begin with to get a better understanding of what's > going > on.....and I also wanna keep it as simple as possible... > > However, when I try to put some code between the reading and the > writing of > a sample the sound gets distorted and I don't really know what I > should do > about that...so I was hoping that maybe some of you clever folks > could give > me a hint or two? :o) > > The for-loop in the source code below is just to check what effect > _any_ > code between the reading and writing of a sample will have on the > quality of > the playback....it was my intention to replace the loop with some > signal > processing stuff later on... > > Thanks...and have a great day... > > Here is the simple source code that is in my main program: > #include "dsk6713.h" > #include "dsk6713_aic23.h" > DSK6713_AIC23_Config config = > {0x0017,0x0017,0x01f9,0x01f9,0x0011,0x0000,0x0000,0x0043,0x001d,0x000 > 1}; > DSK6713_AIC23_CodecHandle hCodec; > unsigned int mySample; > > void main() > { > DSK6713_init(); > hCodec=DSK6713_AIC23_openCodec(0,&config); > while(1) > { > DSK6713_AIC23_read(hCodec, &mySample); > for (i=0;i<1000;i++); > while(!DSK6713_AIC23_write(hCodec , mySample)); > } > } |