3system USB Devices Driver



Solid State System Co., Ltd. (aka 3S) founded in Year 1998, is well known by its profound NAND flash knowledge and experiences accumulated on mobile storage medias. Headquartered in Hsinchu, Taiwan and with branch offices located in both Taipei and Shenzen, China; 3S was listed under Taiwan Stock Exchange (TSC) in Year 2007 and publically traded (Stock symbol: 3259). During device enumeration, The USB driver stack then retrieves the DeviceInterfaceGUID value from the extended properties OS feature descriptor and registers the device in the device's hardware key. An application can retrieve the value by using SetupDiXxx APIs (See SetupDiOpenDevRegKey).For more information, see How to Access a USB Device by Using WinUSB Functions. Microsoft-provided USB device class drivers. Microsoft provides drivers for several USB device classes approved by USB-IF. These drivers and their installation files are included in Windows. They are available in the WindowsSystem32DriverStoreFileRepository folder. See, USB device class drivers included in Windows.

-->

3system USB Devices Driver

For certain Universal Serial Bus (USB) devices, such as devices that are accessed by only a single application, you can install WinUSB (Winusb.sys) in the device's kernel-mode stack as the USB device's function driver instead of implementing a driver.

This topic contains these sections:

Automatic installation of WinUSB without an INF file

As an OEM or independent hardware vendor (IHV), you can build your device so that the Winusb.sys gets installed automatically on Windows 8 and later versions of the operating system. Such a device is called a WinUSB device and does not require you to write a custom INF file that references in-box Winusb.inf.

When you connect a WinUSB device, the system reads device information and loads Winusb.sys automatically.

For more information, see WinUSB Device.

Installing WinUSB by specifying the system-provided device class

When you connect your device, you might notice that Windows loads Winusb.sys automatically (if the IHV has defined the device as a WinUSB Device). Otherwise follow these instructions to load the driver:

  1. Plug in your device to the host system.
  2. Open Device Manager and locate the device.
  3. Select and hold (or right-click) the device and select Update driver software.. from the context menu.
  4. In the wizard, select Browse my computer for driver software.
  5. Select Let me pick from a list of device drivers on my computer.
  6. From the list of device classes, select Universal Serial Bus devices.
  7. The wizard displays WinUsb Device. Select it to load the driver.
Driver

If Universal Serial Bus devices does not appear in the list of device classes, then you need to install the driver by using a custom INF.The preceding procedure does not add a device interface GUID for an app (UWP app or Windows desktop app) to access the device. You must add the GUID manually by following this procedure.

  1. Load the driver as described in the preceding procedure.

  2. Generate a device interface GUID for your device, by using a tool such as guidgen.exe.

  3. Find the registry key for the device under this key:

    HKEY_LOCAL_MACHINESYSTEMCurrentControlSetEnumUSB<VID_vvvv&PID_pppp>

  4. Under the Device Parameters key, add a String registry entry named DeviceInterfaceGUID or a Multi-String entry named DeviceInterfaceGUIDs. Set the value to the GUID you generated in step 2.

  5. Disconnect the device from the system and reconnect it to the same physical port.Note If you change the physical port then you must repeat steps 1 through 4.

Writing a custom INF for WinUSB installation

As part of the driver package, you provide an .inf file that installs Winusb.sys as the function driver for the USB device.

The following example .inf file shows WinUSB installation for most USB devices with some modifications, such as changing USB_Install in section names to an appropriate DDInstall value. You should also change the version, manufacturer, and model sections as necessary. For example, provide an appropriate manufacture's name, the name of your signed catalog file, the correct device class, and the vendor identifier (VID) and product identifier (PID) for the device.

Also notice that the setup class is set to 'USBDevice'. Vendors can use the 'USBDevice' setup class for devices that do not belong to another class and are not USB host controllers or hubs.

If you are installing WinUSB as the function driver for one of the functions in a USB composite device, you must provide the hardware ID that is associated with the function, in the INF. You can obtain the hardware ID for the function from the properties of the devnode in Device Manager. The hardware ID string format is 'USBVID_vvvv&PID_pppp'.

The following INF installs WinUSB as the OSR USB FX2 board's function driver on a x64-based system.

3system USB Devices Driver

Starting in Windows 10, version 1709, the Windows Driver Kit provides InfVerif.exe that you can use to test a driver INF file to make sure there are no syntax issues and the INF file is universal. We recommened that you provide a universal INF. For more information, see Using a Universal INF File.

