[sdiy] Digital Audio CODEC config help

Richie Burnett rburnett at richieburnett.co.uk
Wed Aug 17 12:51:48 CEST 2022


> Yes Mode 8 should be fine for you.  I always use I2S and Mode 4 with the 
> STM version of the SAI interface, but LJ should be ok

Thanks Mike.  I was kind of heading in that direction but wanted to be sure.

Am I right in thinking that my choice of Mode 8 (or your Mode 4 choice) 
would let me run the CODEC at Fs=48kHz, 96kHz, or 192kHz, with a fixed MCLK 
frequency, just by re-programming the SAI on the micro?  (This would be 
useful because for some projects I might want 48kHz, others 96kHz, and I 
also dabble with ultrasonic stuff in my day job so being able to go up to 
192kHz would be nice.)

I'm trying to get my head around the difference between Mode 8 and Mode 9. 
It looks like Mode 9 is for a fixed sample rate ("Normal Speed") but lets 
you use different oversampling ratios for the MCLK?  ...and conversely Mode 
8 allows you to support different sample rates ("Quad Speed", "Double Speed" 
& "Normal Speed") but using a fixed MCLK frequency?  Am I understanding this 
correctly?

I know that a CODEC in slave mode can determine some information about the 
ratios of the different clocks by counting the number of cycles of the Bit 
Clock and Master Clock in one cycle of the Word Clock.  The configuration 
pins presumably provide the missing information it needs to operate as the 
user desires.

-Richie,



More information about the Synth-diy mailing list