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.

TLV320AIC3106: Audio DC Problem

Part Number: TLV320AIC3106

Hello,

We currently use the TI TLV320AAIC3106 on a few of our two-way radio products. W

codec.c
void codec_init(void)
{
    // ----------- CODEC GENERAL INIT ------------
    codec_wr(SW_RESET, 0x80);           // Codec software reset.
    codec_wr(PAGE_SEL, 0);              // Select Register Page 0.
    codec_rd(PAGE_SEL);

    // Master clock source.
    codec_wr(CLK_GEN, 0x02);            // Clock source is MCLK.
    codec_wr(CLK_IN, 0x00);             // CODEC_CLKIN uses PLLDIV_OUT.

    // PLL config.  K = J.D = 6.144
    codec_wr(PLL_PROG_A, 0x91);         // PLL Enabled, Q=2, P=1.
    codec_wr(PLL_PROG_B, 0x18);         // J=6.
    codec_wr(PLL_PROG_C, 0x16);         // D=1440.
    codec_wr(PLL_PROG_D, 0x80);
    codec_wr(OVERFLOW_FLAGS, 0x01);     // R=1.

    // ADC, DAC sample rate.
    codec_wr(SAMPLE_RATE_SEL, 0x44);    // Sample rate = Fs/3. (16kHz).

    // I2S setup.
    codec_wr(ASDI_CTRL_A, 0x80);        // BCLK output, WCLK input.
    codec_wr(ASDI_CTRL_B, 0x00);        // I2S mode, 16-bit.
    codec_wr(ASDI_CTRL_C, 0x00);        // Audio Serial Data Word Offset.

    // MIC Bias.
    codec_wr(MICBIAS, MICBIAS_2V5);     // Set MIC bias.
    
    
    // ----------CODEC ROUTING AND SETUP ----------
    // ADC.
    codec_wr(MIC2RP_ADC_R, 0x78);       // Line2R single-ended, not connected to right ADC.

    // DAC.
    codec_wr(DATA_PATH, 0x0A);          // Left data -> DAC_L, Right data -> DAC_R.
    codec_wr(DAC_POWER, 0xE0);          // DAC_L and DAC_R powered-up, HPLCOM single-ended output.
    codec_wr(HPOUT_CTRL, 0x00);         // Output VCM = 1.35V. (AVDD/2).

    // Output HPROUT
    codec_wr(DAC_R1_HPROUT, 0x80);      // DAC_R1 -> HPROUT, 0 gain.
    codec_wr(HPROUT_GAIN, 0x8B);        // HPROUT powered-up, +8dB, unmuted, weak common mode.

    // Output HPRCOM
    codec_wr(DAC_R1_HPRCOM, 0x80);      // DAC_R1 -> HPRCOM, 0 gain.
    codec_wr(HPOUT_CONFIG, 0x16);       // HPRCOM single-ended, short circuit protection.
    codec_wr(HPRCOM_GAIN, 0x8B);        // HPRCOM powered-up, +8dB, unmuted, weak common mode.

    // Mono line output
    codec_wr(MONO_LOP_GAIN, 0x6B);      // MONO_LOP: powered-up, +6dB, unmuted.
    codec_wr(DAC_L1_MONO_LOP, 0x84);    // DAC_R1 -> MONO_LOP, connected, 2dB.

    // LEFT line output
    codec_wr(LEFT_LOP_GAIN, 0x6B);      // LEFT_LOP powered-up, +6dB, unmuted.
    codec_wr(DAC_L1_LEFT_LOP, 0x84);    // DAC_L -> left LOP, connected, 2dB.

    // RIGHT line output
    codec_wr(RIGHT_LOP_GAIN, 0x6B);     // RIGHT_LOP powered-up, +6dB, unmuted.
    codec_wr(DAC_L1_RIGHT_LOP, 0x84);   // DAC_L -> right LOP, connected, 2dB.


    // !!!!!!!!!! If this is set, RIGHT_LOP/M and LEFT LOP/M lose DC bias !!!!!!!!
    codec_wr(MIC2RP_HPROUT, 0xFF);      // MIC2RP -> HPROUT, muted
}
e need to mix “voice” audio from the right DAC with an analogue “beeptone” audio signal (beeps, alarms, etc), and then output this to the audio amps. The output configuration is essentially:

  • DACR->HPROUT, DACR->HPRCOM (“voice” audio)
  • LINE2R->HPROUT, LINE2R->HPRCOM (“beeptone” audio)
  • DACL->RIGHT_LOP/M (differential “voice” audio signal for FM modulation)

This seems to work correctly, “beeptones” are mixed with “voice” audio, and output to our audio amplifiers. Important for us, is to have a constant 1.35V common-mode DC bias level on RIGHT_LOP/M, which is used for FM modulation. The issue we are seeing, is if the registers are set to connect LINE2R->HPROUT and HPRCOM, the RIGHT_LOP/M loses its DC bias and appears to float. The DC level drifts over time, and differs considerably from one sample to the next.

 

Attached is a C file with a simplified configuration that reproduces the issue.

 

The following DC voltages are measured (without and with the last setting, which routes MIC2RP to HPROUT):

Output

Without MIC2RP –> HPROUT

With MIC2RP -> HPROUT

HPRCOM

1.35V

1.35V

HPROUT

1.35V

1.35V

MONO_LOP

1.32V

1.32V

MONO_LOM

1.32V

1.32V

LEFT_LOP

1.35V

0.7V <-> 2.26V (drifting, sample dependent)

LEFT_LOM

1.35V

0.7V <-> 2.26V (drifting, sample dependent)

RIGHT_LOP

1.35V

0.7V <-> 2.26V (drifting, sample dependent)

RIGHT_LOM

1.35V

0.7V <-> 2.26V (drifting, sample dependent)

Thank You.