HDMI is the best choice for digital audio. It'll provide up to 7.1 channels of high resolution PCM (or Dolby or DTS), depending on how your receiver, TV, and the computer's graphics hardware and drivers are configured.
S/PDIF (optical or coax) is limited to stereo PCM. For an S/PDIF connection to pass multichannel audio, the audio has to be encoded into lossy 5.1 Dolby or DTS.
When using two channel (stereo) PCM, there is no real quality difference between HDMI and S/PDIF. Both can carry 24/192 PCM audio. Although some people like to claim that some HDMI implementations have an audible jitter effect, that's at an extremely low level, if you can even hear it at all.
Marantz SR7009 avr + MM9000 amp --> Atmos 7.1.4
Fronts=NHT 2.9+AC2, FH+TM=DefTech PM1000, LCR+TM amped