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.

TLV320AIC3104: 安装snd-soc-tlv320aic3x-i2c.ko模块失败,无法aplay音频

Part Number: TLV320AIC3104

你好,我升级到linux5.15.71配置声卡的时候,选配了snd-soc-tlv320aic3x.ko 和 snd-soc-tlv320aic3x-i2c.ko 模块,安装完成后

ls /dev/snd/ by-path controlC0 pcmC0D0c pcmC0D0p timer  

但是安装完模块后 i2c命令无法使用,不安装模块时都是可以使用的

# 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: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX

无论是播放还是录制音频都是显示这种信息

c# aplay sine.wav
Playing WAVE 'sine.wav' : Signed 32 bit Little Endian, Ra[ 1101.900499] fsl-sai 2028000.sai: failed to derive required Tx rate: 2822400
te 44100 Hz, Stereo
[ 1101.909754] fsl-sai 2028000.sai: ASoC: error at snd_soc_dai_hw_params on 2028000.sai: -22
[ 1101.923524] 2028000.sai-tlv320aic3x-hifi: ASoC: soc_pcm_hw_params() failed (-22)
aplay: set_params:1297: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S32_LE
SUBFORMAT: STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (125011 125012)
PERIOD_SIZE: 5513
PERIOD_BYTES: 44104
PERIODS: 4
BUFFER_TIME: (500045 500046)
BUFFER_SIZE: 22052
BUFFER_BYTES: 176416
TICK_TIME: 0

在我安装模块时,有这样一个错误

# insmod snd-soc-tlv320aic3x-i2c.ko
[ 327.413410] tlv320aic3x 0-0018: Unsuitable MicBias voltage found in DT

下面是我的相关设备树配置

	sound {
		compatible = "simple-audio-card";
		simple-audio-card,name = "tlv320aic3104";
		simple-audio-card,format = "i2s";
		simple-audio-card,mclk-fs = <256>;
		simple-audio-card,bitclock-master = <&dailink0_master>;
		simple-audio-card,frame-master = <&dailink0_master>;
		simple-audio-card,widgets =
			"Microphone", "Microphone Jack",
			"Headphone", "Headphone Jack",
			"Speaker", "External Speaker",
			"Line", "Line Out",
			"Line", "Line In";
		,routing =
			"MIC_IN", "Microphone Jack",
			"Headphone Jack", "HP_OUT",
			"LINE1L", "Line In",
			"LINE1R", "Line In",
			"Headphone Jack", "RLOUT",
			"Headphone Jack", "LLOUT";

		dailink0_master:simple-audio-card,cpu {
			sound-dai = <&sai1 0>;
		};

		simple-audio-card,codec {
			sound-dai = <&codec 0>;
			// clocks = <&clks IMX6UL_CLK_SAI1>;
		};
	};
	
&sai1 {
	#sound-dai-cells = <0>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_sai1>;
	assigned-clocks = <&clks IMX6UL_CLK_SAI1_SEL>,
			  <&clks IMX6UL_CLK_SAI1>;
	assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
	assigned-clock-rates = <2>, <24576000>;
	status = "okay";
};

&i2c1 {
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c1>;
	status = "okay";
	
	codec: tlv320aic3104@18 {
		#sound-dai-cells = <0>;
		compatible = "ti,tlv320aic3104";
		reg = <0x18>;
		gpio-reset = <&gpio1 26 GPIO_ACTIVE_LOW>;
		ai3x-micbias-vg = <0>;
		/* Regulators */
		DRVDD-supply = <&reg_3p3v>;
		AVDD-supply = <&reg_3p3v>;
		IOVDD-supply = <&reg_3p3v>;
		DVDD-supply = <&reg_1p8v>;
		status = "okay";
	};

请问我是哪里没配置,还有有什么配置错误呢?menuconfig里面选配那些