I'm using VS1063a in a project with IMA-ADPCMA and AEC (echo cancel).
As this is a streamed application I need to adjust play speed to avoid buffer over/under -run.
According to the specification there is a play rate adjust register at 0x1e07:1e08.
Trying this register, I can't adjust it a small amount. Only when I write big enough number at play rate adjust it is affected and sounds like donald duck.
The lowest affected value is 0x7a11d (7 is high 16-bits).
I have tried to also update AUDATA after play speed adjust (as in example for DS1053), but no luck.
Writing 0x60 to AIADDR has also been mentioned, but it results in no sound at all. This register holds the plugin pointer so it should probably stay at 0x50 as specified.
I would appreciate any help or pointer in the right direction.
Used code to change speed adjust register:
Code: Select all
#define SPI_AUDATA 0x05 #define SPI_WRAM 0x06 #define SPI_WRAMADDR 0x07 #define AUDATA_VAL 0x1f40 //Sampling 8K, mono audio u16 parTab[ RSPAR_TABMAX + 1 ]; VS1003B_CMD_Write(SPI_WRAMADDR, 0x1e07); VS1003B_CMD_Write(SPI_WRAM, parTab[ RSPAR_SPEED_ADJ]); VS1003B_CMD_Write(SPI_WRAMADDR, 0x1e08); VS1003B_CMD_Write(SPI_WRAM, parTab[ RSPAR_SPEED_ADJ_HI]); VS1003B_CMD_Write(SPI_AUDATA, AUDATA_VAL);