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: Integrating TLV320AIC3100 Codec with Microphone AOM-4546P-R-47459: Recording Issue

Part Number: TLV320AIC3100

Tool/software:

I've successfully integrated the TLV320AIC3100 codec with my system, as confirmed by the output of

arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: D10audio [10_audio], device 0: 4400b004.audio-controller-tlv320aic31xx-hifi tlv320aic31xx-hifi [4400b004.audio-controller-tlv320aic31xx-hifi tlv320aic31xx-hifi]
  Subdevices: 1/1
  Subdevice #0: subdevice #0



I've followed the steps outlined in this link https://e2e.ti.com/support/audio-group/audio/f/audio-forum/1279143/tlv320aic3100-microphone-audio-was-not-coming-in-the-tlv320aic3100-codec on TI's forum, but I'm encountering an issue where the recorded audio is blank. Specifically, the microphone I'm using is the AOM-4546P-R-47459.

I have used all the following amixer commands expect amixer -c 0 sset "DAC" 0 off (its shows invalid command)

amixer -c 0 cset name='ADC Capture Switch' on
amixer -c 0 sset 'ADC' 40
amixer -c 0 sset 'Mic PGA' 50
amixer -c 0 sset "Output Left From MIC1LP" off
amixer -c 0 sset "Output Left From MIC1RP" off
amixer -c 0 sset "Output Right From MIC1RP" off
amixer -c 0 sset 'MIC1LM P-Terminal' 'FFR 10 Ohm'
amixer -c 0 sset "DAC" 0 off
amixer -c 0 sset 'Speaker Analog' 0 off
amixer -c 0 sset "HP Analog" 0 off
amixer -c 0 sset "HP Left" off
amixer -c 0 sset "HP Right" off
amixer -c 0 sset "HP Driver" off
amixer -c 0 sset "Output Left From Left DAC" off
amixer -c 0 sset "Output Right From Right DAC" off

