[IMX93] How to config device tree for SPDIF bind with HDMI Audio

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[IMX93] How to config device tree for SPDIF bind with HDMI Audio

677 Views
charleshuang
Senior Contributor II

Hi NXP Team,

As title, we connect SPDIF output "MX93_PAD_GPIO_IO23__SPDIF_OUT" to ADV7535 audio on our board. So, for this purpose, how should we configure the device tree?

 

 

0 Kudos
Reply
9 Replies

619 Views
charleshuang
Senior Contributor II

Hi @jimmychan ,

Yes, the imx93 does not directly support HDMI video/audio.

Our board is MIPI to HDMI, and the SPDIF_OUT is connected to the bridge IC.

In theory, it should work. Please refer to the attached document for the device tree modifications.

And please help us confirm where the issue might be? Thank you!

 

0 Kudos
Reply

567 Views
jimmychan
NXP TechSupport
NXP TechSupport

What is the issue you met? No sound come out?

When you test, do you unblank the HDMI?

FYI. https://community.nxp.com/t5/i-MX-Processors/IMX8MP-HDMI-audio-no-sound/td-p/1939886

0 Kudos
Reply

509 Views
weikeng-jimmy
Contributor III

Hi Sir,

My customer would to know how to achieve this function as figure (hdmi audio).

We refer Beacon development board setting and use "i2s" audio card format can work normally. (imx8mm-beacon-kit.dts)

sound-hdmi {
compatible = "simple-audio-card";
simple-audio-card,name = "sound-hdmi";
simple-audio-card,format = "i2s";

simple-audio-card,cpu {
sound-dai = <&sai5>;
system-clock-direction-out;
};

simple-audio-card,codec {
sound-dai = <&adv_bridge>;
};
};


Can you give we some suggestion for "spdif" setting. Thanks !

sound-hdmi {
compatible = "simple-audio-card";
simple-audio-card,name = "sound-hdmi";

#address-cells = <1>;
#size-cells = <0>;

simple-audio-card,cpu {
sound-dai = <&xcvr>; // sound-dai = <&sai5>;
};

simple-audio-card,codec {
sound-dai = <&adv7535>;
};
};

error log message as below.

[ 3.134115] asoc-simple-card sound-hdmi: control 3:0:0:IEC958 Playback Default:0 is already present
[ 3.143195] hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: error at snd_soc_pcm_dai_new on spdif-hifi: -16

螢幕截圖 2024-09-02 13.44.17.png

 

0 Kudos
Reply

548 Views
charleshuang
Senior Contributor II

Hi @jimmychan 

Thank your reply, I tried 'unblank the HDMI' but it look like no use.

Yes, there is no audio output.
I tested by using `gplay` to play a AV file.
The SPDIF_OUT has a signal, but there is no sound heard from the HDMI panel.

And my sound card information as below :

root@imx93afee320a1:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: imxaudioxcvr [imx-audio-xcvr], device 0: XCVR PCM snd-soc-dummy-dai-0 [XCVR PCM snd-soc-dummy-dai-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sgtl5000 [sgtl5000], device 0: HiFi sgtl5000-0 [HiFi sgtl5000-0]
Subdevices: 1/1
Subdevice #0: subdevice #0

 

The document of `xcvr` say it support HDMI Audio, is there anything that we need to pay attention to?
https://github.com/nxp-imx/linux-imx/blob/lf-6.1.36-2.1.0/Documentation/devicetree/bindings/sound/fs...

0 Kudos
Reply

245 Views
jimmychan
NXP TechSupport
NXP TechSupport

For your reference, the attachment is an example of spdif in dts.

0 Kudos
Reply

182 Views
weikeng-jimmy
Contributor III

Hi Jimmy,                                                                                                                                                               Thanks for your support. The imx93-11x11-frdm-aud-hat.dts have xcvr setting same as original imx93 dts file. Can you help to provide spdif access bridge definition in dts as below example.

https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next/+/refs/heads/akpm-base/Docu...

sound {
compatible = "simple-audio-card";
simple-audio-card,name = "Cubox Audio";

#address-cells = <1>;
#size-cells = <0>;

simple-audio-card,dai-link@0 { /* I2S - HDMI */
reg = <0>;
format = "i2s";
cpu {
sound-dai = <&audio0>;
};
codec {
sound-dai = <&tda998x0>;
};
};

simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
reg = <1>;
cpu {
sound-dai = <&audio1>;
};
codec {
sound-dai = <&tda998x1>;
};
};

simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
reg = <2>;
cpu {
sound-dai = <&audio2>;
};
codec {
sound-dai = <&spdif_codec>;
};
};
};

 

0 Kudos
Reply

100 Views
jimmychan
NXP TechSupport
NXP TechSupport

Hello,

 

I got the AE reply. The define of SPDIF in the example "imx93-11x11-frdm-aud-hat.dts " is almost the same with the one on i.mx93-11x11-evk.dts. The attachment is the imx93-11x11-frdm.dts that the AE used. 

 

Best regards,

Jimmy

0 Kudos
Reply

503 Views
jimmychan
NXP TechSupport
NXP TechSupport

"The SPDIF_OUT has a signal, but there is no sound heard from the HDMI panel."

Have you try the "alsamixer" to tune the volume?

0 Kudos
Reply

629 Views
jimmychan
NXP TechSupport
NXP TechSupport

According to the release notes, i.MX93 is not support the HDMI audio.

https://www.nxp.com/docs/en/release-note/IMX_LINUX_RELEASE_NOTES.pdf

0 Kudos
Reply