1usbvc(7D) Devices usbvc(7D)
2
3
4
6 usbvc - USB video class driver
7
9 #include <sys/usb/clients/video/usbvc/usbvc.h>
10
11 #include <sys/videodev2.h>
12
13 usbvc@unit-address
14
15
17 The usbvc driver is a USBA (Solaris USB Architecture)-compliant client
18 driver that supports the USB Device Class Definition for Video Devices
19 specification, Versions 1.0 and 1.1. The usbvc driver supports a subset
20 of the video controls and formats described in the USB specification.
21
22
23 The usbvc driver also implements the Video4Linux2 API (V4L2), Version
24 0.20 for applications. For more information on the V4L2 API, visit
25 http://www.thedirks.org/v4l2.
26
27
28 Note that the usbvc driver supports the video capture function only and
29 that video output is not supported. For more information on supported
30 USB video-class devices and functions, visit http://www.sun.com/io.
31
33 The usbvc driver reads video data from the isochronous endpoint of the
34 device. Bulk data endpoints are not supported.
35
36
37 MJPEG and UNCOMPRESSED video formats are supported. Isochronous data
38 are read from the isochronous input device frame-by-frame and are
39 maintained in a buffer array within the driver. Video frames are read
40 from the driver using the read(2) or mmap(2) I/O method. For read(2),
41 each read returns a buffer of a video frame. For mmap(2), each VID‐
42 IOC_DQBUF ioctl returns the buffer structure v4l2_buffer. (A video
43 frame buffer pointer is included in the structure). See the V4L2 API
44 for buffer structure and other related data structure information.
45
47 A brief overview of supported ioctl requests appears below. For more
48 detailed information, refer to the V4L2 API document. Note: ioctl
49 information presented in the V4L2 API document may differ slightly from
50 the content of this manpage. In such cases, you should rely on the
51 information in this manpage.
52
53 VIDIOC_QUERYCAP
54
55 Query the device capabilities. Besides device capabilities, the
56 usbvc driver returns structure v4l2_capability which includes
57 information on the driver, data bus and OS kernel. Please note that
58 the "Version" structure member has no meaning in Solaris and is
59 always set to 1.
60
61
62 VIDIOC_ENUM_FMT
63
64 Enumerate the video formats supported by the device.
65
66
67 VIDIOC_S_FMT
68
69 Set a video format.
70
71
72 VIDIOC_G_FMT
73
74 Get a video format.
75
76
77 VIDIOC_REQBUFS
78
79 Request the usbvc driver to allocate video data buffers. If a buf‐
80 fer is set to zero, the driver stops reading video data from the
81 device and releases all allocated buffers. (For mmap(2) only).
82
83
84 VIDIOC_QUERYBUF
85
86 Query a given buffer's status. (For mmap(2) only).
87
88
89 VIDIOC_QBUF
90
91 Enqueue an empty buffer to the video data buffer array. (For
92 mmap(2) only).
93
94
95 VIDIOC_DQBUF
96
97 Dequeue a done buffer from the video data buffer array. (For
98 mmap(2) only).
99
100
101 VIDIOC_STREAMON
102
103 Start reading video data.
104
105
106 VIDIOC_STREAMOFF
107
108 Stop reading video data.
109
110
111 VIDIOC_ENUMINPUT
112
113 Enumerate all device inputs. Currently, the usbvc driver supports
114 one input only.
115
116
117 VIDIOC_G_INPUT
118
119 Get the device's current input. At this time, the usbvc driver sup‐
120 ports one input only.
121
122
123 VIDIOC_S_INPUT
124
125 Set the device's current input. At this time, the usbvc driver
126 supports one input only.
127
128
129 VIDIOC_QUERYCTRL
130
131 Query the device and driver for supported video controls. Cur‐
132 rently, the usbvc driver supports the brightness, contrast, satura‐
133 tion, hue, and gamma video controls.
134
135
136 VIDIOC_G_CTRL
137
138 Get the device's current video control.
139
140
141 VIDIOC_S_CTRL
142
143 Set the device's current video control.
144
145
146 VIDIOC_G_PARM
147
148 Get streaming parameters, the number of frames per second and num‐
149 ber of buffers used internally by driver in read/write mode.
150
151
152 VIDIOC_S_PARM
153
154 Set streaming parameters, the number of frames per second and num‐
155 ber of buffers used internally by driver in read/write mode.
156
157
159 EBUSY An open was attempted after the device has already been
160 opened.
161
162
163 EINVAL An unsupported ioctl is received or an ioctl is attempted
164 with an out-of-range value.
165
166
167 EIO The driver received an unrecoverable device error or the
168 device did not respond or the device stalled when attempting
169 an access. A read(2) or ioctl(2) did not complete due to a
170 peripheral access.
171
172
173 ENXIO The driver received an open(2) request for a device for
174 which the attach failed.
175
176
177 ENODEV The driver received an open(2) request for a disconnected
178 device.
179
180
182 /kernel/drv/usbvc
183
184 32-bit ELF kernel module. (x86)
185
186
187 /kernel/drv/amd64/usbvc
188
189 64-bit ELF kernel module. (x86)
190
191
192 /kernel/drv/sparcv9/usbvc
193
194 64-bit ELF kernel module. (SPARC)
195
196
197 /dev/usb/*/*/*
198
199 ugen(7D) nodes.
200
201
202 /dev/videoN
203
204 Device node for isochronous input from USB video device and device
205 control.
206
207
209 See attributes(5) for descriptions of the following attributes:
210
211
212
213
214 ┌─────────────────────────────┬───────────────────────────────┐
215 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
216 ├─────────────────────────────┼───────────────────────────────┤
217 │Architecture │ SPARC, x86, PCI-based systems │
218 ├─────────────────────────────┼───────────────────────────────┤
219 │Availability │SUNWusbvc │
220 └─────────────────────────────┴───────────────────────────────┘
221
223 cfgadm_usb(1M), ioctl(2), open(2), mmap(2), read(2), libusb(3LIB),
224 attributes(5),ugen(7D), usba(7D), attach(9E)
225
226
227 Writing Device Drivers
228
229
230 System Administration Guide: Basic Administration
231
232
233 Universal Serial Bus Specification 1.0, 1.1 and 2.0— 1996, 1998, 2000
234
235
236 USB Device Class Definition for Video Devices 1.0 and 1.1— 2003, 2005
237
238
239 Video4Linux2 API (V4L2), Version 0.20
240
241
242 I/O Technologies and Solutions —http://www.sun.com/io
243
244
245 http://docs.sun.com
246
247
248 http://www.usb.org
249
250
251 http://www.thedirks.org/v4l2
252
254 In addition to being logged, the following messages may appear on the
255 system console. All messages are formatted in the following manner:
256
257 Warning: <device path> (usbvc<instance num>):Error Message...
258
259
260
261 Device was disconnected while open. Data may have been lost.
262
263 The device has been hot-removed or powered off while it was open
264 and a possible data transfer was in progress. The job may be
265 aborted.
266
267
268 Cannot access <device>. Please reconnect.
269
270 This device has been disconnected because a device other than the
271 original one has been inserted. The driver informs you of this fact
272 by displaying the name of the original device.
273
274
275 Device is not identical to the previous one on this port. Please dis‐
276 connect and reconnect.
277
278 The device was hot-removed while open. A new device was hot-
279 inserted which is not identical to the original device. Please dis‐
280 connect the device and reconnect the original device to the same
281 port.
282
283
285 The USB video device will be power-managed when the device is idle.
286
287
288 If a USB video device is hot-removed while active, a console warning is
289 displayed requesting you to put the device back in the same port and
290 telling you of potential data loss. Hot-removal of an active video
291 device is strongly discouraged.
292
293
294 Always close all applications before hot-removing or hot-inserting a
295 device. If an application is open when a device is hot-removed, insert‐
296 ing the device in a different port will create new /dev/videoN
297 links. Moving an active device to another port is not recommended.
298
299
300
301SunOS 5.11 18 July 2008 usbvc(7D)