This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TLV320DAC3100: Audio codec clock parameter caluclation

Part Number: TLV320DAC3100

Tool/software:

Dear Team,

We are using TLV320DAC3100IRHBR audio codec with our custom platform, we are using below mentioned kernel driver driver

URL: https://github.com/nxp-imx/linux-imx/blob/lf-6.12.y/sound/soc/codecs/tlv320aic31xx.c

The above mentioned kernel driver will only supports some of the clock rates under aic31xx_divs[] structure, we want to support other clock rates (for example 6M, 12M, 26M, etc), for these custom clocks kindly provide formula to calculate below mentioned parameters

struct aic31xx_rate_divs {
        u32 mclk_p;
        u32 rate;
        u8 pll_j;
        u16 pll_d;
        u16 dosr;
        u8 ndac;
        u8 mdac;
        u8 aosr;
        u8 nadc;
        u8 madc;
};

Thanks,
Nikhil K

  • Hi Nikhil,

    I would recommend you read section 6.3.11 of the DAC3100 datasheet, this explains how the clock tree works. I am happy to help more or double check your math for each clock rate you want to support.

    The parameters here:

    mclk_p = MCLK rate
    rate = sample rate (FSYNC rate)
    pll_j = J of J.D
    pll_d = D of J.D, needs to be 4 digits (if J.D is 5.2, then D=2000)
    dosr = should be 128 (DAC OSR)
    aosr = should be 128 (ADC OSR)

    Best,
    Mir