On some TVs you have to turn the TV speakers off to get the audio output to work. They don't make that clear in the instructions.
Just to repeat what has been said above. You have to turn the optical output on in the TV menu and set it to bitstream 5.1.
You also have to assign the optical connection to an input such as TV or video 1 in the receiver input set up menu. If it's set to HDMI for audio rather than say optical 1 you won't get any sound.