vs1063 clock

Designing hardware that uses VLSI Solution's devices as slave codecs such as an external MP3 decoder chip for a host microcontroller.
Post Reply
Rotla
User
Posts: 5
Joined: Sun 2011-07-17 16:04

vs1063 clock

Post by Rotla » Sun 2011-07-17 16:31

Hello,

What the reason to divide (f/2) the freqency, using 24.576MHz?

For example - if multiplyer is set to 2, this gives 49.152 MHz CPU clock, that is not out of spec (61.5MHz).

Only playback will be with x2 speed (because of a I2S/DAC clocking) - 96 instead of 48 if CPU will able to decode.

So the next question - what is %% of the CPU time for WAV and FLAC decoding?
(without any other job, like VU-metr or bass/treble/equlizer). For WAV I think this is not a problem (nothing to decode), but for the Flac ?
Last edited by Rotla on Tue 2011-07-19 12:10, edited 1 time in total.

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

Re: vs1063 clock

Post by Panu » Tue 2011-07-19 9:27

Hi!

> What the reason to divide (f/2) the freqency, using 24.576MHz?

It's because the VS1053/VS1063 audio hardware requires a fixed 12.288 MHz clock rate (I think the real max may be something like 15 MHz). If you use 24.576 MHz, you need to set the divide-by-2 to first get 12.288 Mhz for the system. Then you can get 49.152 Mhz by setting clock multiplier x4.

Only playback will be with x2 speed (because of a I2S/DAC clocking) - 96 instead of 48 if CPU will able to decode.
I think the audio hardware might fail if you feed 24MHz clock into it...
So the next question - what is %% of the CPU time for WAV and FLAC decoding?
WAV is very easy to decode, but FLAC uses more cycles. FLAC is more difficult to estimate, since the instantaneous bitrate of FLAC can vary quite a lot. The software is fast enough to handle 48kHz/24bit FLAC but I am not sure how much CPU margin there is left.

I'm not sure about the %%. Most of the codecs use quite little %%, for example MP3 some 30%, WAV maybe 10%, flac maybe 80%, and AAC uses everything you can give it, but I don't know if it matters much because in a generic player you need to prepare for the worst case anyway. But of course, if you're not doing a generic player but for some special application, your case might be different....

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

Rotla
User
Posts: 5
Joined: Sun 2011-07-17 16:04

Re: vs1063 clock

Post by Rotla » Tue 2011-07-19 12:14

Panu,

thank you for your answer.

Last question - what happens with 44.1kHz content? It will be resampled to 48?
Is it possible to use 11.289 MHz instead os 12.288, in order to obtain real 44.1kHz output (I2S) ?

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

Re: vs1063 clock

Post by Panu » Wed 2011-07-20 14:54

Hi!

1) Yes, and 2) Yes, I think so. Be sure to set CLOCKF register properly so the chip knows which XTAL it has.

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

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

Re: vs1063 clock

Post by pasi » Wed 2011-07-20 23:43

Rotla wrote:What the reason to divide (f/2) the freqency, using 24.576MHz?
Panu is correct. Going over 13MHz for the audio parts is above the test spec. Also 14.31818MHz should be fine (but not guaranteed). Anything above that is overclocking, but will work upto some frequency. I think we've run analog with 20MHz and had problems with 24MHz, but it may've been vs1011.
Rotla wrote:So the next question - what is %% of the CPU time for WAV and FLAC decoding?
Right, normal linear wav is easy, adpcm takes a bit more, without checking I would say 3.0x is enough for 16-bit stereo 48kHz FLAC. 24-bit (the lowest 8 bits are discarded after decoding) will take more, and you may have trouble feeding that much data.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Post Reply