AcxDeviceAddFactoryCircuit function (acxdevice.h)

The AcxDeviceAddFactoryCircuit function adds a factory circuit to a WDFDEVICE for creating audio circuits.

Syntax

NTSTATUS AcxDeviceAddFactoryCircuit(
  WDFDEVICE         Device,
  ACXFACTORYCIRCUIT Factory
);

Parameters

Device

A WDFDEVICE to which the ACX factory circuit will be added.

Factory

The ACX factory circuit to add to the WDFDEVICE specified by the Device parameter.

Return value

AcxDeviceAddFactoryCircuit returns STATUS_SUCCESS if the call was successful. Otherwise, it returns an NTSTATUS error code.

Remarks

An ACX driver may create one or more circuits in the following scenarios:

  • At initialization time
  • At run time, as side effect of an external event, such as detecting a new audio component
  • Because it registered itself with ACX as circuit factory. The ACX framework uses the registered factory to ask the driver to create a new circuit.

Use AcxDeviceRemoveFactoryCircuit to remove a factory circuit from a WDFDEVICE.

This function can only be called from the EVT_WDF_DEVICE_PREPARE_HARDWARE callback function for this device.

Example

WDFDEVICE                Device;
NTSTATUS                 status;
PCAPTURE_DEVICE_CONTEXT  devCtx;

// Code to initialize WDFDEVICE...

//
// Add control circuit to child's list.
//
status = AcxDeviceAddFactoryCircuit(Device, devCtx->CtrlCircuit);

if (!NT_SUCCESS(status))
{
    ASSERT(FALSE);
    goto exit;
}

ACX requirements

Minimum ACX version: 1.0

For more information about ACX versions, see ACX version overview.

Requirements

Requirement Value
Header acxdevice.h
IRQL PASSIVE_LEVEL

See also