Electrical – Generating i2s Clock Signals

audioclocki2sraspberry pi

I am trying to design a Pi Hat to integrate my Raspberry Pi 3 for use as an automotive head unit. I have a Texas Instruments TAS6424 and some supporting components, and am trying to design a DAC PCB to drive the speakers.

Ignoring power issues etc, the issue I've run into is that the Raspberry Pi cannot output the mclk signal required by the TAS6424 chip's digital serial audio interface. The DAC operates in slave mode exclusively, while the Pi can operate in either master or slave mode on both the LRCLK and BCLK signals.

I've found the following devices that may be able to generate an appropriate signal.

Will this work to generate an external clock? Can the Pi generate a BCLK signal from a LRCLK? Vice versa? How much kernel modding will it take to properly control the above devices in order to switch sample rates at runtime and create a working ASoC device?

Developing something like this would allow one to interface the Pi with DACs that require a master clock signal, like most hifi i2s equipment.

Best Answer

For a delta sigma converter, MCLK is actually the critical one (It feeds the modulator), with the other two derived from it.

The common options are to use a PLL to derive this from LRCLK or (better) BCLK, or derive all three from a rock and divider chain (This usually gives the best quality, but you will need two rocks to accomodate the 44.1 and 48kHz derived rates unless you use a PLL like the 1708), in this case you run both interfaces in slave mode.

The PLL1708 plus a rock will get you an MCLK for all three possible rates, but you then need to divide this down to generate the serial and frame clocks, and you will need to run both sides of the interface in slave mode. Note that the LS294 is a 5V part!