TV audio not working sometimes with optical cable

Apr 8, 2018
1
0
10
I got a new optical cable and hooked it up yesterday. I have a Sony TV and a Pioneer VSX 821-k receiver.The audio from the TV goes into the TV/Sat input of the receiver. Any sound that comes out of the TV should be fed to the receiver but my NVidia Shield does and the OTA TV does not.
The fact that it works with the Shield would indicate to me that I set up the receiver correctly, as you have to select the type of input (HDMI, analog, c1, c2 or whatever).
How does this make sense? If I just switch it to use the TV speakers, they both work fine.
Is there something about OTA sound that is different from streamed sound that would cause it not to work with an optical cable?
The sound did work when I just used RCA cables previously.