Devices usbvc(7D)
NAME
usbvc - USB video class driver
SYNOPSIS
#include
#include
usbvc@unit-address
DESCRIPTION
The usbvc driver is a USBA (Solaris USB Architecture)-
compliant client driver that supports the USB Device Class Definition for Video Devices specification, Versions 1.0 and1.1. The usbvc driver supports a subset of the video con-
trols and formats described in the USB specification.The usbvc driver also implements the Video4Linux2 API
(V4L2), Version 0.20 for applications. For more information on the V4L2 API, visit http://www.thedirks.org/v4l2.Note that the usbvc driver supports the video capture func-
tion only and that video output is not supported. For moreinformation on supported USB video-class devices and func-
tions, visit http://www.sun.com/io. READING DATAThe usbvc driver reads video data from the isochronous end-
point of the device. Bulk data endpoints are not supported.MJPEG and UNCOMPRESSED video formats are supported. Isochro-
nous data are read from the isochronous input deviceframe-by-frame and are maintained in a buffer array within
the driver. Video frames are read from the driver using theread(2) or mmap(2) I/O method. For read(2), each read returns a buffer of a video frame. For mmap(2), each
VIDIOC_DQBUF ioctl returns the buffer structure v4l2_buffer.
(A video frame buffer pointer is included in the structure). See the V4L2 API for buffer structure and other related data structure information. IOCTLS A brief overview of supported ioctl requests appears below.For more detailed information, refer to the V4L2 API docu-
ment. Note: ioctl information presented in the V4L2 APIdocument may differ slightly from the content of this man-
page. In such cases, you should rely on the information in this manpage.SunOS 5.11 Last change: 18 July 2008 1
Devices usbvc(7D)
VIDIOC_QUERYCAP
Query the device capabilities. Besides device capabili-
ties, the usbvc driver returns structure v4l2_capability
which includes information on the driver, data bus and OS kernel. Please note that the "Version" structure member has no meaning in Solaris and is always set to 1.VIDIOC_ENUM_FMT
Enumerate the video formats supported by the device.VIDIOC_S_FMT
Set a video format.VIDIOC_G_FMT
Get a video format.VIDIOC_REQBUFS
Request the usbvc driver to allocate video data buffers.
If a buffer is set to zero, the driver stops reading video data from the device and releases all allocated buffers. (For mmap(2) only).VIDIOC_QUERYBUF
Query a given buffer's status. (For mmap(2) only).VIDIOC_QBUF
Enqueue an empty buffer to the video data buffer array. (For mmap(2) only).VIDIOC_DQBUF
Dequeue a done buffer from the video data buffer array. (For mmap(2) only).VIDIOC_STREAMON
Start reading video data.SunOS 5.11 Last change: 18 July 2008 2
Devices usbvc(7D)
VIDIOC_STREAMOFF
Stop reading video data.VIDIOC_ENUMINPUT
Enumerate all device inputs. Currently, the usbvc driver
supports one input only.VIDIOC_G_INPUT
Get the device's current input. At this time, the usbvc
driver supports one input only.VIDIOC_S_INPUT
Set the device's current input. At this time, the usbvc
driver supports one input only.VIDIOC_QUERYCTRL
Query the device and driver for supported video con-
trols. Currently, the usbvc driver supports the bright-
ness, contrast, saturation, hue, and gamma video con-
trols.VIDIOC_G_CTRL
Get the device's current video control.VIDIOC_S_CTRL
Set the device's current video control.VIDIOC_G_PARM
Get streaming parameters, the number of frames per second and number of buffers used internally by driver in read/write mode.VIDIOC_S_PARM
Set streaming parameters, the number of frames per second and number of buffers used internally by driverSunOS 5.11 Last change: 18 July 2008 3
Devices usbvc(7D)
in read/write mode.ERRORS
EBUSY An open was attempted after the device has already been opened. EINVAL An unsupported ioctl is received or an ioctl isattempted with an out-of-range value.
EIO The driver received an unrecoverable device error or the device did not respond or the device stalled when attempting an access. A read(2) or ioctl(2) did not complete due to a peripheral access.ENXIO The driver received an open(2) request for a dev-
ice for which the attach failed. ENODEV The driver received an open(2) request for a disconnected device. FILES/kernel/drv/usbvc
32-bit ELF kernel module. (x86)
/kernel/drv/amd64/usbvc
64-bit ELF kernel module. (x86)
/kernel/drv/sparcv9/usbvc
64-bit ELF kernel module. (SPARC)
/dev/usb/*/*/* ugen(7D) nodes. /dev/videoN Device node for isochronous input from USB video device and device control.SunOS 5.11 Last change: 18 July 2008 4
Devices usbvc(7D)
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:______________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_______________________________|
| Architecture | SPARC, x86, PCI-based systems|
|_____________________________|_______________________________|
| Availability | driver/graphics/usbvc |
|_____________________________|_______________________________|
SEE ALSO
cfgadm_usb(1M), ioctl(2), open(2), mmap(2), read(2),
libusb(3LIB), attributes(5),ugen(7D), usba(7D), attach(9E) Writing Device Drivers System Administration Guide: Basic AdministrationUniversal Serial Bus Specification 1.0, 1.1 and 2.0- 1996,
1998, 2000USB Device Class Definition for Video Devices 1.0 and 1.1-
2003, 2005 Video4Linux2 API (V4L2), Version 0.20I/O Technologies and Solutions -http://www.sun.com/io
http://docs.sun.com http://www.usb.org http://www.thedirks.org/v4l2 DIAGNOSTICS In addition to being logged, the following messages may appear on the system console. All messages are formatted in the following manner:SunOS 5.11 Last change: 18 July 2008 5
Devices usbvc(7D)
Warning:
Device was disconnected while open. Data may have been lost.(usbvc ):Error Message... The device has been hot-removed or powered off while it
was open and a possible data transfer was in progress. The job may be aborted. Cannot access. Please reconnect. This device has been disconnected because a device other than the original one has been inserted. The driver informs you of this fact by displaying the name of the original device. Device is not identical to the previous one on this port. Please disconnect and reconnect. The device was hot-removed while open. A new device was
hot-inserted which is not identical to the original dev-
ice. Please disconnect the device and reconnect the ori-
ginal device to the same port. NOTESThe USB video device will be power-managed when the device
is idle.If a USB video device is hot-removed while active, a console
warning is displayed requesting you to put the device back in the same port and telling you of potential data loss.Hot-removal of an active video device is strongly
discouraged.Always close all applications before hot-removing or hot-
inserting a device. If an application is open when a deviceis hot-removed, inserting the device in a different
port will create new /dev/videoN links. Moving an active device to another port is not recommended.SunOS 5.11 Last change: 18 July 2008 6