5
votes

I have Windows 7 64 Bit Professional Edition on a computer I built myself so there is no manufacturer to ask. I am using an on-board sound card which has 7.1 and Optical outputs. The optical output is plugged into a Denon amp which controls the speakers.

I have got a speaker system plugged into my computer through the optical port on my sound card. When I use standard windows drivers I only get stereo output so I installed the Realtek HD audio driver. This gives me surround sound successfully however it does not tie this as a standard speaker so when I plug in headphones and define them as headphones nothing happens the audio still goes to the speaker system and nothing to the headphones.

I have discovered that if I disable the Digital output device in the playback devices list the audio is automatically rerouted through the headphones. Therefore I have been trying to find a way of disabling or enabling this device. I have a programmable keyboard so I can map a program or script to a spare key therefore I am trying to write a program to check if the device is enabled or disabled then change this to whatever it is not i.e. if on turn off and if off turn on.

I attempted to locate the hardware IDs which are
1. "HDAUDIO\FUNC_01&VEN_10EC&DEV_0888&SUBSYS_105BA601"
2. "HDAUDIO\FUNC_01&VEN_10EC&DEV_0888&SUBSYS_105BA601&REV_1000"

I had planned to create a batch script using devcon (the command line alternative to device manager.) using the below code to disable or enable the device

devcon disable "HDAUDIO\FUNC_01&VEN_10EC&DEV_0888&SUBSYS_105BA601*"
devcon enable "HDAUDIO\FUNC_01&VEN_10EC&DEV_0888&SUBSYS_105BA601*"

However devcon fails to disable these devices as the optical connection is on the sound card and I can only disable the entire sound card which would also disable the headphones.

I am a little lost as to what to do now and I really don't want my brother to need to play with disabling devices.

I am open to any suggestions. I am happy to use any language to do this. Im sure there must be a way of doing this from c but I have been unable to locate any information on this. I would appreciate any suggestions. I am quite happy to write the program myself but if someone could at least point me in the right direction to an api or something like devcon or some way in some language to do this. I currently know VB6, VB.NET, VB Script, Java and Batch Scripting and Powershell quite well and have some knowledge of C, C++ and C#.NET.

any and all help would be appreciated

Kind Regards
Dexter

1
I have the same issue, did you ever get it to work?dindenver
I eventually found a fairly simple solution with no actual scripts. First you install MPCStar and Realtek HD audio manager and set the appropriate device you want to use to the default device using the realtek HD audio manager. Then open MPCStar after changing the default device and skip to the next video. MPCStar seems to be quite forceful and grabs the audio for the current channel, then any new audio streams will come out of the new default device. I also needed to initially untick both tickboxes in the advanced properties of the playback device. So to summarize MPCStar + Realtek did it.feldoh
just to make it a bit more obvious, after the initial setup, all you have to do is change the default device in the Realtek HD audio manager and play something in MPCStar to finalise it. I tend to leave MPCStar open because of this so in my case it is only one extra click.feldoh

1 Answers

2
votes

You can try with this :

devcon /r disable @"HDAUDIO\FUNC_01&VEN_10EC&DEV_0888&SUBSYS_105BA601*"
devcon /r enable @"HDAUDIO\FUNC_01&VEN_10EC&DEV_0888&SUBSYS_105BA601*"

Regards,

Pal