I was suffering from the same problem, I searched for a solution for a couple hours. Got tired of seeing nothing but posts like this one. I discovered it was easier to use windows "Sound" control panel than it was using the "Realtek HD Audio Manager", at least with a keyboard it is. I have a program called Hotkeyz by Skynergy. It has a feature called 'Keyboard Remap' which can turn a single keypress into the typing of a novel, if that's what you want it to do. I used the keyboard remap feature of hotkeyz to fire this sequence of keystrokes when I pressed ctrl+alt+l (for livingroom - which is the digital out):
win+r for run box...
mmsys.cpl, enter to open "Sound" control panel
each pause waits half a second to avoid completion before cpl opens.
down, down, tab, space, enter are the keystrokes needed to switch to digital out.
A slight revision was required to switch back to the line out (or headphone out). A second keyboard remap hot key is needed, in my case ctrl+alt+b (for blueroom) :
It's all the same except for up, tab, tab, space, enter. This returns the audio to my desktop speakers. These are the exact remap parameters from the program. They can be copied and pasted into a key you create with the desired hotkey... provided you have mmsys.cpl (I have Win7) AND it looks like this when opened:
Sorry, can't post an image 'til I have 10 points or something. I spent a lot of time screen capturing, pasting, cropping, saving, finding a free online host, uploading the pic, posting the link... only to be punched in the face 'cause I'm a noob. I love life.