PFREE_DMA_BUFFER_WITH_NOTIFICATION - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// hdaudio.h

PFREE_DMA_BUFFER_WITH_NOTIFICATION PfreeDmaBufferWithNotification;

NTSTATUS PfreeDmaBufferWithNotification(
  [in] PVOID _context,
  [in] HANDLE Handle,
  [in] PMDL BufferMdl,
  [in] SIZE_T BufferSize
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-hdaudio-pfree_dma_buffer_with_notification)

PFREE_DMA_BUFFER_WITH_NOTIFICATION callback function

Description

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.

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 code Description
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.

See also

AllocateCaptureDmaEngine

AllocateDmaBufferWithNotification

AllocateRenderDmaEngine

HDAUDIO_BUS_INTERFACE_V2