[wdmaudiodev] Re: Getting a MIDI Driver Port enumerated.

  • From: Max K <xaseriii@xxxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Thu, 13 Jun 2013 21:08:12 +0200

Right, very very slowly I got the idea that I might have to put the Interfaces 
Section in the NTAMD64 subsection for it to work under x64. So this would be 
correct (and it works :) ). HOWEVER, I still wonder whether this is the 
preferred way, or if there is a better way or if there is a more dynamic way, 
for creating ports on the fly (I don't really need this, but it would be nice 
and I know that Tobias Erichsen, who is also an active member here, found out 
how to do it, but I doubt that he will tell me how to do it).

Regards,
Max :)

[vmidi.Wave]
AddReg=vmidi.Wave.AddReg
[vmidi.Wave.AddReg]
HKR,,FriendlyName,,%DeviceDesc64%
HKR,,CLSID,,%Proxy.CLSID%

;======================================================
; vmidi
;======================================================
.
[vmidi.NTAMD64.Interfaces]
AddInterface=%KSCATEGORY_AUDIO%,%KSName_VMIDI%,vmidi.Wave
AddInterface=%KSCATEGORY_RENDER%,%KSName_VMIDI%,vmidi.Wave
AddInterface=%KSCATEGORY_CAPTURE%,%KSName_VMIDI%,vmidi.Wave
.
KSCATEGORY_AUDIO="{6994AD04-93EF-11D0-A3CC-00A0C9223196}"
KSCATEGORY_RENDER="{65E8773E-8F56-11D0-A3B9-00A0C9223196}"
KSCATEGORY_CAPTURE="{65E8773D-8F56-11D0-A3B9-00A0C9223196}"
Proxy.CLSID="{17CCA71B-ECD7-11D0-B908-00A0C9223196}"

KSNAME_VMIDI="VMIDI"

From: xaseriii@xxxxxxxxxx
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Getting a MIDI Driver Port enumerated.
Date: Thu, 13 Jun 2013 20:32:02 +0200




See below, but I still doubt, that this is of any use. The way I see it, its 
just a way of getting the interfaces that need to be installed from the inf for 
generalized installers, it should be possible without.

[vmidi.Wave]
AddReg=vmidi.Wave.AddReg
[vmidi.Wave.AddReg]
HKR,,FriendlyName,,%DeviceDesc64%
HKR,,CLSID,,%Proxy.CLSID%

;======================================================
; vmidi
;======================================================

.
.
.

[vmidi.Interfaces]
AddInterface=%KSCATEGORY_AUDIO%,%KSName_Wave%,vmidi.Wave
AddInterface=%KSCATEGORY_RENDER%,%KSName_Wave%,vmidi.Wave
AddInterface=%KSCATEGORY_CAPTURE%,%KSName_Wave%,vmidi.Wave
AddInterface=%KSCATEGORY_TOPOLOGY%,%KSName_Topology%,vmidi.Wave

.
.
.

KSCATEGORY_AUDIO="{6994AD04-93EF-11D0-A3CC-00A0C9223196}"
KSCATEGORY_RENDER="{65E8773E-8F56-11D0-A3B9-00A0C9223196}"
KSCATEGORY_CAPTURE="{65E8773D-8F56-11D0-A3B9-00A0C9223196}"
KSCATEGORY_TOPOLOGY="{DDA54A40-1E4C-11D1-A050-405705C10000}"
Proxy.CLSID="{17CCA71B-ECD7-11D0-B908-00A0C9223196}"

KSNAME_Wave="Wave"
KSNAME_Topology="Topology"

From: Matthew.van.Eerde@xxxxxxxxxxxxx
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Getting a MIDI Driver Port enumerated.
Date: Thu, 13 Jun 2013 18:04:33 +0000









Can you send the AddInterface= line from your .inf that has KSCATEGORY_AUDIO, 
and also the section it references?
 


From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx]
On Behalf Of Max K

Sent: Thursday, June 13, 2013 10:59 AM

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Re: Getting a MIDI Driver Port enumerated.


 

