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:CAN'播放和录制

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

https://e2e.ti.com/support/audio-group/audio/f/audio-forum/1315047/tlv320aic3104-can-t-aplay-and-record

器件型号:TLV320AIC3104

你好

 我使用的是 Linux4.19内核,芯片是 tlv320aic3104,然后是 menuconfig 配置<*>德州仪器 TLV320AIC3x 编解码器,我的器件树配置当音频输入时,我可以控制从 BYPASS 到 RIHGHT_LOP/M 的输出。 我要实现的是具有红色差分输入和绿色差分输出的配置。 但当我执行 arecord -D HW:0、0 -f s16_LE -d 10 -c 2 -r 16 -t wav 001.wav 时、音频不会从 I2S 输出到 CPU、播放 CPU 发出的音频播放 sin.wav 声音、但我不确定它是否能进入3104芯片。 以前使用 Linux4.1时,配置音频可以达到我需要的效果,但使用相同的配置却无法实现。

 

我希望通过 ALSA 命令满足我的需求、并寻求您的帮助。

此致

 

注1:我注意到 alsa 命令的旧版本和新版本之间的 numid 数字发生了变化。 例如:

numid=42、iface=混频器、name='Right Line1L Mux'、numid=43、iface=混频器、name='RightLine1RMux'

注2:我用于配置录制的命令是

amixer cset numid=32,iface=Mixer,name='PGA Capture Switch'开,of

amixer cset numid=31, iface=Mixer, name='PGA Capture Volume' 31

amixer cset numid=23,iface=mixer, name='AGC Switch' off,off

amixer cset numid=40,iface=mixer,name='Left Line1L Mux' 2

amixer cset numid=44、iface=mixer、name='Left PGA Mixer Line1L Switch' on

amixer cset numid=37,iface=mixer, name='Left HPCOM Mux'

----------------------------------------------------------------------------------------------------------------

到目前为止、我发现当我配置路径时、寄存器0x66配置为0xa2 (i2cset -y -f 0 0x18 0x66 0xa2)。 执行一次播放、不会产生任何声音(0x66将变回0x02)、再执行一个路径配置、再次将寄存器0x66配置为0xa2 (i2cset -y -f 0 0x18 0x66 0xa2)、播放音频并查找声音(检查0x66寄存器是否已更改为0xa2)。

----------------------------------------------------------------------------------------------------------------

我的设备树:

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>; */
		};
	};

&clks {
	assigned-clocks = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
	/* assigned-clock-rates = <1179648000>; */
	assigned-clock-rates = <786432000>;
	/* assigned-clock-rates = <705600000>; */
};

&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 = <&gpio5 2 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";
	};

	eeprom@50 {
		compatible = "atmel,24c02";
		reg = <0x50>;
	};
};

&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>, <12288000>; */
	assigned-clock-rates = <2>, <24576000>;
	/* assigned-clock-rates = <2>, <28224000>; */
	status = "okay";
};

录像

阿普拉斯

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

    您好、Ka ka:

    对于 regdump、我发现以下几个错误:

    1.输入 ADC PGA 已静音、  

    2.关闭 Micbias 电源

    3.未路由线路输出

    这意味着您的驱动程序中有错误的路由路径并使其不起作用。 您应该通过 amixer 设置来更正它

    谢谢

    凯文