DVD player and anything encoded in 5.1 should output surround sound via the optical output.
Unfortunately games etc are not encoded so you would need a soundcard that can either encode dolby digital live or use a soundcard that has separate outputs for R,L LS, RS and the subwoofer and connect them to each PC speaker or use an amplifer that has a set of auxillery inputs for each channel.
For gaming, I have a Soundblaster Titanium that ouputs 5.1 to my Denon amplifier via optical output on the card in Windows so I can use standard speakers instead of computer speakers.
There is a program that can encode sound real time called Jack or something but it uses a lot of CPU power if you can get it to work. I never got it to work.