Filter driver
# Filter driver

A filter driver is a Microsoft Windows driver that extends or modifies the function of peripheral devices or supports a specialized device in the personal computer. It is a driver or program or module that is inserted into the existing Driver Stack to perform some specific function. A filter driver should not affect the normal working of the existing driver stack in any major way. Written either by Microsoft or the vendor of the hardware, any number of filter drivers can be added to Windows. Upper level filter drivers sit above the primary driver for the device (the function driver), while lower level filter drivers sit below the function driver and above the bus driver.

Filters may work on a certain brand of device such as a mouse or keyboard, or they may perform some operation on a class of devices, such as any mouse or any keyboard.

The Windows Dev Center - Hardware pages explain upper and lower filter drivers in detail.

For example, the generic USB camera (UVC) driver usbvideo.sys is a function driver, while the bus driver handles USB data from the host controller devices. A lower level filter modifies the behavior of the camera hardware (e.g. watching for interrupt packets from a camera switch) and fits between the function and bus drivers. An upper level filter typically provide added-value features for a camera, such as additional processing of the video stream (e.g. colour changes, identification of objects, applying overlays), and fit between the function driver and the user application that has connected to the camera.

Another type of filter driver is the bus (e.g. USB, PCI, PCIe) filter driver, which may be added on top of the bus driver. For example, an ACPI bus filter is added to support power management for each device.

