I'd like to using USB audio class and bulk at the same time in one project. The function are exactly like example of usb_audio_app and bulk_loopback_app.
is it possible ? then how to start ...
The ADI USB stack does not support the use of composite devices.
I would like to clear up the "The ADI USB stack does not support the use of composite devices" with you.
I have combined the adi_usb_bulkadi.c into the adi_usb_audio_class.c by using API of ADI USB stack. (One USB devive have two USB interfaces: audio and bulk).
Windows can detect correct driver, usbaudio.sys and bulkadi.sys, for it separately when I change the VID and PID in usb_audio_app.c. What I am think is that windows need a new driver to support this device which I combined from adi_usb_bulkadi.c into the adi_usb_audio_class.c.
Am I right?
you said, "The ADI USB stack does not support the use of composite devices" it means even I finish a window driver for this device, the ADI audio and bulk USB stack can not run at the same time?
From my limited understanding on the subject, a composite device will need the following:
1) Interface Association Descriptors (IAD) – presumably one for each function, e.g, bulk, audio. One to tie together the bulk driver interfaces and one to tie together the audio interfaces.
2) A new INF file that associated both functions with the device and identifies the drivers to load.
We have no experience of composite devices, and so my best advice would be to consult Jan Axelson’s book, USB Complete 4th Edition and the USB 2.0 specification, http://www.usb.org/developers/docs/usb_20_101111.zip.
If you have combined the USB interfaces for the 2 firmware (Blackfin) class drivers then Windows will allow you to use 2 separate drivers. You do not have to create your own. Indeed, you should avoid creating your own.
If the device has an Audio class compliant interface then Windows will load the standard USB audio driver stack and it should all 'just work'.
If the device also has a bulk interface then I would suggest trying out one of the libusb related driver/installer combinations. This makes it *much* simpler to develop, avoids kernel debugging and basic code signing problems. See here for example: http://libusbk.sourceforge.net/UsbK3/usbk_installers.html
Question: Can you share your composite driver code? I would also like to do this but have not had the time!
Thank you for your information and suggestion, the result of my test is just correspond with what you described.
Here is my driver code, it's not complete, but it can just send out correct descriptors. if I can make it work, I will update the code here again.
Hi, MartimK and Jerry,
I have made it work by replace "USB\VID_064B&PID_1212" with "USB\VID_064B&PID_1212&MI_03" in bulkadi.inf (Here the 03 is the number of bulk interface in my code), but I lose the Digital Signatures after that unfortunately.
Again thank you guys help.
Thanks. I will have a look at your code.
The impact of the driving signing issue can mnimized if you use one of the presigned packages for the bulk driver.
Zadig is very useful for testing: http://sourceforge.net/projects/libwdi/files/zadig/
you can check the code now.
Sweet. I will check this out right away. Many thanks!
Do you get the right data into your host PC?
Yes, I did the test by using the program (hostapp.exe) from example.
Retrieving data ...