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:DAC 开启时发出恒定嘶嘶声

Guru**** 2343770 points
Other Parts Discussed in Thread: TLV320AIC3100
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/audio-group/audio/f/audio-forum/1516973/tlv320aic3100-constant-hiss-sound-when-dac-is-on

器件型号:TLV320AIC3100

工具/软件:

大家好!

我使用的是 TLV320AIC3100、 配置其 DAC 部分后、我可以在不将 DAC 用于任何应用的情况下收听恒定的嘶嘶声。 有人可以帮助我解决这个问题吗? 我附加了 init I2C 命令。

#!/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

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、

    很抱歉耽误你的时间、明天我将进行研究。 您还能附上原理图吗?

    此致、
    Mir

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    上面是我们使用的原理图。 请看一下。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、

    您的原理图看起来没有问题。 您描述的背景噪音是在耳机输出还是扬声器输出? 还是麦克风的输出? 我注意到您的脚本有一些问题。 我逐行检查是否有任何问题、并评论了我看到的内容、包括要修复的事项的笔记。 我还认为、应该修改一些行文、以便使之更好--我在评论中再次指出了这一点。 另外、我能问您为什么使用 PRB P11、以及为什么使用自适应滤波? 在脚本中使用脚本之前、我们能否让脚本恢复为默认值?

    #!/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
    

    如果您看到我建议的更改有任何改进、请告诉我、并附上您的新脚本。

    此致、
    Mir

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、  

    感谢您的答复。 在不使用耳机的扬声器上可以观察到嘶嘶声。 即使未启动 MIC 部件、仍会发出明显的嘶嘶声。 注:未打开 D 类时、不会观察到嘶嘶声。 当我们打开 D 类放大器时、我们可以看到嘶嘶声。 此观察是在扬声器上没有播放音频时出现的。  

    实际上、我们要使用 PRB P25来启用蜂鸣发生器。 如果考虑到功率优化和耳机和扬声器更好的音质、我们不使用蜂鸣器、您可以建议您设置哪个 PRB?

    谢谢、

    Ajita.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Ajita:

    我看到-是的、您确实需要 PRB P25来运行蜂鸣发生器。 但是、看起来您在脚本中将其设置为 P11。 可以将其切换为 P25吗? 此外、您还可以关闭自适应滤波模式吗?

    为了帮助解决嘶嘶声、您似乎已经在页1寄存器0x2a (寄存器42)中最大化了 D 类驱动器增益。 您是否可以将其设置为最低增益6dB 并看看这是否有帮助?

    此致、
    Mir