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.

TLV320AIC3100: Constant Hiss sound when DAC is on

Part Number: TLV320AIC3100

Tool/software:

Hi all,

I am using TLV320AIC3100 is my project. After configuring its DAC part, I can listen constant hiss sound without using DAC for any application. Can someone please help me to fix this ? I have attached my init I2C commands.

#!/bin/bash

echo "Performing tlv320aic configuration"

# Download the configuration to the chip:
echo "Sending i2c configuration"
#AGC
# power up
i2cset -f -y -r 1 0x18 0x00 0x00
#reset software
i2cset -f -y -r 1 0x18 0x01 0x01
#configure on chip PLL accord as 
# p=1, r=1, j=8, d=0, aosr=128, nadc=8, madc=2
i2cset -f -y -r 1 0x18 0x04 0x03
i2cset -f -y -r 1 0x18 0x06 0x08
i2cset -f -y -r 1 0x18 0x07 0x00
i2cset -f -y -r 1 0x18 0x08 0x00
i2cset -f -y -r 1 0x18 0x05 0x91
i2cset -f -y -r 1 0x18 0x12 0x88
i2cset -f -y -r 1 0x18 0x13 0x82
i2cset -f -y -r 1 0x18 0x14 0x80

#configure DAC part

i2cset -f -y -r 1 0x18 0x0B 0x88
i2cset -f -y -r 1 0x18 0x0C 0x82
i2cset -f -y -r 1 0x18 0x0D 0x00

#set I2S word length to 16
i2cset -f -y -r 1 0x18 0x1B 0x00
#PRB P11 DAC
i2cset -f -y -r 1 0x18 0x3C 0x0B
i2cset -f -y -r 1 0x18 0x00 0x08
i2cset -f -y -r 1 0x18 0x01 0x04
i2cset -f -y -r 1 0x18 0x00 0x00
#PRB_P1=01
i2cset -f -y -r 1 0x18 0x3d 0x01

#DAC volume set using VOL/MICDET
i2cset -f -y -r 1 0x18 0x74 0x00

#program analog blocks
#set page 1
i2cset -f -y -r 1 0x18 0x00 0x01

#Unmute HPLR,set gain 18db
i2cset -f -y -r 1 0x18 0x1F 0x04
i2cset -f -y -r 1 0x18 0x21 0x4E
i2cset -f -y -r 1 0x18 0x23 0x44
i2cset -f -y -r 1 0x18 0x28 0x06
i2cset -f -y -r 1 0x18 0x29 0x06
i2cset -f -y -r 1 0x18 0x2A 0x1C

#power up output drivers
i2cset -f -y -r 1 0x18 0x1F 0xC2
i2cset -f -y -r 1 0x18 0x20 0x86
i2cset -f -y -r 1 0x18 0x24 0x92
i2cset -f -y -r 1 0x18 0x25 0x92
i2cset -f -y -r 1 0x18 0x26 0x92


i2cset -f -y -r 1 0x18 0x2e 0x07
i2cset -f -y -r 1 0x18 0x2f 0x10

#set below comamnds
i2cset -f -y -r 1 0x18 0x30 0x30
i2cset -f -y -r 1 0x18 0x31 0xc0

#set page 0
i2cset -f -y -r 1 0x18 0x00 0x00

#power up DAC
i2cset -f -y -r 1 0x18 0x3F 0xD4

# These are the left/right volume settings
i2cset -f -y -r 1 0x18 0x41 0xE6
i2cset -f -y -r 1 0x18 0x42 0xE6
i2cset -f -y -r 1 0x18 0x40 0x00

#set AGC
i2cset -f -y -r 1 0x18 0x56 0xA0
i2cset -f -y -r 1 0x18 0x57 0xFE
i2cset -f -y -r 1 0x18 0x58 0x50
i2cset -f -y -r 1 0x18 0x5A 0xA8
i2cset -f -y -r 1 0x18 0x5B 0x00
i2cset -f -y -r 1 0x18 0x5C 0x00

