[wdmaudiodev] Re: newbie questions about filter drivers
- From: Tim Roberts <timr@xxxxxxxxx>
- To: wdmaudiodev@xxxxxxxxxxxxx
- Date: Mon, 18 Oct 2004 11:20:35 -0700
dprado@xxxxxxxxxxxxxx wrote:
Theoretically, the passage of IRPs through the stack will be the same,
but why would you want to? Call a spade a spade..
I understand that some times filter drivers are used, to change functionality
of a lower driver due to , let's say , non compliant hardware. But, I imagine,
that there are situations where you want to filter IRPs to slightly change some
functionality. The reason I wanted to do thing this way, is to be able to
selectively use the filter driver or the original driver without filtering. If
I register a filter driver ABC as a function driver and stack it on top of
another function driver XYZ , any audio App can use waveOut api to write
directly to the original XYZ driver, or write to ABC and have a "filtered XYZ
through ABC". I don't know if this is clear or not, or even if it makes any
sense at all. :)
I think you misunderstand the way driver stacks work. No one talks
directly to an audio function driver. There are a vast number of
drivers in between XYZ and user-mode: sysaudio.sys, wdmaud.sys,
stream.sys, etc. API requests always go into the top of the driver
stack, not into the middle.
The combination of XYZ+ABC (plus the upper layers) is only going to be a
single audio device, no matter how you filter it, and even if both of
them are function drivers. How had you planned to switch the filtering
on and off? You could have a magic registry entry somewhere that your
filter driver reads on a regular basis, but that will just alter the
behavior of your one audio device. You won't create a second device
that way.
You could possibly create a second PDO, making your filter into a bus
driver, but then you'd be talking about mixing.
--
- Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
Other related posts: