For hardware reasons (HDMI outputs sent to splitters without DDC connected) I’m specifying the edids in the dts under the host1x/sor (0 & 1) nodes (nvidia,edid=xx) for the two outputs.
the issue is two-fold,
- The edid exported appears to repeat the first 128 bytes twice instead of containing the extension data:
given:
#define CTI_EDID_FDI_800x480 \
[00 ff ff ff ff ff ff 00 18 89 f4 70 0a 00 00 00\
0a 1a 01 03 81 0f 09 78 e7 ee 91 a3 54 4c 99 26\
0f 50 54 00 00 00 01 00 01 01 01 01 01 01 01 01\
01 01 01 01 01 01 4e 0c 20 c8 30 e0 2d 10 5a 64\
32 08 96 5a 00 00 00 14 00 00 00 fe 00 52 65 76\
20 31 2e 30 0a 20 20 20 20 20 00 00 00 fc 00 45\
4c 49 37 30 2d 49 78 48 57 0a 20 20 00 00 00 fd\
00 3c 45 1f 24 04 00 0a 20 20 20 20 20 20 01 e1\
02 03 0C 00 23 0F 07 07 83 01 00 00 00 00 00 00\
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b]
sor1 {
status = "okay";
hdmi-display {
status = "okay";
nvidia,edid = CTI_EDID_FDI_800x480;
};
dp-display {
status = "disabled";
};
};
In the dts. The output on the device is:
root@tegra-ubuntu:~# cat /sys/kernel/debug/tegradc.0/edid
00 ff ff ff ff ff ff 00 18 89 f4 70 0a 00 00 00
0a 1a 01 03 81 0f 09 78 e7 ee 91 a3 54 4c 99 26
0f 50 54 00 00 00 01 00 01 01 01 01 01 01 01 01
01 01 01 01 01 01 4e 0c 20 c8 30 e0 2d 10 5a 64
32 08 96 5a 00 00 00 14 00 00 00 fe 00 52 65 76
20 31 2e 30 0a 20 20 20 20 20 00 00 00 fc 00 45
4c 49 37 30 2d 49 78 48 57 0a 20 20 00 00 00 fd
00 3c 45 1f 24 04 00 0a 20 20 20 20 20 20 01 e1
00 ff ff ff ff ff ff 00 18 89 f4 70 0a 00 00 00
0a 1a 01 03 81 0f 09 78 e7 ee 91 a3 54 4c 99 26
0f 50 54 00 00 00 01 00 01 01 01 01 01 01 01 01
01 01 01 01 01 01 4e 0c 20 c8 30 e0 2d 10 5a 64
32 08 96 5a 00 00 00 14 00 00 00 fe 00 52 65 76
20 31 2e 30 0a 20 20 20 20 20 00 00 00 fc 00 45
4c 49 37 30 2d 49 78 48 57 0a 20 20 00 00 00 fd
00 3c 45 1f 24 04 00 0a 20 20 20 20 20 20 01 e1
root@tegra-ubuntu:~#
- And I’m uncertain if the above is the cause, but sound output via HDMI is not available. Despite the output of aplay -l and aplay -L showing the hdmi is there. I verified both edid I’ve used have audio and speakers specified in the edid. Adding the hdmi output devices manually in default.pa makes them visible in Sound Settings but no audio output via test. If I get the same info from the devkit I see the second 128 bytes are different.
root@tegra-ubuntu:/home/nvidia# cat /sys/kernel/debug/tegradc.0/edid
00 ff ff ff ff ff ff 00 10 ac a0 40 4c 33 33 30
12 18 01 03 80 33 1d 78 ea e5 95 a6 56 52 9d 27
10 50 54 a5 4b 00 71 4f 81 80 a9 c0 d1 c0 01 01
01 01 01 01 01 01 02 3a 80 18 71 38 2d 40 58 2c
45 00 fd 1e 11 00 00 1e 00 00 00 ff 00 44 57 46
32 58 34 34 52 30 33 33 4c 0a 00 00 00 fc 00 44
45 4c 4c 20 50 32 33 31 34 54 0a 20 00 00 00 fd
00 38 4c 1e 53 11 00 0a 20 20 20 20 20 20 01 85
02 03 26 f1 4f 90 05 04 03 02 07 16 01 06 11 12
15 13 14 1f 23 09 07 07 65 03 0c 00 10 00 83 01
00 00 e3 05 03 01 02 3a 80 18 71 38 2d 40 58 2c
45 00 fd 1e 11 00 00 1e 01 1d 80 18 71 1c 16 20
58 2c 25 00 fd 1e 11 00 00 9e 01 1d 00 72 51 d0
1e 20 6e 28 55 00 fd 1e 11 00 00 1e 8c 0a d0 8a
20 e0 2d 10 10 3e 96 00 fd 1e 11 00 00 18 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c5
root@tegra-ubuntu:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: tegrahda [tegra-hda], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: tegrahda [tegra-hda], device 7: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
root@tegra-ubuntu:~# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
default
music
demixer
voice
aux_plug
music_and_voice
dmix:CARD=tegrahda,DEV=3
tegra-hda, HDMI 0
Direct sample mixing device
dmix:CARD=tegrahda,DEV=7
tegra-hda, HDMI 0
Direct sample mixing device
dsnoop:CARD=tegrahda,DEV=3
tegra-hda, HDMI 0
Direct sample snooping device
dsnoop:CARD=tegrahda,DEV=7
tegra-hda, HDMI 0
Direct sample snooping device
hw:CARD=tegrahda,DEV=3
tegra-hda, HDMI 0
Direct hardware device without any conversions
hw:CARD=tegrahda,DEV=7
tegra-hda, HDMI 0
Direct hardware device without any conversions
plughw:CARD=tegrahda,DEV=3
tegra-hda, HDMI 0
Hardware device with all software conversions
plughw:CARD=tegrahda,DEV=7
tegra-hda, HDMI 0
Hardware device with all software conversions
Using the fallback mechanism of course doesn’t work because we need different resolutions for the two outputs. Seems better to have the default resolution at the desired setting than relying on xorg configurations when we’d eventually like to not require x/lightdm/user logged in for the embedded device.
And tangentially related - how to get sound output to second HDMI? Two devices are listed, 3 and 7, even on a stock devkit. In the dts there are two dpaux@xxx enabled. I think on the devkit DEV=7 outputs on HDMI-0, but neither works as per above when overriding the edid.
re the audio setup maybe everyone already knows this but there are two udev rules that switch the audio setup (asound.conf and default.pa links) when HDMI is hotplugged.
nvidia@tegra-ubuntu:~$ cat < /etc/udev/rules.d/90-alsa-asound-tegra.rules
SUBSYSTEM!="sound", GOTO="sound_end"
KERNEL!="card*", GOTO="sound_end"
ATTRS{id}=="tegrasndt186ref", ACTION=="add", RUN+="/bin/rm /var/lib/alsa/asound.state"
ATTRS{id}=="tegrasndt186ref", ACTION=="add", RUN+="/etc/amixer_settings"
ATTRS{id}=="tegrasndt186ref", ACTION=="add", RUN+="/bin/ln -sf /etc/asound.conf.tegrasndt186ref /etc/asound.conf"
ATTRS{id}=="tegrahda", ACTION=="add", RUN+="/bin/ln -sf /etc/asound.conf.tegrahda /etc/asound.conf"
LABEL="sound_end"
nvidia@tegra-ubuntu:~$ cat < /etc/udev/rules.d/92-hdmi-audio-tegra.rules
SUBSYSTEM!="switch", GOTO="hdmi_end"
KERNEL!="hdmi_audio", GOTO="hdmi_end"
ATTRS{state}=="1", RUN+="/bin/ln -sf /etc/pulse/default.pa.hdmi /etc/pulse/default.pa"
ATTRS{state}=="0", RUN+="/bin/ln -sf /etc/pulse/default.pa.orig /etc/pulse/default.pa"
ATTRS{state}=="1", RUN+="/bin/ln -sf /etc/asound.conf.tegrahda /etc/asound.conf"
ATTRS{state}=="0", RUN+="/bin/ln -sf /etc/asound.conf.tegrasndt186ref /etc/asound.conf"
LABEL="hdmi_end"