Post Go back to editing

ADAU1452 Linux driver

Category: Software

Hello!

I would highly appreciated if someone could refer to an ADAU1452 driver for linux? Maybe exist a driver for another similar AD device which can be used as a reference?

Thank you in advance!

Best regards,

Roman

Thread Notes

  • Hello Roman,

    My first inclination as the manager for this space on the forum was to move your question over to the Linux space. However, I see the manager of that space moved it here. I am not a Linux expert but I can give you an answer. No, there is no driver for the ADAU1452. The big reason is that it is fully programmable with custom programs so all the addresses of objects like volume controls and mutes and things a Linux driver needs to do will always be different in every user's program. So a custom driver will be needed. 

    There are two parts that have drivers and also have a SigmaDSP core that you can use as an example. The ADAU1701 is the first one to mention. The ADAU1761 is the other. You can find them here: Linux Drivers [Analog Devices Wiki]

    What makes these two parts able to have a driver is because they both have converters that have mutes and volume controls in fixed registers. The ADAU1761 actually has an extensive analog front end and back end that has mixers and several volume controls all of which are always available as fixed registers. They both have a sigmaDSP core so anything you want to control within the DSP program via the driver would have to be custom programed. The ADAU1452 has no converters. I suggest in your design you should use the AD1938 codec to interface with the ADAU1452. All of our eval boards will use this codec and there is a driver for the codec in the link I gave you. By using the AD1938 codec with the DSP will give you the basic control of the audio and you might not have to do too much custom programming. Obviously, it depends on what you want to do. 

    Let us know if you need help with implementing your design.

    Dave T

  • Thank you, Dave!

    I will look at drivers for ADAU17x1 as you have suggested. 

    Best regard,

    Roman

  • Hi Dave!

    What is the percentage of similarity between ADAU1452 and ADAU1761? 

    const struct snd_soc_dai_ops adau17x1_dai_ops = {

    .hw_params = adau17x1_hw_params,
    .set_sysclk = adau17x1_set_dai_sysclk,
    .set_fmt = adau17x1_set_dai_fmt,
    .set_pll = adau17x1_set_dai_pll,
    .set_tdm_slot = adau17x1_set_dai_tdm_slot,
    .startup = adau17x1_startup,
    };

    Assuming the structure above from adau17x1.c will be used in probe of adau1452. Shall I add the same logic used in adau17x1_set_dai_pll to the ADAU1452? Or it is enough to pass commands generated by Sigma Strudio where we write

    SIGMA_WRITE_REGISTER_BLOCK( DEVICE_ADDR_IC_1, REG_PLL_ENABLE_IC_1_ADDR, REG_PLL_ENABLE_IC_1_BYTE, R8_PLL_ENABLE_IC_1_Default );
    SIGMA_WRITE_REGISTER_BLOCK( DEVICE_ADDR_IC_1, REG_PLL_CTRL0_IC_1_ADDR, REG_PLL_CTRL0_IC_1_BYTE, R9_PLL_CTRL0_IC_1_Default );
    SIGMA_WRITE_REGISTER_BLOCK( DEVICE_ADDR_IC_1, REG_PLL_CTRL1_IC_1_ADDR, REG_PLL_CTRL1_IC_1_BYTE, R10_PLL_CTRL1_IC_1_Default );
    SIGMA_WRITE_REGISTER_BLOCK( DEVICE_ADDR_IC_1, REG_PLL_CLK_SRC_IC_1_ADDR, REG_PLL_CLK_SRC_IC_1_BYTE, R11_PLL_CLK_SRC_IC_1_Default );
    SIGMA_WRITE_REGISTER_BLOCK( DEVICE_ADDR_IC_1, REG_MCLK_OUT_IC_1_ADDR, REG_MCLK_OUT_IC_1_BYTE, R12_MCLK_OUT_IC_1_Default );
    SIGMA_WRITE_REGISTER_BLOCK( DEVICE_ADDR_IC_1, REG_PLL_ENABLE_IC_1_ADDR, REG_PLL_ENABLE_IC_1_BYTE, R13_PLL_ENABLE_IC_1_Default );
    /* Register Default - IC 1.PLL_ENABLE */
    ADI_REG_TYPE R8_PLL_ENABLE_IC_1_Default[REG_PLL_ENABLE_IC_1_BYTE] = {
    0x00, 0x00
    };

    /* Register Default - IC 1.PLL_CTRL0 Register */
    ADI_REG_TYPE R9_PLL_CTRL0_IC_1_Default[REG_PLL_CTRL0_IC_1_BYTE] = {
    0x00, 0x60
    };

    /* Register Default - IC 1.PLL_CTRL1 Register */
    ADI_REG_TYPE R10_PLL_CTRL1_IC_1_Default[REG_PLL_CTRL1_IC_1_BYTE] = {
    0x00, 0x02
    };

    /* Register Default - IC 1.PLL_CLK_SRC Register */
    ADI_REG_TYPE R11_PLL_CLK_SRC_IC_1_Default[REG_PLL_CLK_SRC_IC_1_BYTE] = {
    0x00, 0x01
    };

    /* Register Default - IC 1.MCLK_OUT Register */
    ADI_REG_TYPE R12_MCLK_OUT_IC_1_Default[REG_MCLK_OUT_IC_1_BYTE] = {
    0x00, 0x05
    };
    Best regards,
    Roman