Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Syntax
PFREE_DMA_ENGINE PfreeDmaEngine;
NTSTATUS PfreeDmaEngine(
[in] PVOID _context,
[in] HANDLE Handle
)
{...}
Parameters
[in] _context
Specifies the context value from the Context member of the HDAUDIO_BUS_INTERFACE, the HDAUDIO_BUS_INTERFACE_V2 or HDAUDIO_BUS_INTERFACE_BDL structure.
[in] Handle
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 |
|---|---|
|
Indicates that the handle parameter value is invalid. |
|
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:
- Any previously allocated DMA buffer has not been freed (by calling FreeDmaBuffer or FreeContiguousDmaBuffer).
- The stream is in a state other than reset.
Requirements
| Requirement | Value |
|---|---|
| Target Platform | Desktop |
| Header | hdaudio.h (include Hdaudio.h) |
| IRQL | <=DISPATCH_LEVEL |