Page 1 of 1

Audio source switching (VS1053)

Posted: Thu 2016-08-18 15:08
by misolabs
Hi,
I am designing an audio playback system where only one two sources will be active at any time, either mp3 playback through the VS1053 or the output from a bluetooth audio receiver. I am currently looking for the simplest setup for mixing these signals that will not deteriorate audio quality too much and I have a couple of questions:
- Could I use the line1 input on the VS1053b and control which source is active by routing signals inside the VS1053 through a MCU? I am already feeding the mp3 stream through an SPI connection. This would be simplest solution because it would not require any changes to my hardware setup.
- Alternatively, what kind of switching circuitry would you put between the two analog outputs and the (class D) amp input? Would an analog switch such as https://www.maximintegrated.com/en/MAX4992 do the job?

Thank you for your support,
Best Regards,
Jerome

Re: Audio source switching (VS1053)

Posted: Fri 2016-08-19 11:04
by pasi
The vs1053b ADMixer plugin ( http://www.vlsi.fi/en/support/software/ ... ugins.html ) can be used to mix the playback with signal from the analog input(s).

Alternatively, you can initialize the encoding mode with a suitable samplerate to route the signal from analog input(s) to the analog outputs. (You don't need to read out the encoded data, so you don't even need the small patch, simply write AICTRL0 and start encoding by setting SM_ENCODE and SM_SOFT_RESET and other applicable bits in SCI_MODE.)

Re: Audio source switching (VS1053)

Posted: Mon 2016-08-22 9:02
by misolabs
Great, thanks a lot! I've been using the VS1053b for years and I still keep discovering new features and possibilities. I'll give the ADMixer plugin a try first.

Have a great day
Jerome

Re: Audio source switching (VS1053)

Posted: Thu 2017-11-09 9:42
by misolabs
Hi,
I finally have time to try out your suggestions. Just a quick question: Which bit do you mean by SM_ENCODE? I cannot find any mention of it in the reference manual. Did you mean SM_ADPCM by any chance?

Have a great day,
Jerome

Re: Audio source switching (VS1053)

Posted: Thu 2017-11-09 11:44
by pasi
Yes, SM_ENCODE is the new name for SM_ADPCM, because since vs1063 multiple other encoding formats can be used. (vs1053b can already encode both IMA ADPCM and raw PCM.)