You need either the optical or ARC connections.
To use ARC the TV has to have an HDMI-ARC connection. If it doesn't use optical. No loss of quality.
Either connection usually has to be turned on in the TV menu. The TV speakers may have to be turned off too. Audio should be set to bitstream in the TV menu so you get digital surround sound.