Yes, they can be used for surround sound, if the application you’re using to play the videos support it. It must transmit the audio as a compressed signal - almost always Dolby Digital, AKA AC3. You cannot send 5.1 bitstream audio over an optical interface, as there is not enough bandwidth to support it.