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.

TLV320ADC3100: 边录边播出现破音

Part Number: TLV320ADC3100

我们通过规格书,配置了44.1k的采样率,然后边录边播,会时不时出现破音。请问怎么解决?我贴出配置的寄存器和电路如下:

snd_soc_write(codec, 0x00, 0x00);//切换寄存器页到页0
    snd_soc_write(codec, 0x01, 0x01);//软复位
 
    //2
    snd_soc_write(codec, 0x04, 0x03);//set pll=mclk, codev_clk=pll
 
    snd_soc_write(codec, 0x05, 0x91);//set p=r=1
    snd_soc_write(codec, 0x06, 0x07);//set j=7
    //d=5264
    snd_soc_write(codec, 0x07, 0x14);
    snd_soc_write(codec, 0x08, 0x90);
 
    //snd_soc_write(codec, 0x05, 0x91);//
    snd_soc_write(codec, 0x12, 0x88);// NADC = 8
    snd_soc_write(codec, 0x13, 0x82);// MADC = 2
    snd_soc_write(codec, 0x14, 0x80);// AOSR = 128
 
    snd_soc_write(codec, 0x1b, 0x0c);//
    snd_soc_write(codec, 0x1d, 0x07);
    snd_soc_write(codec, 0x1e, 0x82);

    snd_soc_write(codec, 0x3d, 0x03);
 
    // 3
    #if 1
         //Left AGC
    snd_soc_write(codec,0x56, 0x80);        // 86            AGC Control 1    // 0x70 close agc
    snd_soc_write(codec,0x57, 0xc0);        // 87       AGC Control 2
    snd_soc_write(codec,0x58, 0x32);        // 88            AGC Maximum Gain 32db=0x40    (7f: not set)
    snd_soc_write(codec,0x59, 0x7f);        // 89     AGC attack time     ---
    snd_soc_write(codec,0x5a, 0x7f);        // 90     AGC Decay time         ---
    snd_soc_write(codec,0x5b, 0x1f);        // 91     AGC noise            ---
    snd_soc_write(codec,0x5c, 0x0f);        // 92       AGC signal            ---
    // Right AGC                  );
    snd_soc_write(codec,0x5e, 0x80);        // 94            Right AGC Control 1
    snd_soc_write(codec,0x5f, 0xc0);        // 95            Right AGC Control 2
    snd_soc_write(codec,0x60, 0x32);        // 96            AGC Maximum Gain
    snd_soc_write(codec,0x61, 0x7f);        // 97     AGC attack time     ---
    snd_soc_write(codec,0x62, 0x7f);        // 98     AGC Decay time         ---
    snd_soc_write(codec,0x63, 0x1f);        // 99     AGC noise            ---
    snd_soc_write(codec,0x64, 0x0f);    // 100    AGC signal            ---
#endif

    //snd_soc_write(codec, ADC310X_DITHER_CTRL, 0x77);
    //snd_soc_write(codec, ADC310X_MIC_BIAS_CTRL, 0x20);
    
    snd_soc_write(codec, ADC310X_INPUT_SEL_PGA_L_1, 0x7d);//0X34
    
    //snd_soc_write(codec, ADC310X_INPUT_SEL_PGA_L_2, 0x3d);
    
    snd_soc_write(codec, ADC310X_INPUT_SEL_PGA_R_1, 0x7d);
    //snd_soc_write(codec, ADC310X_INPUT_SEL_PGA_R_2, 0x3d);
    
    snd_soc_write(codec, ADC310X_PGA_ANALOG_L, 0x28);
    snd_soc_write(codec, ADC310X_PGA_ANALOG_R, 0x28);
    
    snd_soc_write(codec, ADC310X_LOW_CURRENT, 0x00);
    //snd_soc_write(codec, 0x00, 0x01);
    //snd_soc_write(codec, 0x33, 0x00);
    //snd_soc_write(codec, 0x3B, 0x10);// LEFT PGA not mute, 0db
    //snd_soc_write(codec, 0x3C, 0x10);// RIGHT PGA not mute,0db
    //snd_soc_write(codec, 0x34, 0xf1);
    //snd_soc_write(codec, 0x37, 0xf1);

 
    // 4
    //snd_soc_write(codec, 0x00, 0x00);
 
    snd_soc_write(codec, 0x51, 0xc1);
 
    snd_soc_write(codec, 0x52, 0x00); // UNMUTE
    
    // 5 SET VOL
    snd_soc_write(codec, 0x53, 0x28);//+4.5db
    snd_soc_write(codec, 0x54, 0x28);//+4.5db

  • 您好,

    您实测MCLK 、WCLK、BCLK频率是多少?您可以附上音频CLK、data的波形吗

    您输入的您用什么电路做的音频播放?这个播放电路播放其他数字音频信号是否正常?

  • 播放电路没问题的,然后我有专门录下来,然后方到windows上播放,也会有破音。下面贴出波形图

    输入电路有之前提问有贴出来阿

  • 我们应用必须要用44.1k采样,所以固定配置的44.1k的采样率,MCLK是用晶振固定送的12M

  • 有什么好的优化方法吗?

  • 抱歉,回复迟了

    关于AGC寄存器的配置您可以先采用默认值吗

    下面这块,您可以标明寄存器地址吗?好像是page1页的寄存器,但是没看到您对寄存器页的配置

    datasheet 中9.2.2.3章节有寄存器配置实例,有些地方您可以参考下

      snd_soc_write(codec, ADC310X_INPUT_SEL_PGA_L_1, 0x7d);//0X34
        
        //snd_soc_write(codec, ADC310X_INPUT_SEL_PGA_L_2, 0x3d);
        
        snd_soc_write(codec, ADC310X_INPUT_SEL_PGA_R_1, 0x7d);
        //snd_soc_write(codec, ADC310X_INPUT_SEL_PGA_R_2, 0x3d);
        
        snd_soc_write(codec, ADC310X_PGA_ANALOG_L, 0x28);
        snd_soc_write(codec, ADC310X_PGA_ANALOG_R, 0x28);
        
        snd_soc_write(codec, ADC310X_LOW_CURRENT, 0x00);

  • 有试过AGC寄存器不配,声音有点杂,不是很清楚

    PAGE1这是驱动的定义

    /* Page 1 registers */
    #define ADC310X_PAGE_1_OFFSET        ADC310X_REGS_IN_PAGE
    #define ADC310X_DITHER_CTRL        (ADC310X_PAGE_1_OFFSET + 0x1a)
    #define ADC310X_MIC_BIAS_CTRL        (ADC310X_PAGE_1_OFFSET + 0x33)
    #define ADC310X_INPUT_SEL_PGA_L_1    (ADC310X_PAGE_1_OFFSET + 0x34)
    #define ADC310X_INPUT_SEL_PGA_L_2    (ADC310X_PAGE_1_OFFSET + 0x36)
    #define ADC310X_INPUT_SEL_PGA_R_1    (ADC310X_PAGE_1_OFFSET + 0x37)
    #define ADC310X_INPUT_SEL_PGA_R_2    (ADC310X_PAGE_1_OFFSET + 0x39)
    #define ADC310X_PGA_ANALOG_L        (ADC310X_PAGE_1_OFFSET + 0x3b)
    #define ADC310X_PGA_ANALOG_R        (ADC310X_PAGE_1_OFFSET + 0x3c)
    #define ADC310X_LOW_CURRENT        (ADC310X_PAGE_1_OFFSET + 0x3d)
    #define ADC310X_PGA_ANALOG_FLAGS    (ADC310X_PAGE_1_OFFSET + 0x3e) /* RO */

    之前没注意到datasheet有例子,我参考试一下。

  • 未使用的输入,建议通过0.47uF电容接GND,以防止未端接输入上的噪声拾取。

    关于您的输入,配置的寄存器好像不对应

  • 请问大概哪些寄存器需要修改,还是全部改成datasheet默认的?

  • 你好,修改了寄存器和加了电容,破音没有了,谢谢

  • 很高兴您的问题得到解决,感谢您的反馈