Sine test OK mp3 noisy

Designing hardware that uses VLSI Solution's devices as slave codecs such as an external MP3 decoder chip for a host microcontroller.
Post Reply
tek66tim
User
Posts: 2
Joined: Tue 2011-03-15 3:09

Sine test OK mp3 noisy

Post by tek66tim » Tue 2011-03-15 3:34

Hi,

I have searched through this forum and I can't find any info on my problem. I'm using the Sparkfun VS1011-v13 board with a micro controller (XMOS). I'm using shared mode, new mode, and I have tied XDCS/BSYNC high through a 100K res. The board uses a 12.288MHz clock so I set the clock doubler in the chip to on. The XMOS micro is very fast and I'm sending 32Bytes with every DREQ high period. I have been able to set and read back the mode register as well as volume register, I believe these are set properly 0x0C20 for the mode reg. I can hear a proper clean tone when running a sine test. I have a known good mp3 file that plays fine in windows media player. I wrote the code to upload this file to SPI flash and verify the integrity of the mp3 in flash. I am also using two SPI ports one for reading the flash the other sends the data to the VS1011, I'm just clocking the data straight through.

The symptom I'm getting is a kind of chopping fluttering sound as well as a high pitched tone, on top of good audio, the good audio seems buried in the noise. The audio plays smoothly, it just has a lot of noise on top of it.

I think I read somewhere that the chip inverts one of the channels, is this true? If it is it may be my problem, I'm mixing the two outputs, through resistors, so the desired audio would cancel and the common mode noise would combine. Is the audio channel flipped for the sine wave test also?

Any guidance would be welcomed, I'm stumped for now.

Thanks in advance,
Tim

User avatar
Panu
VLSI Staff. Currently on holiday.
Posts: 2736
Joined: Tue 2010-06-22 13:43

Re: Sine test OK mp3 noisy

Post by Panu » Tue 2011-03-15 9:52

Hi!

- If you separate the channels, does the audio play ok then?
- Inversion of the other channel is controlled by the SM_DIFF bit in the MODE register.
- What is the bitrate of the file?
- Is it possible to upload the example file here or to our support e-mail address?

And another thing:
- What is your audio ground connection?
- Please verify that LEFT and RIGHT outputs rest cleanly at about 1.23 volts when there is no audio playing.

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

tek66tim
User
Posts: 2
Joined: Tue 2011-03-15 3:09

Re: Sine test OK mp3 noisy

Post by tek66tim » Wed 2011-03-16 15:50

Hi Panu,

Thanks for the reply. I found the problem. It was all me, I wrote a function to run the sine test and adjusted the volume down. When I tried to play an MP3 the chip was set to the low volume level. I reset the volume to a 0 level and it all works now.

I did notice something else though. I have several MP3 voice files in flash ram. I know my addressing is good. When I index to the file start location and play it, the chip make a kind of distorted screech or chirp, then it plays the rest of the file fine. I fixed this by sending some 0xAA bytes to the chip before sending the file. Now it works fine and sounds good.

Thanks again
Tim

User avatar
Panu
VLSI Staff. Currently on holiday.
Posts: 2736
Joined: Tue 2010-06-22 13:43

Re: Sine test OK mp3 noisy

Post by Panu » Thu 2011-03-17 15:08

This can happen if there is partial data from a previous MP3 file in the stream buffer. That's why we recommend clearing the stream buffer by sending 2048 endFillBytes (usually 0) into the stream buffer between songs...

I guess this is similar.

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

red_mamba
User
Posts: 10
Joined: Sun 2011-04-10 18:06

Re: Sine test OK mp3 noisy

Post by red_mamba » Sun 2011-04-10 20:43

Sorry for borrowing your topic :)

I have a similar problem.
I can do a sine test. But I can't get it to play MP3 or WAV or WMA files.
I use VS1053 decoder.

The funny thing is that I can't figure out why the DREQ puts out a square wave of about 12.5MHz,
the decoder is running from external oscillator of 12.288MHz.

What did I forgot to setup? I want the DREQ line to show me when I can send more data to the decoder.

thank you!

chrisallick
User
Posts: 3
Joined: Fri 2011-02-25 18:41

Re: Sine test OK mp3 noisy

Post by chrisallick » Tue 2011-04-12 18:49

I am having similar problems. I am using the 1053 and an atmel atmega328 at 8hz.

I have a 64 kbit mp3 file and I am setting the volume with the following:

int vol = 4;
SCIWrite( SCI_VOL, vol * 512 + vol * 2 );

I had the volume at 45, but the noise was high. Now that I have lowered it to 4 it's less, 0 is a bit better. However, there is a slight high pitch sound some noise. I'll check the stuff you mentioned, but everything seems to be working OK and this only started happening when I went from a breadboard setup to a circuit board.

Could it be the bitrate? Before I wasn't able to play mp3s over 128 kbit, so i assumed 64 would be safe.

- chris allick

User avatar
pasi
VLSI Staff
Posts: 1690
Joined: Thu 2010-07-15 16:04

Re: Sine test OK mp3 noisy

Post by pasi » Tue 2011-04-12 23:48

chrisallick wrote:there is a slight high pitch sound some noise.
If you use an external amplifier, you need a low-pass filter on the outputs or the modulator frequency can be aliased to audible range. (Also check that the stabilization RC circuit is connected to the outputs to prevent the output from becoming unstable with non-resistive loads.)

Check the RCAP capacitor ground connection. It should go directly to VS10XX AGND pins, not through vias. The RCAP capacitor is the single most important part of the design. (Also, connect the grounds together below the chip to prevent ground currents through the chip.) See the layout guidelines from the application notes for details.

Also check that you have enough bypass capacitors on all voltages.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Post Reply