I am not sure how to configure it using optical output, but this is how i set it up for analog out:


I am guessing you can set it to surround here:


If your GPU's HDMI is overriding the setting somehow, you should go to your card's control panel and set the HDMI output to video only.