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.

TLV320DAC3203: SW driver and Volume control

Part Number: TLV320DAC3203

Hi TI team

When checking for the Linux driver of TLV320DAC3203, I found that can use TLV320AIC32x4 driver, since it is compatible with.
For more details, I'd like to check how exactly it is compatible, and what need to do in SW side to use the new part in an embedded Linux board. I'm using it with NXP iMX8 and Yocto.

Secondly, is it possible to implement SW volume control with this TLV320DAC3203?

Thanks.

  • Volume registers are slightly different. 

    Left DAC Channel Digital Volume Control Register: P0x00R0x41

    Right DAC Channel Digital Volume Control Register: P0x00R0x42

    INL to HPL Volume Control Register: P0x01R0x16

    INR to HPR Volume Control Register: P0x01R0x17

    In tlv320aic32x4.c, there's the examples

    static DECLARE_TLV_DB_SCALE(tlv_step_0_5, 0, 50, 0);
    /* -63.5dB min, 0.5dB steps */
    static DECLARE_TLV_DB_SCALE(tlv_pcm, -6350, 50, 0);
    /* -6dB min, 1dB steps */
    static DECLARE_TLV_DB_SCALE(tlv_driver_gain, -600, 100, 0);
    /* -12dB min, 0.5dB steps */
    static DECLARE_TLV_DB_SCALE(tlv_adc_vol, -1200, 50, 0);
    /* -6dB min, 1dB steps */
    static DECLARE_TLV_DB_SCALE(tlv_tas_driver_gain, -5850, 50, 0);
    static DECLARE_TLV_DB_SCALE(tlv_amp_vol, 0, 600, 1);

    SOC_DOUBLE_R_S_TLV("PCM Playback Volume", AIC32X4_LDACVOL,
    			AIC32X4_RDACVOL, 0, -0x7f, 0x30, 7, 0, tlv_pcm),
    SOC_DOUBLE_R_S_TLV("HP Driver Gain Volume", AIC32X4_HPLGAIN,
    			AIC32X4_HPRGAIN, 0, -0x6, 0x1d, 5, 0,
    			tlv_driver_gain),
    	SOC_DOUBLE_R_S_TLV("LO Driver Gain Volume", AIC32X4_LOLGAIN,
    			AIC32X4_LORGAIN, 0, -0x6, 0x1d, 5, 0,
    			tlv_driver_gain),
    SOC_DOUBLE_R_S_TLV("ADC Level Volume", AIC32X4_LADCVOL,
    			AIC32X4_RADCVOL, 0, -0x18, 0x28, 6, 0, tlv_adc_vol),
    	SOC_DOUBLE_R_TLV("PGA Level Volume", AIC32X4_LMICPGAVOL,
    			AIC32X4_RMICPGAVOL, 0, 0x5f, 0, tlv_step_0_5),
    Add similar Kcontrol into the code.