On Tue, 20 Feb 2024 00:21:30 +0100, Stuart Henderson wrote: > > No - ugen acts as a fallback. If a USB device is claimed by another driver, > ugen won't get a chance to attach to it. > > There is a common mechanism to recognise devices by vid/pid for special > handling - sometimes to prevent attaching - sometimes for other adaptations > which are needed. If you're interested, see sys/dev/usb/usb_quirks.c and look > at how UQ_BAD_HID is used to knock out devices which would normally be > claimed by uhid(4); you could use something similar to prevent e.g. uaudio > from attaching to a certain device. However, it would require compiling > the kernel to configure it. >
Thanks, this is that I'm looking for. I hope that I can do it without rebuilding the kernel, but after reading some code around I see that adding a global flag to ignore some USB devices makes code quite frigile. Or should be duplicated a lot. -- wbr, Kirill