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: Dynamic volume control on the fly with digital mics

Part Number: TLV320DAC3203


Hy dear people,

I have again a silly question to which I cannot find an Answer.

How  can I dynamically control the output volume on a TLV320DAC3203 (HPL HPR) with digital mics as input?

The datasheet says:
"The level of the DAC signal can be controlled using the digital volume control of the DAC. To control the output-voltage swing of headphone drivers, the digital volume control provides a range of –6.0dB to +29.0dB (1) in steps of 1dB. These level controls are not meant to be used as dynamic volume control, but more to set output levels during initial device configuration. Refer to for recommendations for using headphone volume control for achieving 0dB gain through the DAC channel with various configurations."

But I cannot see those recommendations anywhere.

I also see, there is a digital volume control for dig mics, but as far as I understand, this applies to the ADC, which I will not be using.

Can you please help me with this?

Best regards!

Gustavo

  • Hi Gustavo,

    The data sheet recommendation refers to use the DAC gain configuration, rather than the headphone amplifier gain. I've highlighted these gain control blocks on the diagram below:

    You should use Page 0 Register 0x41 and 0x42 for each of these gain controls: www.ti.com/.../slau434a.pdf

    Best regards,
    -Ivan Salazar
    Applications Engineer

  • Hi Ivan,
    Thanks for pointing me to the registers of the HP drivers gain.

    Just to be sure: I need to change the volume of the output on the fly. This will be a music instrument, so the player should be able to control the volume in real time. No doubt, you point me into the good direction, but still, I still read on the Applications Reference Guide: 

    "To control the output-voltage swing of headphone drivers, the digital volume control provides a range of –6.0dB to +29.0dB (1) in steps of 1dB. These level controls are not meant to be used as dynamic volume control, but more to set output levels during initial device configuration. Refer to for recommendations for using headphone volume control for achieving 0dB gain through the DAC channel with various configurations."

     Will this real-time-changes be possible?
    And can I implement soft-stepping on this real time situation? On
    Page 1, Register 20, Bits D7-D6 

    Last question, is there a script I can follow as example of the necessary commands to send to the DAC3203, once the system is running?

    Best regards,

    Gustavo

  • Hi Gustavo,

    Thanks for your comments, I actually noticed a couple things I have to edit on my previous post, and adding further details on your questions below:

    • Based on the description, you should actually use the driver gain as fixed value, and user the DAC filter for dynamic adjustment. (Opposite as my initial description, sorry about that confusion)
    • DAC gain offers a couple advantageous features:
      • Soft-stepping can be used to gradually adjust the gain, even when setting new gain value with a considerable difference. This feature is controlled by Page 0 Register 63. Page 1 Register 20 is a different feature.
      • DAC volume for Left and Right channels can be tied together, this way you can control the gain of both channels with a single register write. This is controlled by Page 0 Register 64.

    I'll make edits on the previous post to show the correct information.

    Best regards,
    -Ivan Salazar
    Applications Engineer

  • Hi Ivan,

    Thanks for clarify this.

    I am not confident on which commands I need to make those changes on the fly, when the device is already configured and running.
    Would you be so kind of pointing me to an example script code I could start with? All the examples I can find are for the first setup, but not for changes on the fly.

    Thanks again,

    Gustavo

  • Hi Ivan,

    To clarify my question:

    I have tested this with the EVAL. On the Command Buffer I see the following commands:


    w 30 00 00
    w 30 3F D5 // Soft-Stepping 1 step/2FS
    w 30 00 00
    w 30 41 02 // DAC Gain L
    w 30 00 00
    w 30 42 02 // DAC Gain R

    Should this be enough during running time? Or should I add some other commands in the "real life program"?

    Another question:

    The I2C Address in the GUI is 0x30
    However, the data sheet says "The TLV320DAC3203 ... will respond to the I2C address of 0011000."
    I guess, this is a Typo. I am missing one zero there...


    Best regards,
    Gustavo

  • Hi Gustavo,

    You can write to register 0x3f to set the soft-stepping configuration during initialization.
    Then for the volume changes on the fly, you can write to registers 0x41 and 0x42 only. Alternatively, you can also write to register 0x40 to tie the volume control of both channels together, you may do this during initialization. Then you can write to 0x41 or 0x42 instead of both of them.

    Regarding the I2C address, the data sheet uses 7-bit notation, which adds a 0 at LSB for write or 1 for read. The GUI uses the 8-bit notation considering 0 at LSB.

    Best regards,
    -Ivan Salazar
    Applications Engineer

  • Hi Ivan,

    thanks for the quick answer, I will follow this.
    Also thanks for the explanation about the notation.
    I wish you a pleasant day!

    Gustavo