PFREE_DMA_ENGINE - NtDoc

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

PFREE_DMA_ENGINE PfreeDmaEngine;

NTSTATUS PfreeDmaEngine(
  [in] PVOID _context,
  [in] HANDLE Handle
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

PFREE_DMA_ENGINE callback function

Description

The FreeDmaEngine routine frees a DMA engine that was previously allocated by a call to AllocateCaptureDmaEngine or AllocateRenderDmaEngine.

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

Parameters

_context [in]

Specifies the context value from the Context member of the HDAUDIO_BUS_INTERFACE, the HDAUDIO_BUS_INTERFACE_V2 or HDAUDIO_BUS_INTERFACE_BDL structure.

Handle [in]

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

Return value

FreeDmaEngine returns STATUS_SUCCESS if the call succeeds in freeing the DMA engine. Otherwise, the routine returns an appropriate error code. The following table shows some of the possible return status codes.

Return code Description
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 a buffer is still allocated for the DMA engine.

Remarks

This routine frees a DMA engine that was previously reserved by a call to the AllocateCaptureDmaEngine or AllocateRenderDmaEngine routine.

This routine fails and returns error code STATUS_INVALID_DEVICE_REQUEST in either of the following circumstances:

An audio driver calls this routine to close the pin (and destroy the stream).

See also

AllocateCaptureDmaEngine

AllocateRenderDmaEngine

FreeContiguousDmaBuffer

FreeDmaBuffer

HDAUDIO_BUS_INTERFACE

HDAUDIO_BUS_INTERFACE_BDL

HDAUDIO_BUS_INTERFACE_V2