PFREE_DMA_BUFFER_WITH_NOTIFICATION callback function

The FreeDmaBufferWithNotification routine frees a DMA buffer that was previously allocated by a call to AllocateDmaBufferWithNotification.

The function pointer type for a FreeDmaBufferWithNotification routine is defined as follows.

Syntax


PFREE_DMA_BUFFER_WITH_NOTIFICATION FreeDmaBufferWithNotification;

NTSTATUS FreeDmaBufferWithNotification(
  _In_ PVOID  context,
  _In_ HANDLE handle,
  _In_ PMDL   bufferMdl,
  _In_ SIZE_T bufferSize
)
{ ... }

Parameters

context [in]

Specifies the context value from the Context member of the HDAUDIO_BUS_INTERFACE_V2 structure.

handle [in]

Handle that identifies the DMA engine. This handle value was obtained from a previous call to AllocateCaptureDmaEngine or AllocateRenderDmaEngine.

bufferMdl [in]

A pointer to the buffer MDL. This value was obtained from a previous call to AllocateDmaBufferWithNotification.

bufferSize [in]

The size of the buffer to be freed. This value was obtained from a previous call to AllocateDmaBufferWithNotification.

Return value

FreeDmaBufferWithNotification returns STATUS_SUCCESS if the call succeeds. Otherwise, FreeDmaBufferWithNotification returns an appropriate error code. The following table shows some of the possible return error codes.

Return codeDescription
STATUS_UNSUCCESSFUL

Indicates that the caller is running at an IRQL that is too high.

STATUS_INVALID_HANDLE

Indicates that the handle parameter value is invalid.

STATUS_INVALID_DEVICE_REQUEST

Indicates that the stream is not in the reset state or that no buffer is currently allocated for the DMA engine.

 

Remarks

The FreeDmaBufferWithNotification routine is used together with the AllocateDmaBufferWithNotification routine. These two routines are available only in the HDAUDIO_BUS_INTERFACE_V2 version of the HD Audio DDI.

Callers of FreeDmaBufferWithNotification must be running at IRQL PASSIVE_LEVEL.

Requirements

Target platform

Version

Available in Windows Vista and later versions of Windows.

Header

Hdaudio.h (include Hdaudio.h)

IRQL

PASSIVE_LEVEL

See also

AllocateCaptureDmaEngine
AllocateDmaBufferWithNotification
AllocateRenderDmaEngine
HDAUDIO_BUS_INTERFACE_V2

 

 

Send comments about this topic to Microsoft

Show: