vs1063a mp3 recorder

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

Re: vs1063a mp3 recorder

Post by pasi » Wed 2017-05-03 13:40

vernon wrote:I have play REC00002.mp3 on PC, it's OK, but I send REC00002.mp3 to vs1063a and does not make any sound output.
What do you mean by it's OK? What does the REC00002.mp3 you play on the PC contain? The one you attached only contains low-level noise.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

vernon
User
Posts: 9
Joined: Tue 2017-05-02 10:44

Re: vs1063a mp3 recorder

Post by vernon » Wed 2017-05-03 13:50

sorry for my unclear description, I mean REC00002.mp3 can play normally on PC or mobile mobile phone, but I send it to vs1063a, vs1063a didn't make any sound output. Is there somthing is wrong in my driver code?

User avatar
Henrik
VLSI Staff
Posts: 1041
Joined: Tue 2010-06-22 14:10

Re: vs1063a mp3 recorder

Post by Henrik » Wed 2017-05-03 13:59

Hello Vernon,

As Pasi said, REC00002.mp3 contains only very low-volume background hum (of a room?), and even that in only the left channel, so it may be difficult to hear if the volume level is low. But the good news is that now the file is technically correct: my analyzer software finds no framing or bit error issues! The first frame is 40 kbit/s, then all frames are 32 kbit/s.

Left channel top level is at -37 dB of maximum level, right channel top value is -71 dB, so not much to hear there:
Rec00002_Silence.png
Rec00002_Silence.png (53.79 KiB) Viewed 343 times
To test VS1063a playback, please try playing back a normal music MP3 file first. Then try making a recording where someone says something, or with any other content than silence.

And, as Pasi suggested, best to check for DREQ outside a possibly locking function, so your code could read like this:

Code: Select all

if (!(playMode & PAR_PLAY_MODE_PAUSE_ENA) && vs10xx_dreq_high()) {
  int t = min(SDI_MAX_TRANSFER_SIZE, bytesInBuffer);

  vs10xx_wr_buff(bufP, t);

  bufP += t;
  bytesInBuffer -= t;
  pos += t;
}
You are really close now!

Kind regards,
- Henrik
Good signatures never die. They just fade away.

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

Re: vs1063a mp3 recorder

Post by pasi » Wed 2017-05-03 14:03

Where are you checking the state of DREQ? Are you doing that in vs10xx_wr_buff() ?

It might be better to (also) check DREQ in the main loop so you can perform some of the other functions when DREQ is low and you can't send data.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

vernon
User
Posts: 9
Joined: Tue 2017-05-02 10:44

Re: vs1063a mp3 recorder

Post by vernon » Thu 2017-05-04 4:48

Hello Pasi % Henrik,
I have checked the state of dreq, but it also doesn't work. The print info seems vs1063s never decode anything. following is the printf info

printf("\r%ldKiB "
"%1ds %1.1f"
"kb/s %dHz %s %s"
" %04x ",
pos/1024,
vs10xx_rd_reg(SCI_DECODE_TIME),
hehtoBitsPerSec * 0.1,
sampleRate & 0xFFFE, (sampleRate & 1) ? "stereo" : "mono",
afName[audioFormat1], h1
);

0KiB 0s 0.0kb/s 0Hz mono unknown 0000
4KiB 0s 0.0kb/s 0Hz mono unknown 0000
8KiB 0s 0.0kb/s 0Hz mono unknown 0000
12KiB 0s 0.0kb/s 0Hz mono unknown 0000
16KiB 0s 0.0kb/s 0Hz mono unknown 0000
20KiB 0s 0.0kb/s 0Hz mono unknown 0000
24KiB 0s 0.0kb/s 0Hz mono unknown 0000
28KiB 0s 0.0kb/s 0Hz mono unknown 0000
32KiB 0s 0.0kb/s 0Hz mono unknown 0000
36KiB 0s 0.0kb/s 0Hz mono unknown 0000
40KiB 0s 0.0kb/s 0Hz mono unknown 0000
44KiB 0s 0.0kb/s 0Hz mono unknown 0000
48KiB 0s 0.0kb/s 0Hz mono unknown 0000
52KiB 0s 0.0kb/s 0Hz mono unknown 0000
56KiB 0s 0.0kb/s 0Hz mono unknown 0000
60KiB 0s 0.0kb/s 0Hz mono unknown 0000
64KiB 0s 0.0kb/s 0Hz mono unknown 0000
68KiB 0s 0.0kb/s 0Hz mono unknown 0000
72KiB 0s 0.0kb/s 0Hz mono unknown 0000
76KiB 0s 0.0kb/s 0Hz mono unknown 0000
80KiB 0s 0.0kb/s 0Hz mono unknown 0000
84KiB 0s 0.0kb/s 0Hz mono unknown 0000
88KiB 0s 0.0kb/s 0Hz mono unknown 0000
92KiB 0s 0.0kb/s 0Hz mono unknown 0000
96KiB 0s 0.0kb/s 0Hz mono unknown 0000
100KiB 0s 0.0kb/s 0Hz mono unknown 0000

vernon
User
Posts: 9
Joined: Tue 2017-05-02 10:44

Re: vs1063a mp3 recorder

Post by vernon » Thu 2017-05-04 5:20

Hello Pasi & Henrik,
Please ignore my question just now posted, my problem is solved now, thanks a lot for your technical support and specifically reply.

User avatar
Henrik
VLSI Staff
Posts: 1041
Joined: Tue 2010-06-22 14:10

Re: vs1063a mp3 recorder

Post by Henrik » Thu 2017-05-04 7:42

Hello Vernon!

Great to hear you got your system working!

Kind regards,
- Henrik
Good signatures never die. They just fade away.

Post Reply

Who is online

Users browsing this forum: No registered users