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: Permanent noise (like an alarm) in Speaker added to audio signal

Part Number: TLV320DAC3100

Support Path: /Product/Development and troubleshooting/

Hi everyone,

I'm trying to manage to play audio to a 8 ohm speaker using TLV320DAC3100 TI DAC+amplifier.

I am driving TLV320DAC3100 through I2C using a arduino 3V3 logic board.

Device init is done as below

  digitalWrite(A0, LOW);                //Do a hardware reset
  delay(10);
  digitalWrite(A0, HIGH);
  delay(10);
  Serial.begin(9600);

  write_reg(TLV320DAC, 0x00, 0x00);     //Set page 0
  write_reg(TLV320DAC, 0x01, 0x01);     // Do a software reset
  
  delay(10);

  write_reg(TLV320DAC, 0x04, 0x07);     // PLL_CLKIN = BCLK   CODEC_CLKIN = PLL_CLK
  write_reg(TLV320DAC, 0x06, 0x07);     // J = 7
  Wire.beginTransmission(TLV320DAC);    // D(msb) = 0
  Wire.write(0x07);                     // D(lsb) = 0
  Wire.write(0x00);
  Wire.write(0x00);
  Wire.endTransmission();
  write_reg(TLV320DAC, 0x05, 0x94);     // P = 1, R = 4 PLL is powered up

  write_reg(TLV320DAC, 0x0B, 0x82);     // NDAC =  2 
  write_reg(TLV320DAC, 0x0C, 0x87);     // MDAC = 7
  write_reg(TLV320DAC, 0x0D, 0x00);     // OSR MSB = 0
  write_reg(TLV320DAC, 0x0E, 0x80);     // OSR LSB = 128
  write_reg(TLV320DAC, 0x1B, 0x00);     // Codec interface I2S and word Length 16bit
 
  write_reg(TLV320DAC, 0x00, 0x00);     // Go to page 0
  write_reg(TLV320DAC, 0x3C, 0x04);     // Processing block 4
  write_reg(TLV320DAC, 0x00, 0x08);     // Go to page 8
  write_reg(TLV320DAC, 0x01, 0x04);     // Adaptive filtering enabled

  write_reg(TLV320DAC, 0x00, 0x01);     // Go to page 1
  write_reg(TLV320DAC, 0x20, 0x86);     // Power up Class D output driver
  write_reg(TLV320DAC, 0x21, 0x44);     // Power on time 610ms & ramp up step time = 1,95ms
  write_reg(TLV320DAC, 0x23, 0x44);     // DAC_L to Left channel mixer amplifier & DAC_R to Right channelmixer amplifier
  write_reg(TLV320DAC, 0x26, 0x90);     // Left analog volume routed to class D output driver with gain = -8dB
  write_reg(TLV320DAC, 0x2A, 0x04);     // Class D output stage gain =6dB & class D driver not muted
  
  delay(100);

  write_reg(TLV320DAC, 0x00, 0x00);     // Go to page 0
  write_reg(TLV320DAC, 0x3F, 0xFC);     //Left & Right channels powered up & left and right data path = (L+R)/2
  write_reg(TLV320DAC, 0x41, 0x00);     //Gain DAC Left = 0dB     
  write_reg(TLV320DAC, 0x42, 0x00);     //Gain DAC Right = 0dB      
  write_reg(TLV320DAC, 0x40, 0x02);     //Unmute DAC channels

My problem is that even if I do not play any sound, I still have a noise I can't rid of. (See wav file attached)

Does anyone have an idea about what it could be ?

Thanks for your help, and have a good day !

  • Hi,

    I will try to help you solve this issue.
    Judging from the PLL values, these are the clock signal frequencies coming into TLV320DAC3100:
    BCLK = 3.072 MHz
    WCLK = 48 kHz
    Is this correct for your setup?
    Is this noise present at all the times? or does it stops at some point?

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

    Thank for your help !
    Indeed, these are the clocks coming into TLV320DAC3100 (BCLK=3.072MHz and WCLK=48kHz).
    The noise seems to be permanent (I can hear it before, during, and after audio is playing).

    It seems to be a wrong clock setting isn't it ?

    Thanks for your time, and have a good day !

  • I was wrong, after 15 minutes about, the noise stopped, but I am not able to play music until I reset the arduino.
  • I will create a script based on your settings to try it out.
    In the meantime I would like to ask you a couple more things:
    - I understand the noise is present even if there is no audio playing. Is DIN inactive (zero) all the time while you're not playing any audio?
    - Is there a chance that you're writing into Page 0 Reg 0x47? And/Or other Beep generator registers?
    - Are you getting this noise both on Class-D and headphone output?

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