5.1 Surround for PC Gaming

Post date: Jun 4, 2011 5:37:46 PM

This page is a decade old, but still not that much out of date, because the standards haven't changed. If your 5.1 surround system doesn't have HDMI ARC, or usable HDMI passthrough, and you're trying to hack around that, these experiences might help you.

I have a surround sound system with various connectors, already plugged into a TV with even more connectors, and a laptop with an overlapping set of connectors on it. I thought that I would set myself up to enjoy 5.1 surround audio in games.

Idiot.

  • Step 1: Analog cables.

    • Before you ask, yes the laptop does have surround analog out, surprisingly many do these days. Yours probably does, if you have three 3.5mm stereo sockets on the thing.

    • My audio system does not have full surround analog inputs though, only stereo analog in, ditto the TV.

    • So: No.

  • Step 2: Audio over HDMI.

    • Preferred solution - simplest.

    • I have two audio HDMI devices in hardware, one from NVidia, one from Intel. Start with the obvious: NVidia.

        • NVidia - Recognises the TV, sees that it has 2 speakers, and blankly refuses to allow any other options or overrides regardless of the fact that the TV is plugged into 6 speakers. Some research finds an internet full of other people cursing NVidia for this. An NVidia engineer a few years ago claims that he is trying to get approval to fix it, but then silence. He is presumably dead. CURSE YOU NVIDIA! WHY??

          • So: No.

    • Try the Intel one.

        • Intel - Hmmm - I have the hardware, drivers are installed and show up in the device manager, but it's not showing up in the sound control panel. A quick internet search reveals that this is a common issue, and deliberate for some reason when there's an NVidia blah blah... whatever. This is disabled in low-level hardware. I would have had to try to play computer games with onboard video only anyway to use this, so I abandon it.

        • So: No.

  • Step 3: Digital S/PDIF audio over optical TOSLink.

    • The laptop even has an optical out! Optical is cool and fast and sexy, right? I want that!

    • I bought a cable from EBay, it took nearly 6 weeks to deliver. Grrr. It arrived the other day.

    • Works for stereo, not for surround. What? Why? Serious Googling ensues. I learn a lot:

      • Audio is a lot of data. People forget this because audio is 1-dimensional while video has 2 dimensions, but audio needs very high data rates.

      • Compressed audio (DTS, Dolby Digital, DDL/DD+, AC3, MPEG2, plus others not supported by my 5.1 system) is fine to transfer, but you need to transfer it compressed, because audio is a lot of data. This requires compression, which doesn't generally happen on-the-fly , only a couple of specialist sound cards do this, and mine isn't one of those.

      • Audio generated on the fly in your computer is output uncompressed as different flavours of PCM. This is a lot of data. I if you're sending PCM, S/PDIF will allow only stereo and nothing more. The technical section of the manual for my surround sound system confirms this with a little explicit note: "If the format is PCM, then you can't have nice things", or something to that effect. It's a standards compliance issue - doesn't matter if you dial down the data rates, stereo only. Fine, I give up there.

      • With some (actually quite a lot of) poking about and hacking, I can get video files with 5.1 audio to play their compressed audio through the TOSLink (thank you original MPC!), but any audio mixed through Windows or generated in a game is PCM and gets (silently!) throttled to stereo before transmission.

    • Furious Googling looking to confirm all this, maybe get a software solution for live encoding of PCM to something else, but with no luck. There's an internet full of similarly frustrated optical cable purchasers.

    • So: No.

    • Surprising, actually.

  • Step 4: Back to HDMI

    • Okay, remember how the limitation in NVidia audio over HDMI is bloody NVidia refusing to give me options? What can I do about that? CURSE YOU NVIDIA! WHY??

    • It turns out that you can override the monitor drivers to tell Windows that the TV has 6 speakers (5.1), and then I can expect happiness and satisfaction.

    • Monitors and consumer displays return a 256-byte binary block called EDID which tell your video card what's possible. This was pretty much standardised in 2006, so by now, 2011, everyone uses this without workarounds - the list is assumed to be final and non-negotiable.

      • but

      • What if the EDID is wrong? For the benefit of manufacturers who make mistakes, it is possible to specify an overriding EDID, put it in a human-readable format in a .inf file, and install it as a new "monitor driver" via the device manager. There's a free piece of software, Moninfo, which spits out such a .inf file based on your current settings. I had no luck getting hold of the standards for EDID, but there's a summary at Wikipedia.

    • Download Moninfo, dump the current EDID .inf. The description of the format at Wikipedia demonstrably does not apply to the long list of hex values that I see, BUT, Moninfo also gives me a human-readable summary so I manage to reverse engineer what hex codes I'm looking for, and I find them! There's the three bytes which say PCM, up to 192kHz, 2 speakers.... Bingo! Change the hex code to alter that one bit so it's now 6 speakers.

    • Don't forget to also set the checksum! This seems to sum to 0xEF instead of 0x00, but whatever - the header didn't follow what Wikipedia said either. On the second try, this works!

    • Windows sees a TV with 6 speakers, the sound control panel gives me all sorts of surround options suddenly. Not part of this story, but I also spent time adding 6-speaker configs for DTS, MPEG2, etc, which required more understanding of the format and a couple of test runs and reboots, but ultimately success. Truly, at this stage, I'm going a bit above and beyond a normal amount of fiddling.

    • I'm only getting stereo.

    • The lights on the front of the surround sound system tell me that I'm only getting stereo. 5.1 surround for media files now works with more formats and fewer hacks (yay I guess, but I already had a workaround with the original MPC [not MPC-HC]). What's going on? Then it hits me.

      • The surround sound system is plugged into the TV via... S/PDIF. As I recently learned, for PCM, this means stereo only!

    • Cry.

    • I spend a while looking at audio transfer options in the TV and re-Googling software options, but without any luck. The TV does live transcoding of audio... from any format to PCM, but not vice versa. I can now send surround to the TV, but I still can't get it to the sound system!

      • So: Yes to the TV, but ultimately: No.

So 5.1 surround for gaming requires an HDMI passthrough sound system, or a state of the art live-encoding external soundcard! It's been an interesting and enlightening journey.

How does one modify an EDID tag? Well since the description at Wikipedia doesn't seem to apply to the EDID from my TV since byte-codes don't match up, and I didn't find a decent EDID spec, I hacked the EDID format a little. Not much. I've made a spreadsheet file to help you modify the EDID tags to your liking though, if you want to try yourself. Hope that it helps. More reading and info: