Thank you very much for this code. Unfortunately it may not work for Fs I am interested in. For ex. if we assume F_PLL=96MHz (as in Teensy3.2) your code gives:
Fs=8000Hz {8, 375} -> MCLK = 96MHz*8/375 = 2,048,000Hz
Fs=11025Hz {73, 2483}->MCLK = 96MHz*73/2483 = 2,822,392Hz
As you can see both...