I wanted to hook up a Roku 3 - however, I learned that it only had HDMI output - no optical for audio. This concerned me, because I really wanted 5.1 audio and my aging Denon AVR3802 did not have HDMI switching capabilities. I would have to connect it directly to the TV. As I had understood it, my tv (Samsung LN52A630) would not pass DD 5.1 via it's optical out port - only PCM or DD 2.0. I went ahead and got the Roku anyway, knowing this would be the case.
Imagine my surprise when I played my first movie (via HBO GO) and saw the "Dolby Digital 5.1" light up on my receiver! I have no idea why this is working, but I'm not complaining. According to Samsung's own documentation, this should not be possible. They say 5.1 is only passed via the optical out when viewing an OTA broadcast. The Roku must be doing some special handshake with the set. It is definitely discreet 5.1 too. I had ensured in the Roku settings that "Surround" was selected under the audio options... but at the time, I didn't really think it mattered. Apparently it is working. I suppose it depends heavily on the handshake between the source device and the TV. I'll have to attempt to do do this with my blu-ray player to see if I can get the same results.