Here is what I see with HDMI-ARC. I’m not setup to test with optical. However, results should be similar, if not the same, for optical and HDMI-ARC. As others noted, neither can pass 7.1 audio nor lossless audio such as TrueHD and dts-HD MA.
Setup:
LG B7 OLED <–HDMI ARC–> Denon AVR-X4300H with 5.1.2 speaker configuration
Plex for LG v4.19.1 / webOS 3.8.0
AC3/EAC3/DTS all enabled in Plex LG app
PMS v1.18.4.2171 on Synology DS918+
Edit: Added EAC3 7.1 info.
AC3/EAC3 5.1: Audio direct plays. Denon display shows Dolby Digital / Dolby Digital + and channel map shows it is receiving 5.1 channels.
EAC3 5.1 + Atmos: Audio direct plays. Atmos information is passed. Denon display says “Dolby Atmos.”
EAC3 7.1: Audio direct plays. LG sends audio to Denon as Dolby Digital 5.1. Denon front display says “Dolby Digital” and channel map shows it is receiving 5.1 channels. Left Side Surround / Right Side Surround audio sent to Left Rear Surround / Right Rear Surround channel.
TrueHD 7.1 (including + Atmos): Audio transcoded by Plex Media Server to AAC 5.1 (and any Atmos info lost), as shown in Plex Dashboard and Tautulli. LG sends audio to Denon as Dolby Digital 5.1. Denon front display says “Dolby Digital” and channel map shows it is receiving 5.1 channels.
dts 5.1: Audio direct plays. Audio passed to Denon as dts 5.1. Denon front display shows it is receiving dts 5.1 audio.
dts-HD MA 5.1 and 7.1: Audio direct plays. The dts 5.1 core is passed to the Denon. The “-HD MA” portion is discarded. Denon front display shows it is receiving dts 5.1 audio.
AAC 5.1: Audio direct plays. LG sends audio to Denon as Dolby Digital. Denon front display says “Dolby Digital” channel map shows it is receiving 5.1 channels.
AAC 7.1: Audio direct plays. Audio sent to Denon as AC3 5.1. Audio sent to Left Side Surround and Right Side Surround is dropped. Denon front display says “Dolby Digital” channel map shows it is receiving 5.1 channels.