Open Interface Driver



If you do not see your PreSonus interface’s audio driver on the Start page when you launch Studio One, click on the 'Configure Audio Devices' link in the Setup area to open the 'Audio Setup Options' window. In the Audio Device menu, select the driver for your PreSonus interface. Click the Apply button and then click OK. When an application or kernel-mode component requests access to a driver's device interface, the framework calls the driver's EvtDeviceFileCreate callback function. The driver can call WdfFileObjectGetFileName to obtain the name of the device or file that the application or kernel-mode component is accessing.

News Story

Driver Update

We’ve released our latest Windows USB driver

We recently released our latest Windows USB driver (version 4.63.23) which supports the following devices:

  • 3rd Generation Scarlett Range
  • Clarett USB Range
  • 2nd Generation Scarlett Range
  • 1st Generation Scarlett Range
  • iTrack Solo
  • Saffire 6 USB 2.0*

This release brings the 1st Generation Scarlett Range, iTrack Solo and Saffire 6 USB 2.0 up to the same driver versions as the 2nd and 3rd Generation Scarlett ranges and the Clarett USB range.
1st Generation Scarlett 6i6, 8i6, 18i6, 18i8 and 18i20 continue to be supported by Scarlett Mix Control 1.10.
Delivering stable driver performance is one of our highest priorities. We want to make sure that we’re doing everything we can to give the best customer experience, so you can focus on your creativity.
You can install the latest driver by selecting your product in the Downloads section of our website, then installing either Focusrite Control (2nd Gen Scarlett 6i6, 18i8 and 18i20, 3rd Gen Scarlett Range, Clarett USB Range), Scarlett Mix Control (1st Gen Scarlett 6i6, 8i6, 18i6, 18i8 and 18i20) or the standalone driver installer (1st and 2nd Gen Scarlett Solo, 2i2 and 2i4, iTrack Solo, Saffire 6 USB 2.0).
*the USB 1.1 version of the Saffire 6 USB is no longer supported. You can check which version you have by looking at the serial number on the underside of the unit: serial numbers beginning “SU” are the USB 1.1 variant, “S2” is the USB 2.0 variant.

-->

A device interface is a symbolic link to a Plug and Play (PnP) device that an application can use to access the device. A user-mode application can pass the interface's symbolic link name to an API element, such as the Microsoft Win32 CreateFile function. To obtain a device interface's symbolic link name, the user-mode application can call SetupDi functions. For more information about SetupDi functions, see Using Device Installation Functions.

Each device interface belongs to a device interface class. For example, a driver stack for a CD-ROM device might provide an interface that belongs to the GUID_DEVINTERFACE_CDROM class. One of the CD-ROM device's drivers would register an instance of the GUID_DEVINTERFACE_CDROM class to inform the system and applications that a CD-ROM device is available. For more information about device interface classes, see Overview of Device Interface Classes.

Registering a Device Interface

To register an instance of a device interface class, a framework-based driver can call WdfDeviceCreateDeviceInterface from within its EvtDriverDeviceAdd callback function. If the driver supports multiple instances of the interface, it can assign a unique reference string to each instance.

Open Interface Driver Software

After the driver has registered a device interface, the driver can call WdfDeviceRetrieveDeviceInterfaceString to obtain the symbolic link name that the system has assigned to the device interface.

For information about other ways that drivers can register device interfaces, see Registering a Device Interface Class.

Enabling and Disabling a Device Interface

Open Driver Interface

After a driver calls WdfDeviceCreateDeviceInterface from EVT_WDF_DRIVER_DEVICE_ADD, the framework automatically enables all of a device's interfaces when the device goes through PnP enumeration and disables the interfaces when the device undergoes PnP removal.

Open driver interface

Note that any device power state changes or PnP resource rebalance does not change the interface's state. To prevent the interface from being automatically enabled during PnP start, call WdfDeviceSetDeviceInterfaceStateEx (set the EnableInterface parameter to FALSE) for that interface.

Interfaces created after the device already starts won't be automatically enabled. The driver must call WdfDeviceSetDeviceInterfaceState or WdfDeviceSetDeviceInterfaceStateEx to enable such interfaces.

A driver can disable and re-enable a device interface if necessary. For example, if a driver determines that its device has stopped responding, the driver can call WdfDeviceSetDeviceInterfaceState or WdfDeviceSetDeviceInterfaceStateEx to disable the device's interfaces and prohibit applications from obtaining new handles to the interface. (Existing handles to the interface are not affected.) If the device later becomes available, the driver can call WdfDeviceSetDeviceInterfaceState or WdfDeviceSetDeviceInterfaceStateEx again to reenable the interfaces.

Open Interface Drivers

Receiving Requests to Access a Device Interface

When an application or kernel-mode component requests access to a driver's device interface, the framework calls the driver's EvtDeviceFileCreate callback function. The driver can call WdfFileObjectGetFileName to obtain the name of the device or file that the application or kernel-mode component is accessing. If the driver specified a reference string when it registered the device interface, the operating system includes the reference string in the file or device name that WdfFileObjectGetFileName returns.

Accessing Another Driver's Device Interface

This section shows how a Kernel-Mode Driver Framework (KMDF) driver or a User-Mode Driver Framework (UMDF) version 2 driver registers for notification of arrival or removal of a device interface provided by another driver, and then creates a remote I/O target to communicate with the device represented by the device interface.

For information on how to do this in a UMDF version 1 driver, see Using Device Interfaces in UMDF Drivers.

To register for notification of device interface events, a KMDF driver calls IoRegisterPlugPlayNotification, while a UMDF 2 driver calls CM_Register_Notification. In both cases, the driver calls the appropriate routine from its EvtDriverDeviceAdd callback function.

Open Interface Driver Tool

The following code example shows how a local UMDF 2 driver registers for notifications and then opens the remote I/O target.

  1. The remote driver registers for a device interface by calling WdfDeviceCreateDeviceInterface from EvtDriverDeviceAdd.

  2. The local driver calls CM_Register_Notification from EvtDriverDeviceAdd to register for notification when a device interface is available. Provide a pointer to a notification callback routine that the framework calls when device interfaces are available.

  3. The system calls the local driver's notification callback routine each time that the specified device interface arrives or is removed. The callback routine can examine the EventData parameter to determine which device interface has arrived. It might then queue a work item to open the device interface.

  4. From the work item callback function, the local driver calls WdfIoTargetCreate to create the remote target, and WdfIoTargetOpen to open a remote I/O target.

    When calling WdfIoTargetOpen, the driver optionally registers an EvtIoTargetQueryRemove callback function to receive removal notification, along with the opportunity to decline the removal. If the driver does not provide EvtIoTargetQueryRemove, the framework closes the I/O target when the device is removed.

    In rare cases, a UMDF 2 driver can call CM_Register_Notification a second time, to register for notification of device removal. For example, if the driver calls CreateFile to get a HANDLE to the device interface, it should register for notification of device removal so that it can properly respond to query remove attempts. In most cases, the UMDF 2 driver calls CM_Register_Notification only once, and relies on WDF support for device removal.

Open Interface Driver App

Related topics