Not sure if you've done this or not (probably have :P). But make sure you set 5.1 surround for both digital (toslink) and anolog (speakers) tabs through the realtek software or control panel > sound. If you have and anolog still doesn't work while gaiming. Can you give me the models of your receiver and realtek card? Cheers.
Also, read http://www.tomshardware.com/forum/259712-28-realtek-audio-optical-games.
Good link, lots of info
my rec'ver: JVC RX-888VBK (about 10 years old, but still works fine and has multiple optical inputs, but no HDMI)
Realtek chip is on motherboard ALC889 codec (mb is GigabyteGA-790XTA-UD4)
Played around a bit earlier, had sound coming out TV only thru HDMI, but when I started up Dragon Age - no sound out of TV. Note that I did NOT have the surround system on at that time (just wanted to play for a while - no luck).
The anolog route really should work - needs dual RCA to stereo mini-plug converters (X3) - I have 1 and tried it on front channel but nothing.
I'd like to avoid buying a separate sound card, especially since Turtle Beach seems to be gone from sound card market almost totally, and I am not impressed with Creative Labs