[sdiy] Digital Audio CODEC config help

Mike Bryant mbryant at futurehorizons.com
Wed Aug 17 17:19:49 CEST 2022


> 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,

In theory yes.  MCLK should be 24.576MHz and you just alter FS to suit. 

However, I recall some AKM chips had issues with running at 512x clock for 48kHz sampling, though I can't remember if it is this particular chip as I always only use 96kHz.


> I also dabble with ultrasonic stuff in my day job so being able to go up to 192kHz would be nice

You might get the DAC to do this, sort of, using de-emphasis mode 1, but the ADC will always kill anything over 20kHz I believe.  You'll need a different chip for that, probably an Analog Devices one.




-----Original Message-----
From: Synth-diy [mailto:synth-diy-bounces at synth-diy.org] On Behalf Of Richie Burnett
Sent: 17 August 2022 11:52
To: synth-diy mailing list
Subject: Re: [sdiy] Digital Audio CODEC config help

> 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,

_______________________________________________
Synth-diy mailing list
Synth-diy at synth-diy.org
http://synth-diy.org/mailman/listinfo/synth-diy
Selling or trading? Use marketplace at synth-diy.org




More information about the Synth-diy mailing list