Only include a ClassInstall32 section in a device INF file to install a new custom device setup class. INF files for devices in an installed class, whether a system-supplied device setup class or a custom class, must not include a ClassInstall32 section.

Except for device-specific values and several issues that are noted in the following list, you can use these sections and directives to install WinUSB for any USB device. These list items describe the Includes and Directives in the preceding .inf file.

  • USB_Install: The Include and Needs directives in the USB_Install section are required for installing WinUSB. You should not modify these directives.

  • USB_Install.Services: The Include directive in the USB_Install.Services section includes the system-supplied .inf for WinUSB (WinUSB.inf). This .inf file is installed by the WinUSB co-installer if it isn't already on the target system. The Needs directive specifies the section within WinUSB.inf that contains information required to install Winusb.sys as the device's function driver. You should not modify these directives.Note Because Windows XP doesn't provide WinUSB.inf, the file must either be copied to Windows XP systems by the co-installer, or you should provide a separate decorated section for Windows XP.

  • USB_Install.HW: This section is the key in the .inf file. It specifies the device interface globally unique identifier (GUID) for your device. The AddReg directive sets the specified interface GUID in a standard registry value. When Winusb.sys is loaded as the device's function driver, it reads the registry value DeviceInterfaceGUIDs key and uses the specified GUID to represent the device interface. You should replace the GUID in this example with one that you create specifically for your device. If the protocols for the device change, create a new device interface GUID.

    Note User-mode software must call SetupDiGetClassDevs to enumerate the registered device interfaces that are associated with one of the device interface classes specified under the DeviceInterfaceGUIDs key. SetupDiGetClassDevs returns the device handle for the device that the user-mode software must then pass to the WinUsb_Initialize routine to obtain a WinUSB handle for the device interface. For more info about these routines, see How to Access a USB Device by Using WinUSB Functions.

The following INF installs WinUSB as the OSR USB FX2 board's function driver on a x64-based system. The example shows INF with WDF coinstallers.

  • USB_Install.CoInstallers: This section, which includes the referenced AddReg and CopyFiles sections, contains data and instructions to install the WinUSB and KMDF co-installers and associate them with the device. Most USB devices can use these sections and directives without modification.

  • The x86-based and x64-based versions of Windows have separate co-installers.

    Note Each co-installer has free and checked versions. Use the free version to install WinUSB on free builds of Windows, including all retail versions. Use the checked version (with the '_chk' suffix) to install WinUSB on checked builds of Windows.

Each time Winusb.sys loads, it registers a device interface that has the device interface classes that are specified in the registry under the DeviceInterfaceGUIDs key.

Note If you use the redistributable WinUSB package for Windows XP or Windows Server 2003, make sure that you don't uninstall WinUSB in your uninstall packages. Other USB devices might be using WinUSB, so its binaries must remain in the shared folder.

How to create a driver package that installs Winusb.sys

To use WinUSB as the device's function driver, you create a driver package. The driver package must contain these files:

  • WinUSB co-installer (Winusbcoinstaller.dll)
  • KMDF co-installer (WdfcoinstallerXXX.dll)
  • An .inf file that installs Winusb.sys as the device's function driver. For more information, see Writing an .Inf File for WinUSB Installation.
  • A signed catalog file for the package. This file is required to install WinUSB on x64 versions of Windows starting with Vista.

