IDmaChannel interface

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.


The IDmaChannel interface inherits from the IUnknown interface.


The IDmaChannel interface has these methods.

Method Description
IDmaChannel::AllocateBuffer The AllocateBuffer method allocates a common buffer that can be accessed by the port driver and DMA hardware.
IDmaChannel::AllocatedBufferSize The AllocatedBufferSize method returns the size of the allocated buffer.
IDmaChannel::BufferSize The BufferSize method returns the size in bytes of the DMA channel's data buffer.
IDmaChannel::CopyFrom The CopyFrom method copies sample data from the DMA channel's common buffer to the specified destination buffer.
IDmaChannel::CopyTo The CopyTo method copies sample data to the DMA channel's common buffer from the specified source buffer.
IDmaChannel::FreeBuffer The FreeBuffer method frees the buffer that was allocated by the previous call to IDmaChannel::AllocateBuffer.
IDmaChannel::GetAdapterObject The GetAdapterObject method returns the DMA channel's hardware adapter object.
IDmaChannel::MaximumBufferSize The MaximumBufferSize method returns the size in bytes of the largest buffer that this DMA-channel object is configured to support.
IDmaChannel::PhysicalAddress The PhysicalAddress method returns the physical address of the allocated buffer.
IDmaChannel::SetBufferSize The SetBufferSize method sets the DMA channel's current buffer size.
IDmaChannel::SystemAddress The SystemAddress method returns the system address of the allocated buffer.
IDmaChannel::TransferCount 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