usbfs: Add support for allocating / freeing streams
authorHans de Goede <hdegoede@redhat.com>
Wed, 9 Oct 2013 15:19:31 +0000 (17:19 +0200)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Tue, 4 Mar 2014 23:38:05 +0000 (15:38 -0800)
commitbcf7f6e39335af4f03da8c26a98185fd49754fcc
tree61a8b40af9264409c66ced8ac324e3f3274f00ff
parent2fec32b06e374642802f7fb4f5350317cd14732b
usbfs: Add support for allocating / freeing streams

This allows userspace to use bulk-streams, just like in kernel drivers, see
Documentation/usb/bulk-streams.txt for details on the in kernel API. This
is exported pretty much one on one to userspace.

To use streams an app must first make a USBDEVFS_ALLOC_STREAMS ioctl,
on success this will return the number of streams available (which may be
less then requested). If there are n streams the app can then submit
usbdevfs_urb-s with their stream_id member set to 1-n to use a specific
stream. IE if USBDEVFS_ALLOC_STREAMS returns 4 then stream_id 1-4 can be
used.

When the app is done using streams it should call USBDEVFS_FREE_STREAMS

Note applications are advised to use libusb rather then using the
usbdevfs api directly. The latest version of libusb has support for streams.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
drivers/usb/core/devio.c
include/uapi/linux/usbdevice_fs.h
This page took 0.033687 seconds and 5 git commands to generate.