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.

[参考译文] TLV320AIC3204:编解码器探测问题。

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

https://e2e.ti.com/support/audio-group/audio/f/audio-forum/1338803/tlv320aic3204-codec-probe-issue

器件型号:TLV320AIC3204

大家好!

我正在使用 imx8mp 定制板。  TLV320AIC3204编解码器通过 I2C4和 SAI5接口连接到 imx8mp。

以下是我的 DTS 文件更改:

sound {
                 compatible = "simple-audio-card";
                 label = "tlv320aic32x4-audio";
                 simple-audio-card,name = "tlv320aic32x4";
                 simple-audio-card,format = "i2s";
                 status = "okay";
                 simple-audio-card,frame-master = <&sndcodec>;
                 simple-audio-card,bitclock-master = <&sndcodec>;
                 simple-audio-card,widgets =
                     "Microphone", "Mic Jack",
                     "Line", "Line In",
                     "Line", "Line Out",
                     "Headphone", "Headphone Jack";
                 simple-audio-card,routing =
                      "IN1_L", "Line In",
                      "IN1_R", "Line In",
                      "IN3_R", "Mic Jack",
                      "CM_L", "Mic Jack",
                      "CM_R", "Mic Jack",
                      "Line Out", "LOL",
                      "Line Out", "LOR",
                      "Headphone Jack", "HPL",
                      "Headphone Jack", "HPR";

                simple-audio-card,dai-link {
                        format = "i2s";
                        cpu: simple-audio-card,cpu {
                                sound-dai = <&sai5>;
                        };

                        sndcodec: codec {
                                sound-dai = <&tlv320aic32x4>;
                                system-clock-frequency = <IMX8MP_CLK_AUDIO_BLK_CTRL_SAI5_MCLK1>; /* this matches sai3 */
                        };
                };
         };

&sai5 {
        #sound-dai-cells = <0>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_sai5>;
        dmas = <&sdma2 8 24 0>, <&sdma2 9 24 0>;
        assigned-clocks = <&clk IMX8MP_CLK_SAI5>;
        assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
        assigned-clock-rates = <24576000>;
        clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI5_IPG>, <&clk IMX8MP_CLK_DUMMY>,
               <&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI5_MCLK1>, <&clk IMX8MP_CLK_DUMMY>,
               <&clk IMX8MP_CLK_DUMMY>, <&clk IMX8MP_AUDIO_PLL1_OUT>,
               <&clk IMX8MP_AUDIO_PLL2_OUT>;
        clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
        fsl,sai-asynchronous;
        fsl,dataline = <2 0xf 0xf>;
        status = "okay";
};

pinctrl_sai5:sai5grp {
                     fsl,pins = <                            
                             MX8MP_IOMUXC_SAI5_MCLK__AUDIOMIX_SAI5_MCLK                0xd6
                             MX8MP_IOMUXC_SAI5_RXD0__AUDIOMIX_SAI5_RX_DATA00           0xd6
                             MX8MP_IOMUXC_SAI5_RXFS__AUDIOMIX_SAI5_RX_SYNC             0xd6
                             MX8MP_IOMUXC_SAI5_RXC__AUDIOMIX_SAI5_RX_BCLK              0xd6
                             MX8MP_IOMUXC_SAI5_RXC__AUDIOMIX_SAI1_TX_DATA01            0xd6                           
                             >;
             };

&i2c4 {
        clock-frequency = <384000>;
        pinctrl-names = "default", "gpio";
        pinctrl-0 = <&pinctrl_i2c4>;
        pinctrl-1 = <&pinctrl_i2c4_gpio>;
        scl-gpios = <&gpio5 20 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
        sda-gpios = <&gpio5 21 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
        status = "okay";
        tlv320aic32x4: tlv320aic32x4@18 {
                       #sound-dai-cells=<0>;
                       compatible = "ti,tlv320aic32x4";
                       status = "okay";
                       pinctrl-names = "default";
                       pinctrl-0 = <&pinctrl_tlv320aic3x04>;
                       reg = <0x18>;
                       clock-names = "mclk";
                       clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI5_MCLK1>;
                       iov-supply = <&reg_vcc_1v8>;
                       ldoin-supply = <&reg_vcc_3v3>;
                       reset-gpios = <&gpio5 11 GPIO_ACTIVE_LOW>;
               };


};

