I don't understand how the SGTL5000 sets it's sample clock. There are 2 bits in a register that specify 32k/44k1/48k/96k sampling. This clearly is a map to a prescaler for a clock generator. The problem is: how does one set the sample rate to (say) 22050 or 8000?
One solution would be to select a sample rate that is a multiple of the desired, then duplicate or interpolate samples to match the sample rate setting on the SGTL5000 (when playing). For recording, the samples could be averaged to reduce the sample rate.
However this requires work on the MCU. You can't just read a block from a file and DMA it to the I2S port.
Is there are solution to this? I am using a K20 MCU.