You can then pass an argument in your grub.
Do
nano /etc/default/grub
I have this for GRUB_CMDLINE_LINUX_DEFAULT
loglevel=3 snd-intel-dspcfg.dsp_driver=3 quiet
The more important is that you have snd-intel-dspcfg.dsp_driver=1
Then save and grub-mkconfig -o /boot/grub/grub.cfg
After a reboot the Legacy HDA driver will be loaded and you wille be able to have audio on HDMI.
EDIT : After a reinstall for looking if it was right, i saw an error. it’s dsp_driver=3 (meaning using SOF whereas Legacy) I corrected it.