Updating a USB device to be seen as a composite device
I'm posting this question in part to confirm my understanding of composite devices, but also to hopefully get some direction on how to proceed with a very specific task. Here is the current scenario:
Our product consists of an Intel NUC and a custom board housing an audio microcontroller. There were some issues with the firmware (written by a 3rd party) that I was able to fix. The specs for the board describe custom vendor commands that I used to update the firmware and develop a console app that can be distributed into the field and flash the boards for us. In order to flash the board, I swap out the default driver (usbaudio.sys) that Windows assigns automatically with winusb.sys. Swapping out the driver for winusb.sys enable me to execute transfer control commands and do the flashing. So far, everything works nicely. The boards update and everything is happy.
What I'd prefer to do, however, is to not swap out usbaudio.sys, but instead keep it and add winusb.sys. I want the device to be seen as an audio as well as a generic USB one so I can execute future vendor commands without having to do the driver swap again.
The problem is: I'm not sure how to accomplish this task. I vaguely understand that as a USB device, I can update the firmware to present to Windows feature descriptors that it'll use to load the right drivers; but can this be done to present the device as belonging to two separate device classes? This post seems to indicate yes, but I'm not sure. Alternatively, would it just be easier to write an INF file to install the device as a composite device?
So, I guess to summarize my question: can I expose my device as an audio device as well as a generic device to Windows (I'm pretty confident the answer is yes)? Can I use OS descriptors to expose my device as a composite device to accomplish this end? Or would it be wiser/easier to compose an INF file to do so?
Thanks in advance.
To have your device enumerate as a composite device with one function representing the USB audio device and another function for FW update/WinUSB, you would need to modify the USB configuration descriptor in firmware and add a new USB interface descriptor describing the FW update interface. Additionally you would need to define a Microsoft OS compatible ID descriptor for the new interface specifying the WinUSB compatible ID.
Sign in to comment