AcxDeviceGetCurrentDxExitLatency function (acxdevice.h)
The AcxDeviceGetCurrentDxExitLatency function gets the current audio device sleep state exit latency value.
Syntax
ACX_DX_EXIT_LATENCY AcxDeviceGetCurrentDxExitLatency(
WDFDEVICE Device,
POWER_ACTION SystemPowerAction,
WDF_POWER_DEVICE_STATE DeviceState
);
Parameters
Device
Pointer to the WDFDEVICE for which to get the exit latency.
SystemPowerAction
The system power action for which to get the latency value.
DeviceState
The device power state for which to get the latency value.
Return value
AcxDeviceGetCurrentDxExitLatency returns the current device exit latency value as defined in the ACX_DX_EXIT_LATENCY enumeration.
Remarks
A device has different power states. The D0 power state is when the device is up and running, D1 is when the device is one of the sleep states, and so on. "Dx" refers to any device sleep state.
Audio drivers know when to go in D3Hot or D3Cold based on the ACX_DX_EXIT_LATENCY returned by this method.
Example
WDFDEVICE Device;
WDF_POWER_DEVICE_STATE TargetState;
ACX_DX_EXIT_LATENCY latency;
POWER_ACTION powerAction;
// Code to initialize WDFDEVICE and WDF_POWER_DEVICE_STATE...
powerAction = WdfDeviceGetSystemPowerAction(Device);
//
// Get the current exit latency.
//
latency = AcxDeviceGetCurrentDxExitLatency(Device, powerAction, TargetState);
ACX requirements
Minimum ACX version: 1.0
For more information about ACX versions, see ACX version overview.
Requirements
Requirement | Value |
---|---|
Header | acxdevice.h |
IRQL | <= DISPATCH_LEVEL |