I'm not sure if I have understood you right, but apparently you're trying to get your computer sounds through your Onkyo.
You don't tell about your soundcard, so this is just guessing, but at least my integrated Realtek has a specific Sound Manager program, which should show if and how your optical jack has been configured. On the Audio I/O page there's a wrench symbol under which you can tick whether or not you'd want a pop-up window every time you plug something in to choose the new device's function.
Also I'd recommend you to take a look at Windows' sound settings for choosing the right sound device and output.