IDmaChannel interface (portcls.h)

The IDmaChannel interface provides an abstraction of a DMA channel and its associated DMA buffer and usage parameters. A WaveCyclic or WavePci port driver implements this interface and exposes it to the WaveCyclic or WavePci miniport driver. The miniport driver obtains a reference to the port driver's implementation of an IDmaChannel object by calling one of the port driver's NewXxxDmaChannel methods:




A miniport driver can also implement its own IDmaChannel interface if it requires capabilities that are not in the port driver's default implementation. For more information about this, see Wave Filters. When the port driver calls the miniport driver's NewStream method (for example, IMiniportWaveCyclic::NewStream), the method outputs the miniport driver's IDmaChannel object to the port driver. IDmaChannel inherits from the IUnknown interface.

The current implementation of the IDmaChannel interface in Portcls.sys is not multithread-safe because it does not internally synchronize access to shared data. Typically, a single driver thread calls the methods of an IDmaChannel object. In this case, there is no risk of two method calls simultaneously accessing the same data. However, if multiple threads can potentially call the methods of an IDmaChannel object at the same time, the driver writer must synchronize the method calls to prevent internal data corruption.

For more information, see DMA Channel Objects.


Microsoft supports a diverse and inclusive environment. This article contains references to terminology that the Microsoft style guide for bias-free communication recognizes as exclusionary. The word or phrase is used in this article for consistency because it currently appears in the software. When the software is updated to remove the language, this article will be updated to be in alignment.


The IDmaChannel interface inherits from the IUnknown interface.


The IDmaChannel interface has these methods.


The AllocateBuffer method allocates a common buffer that can be accessed by the port driver and DMA hardware.

The AllocatedBufferSize method returns the size of the allocated buffer.

The BufferSize method returns the size in bytes of the DMA channel's data buffer.

The CopyFrom method copies sample data from the DMA channel's common buffer to the specified destination buffer.

The CopyTo method copies sample data to the DMA channel's common buffer from the specified source buffer.

The FreeBuffer method frees the buffer that was allocated by the previous call to IDmaChannel::AllocateBuffer.

The GetAdapterObject method returns the DMA channel's hardware adapter object.

The MaximumBufferSize method returns the size in bytes of the largest buffer that this DMA-channel object is configured to support.

The PhysicalAddress method returns the physical address of the allocated buffer.

The SetBufferSize method sets the DMA channel's current buffer size.

The SystemAddress method returns the system address of the allocated buffer.

The TransferCount method returns the size in bytes of the buffer that is currently being transferred by a subordinate DMA object.


Target Platform Windows
Header portcls.h