VS1053 recording example

Writing software for systems that use VLSI Solution's devices as slave codecs to a host microcontroller.
User avatar
pasi
VLSI Staff
Posts: 1552
Joined: Thu 2010-07-15 16:04

Re: VS1053 recording example

Post by pasi » Wed 2017-01-18 17:04

The files you included are not valid mp3 files, so either there is too much data or too little.

One test you could make is to record for a certain period, then check the file size and compare to the amount of data you should have according to the duration and bitrate. It will tell you if you are saving too many or too few bytes.

What is your storage? How fast is it to write data to it? How well does the file IO library handle writes?
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

lauba1
User
Posts: 17
Joined: Wed 2017-01-11 9:26

Re: VS1053 recording example

Post by lauba1 » Thu 2017-01-19 11:03

The problem resolved;)
here is a bug:

Code: Select all

 WriteSci(SCI_RECMODE, RM_63_UART_TX | RM_63_FORMAT_MP3 | RM_63_ADC_MODE_RIGHT); /*SCI_AICTRL3 - encoding format - mp3, ADC set to right channel*/
RM_63_UART_TX -> I forgot that I got this for test;)

Thanks for help!;)

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

Re: VS1053 recording example

Post by pasi » Thu 2017-01-19 11:57

Great that you noticed it. If you have UART output enabled but still read words through SCI, you're splitting the data into two. ;)
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

prawit
User
Posts: 3
Joined: Sun 2019-01-13 18:13

Re: VS1053 recording example

Post by prawit » Mon 2019-01-14 15:25

Hi ALL

What are different between record by using Plugin " http://www.vlsi.fi/fileadmin/software/V ... cm-010.zip" and read directly from 0xC01E and 0xC01F for VS1003.

Regards
Prawit

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

Re: VS1053 recording example

Post by pasi » Mon 2019-01-14 16:32

When you read directly from the ADC registers, it is very hard to synchronize to the actual rate the data is update in those registers. You may read the same data twice or not at all, both of which cause the audio data to be "corrupted" with aliasing/distortion.

In the vs10xx encoding mode (or an encoding plugin) you won't have this issue, you know how much data is available, so you get all of the data and nothing but the data (if you can read it quickly enough so that the data buffers do not overflow).
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

prawit
User
Posts: 3
Joined: Sun 2019-01-13 18:13

Re: VS1053 recording example

Post by prawit » Tue 2019-01-15 10:58

Thank for replying
regards
Prawit chumchu

Post Reply