[wdmaudiodev] Re: newbie questions about filter drivers

  • From: Tim Roberts <timr@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Mon, 18 Oct 2004 09:22:05 -0700

dprado@xxxxxxxxxxxxxx wrote:

Well, it is clear to me that this is a lot harder than I previously thought. I
still have a "basic" question regarding the stacking of drivers. All the
information I have seen on WDM filter drivers, state that filter drivers sit
above or below a function driver and "transparently" filter IRPs . I installed
a simple "passtrough" driver as an UpperFilter driver to the MSVAD virtual
audio device from the DDK and it worked as expected, logging the IRPs with
KdPrint. After that I modified the INF file in order to install the passthrough
filter driver as a function driver, including registering wave interfaces for
this driver. I manually configured the MSVAD virtual audio driver as a
LowerFilter of this Passthrough filter driver ( that was actually installed as
a function driver ). This worked, but I am not sure if this is somthing that I
shouldn´t have done.

"Shouldn't" is an awfully judgemental word :) . However, that isn't the right way to do things. In general, the flow from top to bottom is upper filter, function driver, lower filter. As long as that order is maintained, it doesn't much matter what you call them. IRPs go into the top driver, and come out the bottom. However, the naming doesn't really change the roles. Regardless of how you did the naming in the registry, your passthrough really is an upper filter to MSVAD's function driver, and you probably want to continue to think of it in that way.

Generally, If I have a filter driver "XYZ" as an UpperFilter to a function
driver "ABC" , can I install "XYZ" as a function driver and have the "ABC"
driver as a lowerfilter to XYZ? Would it have the same effect?

Theoretically, the passage of IRPs through the stack will be the same, but why would you want to? Call a spade a spade..

This same setup did not work when using USBaudio as a LowerFilter to the
passthough driver The passthough driver refused to load.

Did you actually have a USB Audio Class device to experiment with? Remember that MSVAD is the bottom of its driver stack; there is no lower-level bus driver underneath it, which is why it has to be loaded by hand. That's not the case with USBAUDIO. It can only be loaded upon a demand by USBD.SYS. There must be hardware underneath it (or something that looks like USB audio hardware). That might have been the difference.

- Tim Roberts, timr@xxxxxxxxx
 Providenza & Boekelheide, Inc.


WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx


Other related posts: