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.

TLV320AIC3206: TLV320AIC3206 getting noisy arecord but aplay is perfect with a demo audio.wav

Part Number: TLV320AIC3206
Other Parts Discussed in Thread: AM3354

Hi,

We are using AM3354 with TLV320AIC3206 for audio recording and play.

We are able to play demo audio file(Rar_Center.wav) using aplay command and it looks perfect. But we are facing issues with arecord. we are able to record the data but it contains too much noise (record_8K_stereo_U8bit.wav). attached these wav files for your reference.

Here is the list of commands executed for testing. IN1_L and IN1_R are our lines of interest.

amixer -c AM335xRCU sset 'Mic PGA' on

amixer -c AM335xRCU sset 'CM_L to Left Mixer Negative Resistor' '10 kOhm'
amixer -c AM335xRCU sset 'CM_R to Right Mixer Negative Resistor' 'Off'
amixer -c AM335xRCU sset 'IN1_L to Left Mixer Positive Resistor' 'Off'
amixer -c AM335xRCU sset 'IN1_L to Right Mixer Negative Resistor' 'Off'
amixer -c AM335xRCU sset 'IN1_R to Left Mixer Positive Resistor' '40 kOhm'
amixer -c AM335xRCU sset 'IN1_R to Right Mixer Positive Resistor' 'Off'
amixer -c AM335xRCU sset 'IN2_L to Left Mixer Positive Resistor' 'Off'
amixer -c AM335xRCU sset 'IN2_L to Right Mixer Positive Resistor' 'Off'
amixer -c AM335xRCU sset 'IN2_R to Left Mixer Negative Resistor' 'Off'
amixer -c AM335xRCU sset 'IN2_R to Right Mixer Positive Resistor' 'Off'
amixer -c AM335xRCU sset 'IN3_L to Left Mixer Positive Resistor' 'Off'
amixer -c AM335xRCU sset 'IN3_L to Right Mixer Negative Resistor' 'Off'
amixer -c AM335xRCU sset 'IN3_R to Left Mixer Negative Resistor' 'Off'
amixer -c AM335xRCU sset 'IN3_R to Right Mixer Positive Resistor' 'Off'
amixer -c AM335xRCU sset 'ADC Level' 64
amixer -c AM335xRCU sset 'AGC Max PGA' 50
amixer -c AM335xRCU sset 'AGC Target Level' 0
amixer -c AM335xRCU sset 'ADCFGA Left Mute' off
amixer -c AM335xRCU sset 'ADCFGA Right Mute' on
amixer -c AM335xRCU sset 'AGC Noise Threshold' 31
amixer -c AM335xRCU sset 'AGC Noise Debounce' 0
amixer -c AM335xRCU sset 'AGC Gain Hysteresis' 0
amixer -c AM335xRCU sset 'AGC Hysteresis' 0
amixer -c AM335xRCU sset 'AGC Signal Debounce' 15

Also attached dts configurations here.

&i2c0 {
    pinctrl-names = "default";
    pinctrl-0 = <&i2c0_pins>;

    status = "okay";
    clock-frequency = <400000>;

    tlv320aic3206: tlv320aic3206@18 {
    #sound-dai-cells = <0>;
    compatible = "ti,tlv320aic32x6";
    reg = <0x18>;
    clocks = <&sys_clkin_ck>;
    clock-names = "mclk";
    reset-gpios = <&gpio3 7 GPIO_ACTIVE_HIGH>;
    aic32x4-gpio-func= <
            0xff / AIC32X4_MFPX_DEFAULT_VALUE /
            0xff / AIC32X4_MFPX_DEFAULT_VALUE /
            0x04 / MFP3 AIC32X4_MFP3_GPIO_ENABLED /
            0xff / AIC32X4_MFPX_DEFAULT_VALUE /
            0x08 / MFP5 AIC32X4_MFP5_GPIO_INPUT /
        >;
    ldoin-supply = <&vddio_reg>;
    iov-supply = <&vddio_reg>;
    dv-supply = <&vddio_reg>;
    av-supply = <&vddio_reg>;
    };
};

    sound {
        compatible = "simple-audio-card";
        simple-audio-card,name = "AM335x-RCU";
        simple-audio-card,widgets =
            "Microphone", "Microphone Jack",
            "Headphone", "Headphone Jack",
            "Speaker", "External Speaker",
            "Microphone", "Handset Mic";
        simple-audio-card,routing =
            "IN3_L", "Microphone Jack",
            "Headphone Jack", "HPL",
            "Headphone Jack", "HPR",
            "External Speaker", "LOL",
            "External Speaker", "LOR",
            "Handset Mic", "Mic Bias";
        simple-audio-card,format = "i2s";
        simple-audio-card,bitclock-master = <&cpu_master>;
        simple-audio-card,frame-master = <&cpu_master>;
        cpu_master: simple-audio-card,cpu {
            sound-dai = <&mcasp0>;
            system-clock-frequency = <24576000>;
            system-clock-id = <1>;//<MCASP_CLK_HCLK_AHCLK>;
        };

        sound_master: simple-audio-card,codec {
            sound-dai = <&tlv320aic3206>;
            system-clock-frequency = <24576000>; //Codec generates 24567000 from mclk 24Mhz and FLL settings)
            system-clock-id = <1>;
            };
    };

We also probed and verified MCLK frequency of 24MHz.

Eagerly waiting for your support.

Thank You,

Naveen G S