Note Make sure that the driver package contents meet these requirements:

  • The KMDF and WinUSB co-installer files must be obtained from the same version of the Windows Driver Kit (WDK).
  • The co-installer files must be obtained from the latest version of the WDK, so that the driver supports all the latest Windows releases.
  • The contents of the driver package must be digitally signed with a Winqual release signature. For more info about how to create and test signed catalog files, see Kernel-Mode Code Signing Walkthrough on the Windows Dev Center - Hardware site.
  1. Download the Windows Driver Kit (WDK) and install it.

  2. Create a driver package folder on the machine that the USB device is connected to. For example, c:UsbDevice.

  3. Copy the WinUSB co-installer (WinusbcoinstallerX.dll) from the WinDDKBuildNumberredistwinusb folder to the driver package folder.

    The WinUSB co-installer (Winusbcoinstaller.dll) installs WinUSB on the target system, if necessary. The WDK includes three versions of the co-installer depending on the system architecture: x86-based, x64-based, and Itanium-based systems. They are all named WinusbcoinstallerX.dll and are located in the appropriate subdirectory in the WinDDKBuildNumberredistwinusb folder.

  4. Copy the KMDF co-installer (WdfcoinstallerXXX.dll) from the WinDDKBuildNumberredistwdf folder to the driver package folder.

    The KMDF co-installer (WdfcoinstallerXXX.dll) installs the correct version of KMDF on the target system, if necessary. The version of WinUSB co-installer must match the KMDF co-installer because KMDF-based client drivers, such as Winusb.sys, require the corresponding version of the KMDF framework to be installed properly on the system. For example, Winusbcoinstaller2.dll requires KMDF version 1.9, which is installed by Wdfcoinstaller01009.dll. The x86 and x64 versions of WdfcoinstallerXXX.dll are included with the WDK under the WinDDKBuildNumberredistwdf folder. The following table shows the WinUSB co-installer and the associated KMDF co-installer to use on the target system.

    Use this table to determine the WinUSB co-installer and the associated KMDF co-installer.

    WinUSB co-installerKMDF library versionKMDF co-installer
    Winusbcoinstaller.dllRequires KMDF version 1.5 or later

    Wdfcoinstaller01005.dll Drivers csm.

    Wdfcoinstaller01007.dll

    Wdfcoinstaller01009.dll

    Winusbcoinstaller2.dllRequires KMDF version 1.9 or laterWdfcoinstaller01009.dll
    Winusbcoinstaller2.dllRequires KMDF version 1.11 or laterWdfCoInstaller01011.dll
  5. Write an .inf file that installs Winusb.sys as the function driver for the USB device.

  6. Create a signed catalog file for the package. This file is required to install WinUSB on x64 versions of Windows.

  7. Attach the USB device to your computer.

  8. Open Device Manager to install the driver. Follow the instructions on the Update Driver Software wizard and choose manual installation. You will need to provide the location of the driver package folder to complete the installation.

Related topics

WinUSB Architecture and Modules
Choosing a driver model for developing a USB client driver
How to Access a USB Device by Using WinUSB Functions
WinUSB Power Management
WinUSB Functions for Pipe Policy Modification
WinUSB Functions
WinUSB

-->

Starting with Windows 10, release 1703, a USB Audio 2.0 driver is shipped with Windows. It is designed to support the USB Audio 2.0 device class. The driver is a WaveRT audio port class miniport. For more information about the USB Audio 2.0 device class, see https://www.usb.org/documents?search=&type%5B0%5D=55&items_per_page=50.

The driver is named: usbaudio2.sys and the associated inf file is usbaudio2.inf.

3system USB devices driver

The driver will identify in device manager as 'USB Audio Class 2 Device'. This name will be overwritten with a USB Product string, if it is available.

The driver is automatically enabled when a compatible device is attached to the system. However, if a third-party driver exists on the system or Windows Update, that driver will be installed and override the class driver.

Architecture

usbaudio2.sys fits within the wider architecture of Windows USB Audio as shown.

Related USB specifications

The following USB specifications define USB Audio and are referenced in this topic.

  • USB-2 refers to the Universal Serial Bus Specification, Revision 2.0
  • ADC-2 refers to the USB Device Class Definition for Audio Devices, Release 2.0.
  • FMT-2 refers to the Audio Data Formats specification, Release 2.0.
Devices

The USB-IF is a special interest group that maintains the Official USB Specification, test specifications and tools.

Audio formats

The driver supports the formats listed below. An alternate setting which specifies another format defined in FMT-2, or an unknown format, will be ignored.

Type I formats (FMT-2 2.3.1):

  • PCM Format with 8.32 bits per sample (FMT-2 2.3.1.7.1)
  • PCM8 Format (FMT-2 2.3.1.7.2)
  • IEEE_FLOAT Format (FMT-2 2.3.1.7.3)

Type III formats (FMT-2 2.3.3 and A.2.3):

  • IEC61937_AC-3
  • IEC61937_MPEG-2_AAC_ADTS
  • IEC61937_DTS-I
  • IEC61937_DTS-II
  • IEC61937_DTS-III
  • TYPE_III_WMA

Feature descriptions

This section describes the features of the USB Audio 2.0 driver.

Audio function topology

The driver supports all entity types defined in ADC-2 3.13.

Each Terminal Entity must have a valid clock connection in compatible USB Audio 2.0 hardware. The clock path may optionally include Clock Multiplier and Clock Selector units and must end in a Clock Source Entity.

The driver supports one single clock source only. If a device implements multiple clock source entities and a clock selector, then the driver will use the clock source that is selected by default and will not modify the clock selector’s position.

A Processing Unit (ADC-2 3.13.9) with more than one input pin is not supported.

An Extension Unit (ADC-2 3.13.10) with more than one input pin is not supported.

