From: Greg KH <gregkh@linuxfoundation.org>
To: Martijn Braam <martijn@brixit.nl>
Cc: linux-usb@vger.kernel.org
Subject: Re: Using a composite device with kernel drivers and libusb at the same time
Date: Wed, 27 Mar 2024 14:04:47 +0100 [thread overview]
Message-ID: <2024032752-disarray-bully-40ad@gregkh> (raw)
In-Reply-To: <00c4fd45-dc9f-4197-952e-c7c322b6370c@brixit.nl>
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.
>
> 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. 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?
Why not just make a kernel driver for the interfaces that are not uvc?
We would accept that given that you can not control a device from usbfs
and a driver at the same time as you have pointed out.
thanks,
greg k-h
next prev parent reply other threads:[~2024-03-27 13:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 11:33 Using a composite device with kernel drivers and libusb at the same time Martijn Braam
2024-03-27 13:04 ` Greg KH [this message]
2024-03-27 14:07 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2024032752-disarray-bully-40ad@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=martijn@brixit.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox