If your Pi4 doesn’t have HDMI audio output, please make sure that you connect your HDMI display to the HDMI output labeled HDMI0
. It’s the HDMI output next to the USB power input. See the image below. Right now the secondary HDMI output doesn’t support audio.
(Image by Raspberry Pi Foundation under a Creative Commons license)