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: Enable to get initialize audio codec

Part Number: TLV320DAC3100

Hello,

We are trying to configure audio codec TLV320DAC3100 using I2S, through I2C commands which are sent from the controller.

We are searching for codec control software, so that we can verify the register settings.

Thank you

  • Hi Rohit,

    You can use the attached GUI for TLV320DAC3100.

    Best regards,
    -Ivan Salazar
    Audio Applications Engineer - Low Power Audio & Actuators

    6180.CCDAC310x.zip

  • Hello Ivan,

    We tried to edit the settings like MCLK and P, R values to obtain 48Khz but could not see any changes in the register settings. Is their any way to generate register value according to our use case.

    The Mclk of 12MHz is given from external source and register are set by I2C commands by a controller. We need to configure headphone for audio

    The register settings we are using is as below:

    addr: 00     write value: 00
    addr: 01     write value: 01
    addr: 04     write value: 00
    addr: 05     write value: 91
    addr: 06     write value: 08
    addr: 07     write value: 02
    addr: 08     write value: 30
    addr: 1B     write value: 00
    addr: 0B     write value: 84
    addr: 0C     write value: 84
    addr: 12     write value: 84
    addr: 13     write value: 84
    addr: 14     write value: 00
    addr: 15     write value: 80
    addr: 74     write value: 40
    addr: 44     write value: 68
    addr: 41     write value: 00
    addr: 42     write value: 00
    addr: 43     write value: 00
    addr: 00     write value: 01
    addr: 21     write value: 4E
    addr: 1F     write value: C2
    addr: 23     write value: 44
    addr: 28     write value: 0E
    addr: 29     write value: 0E
    addr: 24     write value: 00
    addr: 25     write value: 00
    addr: 2E     write value: 0B
    addr: 30     write value: 40
    addr: 31     write value: 40
    addr: 00     write value: 00
    addr: 3C     write value: 0B
    addr: 00     write value: 08
    addr: 01     write value: 04
    addr: 00     write value: 00     
    addr: 3F     write value: D6
    addr: 40     write value: 00
    addr: 00     write value: 01
    addr: 26     write value: 24
    addr: 2A     write value: 00
    addr: 20     write value: C6

    Thank you

  • Rohit,

    If you have MCLK = 12MHz and need Fs = 48kHz you can use these values for PLL:
    P=1, R=1, J=7, D=6800, NDAC=3, MDAC=5 and DOSR=128.
    I've created the following script with these values and it also enables headphone output:
    # --------------------------------------------------------------- page 0 is selected
    w 30 00 00
    # s/w reset
    w 30 01 01
    # PLL_clkin = MCLK,codec_clkin = PLL_CLK
    w 30 04 03
    # PLL on, P=1, R=1
    w 30 05 91
    # J=7
    w 30 06 07
    # D=6800
    w 30 07 1A
    w 30 08 90
    # mode is i2s,wordlength is 16
    w 30 1b 00
    # NDAC is powered up and set to 3
    w 30 0b 83
    # MDAC is powered up and set to 5
    w 30 0c 85
    # DOSR = 128, DOSR(9:8) = 0
    w 30 0D 00
    # DOSR(7:0) = 128
    w 30 0E 80
    # DAC => volume control thru pin disable
    w 30 74 00
    # DAC => drc disable, th and hy
    w 30 44 00
    # DAC => 0 db gain left
    w 30 41 00
    # DAC => 0 db gain right
    w 30 42 00
    # --------------------------------------------------------------- page 1 is selected
    w 30 00 01
    # De-pop, Power on = 800 ms, Step time = 4 ms
    w 30 21 4e
    # HPL and HPR powered up
    w 30 1f c2
    # LDAC routed to HPL, RDAC routed to HPR
    w 30 23 44
    # HPL unmute and gain 1db
    w 30 28 0e
    # HPR unmute and gain 1db
    w 30 29 0e
    # No attenuation on HP
    w 30 24 00
    w 30 25 00
    # MIC BIAS = AVDD
    w 30 2e 0b
    # MICPGA P = MIC 10k
    w 30 30 40
    # MICPGA M - CM 10k
    w 30 31 40
    # --------------------------------------------------------------- page 0 is selected
    w 30 00 00
    # select DAC DSP mode 11 & enable adaptive filter
    w 30 3c 0b
    w 30 00 08
    w 30 01 04
    w 30 00 00
    # POWERUP DAC left and right channels (soft step disable)
    w 30 3f d6
    # UNMUTE DAC left and right channels
    w 30 40 00

    Best regards,
    -Ivan Salazar
    Audio Applications Engineer - Low Power Audio & Actuators
  • Hi Ivan,

    It worked!! Thanks for your input.

    Regards,

    Rohit

  • Hi Ivan,

    The above register settings are working but I observed that if I increase the volume of my audio input, after some limit I am getting some noise in output audio. So I think it can be removed by tuning of some parameters. Am I right?

    On which registers should I focus for that?

    Regards,

    Rohit

  • Rohit,

    Perhaps the signal is clipping at the output. You could reduce the gain of the signal path.
    Where are you getting the noise? At the headphone output or speaker output?

    Best regards,
    -Ivan Salazar
    Audio Applications Engineer - Low Power Audio & Actuators
  • Then you can reduce the gain of the headphone drivers by setting Page 1 Reg 0x28 and 0x29 to 0x06. This will set the driver gain to 0dB (it is currently set to 1dB).
    If noise is still present you can add some attenuation by increasing the values of Page 1 Reg 0x24 and 0x25. You can see the attenuation values on data sheet page 45 table 6-24.

    Best regards,
    -Ivan Salazar
    Audio Applications Engineer - Low Power Audio & Actuators
  • Hello Ivan,

    I am playing a song as an input audio and at the output of my headphone, I am able to hear background music properly but the volume of the words of song are slow(almost inaudible). And also getting some noise in background. I tried with your above suggestions of changing gain and attenuation but still same behavior.

    Regards,

    Rohit

  • Rohit,

    Do you have any capture of the output that you can share?
    By words you mean the vocal sounds? If the vocals are lower than the rest of the audio it seems that there is some filter active.
    Could you perform a frequency sweep to test the frequency response?
    This behavior is present only at headphone output but not at speaker?
    Have you written into page 8 registers? Could you please remove these lines from the script?:
    w 30 00 08
    w 30 01 04

    Best regards,
    -Ivan Salazar
    Audio Applications Engineer - Low Power Audio & Actuators