The devices I have connected to the TV are as follows
coaxial antenna (cable) Wii (component video/RCA audio) XBox 360 (HDMI) HTPC (HDMI and optical)
My sound system is a Logitech Z-5500
Right now the TV can handle all of these devices, and more. It has an optical output that goes to the Logitech sound system, and it works and is relatively simple.
The problem is surround sound. The only time the TV will emit a digital surround sound signal over the optical output is if the coax is the currently selected source. If the XBox sends Dolby Digital to the TV via the HDMI cable, then the TV will send stereo, not surround, on the optical output.
I thought I could solve the problem with a receiver, but that is not the case. The Logitech system really is the receiver, all the speakers connect to it. Any home theater receiver you buy will have speaker outputs, but I need just one optical audio output and one HDMI video output.
I haven't been able to find any sort of solution on the Internet short of replacing the TV or sound system, and I'm not doing either one any time soon. Is there some sort of switching device that can solve this? Perhaps there is some way to extract the audio from the HDMI cable before it gets to the television and then use an optical audio switch? I'm out of ideas.