summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uvideo.h
AgeCommit message (Collapse)Author
2011-04-11uncompressed video formats have a fixed per-pixel bit depth, whichJacob Meuser
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.
2011-03-26support VIDIOC_S_PARM and VIDIOC_G_PARM. these ioctls are used forJacob Meuser
setting and and getting the frame interval.
2011-03-25* the mjpeg and uncompressed video frame descriptor structures areJacob Meuser
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
2010-11-27Increase UVIDEO_MAX_FRAME to 32 to support 28 possible frame types onPaul de Weerd
Logitech HD Pro Webcam C910 (and probably others) to make it work. Debugging, suggested and ok jakemsr@
2010-10-09* define structure that represents USB descriptor with variable sizedJacob Meuser
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.
2010-10-09control values can be 1 or 2 bytes, signed or unsigned. fixes hueJacob Meuser
control.
2010-09-29back out support for variable sized processing unit controls untilJacob Meuser
I can figure out why it causes boot hangs with some Sonix camera
2010-09-26support variable sized (bControlSize != 2) processing unit bmControls,Jacob Meuser
and add support for more processing unit controls. from Martin Pieuchot, thanks!
2010-04-27Add a couple more frames in order to support the latest logitech pro 9000Marco Peereboom
webcam. ok mglocker
2009-02-19the uaa structure (and things it points, for instance ifaces) is onlyTheo de Raadt
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
2009-02-12Fix typo; wClockFrequency -> dwClockFrequency.Marcus Glocker
From Kenji Aoyama
2008-12-22Add firmware load for Apple iSight first generation devicesMarcus Glocker
(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@
2008-12-17- Extend our quirk device table by a flags field.Marcus Glocker
- Add Apple iSight first revision device to the quirk table for future code. - Fix some logic in the device matching function. OK deraadt@
2008-12-08do device classification for non-UVC and firmware-needing devices togetherTheo de Raadt
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
2008-12-08Add ability to load firmware for devices which require it.Marcus Glocker
Tested by deraadt@ and myself.
2008-12-05Sort uvideo_vs_iface struct a bit.Marcus Glocker
2008-12-03add UYVY video format support for uncompressed videoYojiro Uo
ok mglocker@
2008-12-03remove bogus part (GUID_UYVY part) form last commit.Yojiro Uo
(this diff will be include next diff.)
2008-12-03fix USB packet size handling of uvideo(4)Yojiro Uo
2008-11-30Setup three isoc transfers at a time so we don't miss frames. This fixesMarcus Glocker
transfers which require larger bandwidths, e.g. for higher resolutions. discussed with yuo@, deraadt@
2008-11-10Remove 17 unused vars from uvideo_softc.Marcus Glocker
2008-11-09Make own struct for the stream header instead saving the data in singleMarcus Glocker
variables.
2008-11-09Add BULK xfer support.Marcus Glocker
Thanks to Carlos Valiente for donating an EeePC 701 where this has been developed and tested.
2008-08-27Some __packed cleanup; Remove another obsolete pack from a none-hardwareMarcus Glocker
struct and pack all other hardware structs which have been forgotten.
2008-08-26Fix alignment panic on sparc64 by removing a wrong __packed. WhileMarcus Glocker
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
2008-08-24Use consistent variable names; curr -> cur, err -> error.Marcus Glocker
2008-08-24Add support for processing unit (e.g. brightness) controls. New V4L2Marcus Glocker
ioctls therefore are VIDIOC_QUERYCTRL, VIDIOC_G_CTRL, and VIDIOC_S_CTRL.
2008-08-02Use correct terms as in the specs;Marcus Glocker
"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@
2008-07-31- Don't relay on bFormatIndex as an internal array index, since thisMarcus Glocker
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@
2008-07-26Since we are able to change the device image resolution on the fly in theMarcus Glocker
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@
2008-07-24Remove some obsolete XXX comments.Marcus Glocker
2008-07-19If a resolution which has been requested over VIDEO_TRY_FMT orMarcus Glocker
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).
2008-07-18Implement VIDIOC_S_FMT and VIDIOC_TRY_FMT. Now V4L2 applications canMarcus Glocker
set their desired image size, and therefore users can manipulate the image size, too via the application. Also tested by brad@
2008-07-14Finish support for uncompressed payloads (UDESCSUB_VS_FORMAT_UNCOMPRESSED).Marcus Glocker
2008-07-13Save format and frame descriptors to a format group structure so weMarcus Glocker
can use them later for stuff like VIDIOC_S_FMT (e.g. set custom resolution).
2008-07-12Remove obsolete TODO comment.Marcus Glocker
2008-07-03Add struct for VC_EXTENSION_UNIT and dump it in debug mode.Marcus Glocker
2008-07-02Add first bits to support uncompressed format.Marcus Glocker
2008-06-30Limit maximal number of mmap buffers to 32 (instead 256).Marcus Glocker
2008-06-26Make video stream work properly on uhci and ohci by adding an ohciMarcus Glocker
isoc xfer workaround. Improved and OK deraadt@
2008-06-09Let the driver switch between read() and mmap() depending on whatMarcus Glocker
the userland application wants. OK robert@
2008-06-09oops. this change was missing from the previous commitRobert Nagy
2008-06-07Start to queue mmap frames. Add VIDIOC_QBUF, VIDIOC_DQBUF,Marcus Glocker
VIDIOC_STREAMON for that purpose, too. OK robert@
2008-06-06Arrange our mmap buffer struct better.Marcus Glocker
2008-06-05Add some first mmap bits.Marcus Glocker
Help by miod@
2008-05-27Instead alloacting a fix frame buffer we allocate the maximum frame sizeMarcus Glocker
delivered by the device (dwMaxVideoFrameSize). Also check for too large frames (buffer overflow), they get skipped.
2008-05-24- Enable userland to read(2) video stream from /dev/video.Marcus Glocker
- Prepare for mmap(2).
2008-04-20Parse VS_INPUT_HEADER descriptor.Marcus Glocker
2008-04-18Add VS_INPUT_HEADER descriptor.Marcus Glocker
2008-04-16Tune isoc maximal transfer size to a better value. Makes all availableMarcus Glocker
resolutions on my cam work.