Is it possible to write a DriverKit driver which can match and take control of a USB class compliant device?

Apple's DriverKit documentation states: "Use the USBDriverKit framework to develop drivers for custom or non-class compliant USB devices for use with macOS". Is it possible to write a DriverKit driver which can match and take control of a USB class compliant device?


We have a number of USB Audio class devices which currently can operate under the control of Apple's class compliant driver or a kext based driver supplied by us. It is not clear from the wording in the docs whether this will be possible moving forward.

Replies

@mhorgan, did you find a way yet to get precedence over AppleMIDIUSBDriver.plugin and possibly com.apple.driver.AppleUSBAudio?


@Apple: wouldn't that be easy to answer: just a yes or a no. And if you don't care, just a "we don't care" so we know at least what to expect!

Thanks,

Hagen.

I haven't gotten that far yet. Trying to wrap my head around what the user mode code would look like. Is it essentially and an Audio Server Plugin renamed or something else? A sample or some documentation would be helpful.

Hi @mhorgan, I'm trying to achieve something similar. Could you make any progress?

Thank you very much in advance!

@Apple: wouldn't that be easy to answer: just a yes or a no. And if you don't care, just a "we don't care" so we know at least what to expect!

Yes

The docs here cover matching criteria, but the matching criteria and behaviors have not substantially changed between DriverKit and IOKit in general.

https://developer.apple.com/documentation/driverkit/creating_a_driver_using_the_driverkit_sdk?language=objc

Specify Criteria for Matching Your Services Against Devices