summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/uvideo.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move the softc definition to uvideo.c so that userland can includempi2015-07-091-63/+7
| | | | | | <dev/usb/uvideo.h> to get USB video descriptor definitions. from Ludovic Coues.
* Replace sc_dying in favour of usbd_is_dying() and usbd_deactivate().pirofti2013-11-071-2/+1
| | | | Tested and okay mpi@.
* Get rid of various 'typedef struct' definitions and use plain structuremglocker2013-04-151-7/+7
| | | | | | | | | definitions instead. We don't change usb.h for now to stay compatible with userland. Tested by mpi@ on macppc and myself on i386. ok mpi@
* uncompressed video formats have a fixed per-pixel bit depth, whichjakemsr2011-04-111-1/+2
| | | | | | | | | | | | | | | means the data size of a frame can be calculated if the dimensions are known. * calculate frame data sizes for uncompressed formats instead of believing what the hardware says. the UVC spec changed between 1.0 and 1.1, and as a result, some devices return bogus information. * skip under-sized as well as over-sized uncompressed frames; there is only one correct size for uncompressed frames. * remove quirk to fix uncompressed frame sizes on certain devices, since that now always happens. * check that the device is actually using the parameters we think it's using.
* support VIDIOC_S_PARM and VIDIOC_G_PARM. these ioctls are used forjakemsr2011-03-261-2/+3
| | | | setting and and getting the frame interval.
* * the mjpeg and uncompressed video frame descriptor structures arejakemsr2011-03-251-22/+5
| | | | | | | | | equivilent. only define one structure, struct usb_video_frame_desc, and handle both types of frame descriptors in the same code. * replace hardcoded numbers with 'sizeof(struct usb_video_frame_desc)' where the numbers represent the size of a frame descriptor tested by several
* Increase UVIDEO_MAX_FRAME to 32 to support 28 possible frame types onweerd2010-11-271-2/+2
| | | | | | Logitech HD Pro Webcam C910 (and probably others) to make it work. Debugging, suggested and ok jakemsr@
* * define structure that represents USB descriptor with variable sizedjakemsr2010-10-091-5/+4
| | | | | | | | | | member the way uaudio does, make the variable sized member as large as it can be and don't define the following members. * reenable control support for devices where bControlSize != 2 in the processing unit descriptor. tested on alpha, amd64, i386, sparc64 and zaurus, as well as the machine where previous support for variable bControlSize caused a hang.
* control values can be 1 or 2 bytes, signed or unsigned. fixes huejakemsr2010-10-091-11/+30
| | | | control.
* back out support for variable sized processing unit controls untiljakemsr2010-09-291-2/+2
| | | | I can figure out why it causes boot hangs with some Sonix camera
* support variable sized (bControlSize != 2) processing unit bmControls,jakemsr2010-09-261-10/+115
| | | | | and add support for more processing unit controls. from Martin Pieuchot, thanks!
* Add a couple more frames in order to support the latest logitech pro 9000marco2010-04-271-2/+2
| | | | | | webcam. ok mglocker
* the uaa structure (and things it points, for instance ifaces) is onlyderaadt2009-02-191-2/+3
| | | | | | | | alive during match and attach. do not attempt to reuse this pointer or ifaces during a deferred attach routine, since it will contain junk, but instead make copies. tested on all 3 kinds of uvideo's (ricoh fw load, apple fw load, and the rest) ok robert mglocker
* Fix typo; wClockFrequency -> dwClockFrequency.mglocker2009-02-121-2/+2
| | | | From Kenji Aoyama
* Add firmware load for Apple iSight first generation devicesmglocker2008-12-221-1/+5
| | | | | | | | | (0x05ac:8300 before firmware load, 0x05ac:0x8501 after firmware load). Also those devices have a own stream header procotol for which we've added a seperate stream header decode function, which does not work yet. A jointventure work with robert@
* - Extend our quirk device table by a flags field.mglocker2008-12-171-2/+2
| | | | | | | - Add Apple iSight first revision device to the quirk table for future code. - Fix some logic in the device matching function. OK deraadt@
* do device classification for non-UVC and firmware-needing devices togetherderaadt2008-12-081-4/+2
| | | | | | in the same device table, and abstract usb control out of the ricoh firmware loader so that it can be reused by other loaders ok mglocker
* Add ability to load firmware for devices which require it.mglocker2008-12-081-1/+5
| | | | Tested by deraadt@ and myself.
* Sort uvideo_vs_iface struct a bit.mglocker2008-12-051-3/+3
|
* add UYVY video format support for uncompressed videoyuo2008-12-031-1/+5
| | | | ok mglocker@
* remove bogus part (GUID_UYVY part) form last commit.yuo2008-12-031-4/+1
| | | | (this diff will be include next diff.)
* fix USB packet size handling of uvideo(4)yuo2008-12-031-3/+6
|
* Setup three isoc transfers at a time so we don't miss frames. This fixesmglocker2008-11-301-4/+17
| | | | | | transfers which require larger bandwidths, e.g. for higher resolutions. discussed with yuo@, deraadt@
* Remove 17 unused vars from uvideo_softc.mglocker2008-11-101-20/+1
|
* Make own struct for the stream header instead saving the data in singlemglocker2008-11-091-9/+16
| | | | variables.
* Add BULK xfer support.mglocker2008-11-091-1/+3
| | | | | Thanks to Carlos Valiente for donating an EeePC 701 where this has been developed and tested.
* Some __packed cleanup; Remove another obsolete pack from a none-hardwaremglocker2008-08-271-39/+38
| | | | struct and pack all other hardware structs which have been forgotten.
* Fix alignment panic on sparc64 by removing a wrong __packed. Whilemglocker2008-08-261-4/+4
| | | | | | | there reorder fields in the struct to make it shorter on 64 bit archs. panic reported by jasper@ thanks to miod@ for helping me debug this down
* Use consistent variable names; curr -> cur, err -> error.mglocker2008-08-241-2/+2
|
* Add support for processing unit (e.g. brightness) controls. New V4L2mglocker2008-08-241-1/+80
| | | | ioctls therefore are VIDIOC_QUERYCTRL, VIDIOC_G_CTRL, and VIDIOC_S_CTRL.
* Use correct terms as in the specs;mglocker2008-08-021-4/+4
| | | | | | | | "fragment" gets replaced by "sample". "sample" gets replaced by "frame". A sample is a peace of a frame (final image). No functional changes. OK deraadt@
* - Don't relay on bFormatIndex as an internal array index, since thismglocker2008-07-311-1/+2
| | | | | | | | | | | | | | | | field is unreliable and can start with any number. Use an own internal array index instead. - If the read buffer is too small, return a propper error to the calling functions. Just check the buffer size if we use the read(2) method since it doesn't affect mmap(2). Fixes kernel crashes seen with the M$ LifeCam NX-6000 and internal (laptop) Sonix chipsets. Tested by jcs@ (Sonix) and myself (NX-6000). OK deraadt@
* Since we are able to change the device image resolution on the fly in themglocker2008-07-261-2/+2
| | | | | | | | | | | | meantime, the memory allocation for the read(2) method for video(4) is not right anymore, and can cause a buffer overflow. We fix this by queuering the maximum available image size for a device at attach time. If the image size should exceed our video(4) buffer after a video format change (which shouldn't happen), uvideo(4) will gracefully fail. Also tested by kettenis@
* Remove some obsolete XXX comments.mglocker2008-07-241-3/+3
|
* If a resolution which has been requested over VIDEO_TRY_FMT ormglocker2008-07-191-1/+7
| | | | | | | | VIDEO_S_FMT doesn't exactly match the devices available resolutions, return the next best matching resolution which we have. Makes some V4L2 apps happy when running them with the default resolution (no options).
* Implement VIDIOC_S_FMT and VIDIOC_TRY_FMT. Now V4L2 applications canmglocker2008-07-181-1/+5
| | | | | | | set their desired image size, and therefore users can manipulate the image size, too via the application. Also tested by brad@
* Finish support for uncompressed payloads (UDESCSUB_VS_FORMAT_UNCOMPRESSED).mglocker2008-07-141-4/+35
|
* Save format and frame descriptors to a format group structure so wemglocker2008-07-131-3/+13
| | | | | can use them later for stuff like VIDIOC_S_FMT (e.g. set custom resolution).
* Remove obsolete TODO comment.mglocker2008-07-121-6/+1
|
* Add struct for VC_EXTENSION_UNIT and dump it in debug mode.mglocker2008-07-031-1/+12
|
* Add first bits to support uncompressed format.mglocker2008-07-021-1/+37
|
* Limit maximal number of mmap buffers to 32 (instead 256).mglocker2008-06-301-2/+2
|
* Make video stream work properly on uhci and ohci by adding an ohcimglocker2008-06-261-3/+2
| | | | | | isoc xfer workaround. Improved and OK deraadt@
* Let the driver switch between read() and mmap() depending on whatmglocker2008-06-091-1/+2
| | | | | | the userland application wants. OK robert@
* oops. this change was missing from the previous commitrobert2008-06-091-1/+2
|
* Start to queue mmap frames. Add VIDIOC_QBUF, VIDIOC_DQBUF,mglocker2008-06-071-4/+10
| | | | | | VIDIOC_STREAMON for that purpose, too. OK robert@
* Arrange our mmap buffer struct better.mglocker2008-06-061-4/+5
|
* Add some first mmap bits.mglocker2008-06-051-1/+14
| | | | Help by miod@
* Instead alloacting a fix frame buffer we allocate the maximum frame sizemglocker2008-05-271-1/+2
| | | | | delivered by the device (dwMaxVideoFrameSize). Also check for too large frames (buffer overflow), they get skipped.
* - Enable userland to read(2) video stream from /dev/video.mglocker2008-05-241-1/+6
| | | | - Prepare for mmap(2).