- USB Audio 2.0 Drivers
- Architecture
- Related USB specifications
- Audio formats
- Feature descriptions
- Audio function topology
- Audio streaming
- Descriptors
- Class-Specific AS interface descriptor
- Type I format type descriptor
- Microsoft OS Descriptors for USB Example
- Troubleshooting
- Feedback Hub
- Driver development
- USB in Windows — FAQ
- I hear numerous USB terms thrown around almost interchangeably. What do they all mean?
- Does my PC have USB 3.0 ports?
- Do I need to install drivers for my eXtensible host controller?
- Why do I see several host controllers on my system?
- Why do I see two hubs in Device Manager when I have connected only one USB 3.0 hub?
- Which set of drivers is loaded for the devices that are connected to 2.0 ports?
- How do I determine whether my USB 3.0 device is operating as SuperSpeed?
- Why isn’t my SuperSpeed USB device faster than an equivalent high-speed USB device?
- Is it possible to have a composite and a compound device in one piece of hardware?
- Why are some of my USB devices reinstalled when they are moved to a new port?
- Is there a list of design recommendations for USB product packaging?
- Do I have to rewrite my client driver to support USB 3.0 devices?
- Which driver is loaded for my SuperSpeed storage device use, Uaspstor.sys or Usbstor.sys?
- Which USB DWG Classes does Microsoft support?
- Which device setup class should I use for a custom USB device?
- Why won’t my CPU enter C3 when I attach some USB devices?
- Which USB class drivers support Selective Suspend?
- Why can’t a USB device awaken Windows from S3?
- Do I need to install drivers for my enhanced (USB 2.0) host controller?
- Can I disable the «HI-SPEED USB Device plugged into non-HI-SPEED USB port» notice?
- Is my USB 2.0 hub single-TT or multi-TT?
- What characters or bytes are valid in a USB serial number?
- What LANGID is used in a string request on localized builds of Windows?
- What LANGID is used to extract a device’s serial number?
- How should numbers be assigned to multiple interfaces on a composite device?
- What are the major restrictions imposed by Usbccgp.sys?
- How do I enable debug tracing for USB core binaries?
- Does Windows support Interface Association Descriptors?
- Does the USB stack handle chained MDLs in a URB?
- Can a driver have more than one URB in an IRP?
- Does Windows Support USB Composite Hubs?
USB Audio 2.0 Drivers
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.
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.
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:
Format | Subslot size | Bit resolution | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type I PCM format: | 1 = terminal ID (As defined in the descriptor) Convention for and is:
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: 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 ExampleThe 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. TroubleshootingIf 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. 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 HubIf 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 developmentThis USB Audio 2.0 class driver was developed by Thesycon and is supported by Microsoft. USB in Windows — FAQThis topic presents frequently asked questions for driver developers who are new to developing and integrating USB devices and drivers with Windows operating systems. I hear numerous USB terms thrown around almost interchangeably. What do they all mean?Say you see something like, «Thanks to USB 3.0, I can connect a SuperSpeed USB thumb drive to my PC’s xHCI host controller and copy files faster.» Let’s understand the USB terms in that sentence. USB 3.0, USB 2.0, and USB 1.0 refer to the USB specification revision number from the USB Implementers Forum. The USB specifications define how the host PC and USB device communicate with each another. The version number also indicates the maximum transmission speed. The newest specification revision is USB 3.0, which specifies a maximum transmission speed up to 5 Gbps. USB 1.0 defines two different data rates, low speed USB (up to 1.5 Mbps) and full speed USB (up to 12 Mbps). USB 2.0 defines a new data rate, high-speed USB (480 Mbps), while maintaining support for low and full speed devices. USB 3.0 continues to work with all of the previously defined data rates. If you look at product packaging, SuperSpeed USB references the newest USB 3.0 devices. Hi-Speed USB is used to describe high-speed USB 2.0 devices. USB, with no descriptor, refers to low speed and full speed devices. In addition to the USB protocol, there is a second specification for the USB host controller, the piece of hardware on the PC to which a device is connected. The Host Controller Interface specification defines how host controller hardware and software interact. The eXtensible Host Controller Interface (xHCI) defines a USB 3.0 host controller. The Enhanced Host Controller Interface (EHCI) defines a USB 2.0 host controller. The Universal Host Controller (UHCI) and the Open Host Controller (OHCI) are two, alternate implementations of a USB 1.0 host controller. Does my PC have USB 3.0 ports?USB 3.0 ports are either marked with the SuperSpeed USB Logo or the port is typically blue. Newer PCs have both USB 3.0 and USB 2.0 ports. If you want your SuperSpeed USB device to perform at top speed, find a USB 3.0 port and connect the device to that port. A SuperSpeed device that is connected a USB 2.0 port, operates at high speed. You can also verify that a particular port is a USB 3.0 port in Device Manager. In Windows Vista or later version of Windows, open Device Manager, and select the port from the list. If you have an eXtensible Host Controller, it supports USB 3.0. Do I need to install drivers for my eXtensible host controller?Windows 8 and Windows Server 2012 include support for USB 3.0. If the PC has USB 3.0 ports and is running a version of Windows earlier than Windows 8, the host controller drivers are provided by the PC manufacturer. If you need to reinstall those drivers, you must get them from the manufacturer. If you added a USB 3.0 controller card to your PC that is running a version of Windows earlier than Windows 8, you must install the drivers provided by the controller card manufacturer. In Windows 8, the Microsoft-provided set of USB 3.0 drivers (USB driver stack) work with most host controllers. Microsoft USB 3.0 driver stack does not work with the Fresco Logic FL1000 controller. To determine if you have an FL1000 controller, open Device Manager and expand Universal Serial Bus controllers. View the controller properties by selecting and holding (or right-clicking) the controller node. On the Details tab, select Hardware Ids property in the list. If the hardware ID starts with PCI\VEN_1B73&DEV_1000, it is the FL1000. For that controller, download and install drivers from your PC or controller card manufacturer. Why do I see several host controllers on my system?In addition to the USB devices that you connect to your PC, there are a number of devices integrated within the PC that might be connected over USB, such as a webcam, fingerprint reader, SD Card reader. To connect all of those devices and still provide external USB ports, the PC supports several USB host controllers. The USB 3.0 xHCI host controller is fully backwards compatible with all USB device speeds, SuperSpeed, high speed, full speed, and low speed. You can connect any device directly to an xHCI controller and expect that device to work. For EHCI controller, that is not the case. While the USB 2.0 specification supports all speeds of devices, the EHCI controller only supports high-speed USB devices. In order for full speed and low speed USB devices to work, they must be connected to the EHCI controller through a USB 2.0 hub, or they must be connected to a UHCI or OHCI Controller. For newer PCs, most USB 2.0 ports exposed by PCs are downstream of a USB 2.0 hub. This hub is connected to an EHCI controller. This allows the PC’s USB 2.0 port to work with all speeds of devices. SuperSpeed devices behave as high-speed devices when connected to a 2.0 port. After the USB 2.0 specification was released, PCs used a combination of host controllers in order to support all speeds of devices. A single USB 2.0 port would be wired to two host controllers, an EHCI host controller and either a UHCI or OHCI host controller. When you attach a device, the hardware dynamically routes the connection to one of the two hosts. The routine depends on the device’s speed. Why do I see two hubs in Device Manager when I have connected only one USB 3.0 hub?While xHCI host controllers work with any speed of device, a SuperSpeed hub only works with SuperSpeed devices. To ensure that USB 3.0 hubs can work with all speeds, they have two parts: a SuperSpeed hub and a USB 2.0 hub. A USB 3.0 hub is able to support all speeds by dynamically routing devices, to the SuperSpeed hub or 2.0 hub, based on device speed. Open Device Manager, view Devices by connection, and then locate your eXtensible Host Controller. When you connect a single USB 3.0 hub to your USB 3.0 port, there are two hubs downstream of the controllers’ Root Hub. In the example below, a SuperSpeed USB storage device and USB Audio device are both connected to a USB 3.0 hub. You can see the storage device is downstream of the SuperSpeed hub and the audio device is downstream of the USB 2.0 hub. Which set of drivers is loaded for the devices that are connected to 2.0 ports?A different set of binaries is loaded for each type of host controller. It’s important to understand that the USB driver stack that Windows loads correlates to the type of host controller, not to the connected device’s speed. In this image, you can see which drivers are loaded for each of the different types of USB host controllers. If the USB 3.0 port is correctly routed to an xHCI controller, Windows loads the xHCI driver stack (also referred to as the USB 3.0 driver stack). If the USB 2.0 port is connected to an EHCI controller through a USB 2.0 hub, the traffic moves through the EHCI controller, and the USB 2.0 driver stack is loaded. For more information about the drivers in the USB driver stack, see USB host-side drivers in Windows. If the PC’s USB 2.0 ports use a companion controller, the host controller to which the port is routed depends on device speed. For example, a low speed device connects through a UHCI or an OHCI controller, and uses the USBUHCI or USBOHCI driver. The PC routes a high speed device to an EHCI controller, therefore, Windows uses the USBEHCI driver. Different device speeds do not determine the driver that is loaded for the controller. However, different device speeds might determine which controller is used. The controller always uses the same driver. How do I determine whether my USB 3.0 device is operating as SuperSpeed?In Windows 8, first, make sure that you have a USB 3.0 port and an xHCI host controller. If your SuperSpeed USB device is connected to the xHCI host controller, Windows 8 shows a «Connected to USB 3.0» message in specific portions of the Windows 8 UI. If the device is connected to an EHCI controller instead of your XHCI controller, the messages will instead read, «Device can perform faster when connected to USB 3.0». You can view these UI messages in PC Settings.
This image shows the UI message when the USB 3.0 device is operating at SuperSpeed. This image shows the UI message when the USB device is operating at a bus speed that is lower than SuperSpeed. You can view similar messages in Devices and Printers, as shown in these images. If the USB 3.0 device is a storage device, Windows Explorer shows similar messages when the volume label is selected, as shown below. Note that the View -> Details pane must be selected for the message to be visible. If you are writing a device driver, the USBView tool, included in the Windows Driver Kit (WDK), is very useful. For the Windows 8 WDK, Microsoft updated USBView to display SuperSpeed USB information. You can use this tool to determine whether or not your device is operating at SuperSpeed. This image shows a USB 3.0 device operating at SuperSpeed in USBView. If you are a device driver developer, the USB driver stack exposes a new IOCTL that is called IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_V2, which you can use to query speed information for USB 3.0 devices. Why isn’t my SuperSpeed USB device faster than an equivalent high-speed USB device?Generally, if a USB 3.0 USB device is not faster than a high-speed USB device, it’s not performing at SuperSpeed. If the SuperSpeed USB device is connected to a USB 3.0 port, it may not operate at SuperSpeed for the following reasons: You are using a USB 2.0 hub. If you are using a hub, verify that it’s a USB 3.0 hub. If you’re using a USB 2.0 hub, any attached SuperSpeed USB device will operate at high-speed. Either replace the hub with a USB 3.0 hub, or connect the device directly to the USB 3.0 port. The firmware on the USB 3.0 hub is out of date. Certain earlier USB 3.0 hubs did not work well. As a result, Windows only uses the 2.0 portion of those hubs. If Device Manager indicates a «Non Functional» hub as shown in this image, Windows 8 is not using the 3.0 portion of your hub. You can either connect your SuperSpeed device directly to the USB 3.0 port, or update the firmware on your hub. Windows 8 recognizes hubs that have newer firmware. The device is connected with a USB 2.0 cable. Make sure that the cable that is used to connect the device is a USB 3.0 cable. It is also possible that the USB 3.0 cable has signal integrity issues. In that case, the device might switch to high speed. If that happens, you must use a different USB 3.0 cable. The firmware on the device is out of date. Update the firmware for the SuperSpeed USB device by obtaining the latest version from the manufacturer’s website. Some SuperSpeed USB device manufacturers release fixes, for bugs found in the device, as firmware updates. The firmware on the host controller is out of date. Update the firmware for the USB 3.0 controller by obtaining the latest version from your PC manufacturer’s site or from your add in card manufacturer’s site. Some USB 3.0 controller manufacturers release fixes, for bugs found in the controller, as firmware updates. The BIOS for your system is out of date. Update the BIOS for your system by obtaining the latest version from your PC maker. On some motherboards, the BIOS can incorrectly route a device that is connected to an xHCI host controller to an EHCI controller. That incorrect routing forces a SuperSpeed USB device to operate at high-speed. A BIOS update can fix this problem. Is it possible to have a composite and a compound device in one piece of hardware?Yes. The Microsoft Natural Keyboard Pro, which has a three-port, bus-powered hub, is an example of a compound composite USB device. The device has a composite device attached to port 1. Two additional ports are exposed to the end user. The device that is attached to port 1 is a low-speed composite device. The device has two interfaces, both of which comply with the USB standard device class definition for human interface devices (HID). The composite device provides two HID interfaces instead of multiplexing all collections over a single HID interface by using top-level collections. This design was chosen for compatibility with older BIOSs. Why are some of my USB devices reinstalled when they are moved to a new port?In Windows 2000 and later operating systems, a new physical device object (PDO) is created when a USB device is moved from one port to another. If the hardware reports a unique USB serial number, a new PDO is not created. To reuse the same PDO and to ensure that the device experience is unchanged whether the device is reinserted into the same port or a new port, hardware vendors must store a serial number on their device. According to Windows Hardware Certification Program requirements, the serial number must be unique for all devices that share the device installation identifier. Is there a list of design recommendations for USB product packaging?The USB-IF has worked with Microsoft and other USB-IF member companies to develop a list of recommendations for independent hardware vendors to include on their packaging. More information is available on the USB Web site. For USB Hi-Speed and SuperSpeed refer to: https://www.usb.org/. Do I have to rewrite my client driver to support USB 3.0 devices?All existing client drivers should continue work, as is, when a low, full, or high-speed device is connected to a USB 3.0 port. In Windows 8, we have ensured compatibility with existing client drivers. The USB 3.0 driver stack maintains IRQL levels, caller context, and error status; retry frequency and timing when interacting with devices, and more to make sure existing drivers continue to work. It is still very important to test. Common failures occur because:
In Windows 7 and earlier version of the operating systems, the USB 3.0 driver stack is provided by third-party. Therefore, we highly recommend that you test your driver to work with third party USB driver stacks. New client drivers in Windows 8 for high Speed and SuperSpeed USB devices should opt for new capabilities. Which driver is loaded for my SuperSpeed storage device use, Uaspstor.sys or Usbstor.sys?The USB Attached SCSI (UAS) protocol is a new mass storage protocol designed to improve performance over the established USB mass storage protocol, Bulk-Only-Transport (BOT). It does so by reducing protocol overhead, supporting SATA native command queuing (NCQ) and by processing multiple commands in parallel. To do this, UAS makes use of a new USB 3.0 feature for bulk transfers called streams. The existing mass storage driver, Usbstor.sys, uses the BOT protocol. It works with all speeds of devices, including SuperSpeed USB devices. For Windows 8, Microsoft includes a new mass storage class driver, Uaspstor.sys which uses the UAS protocol. Because streams is new to USB 3.0, so Uaspstor.sys can only use streams when the hardware supports streams (a SuperSpeed USB device is connected to an xHCI host controller). The driver also includes support for software streams, so it can also load for devices operating at high-speed, regardless of the host type. If you connect a mass storage device to Windows 8 and that device supports UAS, Windows loads Uaspstor.sys. In some cases, there might be known issues with hardware streams on a specific xHCI host controller or known issues with a device’s UAS protocol implementation. In those cases, Windows falls back to the BOT protocol and loads the Usbstor.sys driver instead. Uaspstor.sys is new to Windows 8. It is not present in earlier versions of Windows. Which USB DWG Classes does Microsoft support?Windows supports several USB classes that the USB Device Working Group (DWG) has defined. For the current list of USB class specifications and class codes, visit the USB DWG Web site at https://www.usb.org/documents. This table highlights the USB DWG classes that are supported in Windows and also identifies the versions of Windows that support each class.
|