This section discusses data-intersection handlers in WDM audio drivers. For a broader discussion of data-intersection handling for KS filters in general, see Data Range Intersections in AVStream.
The SysAudio system driver constructs an audio filter graph by connecting together pairs of audio-filter pins. Before a source pin on one filter can be connected to a sink pin of another, SysAudio must negotiate a common format that the two pins can use to exchange data. The details of this negotiation are largely delegated to the data-intersection handlers that are implemented in the individual filters.
An adapter driver creates a filter for an audio device (WavePci, for example) by binding one of its miniport drivers to the corresponding port driver from portcls.sys. When connecting a KMixer source pin to the sink pin of a WavePci filter, for example, SysAudio calls the WavePci port driver's data-intersection handler to determine a common format for the two pins. The port driver always gives the miniport driver's proprietary data-intersection handler the first opportunity to determine a common format. If the proprietary handler declines this opportunity, however, the port driver's default data-intersection handler determines the format instead.
The port driver's default data-intersection handler is designed to deal with the most common hardware features. For simple audio devices, the default handler provides a convenient alternative to implementing a proprietary handler in the adapter driver. However, adapters with more advanced features might need proprietary handlers in order to expose the full capabilities of the hardware.
The remainder of this section describes some of the limitations of the port driver's default data-intersection handler and presents the techniques that are needed to design a proprietary data-intersection handler for an adapter driver. The following topics are discussed:
Default Data-Intersection Handlers
Proprietary Data-Intersection Handlers
Hardware Constraints on Sample Frequency