Found this info on AVS forum. 2: Home>Settings>Sound>Digital Audio Out. Choices: Auto 1, Auto 2, PCM. Some X850C owners have had to use the Auto 2 setting to get DD 5.1 output from the TV. Unlcear at this point why...but you could probably try each setting and determine which provides the best results on your system. To use ARC, connect an HDMI cable from HDMI4 on the TV to your receiver's HDMI input to send audio to your receiver via HDMI. Receiver must also support ARC.
But does the ATV still provide 5.1 when connected directly to the TV? You have two different scenarios here: the Roku connected directly to the TV and the ATV connected to the Denon. If you connect the Roku to the Denon, most likely your 5.1 will return. . Some TVs (have no idea if Sony is one) will not send 5.1 audio from an external source (something plugged into the TV HDMI directly) out the optical connection. They only send 5.1 from their internal sources (broadcast TV and any Smart TV apps).
Dan Nvidia Shield, Roku Stick (3600), Ultra (4640), Premiere (3920), Insignia 720p Roku TV, Sharp 4K Roku TV, Windows 10 Pro x64 running Serviio and Plex on a wired Gigabit network.