Purpose:
I want to use the TMS320C6455EVM as a hardware decoder. I need to use the AIC23
Audio Stereo Codec to sample a signal at 48kHz.
The Setup:
I generate a signal in Matlab, and transmit it using the Audio Line Out on the
PC - I then connect this port directly to the Audio Line In port of the AIC23
interface on the DSP. The format of the signal is 16-bit, mono audio and 48000
samples/sec.
Debugging (on PC):
I have made an audio loop on my PC (connecting the Audio Line In to the Audio
Line Out). In Matlab I use the following commands to test the loop:
The program performs as expected and it can decode the signal correctly. All
synchronization functionality was successfully tested: symbol timing offset
estimation and frame synchronization.
Debugging (on DSP):
>From the simulations, I generate a .dat file to inject
into the DSP memory. I use FileIO to inject the values into the memory. The
hardware decoder works correct. Also tested against various symbol/timing
offsets and AWGN noise.
Using the AIC23:
When transmitting the signal (using the audio channel) from the PC to the DSP
and trying to use the AIC23 codec to sample the data, the decoding does NOT work
correct. The symbol timing offset estimation does not work - causing the whole
system to malfunction.
Code I used:
Here is some of the code I used to drive the AIC23, I guess my problem must be
in here:
The above code does not reproduce the same output as the "wavrecord" function I
mentioned earlier.
- Is there any other settings that has to be set to drive the AIC23 correctly?
- How does one use hardware interrupts (when a sample value is ready) to be able
to decode a signal continuously?
- Have I implemented the sampling correct for a mono audio, 48000 sample/sec and
16-bit per sample signal?
Thank you,
Christo Kleu
Using the AIC23 on the TMS320C6455EVM
Started by ●October 11, 2007
Reply by ●October 11, 20072007-10-11
Christo-
To excerpt your post:
> Using the AIC23:
> When transmitting the signal (using the audio channel) from the PC to the
> DSP and trying to use the AIC23 codec to sample the data, the decoding
> does NOT work correct. The symbol timing offset estimation does not work
> - causing the whole system to malfunction.
Suggest to stop at this point and use CCS graphical display to examine the signal the
AIC23 digitizes. This signal is being placed into a memory buffer on the DSP -- you
can find this memory area by understanding the DSP code. By display the signal, you
can verify that in fact it's what was output by the PC and what you are expecting.
-Jeff
c...@tuks.co.za wrote:
>
> Purpose:
> I want to use the TMS320C6455EVM as a hardware decoder. I need to use the AIC23 Audio Stereo Codec to sample a signal at 48kHz.
>
> The Setup:
> I generate a signal in Matlab, and transmit it using the Audio Line Out on the PC - I then connect this port directly to the Audio Line In port of the AIC23 interface on the DSP. The format of the signal is 16-bit, mono audio and 48000 samples/sec.
>
> Debugging (on PC):
> I have made an audio loop on my PC (connecting the Audio Line In to the Audio Line Out). In Matlab I use the following commands to test the loop:
>
> The program performs as expected and it can decode the signal correctly. All synchronization functionality was successfully tested: symbol timing offset estimation and frame synchronization.
>
> Debugging (on DSP):
> From the simulations, I generate a .dat file to inject into the DSP memory. I use FileIO to inject the values into the memory. The hardware decoder works correct. Also tested against various symbol/timing offsets and AWGN noise.
>
> Using the AIC23:
> When transmitting the signal (using the audio channel) from the PC to the DSP and trying to use the AIC23 codec to sample the data, the decoding does NOT work correct. The symbol timing offset estimation does not work - causing the whole system to malfunction.
>
> Code I used:
> Here is some of the code I used to drive the AIC23, I guess my problem must be in here:
>
> The above code does not reproduce the same output as the "wavrecord" function I mentioned earlier.
>
> - Is there any other settings that has to be set to drive the AIC23 correctly?
> - How does one use hardware interrupts (when a sample value is ready) to be able to decode a signal continuously?
> - Have I implemented the sampling correct for a mono audio, 48000 sample/sec and 16-bit per sample signal?
>
> Thank you,
> Christo Kleu
To excerpt your post:
> Using the AIC23:
> When transmitting the signal (using the audio channel) from the PC to the
> DSP and trying to use the AIC23 codec to sample the data, the decoding
> does NOT work correct. The symbol timing offset estimation does not work
> - causing the whole system to malfunction.
Suggest to stop at this point and use CCS graphical display to examine the signal the
AIC23 digitizes. This signal is being placed into a memory buffer on the DSP -- you
can find this memory area by understanding the DSP code. By display the signal, you
can verify that in fact it's what was output by the PC and what you are expecting.
-Jeff
c...@tuks.co.za wrote:
>
> Purpose:
> I want to use the TMS320C6455EVM as a hardware decoder. I need to use the AIC23 Audio Stereo Codec to sample a signal at 48kHz.
>
> The Setup:
> I generate a signal in Matlab, and transmit it using the Audio Line Out on the PC - I then connect this port directly to the Audio Line In port of the AIC23 interface on the DSP. The format of the signal is 16-bit, mono audio and 48000 samples/sec.
>
> Debugging (on PC):
> I have made an audio loop on my PC (connecting the Audio Line In to the Audio Line Out). In Matlab I use the following commands to test the loop:
>
> The program performs as expected and it can decode the signal correctly. All synchronization functionality was successfully tested: symbol timing offset estimation and frame synchronization.
>
> Debugging (on DSP):
> From the simulations, I generate a .dat file to inject into the DSP memory. I use FileIO to inject the values into the memory. The hardware decoder works correct. Also tested against various symbol/timing offsets and AWGN noise.
>
> Using the AIC23:
> When transmitting the signal (using the audio channel) from the PC to the DSP and trying to use the AIC23 codec to sample the data, the decoding does NOT work correct. The symbol timing offset estimation does not work - causing the whole system to malfunction.
>
> Code I used:
> Here is some of the code I used to drive the AIC23, I guess my problem must be in here:
>
> The above code does not reproduce the same output as the "wavrecord" function I mentioned earlier.
>
> - Is there any other settings that has to be set to drive the AIC23 correctly?
> - How does one use hardware interrupts (when a sample value is ready) to be able to decode a signal continuously?
> - Have I implemented the sampling correct for a mono audio, 48000 sample/sec and 16-bit per sample signal?
>
> Thank you,
> Christo Kleu
Reply by ●October 11, 20072007-10-11
hi,
i guess according to my knowledge,just go to my examples and in the BSL folder open the dsk_app pjt.theer is an loopback program example which uses the aic23 codec you can set the parameters of AIC as u wrote in the mail.It uses the dsp/bios dsk_app.cdb where he uses teh DMA transfer and the ping pong buffer.i think it will be useful for solving your problem
Mahesh
Jeff Brower wrote:
Christo-
To excerpt your post:
> Using the AIC23:
> When transmitting the signal (using the audio channel) from the PC to the
> DSP and trying to use the AIC23 codec to sample the data, the decoding
> does NOT work correct. The symbol timing offset estimation does not work
> - causing the whole system to malfunction.
Suggest to stop at this point and use CCS graphical display to examine the signal the
AIC23 digitizes. This signal is being placed into a memory buffer on the DSP -- you
can find this memory area by understanding the DSP code. By display the signal, you
can verify that in fact it's what was output by the PC and what you are expecting.
-Jeff
c...@tuks.co.za wrote:
>
> Purpose:
> I want to use the TMS320C6455EVM as a hardware decoder. I need to use the AIC23 Audio Stereo Codec to sample a signal at 48kHz.
>
> The Setup:
> I generate a signal in Matlab, and transmit it using the Audio Line Out on the PC - I then connect this port directly to the Audio Line In port of the AIC23 interface on the DSP. The format of the signal is 16-bit, mono audio and 48000 samples/sec.
>
> Debugging (on PC):
> I have made an audio loop on my PC (connecting the Audio Line In to the Audio Line Out). In Matlab I use the following commands to test the loop:
>
> The program performs as expected and it can decode the signal correctly. All synchronization functionality was successfully tested: symbol timing offset estimation and frame synchronization.
>
> Debugging (on DSP):
> From the simulations, I generate a .dat file to inject into the DSP memory. I use FileIO to inject the values into the memory. The hardware decoder works correct. Also tested against various symbol/timing offsets and AWGN noise.
>
> Using the AIC23:
> When transmitting the signal (using the audio channel) from the PC to the DSP and trying to use the AIC23 codec to sample the data, the decoding does NOT work correct. The symbol timing offset estimation does not work - causing the whole system to malfunction.
>
> Code I used:
> Here is some of the code I used to drive the AIC23, I guess my problem must be in here:
>
> The above code does not reproduce the same output as the "wavrecord" function I mentioned earlier.
>
> - Is there any other settings that has to be set to drive the AIC23 correctly?
> - How does one use hardware interrupts (when a sample value is ready) to be able to decode a signal continuously?
> - Have I implemented the sampling correct for a mono audio, 48000 sample/sec and 16-bit per sample signal?
>
> Thank you,
> Christo Kleu
---------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.
i guess according to my knowledge,just go to my examples and in the BSL folder open the dsk_app pjt.theer is an loopback program example which uses the aic23 codec you can set the parameters of AIC as u wrote in the mail.It uses the dsp/bios dsk_app.cdb where he uses teh DMA transfer and the ping pong buffer.i think it will be useful for solving your problem
Mahesh
Jeff Brower wrote:
Christo-
To excerpt your post:
> Using the AIC23:
> When transmitting the signal (using the audio channel) from the PC to the
> DSP and trying to use the AIC23 codec to sample the data, the decoding
> does NOT work correct. The symbol timing offset estimation does not work
> - causing the whole system to malfunction.
Suggest to stop at this point and use CCS graphical display to examine the signal the
AIC23 digitizes. This signal is being placed into a memory buffer on the DSP -- you
can find this memory area by understanding the DSP code. By display the signal, you
can verify that in fact it's what was output by the PC and what you are expecting.
-Jeff
c...@tuks.co.za wrote:
>
> Purpose:
> I want to use the TMS320C6455EVM as a hardware decoder. I need to use the AIC23 Audio Stereo Codec to sample a signal at 48kHz.
>
> The Setup:
> I generate a signal in Matlab, and transmit it using the Audio Line Out on the PC - I then connect this port directly to the Audio Line In port of the AIC23 interface on the DSP. The format of the signal is 16-bit, mono audio and 48000 samples/sec.
>
> Debugging (on PC):
> I have made an audio loop on my PC (connecting the Audio Line In to the Audio Line Out). In Matlab I use the following commands to test the loop:
>
> The program performs as expected and it can decode the signal correctly. All synchronization functionality was successfully tested: symbol timing offset estimation and frame synchronization.
>
> Debugging (on DSP):
> From the simulations, I generate a .dat file to inject into the DSP memory. I use FileIO to inject the values into the memory. The hardware decoder works correct. Also tested against various symbol/timing offsets and AWGN noise.
>
> Using the AIC23:
> When transmitting the signal (using the audio channel) from the PC to the DSP and trying to use the AIC23 codec to sample the data, the decoding does NOT work correct. The symbol timing offset estimation does not work - causing the whole system to malfunction.
>
> Code I used:
> Here is some of the code I used to drive the AIC23, I guess my problem must be in here:
>
> The above code does not reproduce the same output as the "wavrecord" function I mentioned earlier.
>
> - Is there any other settings that has to be set to drive the AIC23 correctly?
> - How does one use hardware interrupts (when a sample value is ready) to be able to decode a signal continuously?
> - Have I implemented the sampling correct for a mono audio, 48000 sample/sec and 16-bit per sample signal?
>
> Thank you,
> Christo Kleu
---------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.
Reply by ●October 11, 20072007-10-11
Mahesh-
> i guess according to my knowledge,just go to my examples and in the BSL folder open
> the dsk_app pjt.theer is an loopback program example which uses the aic23 codec you
> can set the parameters of AIC as u wrote in the mail.It uses the dsp/bios
> dsk_app.cdb where he uses teh DMA transfer and the ping pong buffer.i think it will
> be useful for solving your problem
That's a good suggestion, but note that it takes Christo away from his
MATLAB-generated DSP code. I think if Christo takes the time to understand his
existing DSP code, and figure out where that code is storing AIC23 digitized data in
memory, then he will gain a better understanding of his overall system.
But you're right, if that doesn't work then Christo may need to back up all the way
to simple stand-alone, non-MATLAB example code and get familiar with the AIC23.
-Jeff
> Jeff Brower wrote:
> Christo-
>
> To excerpt your post:
>
> > Using the AIC23:
> > When transmitting the signal (using the audio channel) from the PC to
> the
> > DSP and trying to use the AIC23 codec to sample the data, the decoding
> > does NOT work correct. The symbol timing offset estimation does not
> work
> > - causing the whole system to malfunction.
>
> Suggest to stop at this point and use CCS graphical display to examine
> the signal the
> AIC23 digitizes. This signal is being placed into a memory buffer on the
> DSP -- you
> can find this memory area by understanding the DSP code. By display the
> signal, you
> can verify that in fact it's what was output by the PC and what you are
> expecting.
>
> -Jeff
>
> c...@tuks.co.za wrote:
> >
> > Purpose:
> > I want to use the TMS320C6455EVM as a hardware decoder. I need to use
> the AIC23 Audio Stereo Codec to sample a signal at 48kHz.
> >
> > The Setup:
> > I generate a signal in Matlab, and transmit it using the Audio Line Out
> on the PC - I then connect this port directly to the Audio Line In port
> of the AIC23 interface on the DSP. The format of the signal is 16-bit,
> mono audio and 48000 samples/sec.
> >
> > Debugging (on PC):
> > I have made an audio loop on my PC (connecting the Audio Line In to the
> Audio Line Out). In Matlab I use the following commands to test the loop:
>
> >
> > The program performs as expected and it can decode the signal
> correctly. All synchronization functionality was successfully tested:
> symbol timing offset estimation and frame synchronization.
> >
> > Debugging (on DSP):
> > From the simulations, I generate a .dat file to inject into the DSP
> memory. I use FileIO to inject the values into the memory. The hardware
> decoder works correct. Also tested against various symbol/timing offsets
> and AWGN noise.
> >
> > Using the AIC23:
> > When transmitting the signal (using the audio channel) from the PC to
> the DSP and trying to use the AIC23 codec to sample the data, the
> decoding does NOT work correct. The symbol timing offset estimation does
> not work - causing the whole system to malfunction.
> >
> > Code I used:
> > Here is some of the code I used to drive the AIC23, I guess my problem
> must be in here:
> >
> > The above code does not reproduce the same output as the "wavrecord"
> function I mentioned earlier.
> >
> > - Is there any other settings that has to be set to drive the AIC23
> correctly?
> > - How does one use hardware interrupts (when a sample value is ready)
> to be able to decode a signal continuously?
> > - Have I implemented the sampling correct for a mono audio, 48000
> sample/sec and 16-bit per sample signal?
> >
> > Thank you,
> > Christo Kleu
>
> i guess according to my knowledge,just go to my examples and in the BSL folder open
> the dsk_app pjt.theer is an loopback program example which uses the aic23 codec you
> can set the parameters of AIC as u wrote in the mail.It uses the dsp/bios
> dsk_app.cdb where he uses teh DMA transfer and the ping pong buffer.i think it will
> be useful for solving your problem
That's a good suggestion, but note that it takes Christo away from his
MATLAB-generated DSP code. I think if Christo takes the time to understand his
existing DSP code, and figure out where that code is storing AIC23 digitized data in
memory, then he will gain a better understanding of his overall system.
But you're right, if that doesn't work then Christo may need to back up all the way
to simple stand-alone, non-MATLAB example code and get familiar with the AIC23.
-Jeff
> Jeff Brower wrote:
> Christo-
>
> To excerpt your post:
>
> > Using the AIC23:
> > When transmitting the signal (using the audio channel) from the PC to
> the
> > DSP and trying to use the AIC23 codec to sample the data, the decoding
> > does NOT work correct. The symbol timing offset estimation does not
> work
> > - causing the whole system to malfunction.
>
> Suggest to stop at this point and use CCS graphical display to examine
> the signal the
> AIC23 digitizes. This signal is being placed into a memory buffer on the
> DSP -- you
> can find this memory area by understanding the DSP code. By display the
> signal, you
> can verify that in fact it's what was output by the PC and what you are
> expecting.
>
> -Jeff
>
> c...@tuks.co.za wrote:
> >
> > Purpose:
> > I want to use the TMS320C6455EVM as a hardware decoder. I need to use
> the AIC23 Audio Stereo Codec to sample a signal at 48kHz.
> >
> > The Setup:
> > I generate a signal in Matlab, and transmit it using the Audio Line Out
> on the PC - I then connect this port directly to the Audio Line In port
> of the AIC23 interface on the DSP. The format of the signal is 16-bit,
> mono audio and 48000 samples/sec.
> >
> > Debugging (on PC):
> > I have made an audio loop on my PC (connecting the Audio Line In to the
> Audio Line Out). In Matlab I use the following commands to test the loop:
>
> >
> > The program performs as expected and it can decode the signal
> correctly. All synchronization functionality was successfully tested:
> symbol timing offset estimation and frame synchronization.
> >
> > Debugging (on DSP):
> > From the simulations, I generate a .dat file to inject into the DSP
> memory. I use FileIO to inject the values into the memory. The hardware
> decoder works correct. Also tested against various symbol/timing offsets
> and AWGN noise.
> >
> > Using the AIC23:
> > When transmitting the signal (using the audio channel) from the PC to
> the DSP and trying to use the AIC23 codec to sample the data, the
> decoding does NOT work correct. The symbol timing offset estimation does
> not work - causing the whole system to malfunction.
> >
> > Code I used:
> > Here is some of the code I used to drive the AIC23, I guess my problem
> must be in here:
> >
> > The above code does not reproduce the same output as the "wavrecord"
> function I mentioned earlier.
> >
> > - Is there any other settings that has to be set to drive the AIC23
> correctly?
> > - How does one use hardware interrupts (when a sample value is ready)
> to be able to decode a signal continuously?
> > - Have I implemented the sampling correct for a mono audio, 48000
> sample/sec and 16-bit per sample signal?
> >
> > Thank you,
> > Christo Kleu
>
Reply by ●October 11, 20072007-10-11
I found a loopback example for the board I am using in one of the Code
Composer Studio folders. I used that program to base my logic of how I
use the AIC23 (and the AIC23 data sheet and the functions in the
header file). I think the project was called "tone", but it is also
called in the POST - basically it sends a 1kHz sine wave out of the
left channel and a 2kHz sine wave out of the right channel (when
plugging a headphone into the headphone jack you can hear the tone
playing).
I then went to Matlab and generated a song using various tones, so
that you can distinguish the output. When I played the song out of my
PC, sampled it on the DSP and then playing it back on the Audio Line
Out/Headphones, you can clearly hear that it is the same song (but I
never used the Graph functionality to validate that the actual buffers
are the same).
After that, I generated a 500Hz sine wave in Matlab and played that
out of the PC. I encountered an odd problem, if I loopback the data
onto the Audio Line Out and then view the sampled input values (which
I stored in a buffer) - the buffer resembled the values I generated in
Matlab, BUT when I do not use the write32 command after each read -
each sample is stretched out over 80 to 100 values (that is why I am
thinking my implementation of the sampling is wrong).
This is why I am thinking to implement the interrupt driven sampling,
because the polling sampling I am using at the moment just doesn't
seem to work - it samples much too fast when the data isn't looped
back [you can see this phenomena in the picture links I posted in
another thread]. I am using the inbuilt Graphical display
functionality to verify the data buffers the whole time.
To Jeff's comments:
> existing DSP code, and figure out where that code is storing AIC23
> digitized data in
> memory, then he will gain a better understanding of his overall system.
Correct me if I am wrong:
> hCodec = DSK6455_AIC23_openCodec(0, &config);
Opens the codec and sets all the configurations
> while (!DSK6455_AIC23_read32(hCodec, (Uint32 *)&data));
The DSK6455_AIC23_read32() polls the RX buffer of the McBSP, if it is
busy, it returns a 0 and when it is complete it returns a 1. The
32-bit stereo sampled is saved inside "data" (which was declared as a
Uint16), but because I am only using a MONO signal (instead of
STEREO), the right channel (corresponding to the last 16 bits)
contains the data I want.
I am unclear about the "where that code is storing AIC23 digitized
data in memory" statement, does it not store the sampled value in the
"data" variable?
Quoting Jeff Brower :
> Mahesh-
>> i guess according to my knowledge,just go to my examples and in the
>> BSL folder open
>> the dsk_app pjt.theer is an loopback program example which uses the
>> aic23 codec you
>> can set the parameters of AIC as u wrote in the mail.It uses the dsp/bios
>> dsk_app.cdb where he uses teh DMA transfer and the ping pong
>> buffer.i think it will
>> be useful for solving your problem
>
> That's a good suggestion, but note that it takes Christo away from his
> MATLAB-generated DSP code. I think if Christo takes the time to
> understand his
> existing DSP code, and figure out where that code is storing AIC23
> digitized data in
> memory, then he will gain a better understanding of his overall system.
>
> But you're right, if that doesn't work then Christo may need to back
> up all the way
> to simple stand-alone, non-MATLAB example code and get familiar with
> the AIC23.
>
> -Jeff
>> Jeff Brower wrote:
>> Christo-
>>
>> To excerpt your post:
>>
>> > Using the AIC23:
>> > When transmitting the signal (using the audio channel) from the PC to
>> the
>> > DSP and trying to use the AIC23 codec to sample the data,
>> the decoding
>> > does NOT work correct. The symbol timing offset estimation does not
>> work
>> > - causing the whole system to malfunction.
>>
>> Suggest to stop at this point and use CCS graphical display to examine
>> the signal the
>> AIC23 digitizes. This signal is being placed into a memory
>> buffer on the
>> DSP -- you
>> can find this memory area by understanding the DSP code. By display the
>> signal, you
>> can verify that in fact it's what was output by the PC and what you are
>> expecting.
>>
>> -Jeff
>>
>> c...@tuks.co.za wrote:
>> >
>> > Purpose:
>> > I want to use the TMS320C6455EVM as a hardware decoder. I need to use
>> the AIC23 Audio Stereo Codec to sample a signal at 48kHz.
>> >
>> > The Setup:
>> > I generate a signal in Matlab, and transmit it using the
>> Audio Line Out
>> on the PC - I then connect this port directly to the Audio Line In port
>> of the AIC23 interface on the DSP. The format of the signal is 16-bit,
>> mono audio and 48000 samples/sec.
>> >
>> > Debugging (on PC):
>> > I have made an audio loop on my PC (connecting the Audio
>> Line In to the
>> Audio Line Out). In Matlab I use the following commands to
>> test the loop:
>>
>> >
>> > The program performs as expected and it can decode the signal
>> correctly. All synchronization functionality was successfully tested:
>> symbol timing offset estimation and frame synchronization.
>> >
>> > Debugging (on DSP):
>> > From the simulations, I generate a .dat file to inject into the DSP
>> memory. I use FileIO to inject the values into the memory. The hardware
>> decoder works correct. Also tested against various
>> symbol/timing offsets
>> and AWGN noise.
>> >
>> > Using the AIC23:
>> > When transmitting the signal (using the audio channel) from the PC to
>> the DSP and trying to use the AIC23 codec to sample the data, the
>> decoding does NOT work correct. The symbol timing offset
>> estimation does
>> not work - causing the whole system to malfunction.
>> >
>> > Code I used:
>> > Here is some of the code I used to drive the AIC23, I guess
>> my problem
>> must be in here:
>> >
>> > The above code does not reproduce the same output as the "wavrecord"
>> function I mentioned earlier.
>> >
>> > - Is there any other settings that has to be set to drive the AIC23
>> correctly?
>> > - How does one use hardware interrupts (when a sample value is ready)
>> to be able to decode a signal continuously?
>> > - Have I implemented the sampling correct for a mono audio, 48000
>> sample/sec and 16-bit per sample signal?
>> >
>> > Thank you,
>> > Christo Kleu
>
This message and attachments are subject to a disclaimer. Please refer
to www.it.up.ac.za/documentation/governance/disclaimer/ for full
details. / Hierdie boodskap en aanhangsels is aan 'n vrywaringsklousule
onderhewig. Volledige besonderhede is by
www.it.up.ac.za/documentation/governance/disclaimer/ beskikbaar.
Composer Studio folders. I used that program to base my logic of how I
use the AIC23 (and the AIC23 data sheet and the functions in the
header file). I think the project was called "tone", but it is also
called in the POST - basically it sends a 1kHz sine wave out of the
left channel and a 2kHz sine wave out of the right channel (when
plugging a headphone into the headphone jack you can hear the tone
playing).
I then went to Matlab and generated a song using various tones, so
that you can distinguish the output. When I played the song out of my
PC, sampled it on the DSP and then playing it back on the Audio Line
Out/Headphones, you can clearly hear that it is the same song (but I
never used the Graph functionality to validate that the actual buffers
are the same).
After that, I generated a 500Hz sine wave in Matlab and played that
out of the PC. I encountered an odd problem, if I loopback the data
onto the Audio Line Out and then view the sampled input values (which
I stored in a buffer) - the buffer resembled the values I generated in
Matlab, BUT when I do not use the write32 command after each read -
each sample is stretched out over 80 to 100 values (that is why I am
thinking my implementation of the sampling is wrong).
This is why I am thinking to implement the interrupt driven sampling,
because the polling sampling I am using at the moment just doesn't
seem to work - it samples much too fast when the data isn't looped
back [you can see this phenomena in the picture links I posted in
another thread]. I am using the inbuilt Graphical display
functionality to verify the data buffers the whole time.
To Jeff's comments:
> existing DSP code, and figure out where that code is storing AIC23
> digitized data in
> memory, then he will gain a better understanding of his overall system.
Correct me if I am wrong:
> hCodec = DSK6455_AIC23_openCodec(0, &config);
Opens the codec and sets all the configurations
> while (!DSK6455_AIC23_read32(hCodec, (Uint32 *)&data));
The DSK6455_AIC23_read32() polls the RX buffer of the McBSP, if it is
busy, it returns a 0 and when it is complete it returns a 1. The
32-bit stereo sampled is saved inside "data" (which was declared as a
Uint16), but because I am only using a MONO signal (instead of
STEREO), the right channel (corresponding to the last 16 bits)
contains the data I want.
I am unclear about the "where that code is storing AIC23 digitized
data in memory" statement, does it not store the sampled value in the
"data" variable?
Quoting Jeff Brower :
> Mahesh-
>> i guess according to my knowledge,just go to my examples and in the
>> BSL folder open
>> the dsk_app pjt.theer is an loopback program example which uses the
>> aic23 codec you
>> can set the parameters of AIC as u wrote in the mail.It uses the dsp/bios
>> dsk_app.cdb where he uses teh DMA transfer and the ping pong
>> buffer.i think it will
>> be useful for solving your problem
>
> That's a good suggestion, but note that it takes Christo away from his
> MATLAB-generated DSP code. I think if Christo takes the time to
> understand his
> existing DSP code, and figure out where that code is storing AIC23
> digitized data in
> memory, then he will gain a better understanding of his overall system.
>
> But you're right, if that doesn't work then Christo may need to back
> up all the way
> to simple stand-alone, non-MATLAB example code and get familiar with
> the AIC23.
>
> -Jeff
>> Jeff Brower wrote:
>> Christo-
>>
>> To excerpt your post:
>>
>> > Using the AIC23:
>> > When transmitting the signal (using the audio channel) from the PC to
>> the
>> > DSP and trying to use the AIC23 codec to sample the data,
>> the decoding
>> > does NOT work correct. The symbol timing offset estimation does not
>> work
>> > - causing the whole system to malfunction.
>>
>> Suggest to stop at this point and use CCS graphical display to examine
>> the signal the
>> AIC23 digitizes. This signal is being placed into a memory
>> buffer on the
>> DSP -- you
>> can find this memory area by understanding the DSP code. By display the
>> signal, you
>> can verify that in fact it's what was output by the PC and what you are
>> expecting.
>>
>> -Jeff
>>
>> c...@tuks.co.za wrote:
>> >
>> > Purpose:
>> > I want to use the TMS320C6455EVM as a hardware decoder. I need to use
>> the AIC23 Audio Stereo Codec to sample a signal at 48kHz.
>> >
>> > The Setup:
>> > I generate a signal in Matlab, and transmit it using the
>> Audio Line Out
>> on the PC - I then connect this port directly to the Audio Line In port
>> of the AIC23 interface on the DSP. The format of the signal is 16-bit,
>> mono audio and 48000 samples/sec.
>> >
>> > Debugging (on PC):
>> > I have made an audio loop on my PC (connecting the Audio
>> Line In to the
>> Audio Line Out). In Matlab I use the following commands to
>> test the loop:
>>
>> >
>> > The program performs as expected and it can decode the signal
>> correctly. All synchronization functionality was successfully tested:
>> symbol timing offset estimation and frame synchronization.
>> >
>> > Debugging (on DSP):
>> > From the simulations, I generate a .dat file to inject into the DSP
>> memory. I use FileIO to inject the values into the memory. The hardware
>> decoder works correct. Also tested against various
>> symbol/timing offsets
>> and AWGN noise.
>> >
>> > Using the AIC23:
>> > When transmitting the signal (using the audio channel) from the PC to
>> the DSP and trying to use the AIC23 codec to sample the data, the
>> decoding does NOT work correct. The symbol timing offset
>> estimation does
>> not work - causing the whole system to malfunction.
>> >
>> > Code I used:
>> > Here is some of the code I used to drive the AIC23, I guess
>> my problem
>> must be in here:
>> >
>> > The above code does not reproduce the same output as the "wavrecord"
>> function I mentioned earlier.
>> >
>> > - Is there any other settings that has to be set to drive the AIC23
>> correctly?
>> > - How does one use hardware interrupts (when a sample value is ready)
>> to be able to decode a signal continuously?
>> > - Have I implemented the sampling correct for a mono audio, 48000
>> sample/sec and 16-bit per sample signal?
>> >
>> > Thank you,
>> > Christo Kleu
>
This message and attachments are subject to a disclaimer. Please refer
to www.it.up.ac.za/documentation/governance/disclaimer/ for full
details. / Hierdie boodskap en aanhangsels is aan 'n vrywaringsklousule
onderhewig. Volledige besonderhede is by
www.it.up.ac.za/documentation/governance/disclaimer/ beskikbaar.






