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: Codec

Part Number: TLV320AIC3100

Tool/software:

Hi all,

I am working on TLV320AIC3100 codec. I have IMX8MM host with linux kernel version 5.4.70 . I want record audio using headphone. Below is my schematic diagram:

 DTS entry of Codec is as follow.

  sound-tlv320aic {
    compatible = "simple-audio-card";
    simple-audio-card,name = "tlv320aic-audio";
    simple-audio-card,format = "i2s";
    simple-audio-card,frame-master = <&cpudaitlv>;
    simple-audio-card,bitclock-master = <&cpudaitlv>;
    simple-audio-card,widgets =
        "Microphone", "Microphone Jack",
        "Line", "Line In Jack",
        "Line", "Line Out Jack",
        "Headphone", "Headphone Jack",
        "Speaker", "Speaker Jack";
    simple-audio-card,routing =
        "Headphone Jack", "HPL",
        "Headphone Jack", "HPR",
        "MIC1LM","Microphone Jack",
        "MIC1RP","Microphone Jack",
        "MIC1LP","Microphone Jack",
        "Speaker Jack", "SPK";

    cpudaitlv: simple-audio-card,cpu {
      sound-dai = <&sai3>;
      clocks = <&clk IMX8MM_CLK_SAI3_ROOT>;
      dai-tdm-slot-num = <2>;
      dai-tdm-slot-width = <32>; 
    };

    simple-audio-card,codec {
        sound-dai = <&tlv320aic>;
        clocks = <&clk IMX8MM_CLK_SAI3_ROOT>;
    };
  };

&i2c2 {
    clock-frequency = <400000>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_i2c2>;
    status = "okay";

  tlv320aic: tlv320aic@18 {
    #sound-dai-cells = <0>;
    compatible = "ti,tlv320aic3100";
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_gpio_wlf>;
    ti,reset-gpio = <&gpio3 0 GPIO_ACTIVE_LOW>;
    reg=<0x18>;
    ai31xx-micbias-vg = <MICBIAS_2_0V>;
    status = "okay";
  };
};

&sai3 {
    #sound-dai-cells = <0>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_sai3>;
    assigned-clocks = <&clk IMX8MM_CLK_SAI3>;
    assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL2_OUT>;
    assigned-clock-rates = <11289600>;
    status = "okay";
};

pinctrl_gpio_wlf: gpiowlfgrp {
        fsl,pins = <
            MX8MM_IOMUXC_NAND_ALE_GPIO3_IO0     0xd6
        >;
};

Can you tell me I have made right widgets and routing in dts file>