WavePci

By avoiding the need to copy audio data, the WavePci port driver typically consumes less processor time than the WaveCyclic port driver. However, WavePci is more demanding in terms of audio hardware capabilities. To directly access the noncontiguous pages of physical memory in the application's audio buffer, the audio device must be able to perform the following:

  • Scatter/gather DMA transfers.

  • DMA transfers to and from any location in physical memory.

The audio device accesses the application's buffer as a series of mappings, each of which consists of a contiguous chunk of physical memory. To acquire a mapping, the miniport driver calls the port driver's IPortWavePciStream::GetMapping method; it calls the port driver's IPortWavePciStream::ReleaseMapping method when it finishes processing the mapping. During the time that the miniport driver holds each mapping, the physical memory page that contains the mapping remains locked.

A WavePci miniport driver is more complicated than its WaveCyclic counterpart. When implementing a WavePci miniport driver, a hardware vendor must pay careful attention to synchronization issues. During a call to the port driver to acquire or release a mapping, the miniport driver cannot hold any spin locks. This requirement effectively prevents the miniport driver from maintaining exclusive access to any shared data structure during the call. In addition, a WavePci miniport driver must be prepared to revoke at any time any mappings that it holds. Mappings are revoked when a client cancels an I/O request packet (IRP) that contains audio data.

 

 

Send comments about this topic to Microsoft

Show: