5.1 Dolby Digital audio issue/question RPi

I recently picked up a couple of Raspberry Pi 3B’s to play with and see if I can use them to replace my existing HTPCs. Currently running LibreElec/Krypton 17.0. Things are going pretty well, LiveTV with the HDHomeRun is working good.

However, with Movies I am having issues with 5.1 Dolby Digital audio. It’s probably my setup, but I am looking for any feedback/advice.

My Receiver doesn’t have HDMI, so the way I have it set up is HDMI out of the Pi, to the TV and then Digital out of the TV (optical cable) to my Receiver.

Before I got rid of my cable box, I had it set up this way and 5.1 Dolby Digital TV broadcasts always worked. Now, I have the PI using the same HDMI cable that used to be connected to my cable box, but I am not getting 5.1 audio when watching movies. I still have my HTPC connected and when I play the same movie, 5.1 Dolby Digital works. The HTPC has digital out (optical cable connected to receiver).

I tried different audio settings on the Pi (passthrough, etc) but my receiver is not showing that 5.1 Dolby Digital is working. Anyone have any suggestions?