Encoding problem - no data (VS1053b)

Writing software that inputs and/or outputs audio and performs DSP algorithms such as filters, new codecs or audio effects.
Mister110
User
Posts: 9
Joined: Mon 2012-03-26 12:57

Re: Encoding problem - no data (VS1053b)

Post by Mister110 » Tue 2012-04-10 11:01

pasi wrote:
Mister110 wrote:I can read and write these 699 words so I haven't any problem reading AICTRL0 register.
I mean do the VU meter values change in AICTRL0?

And you do get the line /mic input signal played at the left+right outputs?
Hello,

I'm sorry, you wrote AICTRL0 and I read SCI_HDAT1. So, for your first question about AICTRL0, I always read "0" during recording.

To see if there's any problem with this register or if I have a problem with my write/read VSregister function, I tried a "sine test":

Code: Select all

[...]

VS_writeRegister(SCI_AUDATA, 0xAC45);	//Fs = 44'101Hz
VS_writeRegister(SCI_AICTRL0, 0x0500);	//Left channel (861Hz)
VS_writeRegister(SCI_AICTRL1, 0x0500);	//Right channel (861Hz)

VS_writeRegister(SCI_AIADDR, 0x4020);	//start test

[...]
But there isn't any problem. The test starts and I can hear my 861Hz sinus. When I read SCI_AICTRL0 or SCI_AICTRL1, I find 0x0500 so there isn't any problem with my write/read VS register function.

For your second question, I can hear left and right outputs when I set line/mic. More noise is present on left channel but input signal played at both outputs.

Mister110
User
Posts: 9
Joined: Mon 2012-03-26 12:57

Re: Encoding problem - no data (VS1053b)

Post by Mister110 » Thu 2012-04-12 12:07

Hi everybody,

With my problem not resolved, I tried to check if there's a problem with my VS component. So I created a second prototype of my card but the result is unfortunately the same.

Conclusion? It's probably a software problem. I don't know where find the error in my code (and you told me that there is apparently no problem with it), so the next thing to do is to restart all the procedure and try to do the exemple wich is proposed in the PDF.

Mister110
User
Posts: 9
Joined: Mon 2012-03-26 12:57

Re: Encoding problem - no data (VS1053b)

Post by Mister110 » Wed 2012-04-18 11:36

Hello,

Encoding problem [solved]

After several weeks of research, I found a solution of my encoding problem. It was something software outside the code I wrote here. Something wrong with my state machine and when I read SCI_HDAT1 to see how many words were waiting in my buffer, it always answered '0'.

Now, I can record my voice and create an Ogg file but I have an other problem...

Header sequence problem

On VLSI's FAQ, I saw this indication about header sequence:

"The important headers can be detected as follows: When you start the VS1053b Ogg Vorbis Encoder, receive and store data until you run into the following bytes (XX means no matter): 0x4f 0x67 0x67 0x53 0x00 0x00 XX XX XX XX XX XX XX XX XX XX XX XX 03 00 00 00. This data is the first bytes that is NOT a part of the initial headers but of actual audio data."

But when I'm running until this sequence, I noticed that I can hear the beginning of audio data (about 100 or 200 milliseconds).

A few months earlier, I fixed this "bug" in running until an other sequence: 0x4f 0x67 0x67 0x53 0x00 0x00 XX XX XX XX XX XX XX XX XX XX XX XX 02 00 00 00. With this one, I correctly send header and I don't hear any audio data if I don't want to.

With my new recorded files (and only for these ones), I can't hear anything if I send this last sequence. I have to send the first one (with '03' in position 18), but if I do it, I have the same initial problem: I hear audio data.

- What is exactly the end of header's sequence?
- How can I solve this audio problem?


I thank you for all your answers about my first problem and I thank you again for all about my new problem.

Note: It would be easier to play audio file from beginning to end but I have to play the audio file from a specific location. It's why I have to send the header first, then jump into the file.

cariplex
User
Posts: 3
Joined: Thu 2015-09-03 0:44

Re: Encoding problem - no data (VS1053b)

Post by cariplex » Thu 2015-09-03 23:00

Hi . I'm having the same exact issue you were having . Can you please tell me what was the issue and how did you solve it . I've been trying for 3 weeks trying to figure it out. Your help is greatly appreciated .

Edzelf
User
Posts: 2
Joined: Wed 2016-05-11 11:45

Re: Encoding problem - no data (VS1053b)

Post by Edzelf » Wed 2016-05-11 11:51

cariplex,

When decoding stops after 699 words, there is something wrong with the GPIO.
Your device is probably a Chinese board that has floating GPIO.
Set DDR to 3 and ODATA to 0 first when you configure the VS1053:

Code: Select all

  wram_write ( 0xC017, 3 ) ;                            // GPIO DDR = 3
  wram_write ( 0xC019, 0 ) ;                            // GPIO ODATA = 0

Post Reply

Who is online

Users browsing this forum: No registered users