Cyclic paths in the topology are not allowed.

Audio streaming

The driver supports the following endpoint synchronization types (USB-2 5.12.4.1):

  • Asynchronous IN and OUT
  • Synchronous IN and OUT
  • Adaptive IN and OUT

For the asynchronous OUT case the driver supports explicit feedback only. A feedback endpoint must be implemented in the respective alternate setting of the AS interface. The driver does not support implicit feedback.

There is currently limited support for devices using a shared clock for multiple endpoints.

For the Adaptive IN case the driver does not support a feedforward endpoint. If such an endpoint is present in the alternate setting, it will be ignored. The driver handles the Adaptive IN stream in the same way as an Asynchronous IN stream.

The size of isochronous packets created by the device must be within the limits specified in FMT-2.0 section 2.3.1.1. This means that the deviation of actual packet size from nominal size must not exceed +/- one audio slot (audio slot = channel count samples).

Descriptors

An audio function must implement exactly one AudioControl Interface Descriptor (ADC-2 4.7) and one or more AudioStreaming Interface Descriptors (ADC-2 4.9). A function with an audio control interface but no streaming interface is not supported.

The driver supports all descriptor types defined in ADC-2, section 4. The following subsections provide comments on some specific descriptor types.

Class-Specific AS interface descriptor

For details on this specification, refer to ADC-2 4.9.2.

An AS interface descriptor must start with alternate setting zero with no endpoint (no bandwidth consumption) and further alternate settings must be specified in ascending order in compatible USB Audio 2.0 hardware.

An alternate setting with a format that is not supported by the driver will be ignored.

Each non-zero alternate setting must specify an isochronous data endpoint, and optionally a feedback endpoint. A non-zero alternate setting without any endpoint is not supported.

The bTerminalLink field must refer to a Terminal Entity in the topology and its value must be identical in all alternate settings of an AS interface.

The bFormatType field in the AS interface descriptor must be identical to bFormatType specified in the Format Type Descriptor (FMT-2 2.3.1.6).

For Type I formats, exactly one bit must be set to one in the bmFormats field of the AS interface descriptor. Otherwise, the format will be ignored by the driver.

To save bus bandwidth, one AS interface can implement multiple alternate settings with the same format (in terms of bNrChannels and AS Format Type Descriptor) but different wMaxPacketSize values in the isochronous data endpoint descriptor. For a given sample rate, the driver selects the alternate setting with the smallest wMaxPacketSize that can fulfill the data rate requirements.

Type I format type descriptor

For details on this specification, refer to FMT-2 2.3.1.6.

The following restrictions apply:

FormatSubslot sizeBit resolution
Type I PCM format:1 <= bSubslotSize <= 48 <= bBitResolution <= 32
Type I PCM8 format:bSubslotSize 1bBitResolution 8
Type I IEEE_FLOAT format:bSubslotSize 4bBitResolution 32
Type III IEC61937 formats:bSubslotSize 2bBitResolution 16

Class-Specific AS isochronous audio data endpoint descriptor

For details on this specification, refer to ADC-2 4.10.1.2.

The MaxPacketsOnly flag in the bmAttributes field is not supported and will be ignored.

The fields bmControls, bLockDelayUnits and wLockDelay will be ignored.

Class requests and interrupt data messages

The driver supports a subset of the control requests defined in ADC-2, section 5.2, and supports interrupt data messages (ADC-2 6.1) for some controls. The following table shows the subset that is implemented in the driver.

EntityControlGET CURSET CURGET RANGEINTERRUPT
Clock SourceSampling Frequency Controlxxx
Clock SelectorClock Selector Controlx
Clock MultiplierNumerator Controlx
Denominator Controlx
TerminalConnector Controlxx
Mixer UnitMixer Controlxxx
Selector UnitSelector Controlxx
Feature UnitMute Controlxxx
Volume Controlxxxx
Automatic Gain Controlxx
Effect Unit
Processing Unit
Extension Unit

Additional information on the controls and requests is available in the following subsections.

Clock source entity

For details on this specification, refer to ADC-2 5.2.5.1.

At a minimum, a Clock Source Entity must implement Sampling Frequency Control GET RANGE and GET CUR requests (ADC-2 5.2.5.1.1) in compatible USB Audio 2.0 hardware.

The Sampling Frequency Control GET RANGE request returns a list of subranges (ADC-2 5.2.1). Each subrange describes a discrete frequency, or a frequency range. A discrete sampling frequency must be expressed by setting MIN and MAX fields to the respective frequency and RES to zero. Individual subranges must not overlap. If a subrange overlaps a previous one, it will be ignored by the driver.