We'll I now tried using IoRegisterDeviceInterface after the initialisation of 
port and miniport but it won't let me do it. I'm really stuck here, MSDN is not
 very specific in telling what the correct way is, to install and enable device 
interfaces.



Any help would be great.

Regards,

Max




From:
xaseriii@xxxxxxxxxx

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Re: Getting a MIDI Driver Port enumerated.

Date: Thu, 13 Jun 2013 00:20:46 +0200

This is the whole factory part:

http://pastebin.com/9meNuxfP



the inf is designed according to this section:

http://msdn.microsoft.com/en-us/library/windows/hardware/ff536813%28v=vs.85%29.aspx




From:
Matthew.van.Eerde@xxxxxxxxxxxxx

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Re: Getting a MIDI Driver Port enumerated.

Date: Wed, 12 Jun 2013 22:13:20 +0000

How exactly are you registering your filter, and what exactly is your filter 
descriptor?
 


From:
wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx]
On Behalf Of Max K

Sent: Wednesday, June 12, 2013 2:52 PM

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Re: Getting a MIDI Driver Port enumerated.


 

nope, I reverted my VM to a state where there can't be a cache of the inf.



There is probably a way to do this using SetupAPI but I cannot figure it out.



Regards,

Max




From: 
HarryGraham@xxxxxxxxxx

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Re: Getting a MIDI Driver Port enumerated.

Date: Wed, 12 Jun 2013 21:46:05 +0000

The .inf file is probably cached.  Make sure you tell device manager to delete 
the driver when uninstalling.
 
Harry
 


From:
wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx]
On Behalf Of Max K

Sent: Wednesday, June 12, 2013 2:44 PM

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Re: Getting a MIDI Driver Port enumerated.


 

Right, desperate me just tried to enter the missing reg key manually using 
regedit.. and it worked.



So basically if someone can just tell me how to properly get this reg key 
created.. we are done! (rest can't be that hard.. *cough*)



I tried adding the AddInterface directive to the inf file, it had not effect 
what-so-ever.



Regards,

Max




From: 
xaseriii@xxxxxxxxxx

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Re: Getting a MIDI Driver Port enumerated.

Date: Wed, 12 Jun 2013 23:09:16 +0200

As Tim wrote before, that inf directive should not be neccessary:



"That's true.  KsInitializeDriver and KsCreateFilterFactory will both register 
the interfaces for you, based on the information you provide in your 
KSFILTER_DESCRIPTOR."



Also MSVAD is only adding a topology interface there, I don't have a topology 
as such.

I'll experiment a bit with that directive.



Thanks,

Max




From: 
Matthew.van.Eerde@xxxxxxxxxxxxx

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Re: Getting a MIDI Driver Port enumerated.

Date: Wed, 12 Jun 2013 20:54:46 +0000

Are you populating those via your .inf or at runtime? Here’s how MSVAD does it.
 
[MSVAD_Simple.Interfaces]
…
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Topology%,MSVAD.I.Topo
 
[MSVAD.I.Topo]
AddReg=MSVAD.I.Topo.AddReg
 
[MSVAD.I.Topo.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%MSVAD.Topo.szPname%
 


From:
wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx]
On Behalf Of Max K

Sent: Wednesday, June 12, 2013 1:38 PM

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Re: Getting a MIDI Driver Port enumerated.


 

yes it's there, but it lacks the key "Device Parameters" which should contain a 
CLSID and a friendly name. The Properties key is not accessible.




From: 
Matthew.van.Eerde@xxxxxxxxxxxxx

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Re: Getting a MIDI Driver Port enumerated.

Date: Wed, 12 Jun 2013 20:17:00 +0000

Do you see your filter factory under 
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{6994ad04-93ef-11d0-a3cc-00a0c9223196}
 ?
 


From:
wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx]
On Behalf Of Max K

Sent: Wednesday, June 12, 2013 1:07 PM

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Getting a MIDI Driver Port enumerated.


 

Hi,



I have updated the title to reflect the current problem better (in case someone 
googles it).



I have looked at all audio sample drivers, MSVad has a little bit of midi, but 
not as usefull as other samples.

believe in addition to exposing a MIDI pin factory, you need to register your 
filter factory in the KSCATEGORY_AUDIO device interface.

