On Wed, Mar 27, 2024 at 12:33:51PM +0100, Martijn Braam wrote: > I hope this is an acceptable place to ask this question. I've spend a bit of > time reverse-engineering the USB protocol for a subset of Blackmagic Design > video mixers and I have made a userspace implementation to make these > devices usable in Linux with libusb. This is working great but the roadblock > I have that I can't find a reasonable solution for is that these devices > also expose an UVC webcam. Why is that a roadblock? > While my control software is active it's not possible to use the UVC webcam > functionality of the device because with libusb I have to detach the kernel > from the interfaces to make my userspace access work. As far as I can find > documented online there's no way to have half a composite device handled by > kernel drivers and half with userspace drivers in Linux. Probably the reason it's not mentioned in any documentation is because it isn't a problem. Your libusb program can detach some of the kernel drivers while leaving others attached, and then use the interfaces that are not controlled by a kernel driver. Even if you can't make that work, why not just detach all of the interfaces and ignore the fact that the device has a UVC webcam? > It seems to me the > only solution is to make a kernel driver to bind to the control interface > and have that kernel driver pass-through to userspace somehow with a custom > protocol? If that is the case would such a driver even be supported in > Linux? It seems unlikely. Maybe you should explain your difficulty more fully. > For reference the device I'm working has these looks like this: > > USB 1-4 [1edb:be55] Blackmagic design Blackmagic Design [serial] > Class EF SubClass 02 Protocol 01 > Interface 0 FF/03/00 Unknown <- Blackmagic USB configuration protocol > Interface 1 FF/02/00 Unknown <- Blackmagic USB control protocol (I'm > using this with libusb) > Interface 2 FF/04/00 Unknown <- Unknown > Interface 3 FE/01/01 Unknown <- DFU > Interface 4 0E/01/01 Blackmagic Design <- UVC camera > Interface 5 0E/02/01 Unknown <- UVC camera > Interface 6 01/01/00 Blackmagic Design <- ALSA > Interface 7 01/02/00 Unknown <- ALSA Which of these interfaces require a kernel driver? Does your program require any of them besides interface 1? > If this is not the right place for this question, then where would the right > place be? This is definitely the right place. Alan Stern