i2cset -f -y -r 1 0x18 0x51 0x80
i2cset -f -y -r 1 0x18 0x52 0x00

  • Hi,

    Sorry about the delay, I will look into it tomorrow. Can you also attach your schematic?

    Best,
    Mir

  • Above is the schematic we are using. Please take a look.

  • Hi,

    Your schematic looks alright. This background noise you are describing, is it in the headphone out or speaker out? Or, is it the output of the microphone? I noticed a few issues with your script. I went through it line by line to check for any problems, and commented what I saw including my notes of things to fix. I also think there are some lines that should be changed in order - again I noted this in the comments. Also, can I ask why you are using PRB P11 and why you are using adaptive filtering? Can we make your script work with those back to their defaults before you use them in the script?

    #!/bin/bash
    
    echo "Performing tlv320aic configuration"
    
    # Download the configuration to the chip:
    echo "Sending i2c configuration"
    #AGC
    # power up
    i2cset -f -y -r 1 0x18 0x00 0x00
    #reset software
    i2cset -f -y -r 1 0x18 0x01 0x01
    #configure on chip PLL accord as 
    # p=1, r=1, j=8, d=0, aosr=128, nadc=8, madc=2
    i2cset -f -y -r 1 0x18 0x04 0x03 #pll_clkin=mclk, codcc_clkin=pll_clk
    i2cset -f -y -r 1 0x18 0x06 0x08 #J=8
    i2cset -f -y -r 1 0x18 0x07 0x00 #D-0
    i2cset -f -y -r 1 0x18 0x08 0x00 #D=0
    i2cset -f -y -r 1 0x18 0x05 0x91 #PLL powered up, P=1, R=1
    i2cset -f -y -r 1 0x18 0x12 0x88 #nadc=8
    i2cset -f -y -r 1 0x18 0x13 0x82 #madc=2
    i2cset -f -y -r 1 0x18 0x14 0x80 #aosr=128
    
    #configure DAC part
    
    i2cset -f -y -r 1 0x18 0x0B 0x88 #ndac=8
    i2cset -f -y -r 1 0x18 0x0C 0x82 #mdac=2
    i2cset -f -y -r 1 0x18 0x0D 0x00 #dosr msb=00
    # NOTE: did not set 0x0e, which should be 0x80 (default but still should be set) for dosr=128. if not set this may cause some issues
    
    
    #set I2S word length to 16
    i2cset -f -y -r 1 0x18 0x1B 0x00 #i2s interface, 16 bits, slave mode (bclk and wclk are input)
    #PRB P11 DAC
    i2cset -f -y -r 1 0x18 0x3C 0x0B #PRB P11
    i2cset -f -y -r 1 0x18 0x00 0x08 #page 8
    i2cset -f -y -r 1 0x18 0x01 0x04 #adaptive filtering enabled in DAC processing blocks - dac prb accesses buffer a and external control accesses buffer b.
    i2cset -f -y -r 1 0x18 0x00 0x00 #page 0
    #PRB_P1=01
    i2cset -f -y -r 1 0x18 0x3d 0x01 #adc prb RESERVED VALUE (instead set to default of prb_r4 by setting reg to 0x04)
    
    #DAC volume set using VOL/MICDET
    i2cset -f -y -r 1 0x18 0x74 0x00 #volume control by register
    
    #program analog blocks
    #set page 1 
    i2cset -f -y -r 1 0x18 0x00 0x01 #page 1
    
    #Unmute HPLR,set gain 18db
    i2cset -f -y -r 1 0x18 0x1F 0x04 #hpl+hpr powered down, output common mode=1.35V
    i2cset -f -y -r 1 0x18 0x21 0x4E #driver power on time=1.22s
    i2cset -f -y -r 1 0x18 0x23 0x44 #dac_l routed to left mixer amp, dac_r routed to right mixer amp
    i2cset -f -y -r 1 0x18 0x28 0x06 #hpl driver is not muted. hpl driver pga=0db
    i2cset -f -y -r 1 0x18 0x29 0x06 #hpr driver is not muted, hpr driver pga=0db
    i2cset -f -y -r 1 0x18 0x2A 0x1C #class d drier output stage gain=24dB (MAX?), class d driver not muted
    
    #power up output drivers
    i2cset -f -y -r 1 0x18 0x1F 0xC2 #hpl+hpr powered UP, but the reserved register is wrong this should probably be set to 0xC4. also change the order of these registers and the ones avoce to put them all in order (0x1f-0x2a, repeats are not necessary)
    i2cset -f -y -r 1 0x18 0x20 0x86 #class d driver powered up
    i2cset -f -y -r 1 0x18 0x24 0x92 #left channel analog volume ctrl is routed to hpl output driver, set to 001 0010 (18d) = -9dB gain on the output
    i2cset -f -y -r 1 0x18 0x25 0x92 #same for right channel analog volume ctrl 
    i2cset -f -y -r 1 0x18 0x26 0x92 #same for class d driver volume ctrl
    
    
    i2cset -f -y -r 1 0x18 0x2e 0x07 #software power down not enabled, mic bias only powered up if headset inserted when detection is enabled, reserved bit written wrong on d2, and micbias powered to avdd. likely you meant to write this 0x03.
    i2cset -f -y -r 1 0x18 0x2f 0x10 #mic pga is set to 8dB of gain
    
    #set below comamnds
    i2cset -f -y -r 1 0x18 0x30 0x30 #mic1rP for p terminal of adc w rin=40k
    i2cset -f -y -r 1 0x18 0x31 0xc0 #cm selected for m terminal w rin=40k
    
    #set page 0
    i2cset -f -y -r 1 0x18 0x00 0x00 #page 0
    
    #power up DAC
    i2cset -f -y -r 1 0x18 0x3F 0xD4 #l+r dac powered up, left channel dac=left data, right channel dac=right data
    
    # These are the left/right volume settings
    i2cset -f -y -r 1 0x18 0x41 0xE6 #left channel dac volume set to e6, corresponds to -13dB of digital volume
    i2cset -f -y -r 1 0x18 0x42 0xE6 #same for right channel dac
    i2cset -f -y -r 1 0x18 0x40 0x00 #l+r channel dac NOT MUTED! and independent volume control
    
    # NOTE: register 0x40 should be set before 0x41 and 0x42
    
    #set AGC
    i2cset -f -y -r 1 0x18 0x56 0xA0 #agc enabled, target=-10dB
    i2cset -f -y -r 1 0x18 0x57 0xFE #hysteresis disabled, noise threshold=-90dB
    i2cset -f -y -r 1 0x18 0x58 0x50 #AGC max gain = 40dB
    i2cset -f -y -r 1 0x18 0x5A 0xA8 #43 * 512/fs agc decay time
    i2cset -f -y -r 1 0x18 0x5B 0x00 #agc noise debounce=0/fs
    i2cset -f -y -r 1 0x18 0x5C 0x00 #agc signal debounce = 0/fs
    
    
    
    
    
    i2cset -f -y -r 1 0x18 0x51 0x80 #adc channel powered up, dig mic from gpio1, dig mic not enabled
    i2cset -f -y -r 1 0x18 0x52 0x00 #adc channel not muted
    

    Let me know if you see any improvement from my suggested changes, and please attach your new script as well.

    Best,
    Mir

  • Hi ,

    Thank you for your reply. This hiss sound is observed on speakers not on headphone. Even when MIC part is not started, still hiss sound is noticeable. Note: when Class-D is not turned on, Hiss sound is not observed. When we turned on Class-D amplifier, we can notice hiss sound. This observation is when there is no audio playing on speaker. 

    Actually we want to use PRB P25 to enable beep generator. Can you suggest which PRB need to set if we are not using beep generator considering power optimization and better audio quality over headphone and speaker?

    Thanks,

    Ajita

  • Hi Ajita,

    I see - yes you do need PRB P25 to run the beep generator. However, it looks like you set it to P11 in your script. Can you switch it to P25? Also can you turn off the adaptive filtering mode as well?

    To help with the hiss, it looks like you maxed out the class D driver gain in page 1, register 0x2a (reg 42). Can you set it to the lowest gain of 6dB and see if this helps?

    Best,
    Mir