A Clock Source Entity which implements one single fixed frequency only does not need to implement Sampling Frequency Control SET CUR. It implements GET CUR which returns the fixed frequency, and it implements GET RANGE which reports one single discrete frequency.

Clock selector entity

For details on this specification, refer to ADC-2 5.2.5.2

The USB Audio 2.0 driver does not support clock selection. The driver uses the Clock Source Entity which is selected by default and never issues a Clock Selector Control SET CUR request. The Clock Selector Control GET CUR request (ADC-2 5.2.5.2.1) must be implemented in compatible USB Audio 2.0 hardware.

Feature unit

For details on this specification, refer to ADC-2 5.2.5.7.

The driver supports one single volume range only. If the Volume Control GET RANGE request returns more than one range, then subsequent ranges will be ignored.

The volume interval expressed by the MIN and MAX fields should be an integer multiple of the step size specified in the RES field.

If a feature unit implements single channel controls as well as a master control for Mute or Volume, then the driver uses the single channel controls and ignores the master control.

Additional Information for OEM and IHVs

OEMs and IHVs should test their existing and new devices against the supplied in-box driver.

There is not any specific partner customization that is associated with the in-box USB Audio 2.0 driver.

This INF file entry (provided in a update to Windows Release 1703), is used to identify that the in-box driver is a generic device driver.

The in-box driver registers for the following compatible IDs with usbaudio2.inf.

See the USB audio 2.0 specification for subclass types.

USB Audio 2.0 Devices with MIDI (subclass 0x03 above) will enumerate the MIDI function as a separate multi-function device with usbaudio.sys (USB Audio 1.0 driver) loaded.

The USB Audio 1.0 class driver registers this compatible ID with wdma_usb.inf.

And has these exclusions:

An arbitrary number of channels (greater than eight) are not supported in shared mode due to a limitation of the Windows audio stack.

IHV USB Audio 2.0 drivers and updates

For IHV provided third party driver USB Audio 2.0 drivers, those drivers will continue to be preferred for their devices over our in-box driver unless they update their driver to explicitly override this behavior and use the in-box driver.

System

Audio Jack Registry Descriptions

Starting in Windows 10 release 1703, IHVs that create USB Audio Class 2.0 devices having one or more jacks have the capability to describe these jacks to the in-box Audio Class 2.0 driver. The in-box driver uses the supplied jack information when handling the KSPROPERTY_JACK_DESCRIPTION for this device.

Jack information is stored in the registry in the device instance key (HW key).

The following describes the audio jack information settings in the registry:

<tid> = terminal ID (As defined in the descriptor)

<n> = Jack number (1 ~ n).

Convention for <tid> and <n> is:

  • Base 10 (8, 9, 10 rather than 8, 9, a)
  • No leading zeros
  • n is 1-based (first jack is jack 1 rather than jack 0)

For example:

T1_NrJacks, T1_J2_ChannelMapping, T1_J2_ConnectorType

For additional audio jack information, see KSJACK_DESCRIPTION structure.

These registry values can be set in various ways:

3 System Usb Devices Driver Updater

  • By using custom INFs which wrap the in-box INF for the purpose to set these values.

  • Directly by the h/w device via a Microsoft OS Descriptors for USB devices (see example below). For more information about creating these descriptors, see Microsoft OS Descriptors for USB Devices.

Microsoft OS Descriptors for USB Example

The following Microsoft OS Descriptors for USB example contains the channel mapping and color for one jack. The example is for a non-composite device with single feature descriptor.

The IHV vendor should extend it to contain any other information for the jack description.

Troubleshooting

If the driver does not start, the system event log should be checked. The driver logs events which indicate the reason for the failure. Similarly, audio logs can be manually collected following the steps described in this blog entry. If the failure may indicate a driver problem, please report it using the Feedback Hub described below, and include the logs.

For information on how to read logs for the USB Audio 2.0 class driver using supplemental TMF files, see this blog entry. For general information on working with TMF files, see Displaying a Trace Log with a TMF File.

3 System Usb Devices Driver Adapter

For information on 'Audio services not responding' error and USB audio device does not work in Windows 10 version 1703 see, USB Audio Not Playing

Feedback Hub

If you run into a problem with this driver, collect audio logs and then follow steps outlined in this blog entry to bring it to our attention via the Feedback Hub.

Driver development

This USB Audio 2.0 class driver was developed by Thesycon and is supported by Microsoft.

3 System Usb Devices Driver Win 7

See also