when I set up my device with vs1063a at codec mode, the sample rate of encoding is not right, the decoding is all right.
I want to set it to 16KHz, but never effact, it seems was fixed to 8KHz.
here's my setting:
vs1063_write_reg(SCI_AICTRL3, 0x8013);//PCM mode,left chanel
vs1063_write_reg(SCI_MODE, vs1053_read_reg(SCI_MODE) | SM_RESET | SM_ADPCM | SM_LINE_IN);
Designing hardware that uses VLSI Solution's devices as slave codecs such as an external MP3 decoder chip for a host microcontroller.
2 posts • Page 1 of 1
The encoding rate is always taken from AICTRL0, so put 16000 there to get 16kHz. (Might sound obvious after you read the explanation below.)kanprin wrote: I want to set it to 16KHz, but never effact, it seems was fixed to 8KHz.
The codec mode playback rate is taken from the wav header unless headers are disabled using the appropriate aictrl3 bit. The playback rate detected from the wave header is independent from the encoding rate, because by the time it is known (after you have sent the wave header), the encoding has already been initialized and the rate can not be changed anymore.
20110930: it seems in codec mode without headers the playback rate is actually the ADC rate (48/24/12kHz), not the requested rate. Workaround: wait until DREQ rises, then write the desired playback rate to SCI_AUDATA. (See also the vs1063a-patches package for mp3 encoding fix.)
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook