I have no idea. I am not even sure that the hardware actually supports it. (The SoC seems to support it, but is it correctly wired?) What I find bizarre is that the driver loads, does not complain, but then does not actually create an ALSA device, and inxi
still sees a HDMI audio device with no driver.
I guess another good question would be, does that driver actually work on any other hardware, such as the Orange Pi for which Manjaro has been carrying the patch for a while? But that is a question I cannot answer, the PinePhone is the only Allwinner A64 device I have available.
The DTS files enable HDMI sound, which on one hand means somebody seems to claim it should work, but on the other hand means that it is also not an issue with the DTS files (which would have been my next guess).
What I see is that the HDMI wiring is actually quite complicated, in that the A64 SoC outputs HDMI, which is then translated to USB C DisplayPort by the ANX7688 chip, which is then translated back to HDMI by some chip on the dock. The sound could be lost in translation somewhere. The ANX7688 chip supposedly supports HDMI audio (DisplayPort can also carry the audio), but I am not sure what chip the dock shipped with the PinePhone uses to convert the DisplayPort signal back to HDMI. (The Pinebook Pro dock uses an IT6564 chip, which also claims to support audio, but the small PinePhone dock might be using a completely different chip.) Though it might be that sound would actually work, if only it were detected to begin with, which is where the problem seems to lie.
In this Pipewire bug report from 2021, somebody got an HDMI audio ALSA device created (on Mobian) on the PinePhone (and then ran into an issue in Pipewire that the devices had the wrong priority order, which appears to have been already fixed). It does not say whether the device actually works, but it shows up, which it does not for me.
Hmmm, now that I think of it: Could it be that the kernel is getting an old device tree (from U-Boot or something) in which HDMI audio is missing or disabled? Can I somehow force using the device tree that ships with the kernel source?
I guess that is it: The .dtsi from U-Boot is much shorter and does not enable sound_hdmi
as the one in the kernel does. The corresponding snippet from sun50-a64.dtsi
is also missing in the U-Boot sun50-a64.dtsi
. – Well, various sources of information say that the files in the U-Boot source tree should only be used by U-Boot itself and that what U-Boot passes to the kernel is actually a file that ships with the kernel and comes fom the kernel source tree. So I am still confused as to what is actually going on here.