Page 1 of 1

Multichannel audio board clock requirements

Posted: Wed May 09, 2018 3:25 pm
by xlordofpainx
My question is is it possible to have the xmos xcore-200 MC audio board take 49.152Mhz to MCLK_XCORE, AUDIO_MCLK, MCLK_SPDIF? The Hardware manual of the board just states that there is a need for 24Mhz input on the M_CLK, but then on the clocking sheet there are 2 other clocks which can be used 24.576 MHz (FSEL high) or 22.5792MHz (FSEL low). 24Mhz is needed for USB applications so I have kept that, But I have replaced the circuit with a single oscillator which is providing 24 to the XMOS and 42.152 to another chip (also has one more currently unused programmable out).

Re: Multichannel audio board clock requirements

Posted: Thu May 10, 2018 1:28 pm
by infiniteimprobability
49.152MHz MCLK is no problem. In fact, you can generate it from the board without any HW mods.

Change the following in customdefines.h:
from:

Code: Select all

#define MCLK_441           (512*44100)   /* 44.1, 88.2 etc */
#define MCLK_48            (512*48000)   /* 48, 96 etc */
to:

Code: Select all

#define MCLK_441           (1024*44100)   /* 44.1, 88.2 etc */
#define MCLK_48            (1024*48000)   /* 48, 96 etc */

Add the following flag to the Makefile:

Code: Select all

-DUSE_FRACTIONAL_N=1
What this does is switch over to the CS2100, configure it, and supply a 1MHz clock from an xcore port to the input of the CS2100 which then multiplies it up. Checkout audiohw.xc for the relevant setup, guarded with USE_FRACTIONAL_N conditional compilation.

Re: Multichannel audio board clock requirements

Posted: Mon May 14, 2018 8:27 am
by xlordofpainx
Great I will attempt this. Thaanks. How about when i am using this setup
Image

Do i just go with the makefile option as there is no CS2100.

Re: Multichannel audio board clock requirements

Posted: Mon May 14, 2018 9:39 am
by infiniteimprobability
Ah OK - so it's just literally a change in MCLK. So all you need to change is:

1) Relevant I2C setup for your device to get the MCLK set

2) Tell the software that the MCLK is different
#define MCLK_441 (1024*44100) /* 44.1, 88.2 etc */
#define MCLK_48 (1024*48000) /* 48, 96 etc */

Re: Multichannel audio board clock requirements

Posted: Mon May 14, 2018 9:49 am
by xlordofpainx
Awesome. Amazing help again, thanks