Right, I thought that would be done by ks.sys automatically as soon as it calls 
GetDescription on my driver.



Regards,

Max




From: 
Matthew.van.Eerde@xxxxxxxxxxxxx

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Re: StartDevice Empty Resource List?

Date: Wed, 12 Jun 2013 19:38:40 +0000

I believe the MSVad audio driver in the Windows Driver Kit exposes a MIDI path. 
I believe in addition to exposing a MIDI pin factory, you need to register your
 filter factory in the KSCATEGORY_AUDIO device interface.
 


From:
wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx]
On Behalf Of Max K

Sent: Wednesday, June 12, 2013 12:34 PM

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Re: StartDevice Empty Resource List?


 

Hi,



I have written my own midi device enumeration program already using SetupAPI, 
however I usually use KSstudio or grapdedit now anyways.



My problem is not to enumerate the device but to make my MIDI device show up in 
the list, according to MSDN, all I have to do for that is to expose a MIDI pin, 
but that doesn't seem to suffice.



Regards,

Max




From: 
Matthew.van.Eerde@xxxxxxxxxxxxx

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Re: StartDevice Empty Resource List?

Date: Wed, 12 Jun 2013 19:27:00 +0000

The MMDevices key is for audio devices only, not MIDI devices. You can 
enumerate MIDI devices using the MIDI enumeration APIs.
 
http://blogs.msdn.com/b/matthew_van_eerde/archive/2012/09/21/enumerating-midi-devices.aspx
 


From:
wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx]
On Behalf Of Max K

Sent: Wednesday, June 12, 2013 12:18 PM

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Re: StartDevice Empty Resource List?


 

Hi again,



I know managed to configure the Pins and Nodes in a way that I can instantiate 
them in graphedt, I used the Information from the DmusUart and FMsynth samples 
to set up the pins properly.



However I still can't see a MIDI port, apparently, the driver still isn't 
installed correctly, some registry entries seem to be missing. KSStudio says:

"SetupDiOpenDeviceInterfaceRegKey failed

      Enumerated [???] 
\\?\root#media#0001#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\vmidi

SetupDiEnumDeviceInterfaces failed

GetDeviceDetails failed."



for each Interface category.



I searched the registry a bit and found that I don't have an key for my device 
under CurrentControl/MMDevices, and I believe there should be.

Maybe what devcon install does, isn't sufficient?



Regards,

Max




From: 
xaseriii@xxxxxxxxxx

To: wdmaudiodev@xxxxxxxxxxxxx

Subject: [wdmaudiodev] Re: StartDevice Empty Resource List?

Date: Tue, 11 Jun 2013 09:27:07 +0200




It doesn't appear under any of the WDM categories in graphedt?



No, only the virtual HD Audio sound card.

The service name can be chosen arbitrarily.  However, the system will not allow 
you to have two services with different names but the same "DisplayName".  
That's probably what you were running
 into.  Had you deleted the old one, you could have added the new one.

Thanks, right on spot :)




Date: Mon, 10 Jun 2013 16:15:19 -0700

From: timr@xxxxxxxxx

To: wdmaudiodev@xxxxxxxxxxxxx

CC: xaseriii@xxxxxxxxxx

Subject: [wdmaudiodev] Re: StartDevice Empty Resource List?

Max K wrote:





No, I can only see the MIDI ports of my other MIDI devices, what do you mean by 
instantiate in this context?




It doesn't appear under any of the WDM categories in graphedt?


I had some odd behaviour on my virtual testing machine, whenever I change the 
name property of the AddService directive in my inf file, devcon and my own 
installer wouldn't install the driver
 anymore. Accordingly to MSDN, the name property can be chosen randomly, and it 
worked again after I have reverted my VM to an earlier state, but after that I 
couldn't change it again. Is that a sign for a problem with the driver?




The service name can be chosen arbitrarily.  However, the system will not allow 
you to have two services with different names but the same "DisplayName".  
That's probably what you were running into.  Had you deleted the old one, you 
could have added the new
 one.
-- 
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.


























                                                                                
  

Other related posts: