HDMI audio support?
I am trying to make the audio of HDMI chip(ite66121fn) working. But I can't make it till now.
I tried to modify the dts code with the following patch:
diff --git a/src/arm64/ti/k3-j722s-evm.dts b/src/arm64/ti/k3-j722s-evm.dts
index bc3f9f56..4257c0a0 100644
--- a/src/arm64/ti/k3-j722s-evm.dts
+++ b/src/arm64/ti/k3-j722s-evm.dts
@@ -249,6 +249,26 @@
};
};
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "it66121 HDMI";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,bitclock-master = <&hdmi_dailink_master>;
+ simple-audio-card,frame-master = <&hdmi_dailink_master>;
+ simple-audio-card,mclk-fs = <2182>;
+ status = "okay";
+
+ hdmi_dailink_master: simple-audio-card,cpu {
+ sound-dai = <&mcasp1>;
+ system-clock-frequency = <24000000>;
+ system-clock-direction-out;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&it66121hdmitx>;
+ };
+ };
+
fan: cooling_fan {
compatible = "pwm-fan";
pinctrl-names = "default";
@@ -573,6 +593,14 @@
J722S_IOPAD(0x0038, PIN_INPUT, 7) /* (J22) OSPI0_CSn3.GPIO0_14 */
>;
};
+
+ mcasp1_codec_pins_default: mcasp1-codec-pins-default {
+ pinctrl-single,pins = <
+ J722S_IOPAD(0x0090, PIN_OUTPUT, 2) /* (P27) GPMC0_BE0n_CLE.MCASP1_ACLKX */
+ J722S_IOPAD(0x0098, PIN_OUTPUT, 2) /* (V21) GPMC0_WAIT0.MCASP1_AFSX */
+ J722S_IOPAD(0x008c, PIN_OUTPUT, 2) /* (N23) GPMC0_WEn.MCASP1_AXR0 */
+ >;
+ };
};
&epwm2 {
@@ -1193,3 +1221,24 @@ csi0_i2c: &main_i2c2 {
};
};
};
+
+&mcasp1 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcasp1_codec_pins_default>;
+
+ #sound-dai-cells = <0>;
+
+ op-mode = <0>; /* MCASP_IIS_MODE */
+ tdm-slots = <2>;
+
+ serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
+ 1 0 0 0
+ 0 0 0 0
+ 0 0 0 0
+ 0 0 0 0
+ >;
+ tx-num-evt = <32>;
+ rx-num-evt = <32>;
+};
After this. I can get the audio device of HDMI with aplay -l
.
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [it66121 HDMI], device 0: davinci-mcasp.0-i2s-hifi i2s-hifi-0 [davinci-mcasp.0-i2s-hifi i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
But I can't play music with command aplay xxx.wav
.
Is there anything I miss or doing wrong?