Option 1
If your TV will pass 5.1 through its optical audio output then connect that to the receiver. Check the TV manual on how to turn the optical output on and set it correctly. On the receiver you may have to assign that connection to an input. The receiver manual will specify how.
Option 2
Connect all your sources to an HDMI Input selector with audio extraction. Connect it's optical output to your receiver as above. Connect the selector HDMI output to the TV.