Bewerken

Delen via


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:

IPortWavePci::NewMasterDmaChannel

IPortWaveCyclic::NewMasterDmaChannel

IPortWaveCyclic::NewSlaveDmaChannel

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.

Note

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.

Inheritance

The IDmaChannel interface inherits from the IUnknown interface.

Methods

The IDmaChannel interface has these methods.

 
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.

Requirements

Requirement Value
Target Platform Windows
Header portcls.h