I've been wanting to do this for a long time too. Did some testing today. Hold on to your hats, this is going to be confusing. 
tl;dr Use Kodi. 
1. My very humble setup
I have a PC with HDMI out and a "surround" receiver capable of decoding Dolby Digital and DTS (dunno 'bout the newer formats, probably not). Been using it for ages w/ a Raspberry Pi w/ Kodi Media Center software and later Xbox One + Kodi. Works just fine with movies and surround sound.
However, that HDMI-out from my PC should work too. In the past, when my PC did not have HDMI yet, I used a soundcard w/ an S/PDif (Sony/Philips Digital Interface) output for that. Always with Kodi in pass through mode. But s/pdif is compressed and does not support pass through of multichannel uncompressed PCM (which must be just as good as Dolby or DTS pass thru as far as I know). My mediacenter software (Kodi) decodes the audio (should be lossless) to 5 PCM channels and sends a digital audio steam of the multiple PCM channels (should be lossless) to my amplifier. The amplifier converts the 5 digital streams to 5 analog streams for my 5 speakers (DAC).
2. To sound server or not to?
Anyway, I disabled the sound servers JackAudio and PulseAudio (PA). Especially PulseAudio since it plays stereo over 4 speakers. That is: you get each channel twice! And gone is your stereo spectrum. WHAT a piece of utter shite PA is! Unbelievable how amateurish! Dunno how PipeWire (PW) handles this.
So to test I used bare ALSA.
3. The test file(s) and players
I have a 5.1 FLAC audio file for Queen's "A Night At The Opera". But with VLC player I couldn't get that to play multichnnel: it would get down mixed to stereo or wouldn't play at al. With Audacity (or other software? I forgot) I converted the 5.1 FLAC files to a AC3 (= Dolby Digital, that old fashioned compressed 5.1 format) copy. That would pay w/ VLC.
Then I used Kodi mediacenter (it's in every distro's repo and available for Windows and Xbox (!) too). You must configure audio twice (!) in so-called "expert mode". You must choose your audio device (i.e. the HDMI port of your PC) once for audio in general en when you scroll down you can choose "Pass through". Under 'Pass through' you must choose the HDMI port of your PC for the second time (!!) . And you must choose what audio formats to pass tru and what to decode (to multichannel) uncompressed PCM.
So to play multi-chanel audio you need to pick your file format and player wisely!
HDMI and Kodi
Beware. HDMI sends all kinds of info on what is on the other end of the HDMI cable. This means that in Kodi my HDMI port was named different from ALSA. Kodi could "see" that I have a Sony amplifier so it called it "Sony HDMI" or something.
And lo and behold, that 5.1 FLAC file as well as the AC3 file would play multichannel. I could hear Queen sing "I think you should" at approx 2 minutes in 'Death On Two Legs' on the left rear speaker (when Queen asked "Do you feel like suicide?"). When I used PulseAudio I could hear that the stereo channel was played back through the rear speakers. So I could hear 4 speakers (or five, don't remember) but it was NOT 5.1 sound.
Lessons learned
Pfffff. What a lot of hassle. Lesson learned: disable sound servers like Pulse (ESPECIALLY Pulse) and Jack and use bare ALSA.
I may or may not use PipeWire in the future. But it'll be al ot of hassle to determine if that will pass through digital audio or if it decodes or spreads the 2 stereo channels over 5 speakers.
Another tip: if you have the Immersion Box Set of Pink Floyd's 'Dark Side Of The Moon' then you can use the beginning of "Money" to test multi channel. All four samples (the coins etc.) should play on their own speaker. The samples should "walk around your room".
P.S. HDMI hubs are not your friend! 