I have a usb composite device with 5 interfaces:

Interface 0  - bulk pipes
Interfaces 1-3 - Audio 2 class
Interface 4 - Midi class

Without loading third party kext this device operates as expected as a class 
compliant audio/midi device.  I want to create a kext which lays claim to the 
Audio 2 class interfaces without hindering the operation of the Midi interface. 
 I have developed a kext whose IOKitPersonalities included a dictionary:

Device:
       bInterfaceClass               1
       bConfigurationValue      1
       bInterfaceNumber          1                         // this is the first 
interface in the audio class
       idProduct                        usb pid of device
       idVendor                         usb vid of device
       IOClass                            IOAudioDevice object from kext 
(com_...)
       IOProviderClass              IOUSBInterface

I specified IOUSBInterface as the provider because I was only interested in a 
subset of the composite device.  When I loaded the kext it had no trouble 
matching with the device and the start() and initHardware() methods of the 
IOClass object get called.  This object will use the IOService* provided to 
find the other 2 interfaces associated with the audio function, create 
IOAudioEngine and commence.  I've been testing this on Yosemite and it seems to 
work fine.  The driver has no problem enumerating and opening the interfaces.  
Enumerating the endpoints and streaming audio.

I run into  a problem when I try to load this kext under El Capitan (10.11.4).  
The kext seems to have trouble enumerating the interfaces past the first one.  
The strange thing is that this doesn't fail 100% of the time.  Maybe 5% of the 
time when I load the kext it can enumerate all 3 interfaces.  I thought maybe 
it was some sort of timing issue, but I've made attempts with altered timing to 
no avail.

I guess my question is: is there something wrong with matching an interface to 
the driver object and expecting to be able to access the other interfaces in 
the audio function?  I need all 3 interfaces to run the audio and I link each 
one to an independent IOService object in the driver and start/stop all of them.


===============================================================
Mike Horgan
Engineering
Line 6
O: 818.575.3670


H E L I X
Real. Smart. Control.


Helix is an entirely new kind of guitar processor. LEARN 
MORE<http://line6.com/helix/>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/usb/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to