// 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 referenceNo description available.
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.
_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.
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. |
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.
AllocateDmaBufferWithNotification