Optical cannot do 7.1 or hd surround sound formats, short answer = no.
Hdmi (digital audio).
- It can do Stereo=2 channel (uncompressed) PCM audio.
- It can also do 6 channel=5.1 or up to 8 channel=7.1 (uncompressed) surround sound. (6th or 8th channel is the LFE=low frequency effects).
- All hdmi version cables support up to 8 channel LPCM, 192 kHz, 24-bit audio capability, but they can also support audio at at sample sizes of 16-bit, 20-bit and 24-bit, with sample rates of 32 kHz, 44.1 kHz, 48 kHz, 88.2 kHz, 96 kHz, 176.4 kHz and 192 kHz.
- All hdmi versions can do the lossy surround sound formats known as Dolby Digital or DTS.
- Only hdmi versions 1.3 or after can do the loseless surround sound formats known as DolbyTrueHD or DTS-HD Master Audio. (Can also do Dolby Digital Plus).
- (The versions of each cable can be easily understood by looking at the version charts, more info included at the link).
http://en.wikipedia.org/wiki/HDMI
S/pdif Optical or S/pdif Coaxial (digital audio).
- It can do Stereo=2 channel (uncompressed) PCM audio.
- It can also do 6 channel=5.1 (compressed) surround sound. (6th channel is the LFE=low frequency effects).
- S/pdif supports audio at sample sizes of 16-bit, 20-bit*, 24-bit, with sample rates of 48 kHz, 44.1 kHz and 32 kHz (other sample rates will not pass 2,000 bitrate, they will not work and/or sound bad and/or not sound better).
- S/pdif can only do the lossy surround sound formats known as Dolby Digital or DTS.
- Computer's sound card should have a multi channel audio and/or a decoder like ffdshow/ac3 filter (ac3 s/pdif encode mode) to get surround sound the go through the cable.
(More info in links).
http://ac3filter.net/wiki/AC3Filter_%26_SPDIF
or
http://ac3filter.net/files/docs/ac3filter_1_30b/spdif_eng.html