Would DriverKit work for custom USB device to control mic volume (no stream)?

Hey there,
I would like to ask for guidance on how to ideally communicate with a custom USB HID device.

Use case
Modify a microphone volume via an external USB HID device.

Can I use DriverKit (HIDDriverKit) for that or I need to use IOKit? I have read something here about audio limitation, but not sure what exactly is not allowed.

DriverKit doesn’t support USB devices that manipulate audio or that communicate wirelessly over Bluetooth or Wi-Fi. For those types of devices, create a kernel extension using IOKit.

Would DriverKit still work in my case as I am not sending audio streams but controlling volume only?

Many thanks!
Cheers,
Tom




For a custom HID device, you shouldn't need to write a driver at all. The USB HID usage tables have standard codes for changing volume. Under the consumer usage page, there is a volume usage that should meet your needs. If you download the USB HID Usage Tables from USB.org, you should be able to find all the information you need on these keys. If for some reason, adjusting the device to send the correct commands is impossible, you should be able to achieve this with DriverKit by using an IOHIDEventService and sending these specific HID events using a call to "dispatchEvent." Of course, you could also achieve this with IOKit, if you wanted. However, this should be done on the hardware. Please do not use a driver just for this.
Would DriverKit work for custom USB device to control mic volume (no stream)?
 
 
Q