TI中文支持网
TI专业的中文技术问题搜集分享网站

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.wavPlaying 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里面选配那些

Amy Luo:

您好,

您在哪里找的的snd-soc-tlv320aic3x.ko 和 snd-soc-tlv320aic3x-i2c.ko?

看下面FAQ有提到TLV320AIC3104 驱动,看下是否有帮助:

[FAQ] Linux Drivers: Device drivers for AIC31xx/DAC31xx/AIC325x/AIC320x/AIC326x/AIC321x

,

ka ka:

这两个ko文件是我选配menuconfig编译成模块,板子上电后安装的。

,

ka ka:

这个链接的驱动文件安装后,显示找不到声卡。我编译我自己的内核,如果能找到声卡就无法使用i2ctool工具,也无法播放和录制。和声卡是冲突的,是不是我的设备树那里配置有问题呢,但是我没有查看到错误

root@:/music# i2cdump -y -f 0 0x18No size specified (using byte-data access) 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef00: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX

,

Amy Luo:

下周一我将具体看下您的问题给你回复,若给您造成不便很抱歉

,

ka ka:

期待您的回复

,

Amy Luo:

很抱歉现在才回复您的问题,我不懂linux,为更好解决您的问题,建议您将问题发布在E2E英文技术论坛上,请资深的英文论坛工程师为您提供帮助,英文论坛对应子论坛链接:https://e2e.ti.com/support/audio-group/audio/f/audio-forum

赞(0)
未经允许不得转载:TI中文支持网 » TLV320AIC3104: 安装snd-soc-tlv320aic3x-i2c.ko模块失败,无法aplay音频
分享到: 更多 (0)