I'm sorry if I've overlooked something - but the thread creator wants to output audio via HDMI, thus completely bypassing the Realtek audio hardware. How would the Realtek driver affect this in any way?
Yeah, this is something I haven't managed to figure out, either.
In any event, I *think* I found a solution to the issue - and it was NOT easy! - so for the benefit of anyone googling this in the future, here's my postmortem.
- I got tired of figuring out whether my HP PC was hardware-capable of outputting 5.1, even though I still don't understand what additional hardware capabilities should be necessary in a machine with an HDMI output. So I bought a new Acer PC that had 5.1 capability plastered all over the description. (It was something I was considering anyway)
- The new PC nonetheless exhibited the same exact issue - only outputting stereo sound and only giving the option to output stereo sound.
- Several sites suggested that the "Realtek HD Audio Manager" was an essential device for HD/5.1 sound output and this was absent from the device manager. So I had to download this and reinstall it.
- Enabling HD/5.1 output required messing with the settings in MULTIPLE places - both the control panel and device manager, including in sub-menus buried within sub-menus. Nonetheless, many hours later, 5.1 output appeared in the pulldown options! MIRACLE!
- We weren't home yet. Despite enabling the 5.1 output, the speaker test would only output sound from the front two speakers. (This was different from the way the speaker test failed off the prior PC, where it outputted sound from the surround speakers but the rear sound output was the same as the front sound output.) This suggested to me that the issue at this point was hardware, not software... but WHAT hardware??!
- The culprit was the audio out. I had misremembered the TV→receiver connection. It was a digital optical cable, not an HDMI. And it turns out that digital optical cables do not, in fact, reproduce the exact digital stream they take in - they are bandwidth limited and supposedly cannot be used for 5.1 surround sound or even (according to some sites I saw - I cannot independently verify this) 24bit/96khz stereo. The mystery of how I was nonetheless previously able to get surround-sound output from Xbox→HDMI→TV→[optical]→receiver→speakers remains unsolved.
- I rewired the cables so instead of going PC→HDMI→TV→[optical]→receiver→speakers, I now have one HDMI going from PC→TV and a second HDMI going from PC →receiver. Finally we got working 5.1 output through the speaker test and Foobar2000!! This, I think, is as good as it will get. Unfortunately it's not an ideal solution because having all audio output come through the TV to the receiver enabled me to switch back and forth from PC, to TV, to Xbox as many times as I wanted, and the audio would come through the receiver without having to do anything else. Now, I have to switch the dial for the audio source on the receiver every time I switch the audio source feeding to the TV, which is annoying and really should be unnecessary in the year 2020, but there is no digital audio output from the TV besides the (apparently unusable) optical.
Thanks very much to everybody who tried to help. I hope this post helps someone else out there eventually. Many unanswered questions remain but at least I can listen to Dark Side of the Moon in surround sound.