I have managed to have 5.1 E-AC3 audio for all multichannel videos on YouTube.
The following discussion describes the process I (and others) went through in understanding how we could achieve this.
I "developed" this by taking advantage of the well documented patches available on Thorium's repository but it's pretty much all explained on GitHub.
You can ask questions here, of course, but I'm not a developer, so my answers probably will leave lots to be desired.
The wayland compositor we currently use (cage) doesn't support HDR (yet).
We are (more precisely CvH is) currently looking at using labwc instead, which should support HDR.
ATM the only things you can change are the display resolution (with the latest addon updates also independently for each flatpak addon) and a few audio settings.
Keyboard layout and the audio device are taken from kodi's settings.
We'll have to think about if/how to add more settings, but we also need to be careful that we don't overcomplicate things.
Thanks a lot for the thorough reply. I absolutely agree in not overcomplicating things (which is why I thought maybe extra settings were located in config files for advanced users that care about them). All in all, I think two worthy additions would be HDR (for sure) and multichannel audio (there's a few videos on YT that exploit this capability, don't know if it's exposed in any Leanback device implementation, so I'm not entirely sure this would be possible at all, as opposed to HDR).