Audio pass through

Writing software for systems that use VLSI Solution's devices as slave codecs to a host microcontroller.
Post Reply
lucap87
User
Posts: 1
Joined: Tue 2018-06-26 9:09
Contact:

Audio pass through

Post by lucap87 » Tue 2018-07-03 15:29

I designed some electronic boards with VLSI products and microcontrollers. More often I developed software for those microcontrollers to control the VS1063 products, especially for the VS1063.

Currently, I encountered a limitation in a new project, therefore, I would ask help.

I have a project where the user can press a button to record the audio input into an SD card (in MP3 or Ogg Vorbis formats). During the recording, the operator can listen to an audio feedback of the input by using a headphone attached to the audio output of the VS1063. In this case, I can interact with SCI_VOL to adjust the output.

Recently, a new user asked to be able to listen to the input sound even when the device is not recording (as well as the encoder process is turned off).

A workaround that I found consists in starting the encoder without recording the stream into the SD card. Then, as soon as the user presses the REC button I'll save the stream.
But, in this situation, I have an issue because I cannot save byte as is into SD card. I have to properly recognize the start of a new audio frame and since it is a CPU intensive task I cannot do it easily.
My experimented alternative consists in turning off the current encoding, restarting the VS1063, loading the patch, and starting a new fresh recording. However, the latter creates an unwanted delay of about a second that is not acceptable for the customer.

Do you have any other solution to hear the input sound without starting the encoding? Or do you have a suggestion to sync audio frames?

Thanks, Luca

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

Re: Audio pass through

Post by pasi » Tue 2018-07-03 16:27

See ADMixer from vs1063a datasheet.

Notice that if you stop and restart the ADC between hardware resets, the channels may get swapped. The vs1063a patches package has a workaround for this for the encoding mode, but you should probably provide a hardware reset after ending encoding so that ADMixer can be used without issues. (Or use the mono down-mix mode.)

Also, once turned on, don't turn ADMixer off, just adjust the gain for enable/disable. (Unless you use the mono down-mix mode.)
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Post Reply