Could someone please advise on what might be causing this issue? I've verified the hardware setup and followed configuration steps, yet no audio is being recorded. Any insights or troubleshooting steps would be greatly appreciated.

  • Hi Ahsan,

    Have you probed the DOUT pin to see if there is data toggling? I'm not super familiar with amixer settings but have you double checked that the ADC is unmuted and powered up?

    Best regards,
    Jeff McPherson


  • It records only the noise and there is no audio in it. what could be the reason?

    my dts is as following 

    	sound-10 {
            compatible = "simple-audio-card";
            simple-audio-card,name = "10_audio";
            simple-audio-card,dai-link@0{
    			label = "tlv320aic3100-Codec";
    			    widgets =
                		"Speaker", "Speaker Jack",
                		"Headphone", "Headphone Jack",
                		"Microphone", "Microphone Jack";
            		routing =
                		"Speaker Jack", "SPK",
                		"Headphone Jack", "HPL",
                		"Headphone Jack", "HPR",
    					"Mic Jack ,MICBIAS1", 
    					"MIC1LP", "Mic Jack",
    					"MIC1RP", "Mic Jack",
                		"Microphone Jack", "IN1P",
                		"Microphone Jack", "IN1N";
    			dais = <&sai2a_port_tlv320aic3100>;
                format = "i2s";
    			status = "okay";
                cpu {
                    sound-dai = <&sai2a>;                
                };
                codec {
                    sound-dai = <&tlv320aic3100>;
                };
            };
        };
    	}; 
    	};
    
    	fragment@201 {
    		target = <&i2c6>;
    		__overlay__ {
    			status = "okay";
    			tlv320aic3100: tlv320aic3100@18 {
    				compatible = "ti,tlv320aic3100";
    				#sound-dai-cells = <0>;
    				reg = <0x18>;
    				clocks = <&mclk>;
    				ai31xx-micbias-vg = <2>;
    				reset-gpios = <&gpioh 3 GPIO_ACTIVE_LOW>;
    				status = "okay";
    				port {
    					tlv320aic3100_out: endpoint {
    						remote-endpoint = <&sai2_out_tlv320aic3100>;
    					};
    				};
    			};
    		};
    	};
    
    	fragment@204 {
    		target = <&sai2a>;
    		__overlay__ {
    			dma-names = "rx";
    			status = "okay";			
    			ports {
    				#address-cells = <1>;
    				#size-cells = <0>;
    				sai2a_port_tlv320aic3100: port@0 {
    					sai2_out_tlv320aic3100: endpoint {
    						remote-endpoint = <&sai2_out_tlv320aic3100>;
    						dai-format = "i2s";
    						bitclock-master = <&tlv320aic3100>;
    						mclk-fs = <256>;
    					};
    				};
    			};
    		};
    	};

  • Apologies but our linux support is very limited at this time.

    Can you tell me the clocks you are providing to the device, as well as provide a register dump?

    Thanks,
    Jeff McPherson

  • root@qsmp-1570:/media# i2cdump -y -f 0 0x18
    No size specified (using byte-data access)
    0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
    00: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?...............
    10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 ...............?
    20: 06 3e 00 00 7f 7f ff 7f 3a 3a 04 00 20 86 00 b2 ?>..??.?::?. ?.?
    30: 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?...............
    40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

  • Ahsan,

    I also need to know what your intended clock settings are. What are MCLK, BCLK, FSYNC?

    Thanks,
    Jeff McPherson

  • Hi jeff, 
    I integrate the speaker and its working fine so MCL , BCLK and FSYNC is fine

  • Hi Ahsan,

    So your recording is working now?

    Best regards,
    Jeff McPherson

  • No, the speaker is working fine, but not the microphone. I have also tested that the microphone is generating a pulse when I say something, but the recorded audio is always just noise.

  • Ahsan,

    What are the I2S clock frequencies? This is needed to check register settings.

    Also you say you are recording noise. Is the DOUT pin toggling data? I want to confirm that the ADC is actually powered on.

    Thanks,
    Jeff McPherson

  • Jeff,
    I am able to record the audio but having a lot of noise in it. 


    how can i remove the noise and should record the smooth recording? 

  • Hi Ahsan,

    As I asked before, I need your I2S clock frequencies to check if register settings are correct.

    This kind of distortion you are hearing is usually the result of improper clocking or the I2S settings not matching between the receiver and the codec. Double check that your formats, bit width, and clock edges are matching between the codec settings and your recorder.

    Best regards,
    Jeff McPherson

  • Hi Jeff,

    Thank you for your assistance. Below are the details of the I2S clock frequencies and codec settings as per our current DTS configuration for the TLV320AIC3100 codec integrated with the STM32MP1 platform:

    Clock Configuration:

    • MCLK (Master Clock): 24 MHz (fixed-clock)
    • I2S Format: I2S
    • mclk-fs (MCLK to Sample Rate Ratio): 256

      mclk: codec-mclk {
      	compatible = "fixed-clock";
      	#clock-cells = <0>;
      	clock-frequency = <24000000>;
      };
      
      sound-10 {
      	compatible = "simple-audio-card";
      	simple-audio-card,name = "10_audio";
      	simple-audio-card,dai-link@0 {
      		label = "tlv320aic3100-Codec";
      		format = "i2s";
      		bitclock-master = <&sai2a>;
      		frame-master = <&sai2a>;
      
      		cpu {
      			sound-dai = <&sai2a>;
      		};
      
      		codec {
      			sound-dai = <&tlv320aic3100>;
      		};
      	};
      };
      
      tlv320aic3100: tlv320aic3100@18 {
      	compatible = "ti,tlv320aic3100";
      	#sound-dai-cells = <0>;
      	reg = <0x18>;
      	clocks = <&mclk>;
      	reset-gpios = <&gpioh 3 GPIO_ACTIVE_LOW>;
      
      	port {
      		tlv320aic3100_in: endpoint {
      			remote-endpoint = <&sai2a_out_tlv320aic3100>;
      		};
      	};
      };
      


      Audio Routing and Configuration:

      • Widgets:
        • "Speaker", "Speaker Jack"
        • "Headphone", "Headphone Jack"
        • "Microphone", "Microphone Jack"
      • Routing:
        • "Speaker Jack" to "SPK"
        • "Headphone Jack" to "HPL" and "HPR"



  • Hi Ahsan,

    Looking at your settings, the clock tree has not been configured. I used the EVM GUI to calculate the required settings that you need for an MCLK of 24MHz. See the picture below and set up your EVM with the correct clock dividers using the registers using a tool like i2c get.

    Best regards,
    Jeff McPherson

  • Hi Jeff, 
    i updated the registers as you suggested the response is still the same. The registers values is as following 

    # i2cdump -y  -f 0  0x18
    No size specified (using byte-data access)
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
    00: 00 00 01 66 03 21 07 02 30 00 00 83 85 00 80 80    ..?f?!??0..??.??
    10: 08 00 83 85 80 80 04 00 00 00 01 00 00 00 01 00    ?.?????...?...?.
    20: 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00    ....?...........
    30: 00 00 00 02 30 12 03 02 02 11 10 00 01 04 00 14    ...?0??????.??.?
    40: 0c 00 00 00 6f 38 00 00 00 00 00 ee 10 d8 7e e3    ?...o8.....???~?
    50: 00 00 30 10 00 00 00 00 7f 00 00 00 00 00 00 00    ..0?....?.......
    60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    70: 00 00 00 00 00 7e 00 00 00 00 00 00 00 00 00 00    .....~..........
    80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

  • Hi Ahsan,

    I'll be able to run your register map tomorrow and look for issues. Can you confirm for me that you are giving a 24MHz clock and you want to output a 48kHz sampling rate with 64*fs BCLK?

    Thanks,
    Jeff McPherson