https://e2e.ti.com/support/audio-group/audio/f/audio-forum/1388407/tas2563-device-tree-configuration
器件型号:TAS2563工具与软件:
将 TAS2563集成到我的 Yocto 构建中时遇到了一些问题。 我 devicetree 中的编解码器节点似乎会带来一些问题、但我不知道为什么。 第一个信息:
- 平台:STM32MP
- 放大器
- 内核版本6.1.28
- 使用适用于 TI Git 的驱动程序、而不是主线 Linux。 构建内核模块。
我已经使用提供的工具创建了一个配置 bin 文件、并将其放在/lib/firmware 目录中。 我还没有 DSP 或校准文件、因为我还没有 EVK。 我已申请访问 PurePath 控制台和 TAS2563-SW、但在 PurePath 控制台中没有显示 TAS2563、我是否遗漏了什么?
如果我正确理解了其他主题、TAS2563也可以在没有 DSP 和校准文件的情况下工作、所以让我们继续。 这是我的器件树编解码器片段:
	tas2563: codec@4c {
		compatible = "ti,tas2563";
		reg = <0x4C>;
		#sound-dai-cells = <0>;
		status = "okay";
		//reset-gpios = <&gpiob 1 GPIO_ACTIVE_LOW>;
		//interrupt-parent = <&gpioa>;
		//interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
		tas2563_port: port {
			#address-cells = <1>;
			#size-cells = <0>;
			tas2563_tx_endpoint: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&sai2a_endpoint>;
				dai-format = "i2s";
				frame-master;
				bitclock-master;
			};
			tas2563_rx_endpoint: endpoint@1 {
				reg = <1>;
				remote-endpoint = <&sai2b_endpoint>;
				dai-format = "i2s";
				frame-master;
				bitclock-master;
			};
		};
	};
和我的 SAI 片段:
&sai2{
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&sai2a_pins_mx>, <&sai2b_pins_mx>;
	pinctrl-1 = <&sai2a_sleep_pins_mx>, <&sai2b_sleep_pins_mx>;
	status = "okay";
	clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
	clock-names = "pclk", "x8k", "x11k";
	sai2a:audio-controller@4400b004{
		compatible = "st,stm32-sai-sub-a";
		#clock-cells = <0>;
		dma-names = "tx";
		status = "okay";
		sai2a_port: port {
			sai2a_endpoint: endpoint {
				remote-endpoint = <&tas2563_tx_endpoint>;
				format = "i2s";
				mclk-fs = <256>;
				//dai-tdm-slot-num = <2>;
				///dai-tdm-slot-width = <32>;
			};
		};
	};
 
	 sai2b:audio-controller@4400b024{
		compatible = "st,stm32-sai-sub-b";
		dma-names = "rx";
		st,sync = <&sai2a 2>;
		clocks = <&rcc SAI2_K>, <&sai2a>;
		clock-names = "sai_ck", "MCLK";
		status = "okay";
		sai2b_port: port {
			sai2b_endpoint: endpoint {
				remote-endpoint = <&tas2563_rx_endpoint>;
				format = "i2s";
				mclk-fs = <256>;
				//dai-tdm-slot-num = <2>;
				//dai-tdm-slot-width = <32>;
			};
		};
	};
};
和我的声卡片段:
sound {
		compatible = "audio-graph-card";
		label = "Sound";
		widgets = 
			"Speaker" , "BT Speaker out",
			"Microphone" , "BT Speaker in";
		routing = 
			"BT Speaker out" , "BT_SCO_RX",
			"BT_SCO_TX", "BT Speaker in";
		dais = <&sai1a_port &sai1b_port &sai2a_port &sai2b_port>;
		status = "okay";
};
Sai1a 和 Sai1b 使用 bt-SCO 驱动程序指向蓝牙模块声卡。
问题是声卡未被 ASOC-AUDIO-GRAG-CARD 驱动程序注册:
[ 21.036343] asoc-audio-graph-card sound: error -EINVAL: parse error [ 21.041262] asoc-audio-graph-card: probe of sound failed with error -22
当我将 TAS2563编解码器节点替换为另一个 bt-SCO 编解码器时、问题消失了、声卡已注册。 因此、我怀疑 TAS2563编解码器 devicetre 节点有问题、或者驱动器中有什么问题。 驱动程序会加载并打印以下内容:
[ 20.318888] tasdevice-codec 2-004c: tasdevice_i2c_parse_dt, chip_id:0 [ 20.357839] tasdevice-codec 2-004c: Looking up irq gpio property in node codec@4c failed -22, no side effect on driver running [ 20.428478] tasdevice-codec 2-004c: i2c register success
 
				 
		 
					