pinctrl_tlv320aic3x04: tlv320aic3x04grp {
                               fsl,pins = <
                                       /* CODEC RST# */
                                       MX8MP_IOMUXC_ECSPI2_MOSI__GPIO5_IO11     0x180
                                       >;
};

通过上述 DTS 更改、我将收到以下错误日志:

[    7.244493][   T10] asoc-simple-card sound: ASoC: no sink widget found for IN1_L
[    7.258329][   T10] asoc-simple-card sound: ASoC: Failed to add route Line In -> direct -> IN1_L
[    7.331184][   T10] asoc-simple-card sound: ASoC: no sink widget found for IN1_R
[    7.344900][   T10] asoc-simple-card sound: ASoC: Failed to add route Line In -> direct -> IN1_R
[    7.417926][   T10] asoc-simple-card sound: ASoC: no sink widget found for IN3_R
[    7.431851][   T10] asoc-simple-card sound: ASoC: Failed to add route Mic Jack -> direct -> IN3_R
[    7.504847][   T10] asoc-simple-card sound: ASoC: no sink widget found for CM_L
[    7.512189][   T95] usb 1-1.1: new full-speed USB device number 3 using xhci-hcd
[    7.525980][   T10] asoc-simple-card sound: ASoC: Failed to add route Mic Jack -> direct -> CM_L
[    7.598957][   T10] asoc-simple-card sound: ASoC: no sink widget found for CM_R
[    7.612628][   T10] asoc-simple-card sound: ASoC: Failed to add route Mic Jack -> direct -> CM_R
[    7.685553][   T10] asoc-simple-card sound: ASoC: no source widget found for LOL
[    7.699316][   T95] usb 1-1.1: New USB device found, idVendor=0eef, idProduct=0005, bcdDevice= 1.11
[    7.708388][   T10] asoc-simple-card sound: ASoC: Failed to add route LOL -> direct -> Line Out
[    7.723485][   T95] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    7.731505][   T95] usb 1-1.1: Product: WS170120
[    7.723485][   T95] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    7.731505][   T95] usb 1-1.1: Product: WS170120
[    7.741713][   T95] usb 1-1.1: Manufacturer: WaveShare
[    7.750788][   T95] usb 1-1.1: SerialNumber: 220211
[    7.757046][   T10] asoc-simple-card sound: ASoC: no source widget found for LOR
[    7.817234][   T10] asoc-simple-card sound: ASoC: Failed to add route LOR -> direct -> Line Out
[    7.860368][   T95] input: WaveShare WS170120 as /devices/platform/soc@0/32f10108.usb/38200000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.1/1-1.1:1.0/001
[    7.865821][   T10] asoc-simple-card sound: ASoC: no source widget found for HPL
[    7.882169][   T95] hid-multitouch 0003:0EEF:0005.0001: input,hiddev96,hidraw0: USB HID v1.11 Device [WaveShare WS170120] on usb-xhci-hcd.1.au0
[    7.887048][   T10] asoc-simple-card sound: ASoC: Failed to add route HPL -> direct -> Headphone Jack
[    8.008465][   T10] asoc-simple-card sound: ASoC: no source widget found for HPR
[    8.022156][   T10] asoc-simple-card sound: ASoC: Failed to add route HPR -> direct -> Headphone Jack
[    8.093883][    T1] input: gpio-keys as /devices/platform/gpio-keys/input/input3
[    8.113062][    T1] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    8.123891][    T1] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    8.131262][   T68] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    8.140014][    T1] ALSA device list:
[    8.140595][   T68] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[    8.144274][    T1]   No soundcards found.
[    8.157674][    T1] Freeing unused kernel memory: 1984K

有人能看到我做错了什么或遗漏了什么吗?

此致、

Dhaval Shiroya

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

    我将确认您是否要将 aic3204设置为主器件。 请告诉我内核版本和从何处获得 aic3204驱动程序代码。

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

    谢谢 的参与。 我使用的是 6.5.0-25通用内核。

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

    我想通知大家, 我最近解决了这个问题。 这是我在驱动程序中的语法错误。