I have a Lenovo C20 Workstation with Soundmax Integrated Digital HD Audio which I connect to my Denon AVR 1800.
I can use SPDIF to SPDIF or I can use the speaker outputs to 6 discrete inputs on the receiver.
Which connection should produce the best sound?
For movies and music the SPDIF connection is probably better.
For gaming your PC might have some sound processing that would only be available from the analog outputs. Since the cables are not expensive try them both and see.
SPDIF can send digital signals like Dolby, DTS, and PCM directly to the receiver for it to decode. Speaker does the decoding on the board and outputs an analog signal. SPDIF is preferred, but may be complicated to actually configure correctly. Also, one cable versus 6 is rather nice.
Outputting audio via the analog outputs basically means you're using the DAC (digital-to-analog converter) from your sound card, rather than the DAC in your receiver. I feel like the one in the receiver will typically be higher quality, meaning it's better to use your digital outputs.
Again, I feel like a receiver could probably do whatever sound processing (e.g. equalization, balance, crossover) a sound card could do, and quite possibly do it better. But yeah, if you're able to test out the difference for yourself you might as well.