I recently bought a new projector - a BenQ X1300i - to watch movies or play games with friends. I already owned a Denon AVR-4306 for audio and thought it would be as simple as plugging the projector into the AVRs HDMI output.
As it turns out: Nope. Well... Sort of.
Everything was working. But I lost most of the features that set this specific projector apart from other 1080p projectors: HDR10 and 120Hz. After a lot of research I figured out that the AVR I got does not have enough HDMI bandwidth for these features (and only supports HDMI 1.1).
My first try at solving this was to buy a 4x2 HDMI 2.0 matrix switch (I got this one). With everything plugged in (the projector on out A, the AVR on out B) it seemed to work fine with HDR10 but with 120Hz, audio did not work anymore. Dang it. Remember how I was talking about HDMI bandwidth? Well it turns out that HDR10 increases the bandwidth by a small enough amount that it is still within a clock speed the Denon AVR can parse and extract audio from but with 120Hz? Nope.
After a few days of pausing due to frustration I had the idea to try the SPDIF output of the matrix switch and connect it to the AVR. This seemed to work fine for all the video modes the projector supports so I was happy. For now.
At the time I built the solution above I just had two front speakers and a subwoofer and everything was fine. But I recently installed a center speaker and have two additional ones still to install for a set of rear speakers.
Now I was looking through all the settings the AVR-4306 gave me but was unable to configure it in a way that allowed the Android TV dongle to output surround audio. With a Raspberry Pi running Kodi I can just override the output and force it to output surround formats but there is no such option on Android TV and it isn't a nice solution if I ever want to add temporary signal sources. After searching through the depths of the internet for a while it seemed like the culprit was the EDID the matrix switch advertised to the source. The default of copying the out A EDID made video work perfectly but did not advertise surround capabilities and all the hardcoded other EDID settings of the device do not advertise the rather rare combination of capabilities my projector supports.
So what is this 'EDID' I was talking about?
Well on the hardware level it is pretty simpel: It is a I2C EEPROM connected to the HDMI connector of your signal sink that can be read by the source.
The interesting part is the content of said EEPROM. There is a good overview of the format on Wikipedia but by having an originally not very flexible format and adding a lot of features it got convoluted quickly...
My battle-plan was now to combine the audio feature blocks in the EDID of the AVR with the rest of the EDID of the projector. Reading the EDIDs of the two devices using a notebook running Linux and the tool get-edid of the read-edid package was pretty easy but now what to do with the binary blobs? I first tried the tool wxedid but it didn't support all the extensions I needed. After a bit of searching I found the tool EEditGold from Analog Devices which is free to use, runs nicely with wine on Linux and seems to be the only tool I could find that supports all the relevant extensions. This resulted in this EDID binary but how do I use this now?
My first idea was to modify one of the preprogrammed EDIDs on the matrix switch but after a few hours of tinkering I was unable to modify it without risking to brick the switch (it containes an STM32 and a I2C EEPROM but the STM32 has SWD disabled and the EEPROM is only there to persistently save the currently selected inputs).
Having used 'fake screen' dongles before this seemed to be the ideal solution if it could pass through an HDMI signal. Turns out: Such devices do exist and they are quite cheap on Aliexpress (the relevant search string seems to be 'hdmi virtual display lock screen' should the link be dead) so I ordered one and waited for it to arrive.
Luckily enough it really seems to be just an I2C EEPROM because I was able to simply write my new EDID to the dongle using the edid-rw utility (please check if you are really writing to the correct I2C device by reading and parsing the content of the dongle before writing using the same utility! If you accidentally overwrite the content of another monitor or other I2C device it will be at least really annoying to revive the hardware you just mis-flashed!)
Plugging this reflashed dongle in between the projector and the matrix switch it did not seem to work at first with the AVR connected via HDMI too (even without 120Hz) the moment the Android TV dongle switches to surround (but it does detect surround capabilities which is at least partly a success!). Connecting the AVR via SPDIF again resulted in working surround with HDR though! :D
I have no idea why it does not work via HDMI but it is good enough for my use-case so I'll leave it there. Should I ever want to upgrade to more modern shitty-proprietary-tech like Dolby Atmos I'll need a new receiver anyways which should support the HDMI features I need making this whole mess unnecessary.