summaryrefslogtreecommitdiff
path: root/sys/dev/video.c
AgeCommit message (Collapse)Author
2008-11-11Spacing.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-13Add VIDIOC_ENUM_FRAMESIZES ioctl. This permits applications to query theMarcus Glocker
available formats and resolutions of a device (e.g. "luvcview -L").
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-23If /dev/video* is already used by an application, return EBUSY to otherMarcus Glocker
applications. Fixes a kernel panic. Reported by ian@
2008-07-19In interrupt handler change printf -> DRPINTF.Marcus Glocker
2008-06-13Remove DEBUG #undef's we can turn it on/off in GENERIC like for allMarcus Glocker
other drivers.
2008-06-13Add myself to the copyright since i fumbled around in those files, too.Marcus Glocker
OK robert@
2008-06-12disable debug printfs and descriptor dumpsRobert Nagy
2008-06-12Wrap DPRINTF around #ifdef VIDEO_DEBUG, but leave debugging on byMarcus Glocker
default for now.
2008-06-11implement the VIDIOC_STREAMOFF ioctl and remove some unused codeRobert Nagy
2008-06-10add VIDIOC_QUERYCTRL to the supported ioctlsRobert Nagy
2008-06-09Let the driver switch between read() and mmap() depending on whatMarcus Glocker
the userland application wants. OK robert@
2008-06-09according to miod pmap_update() is not need after pmap_extract() at all,Robert Nagy
so remove it.
2008-06-09Allocate the video buffer based on the maximum frame size that's reportedRobert Nagy
by the device instead of using the statically set VIDEO_BUF_SIZE. ok mglocker@
2008-06-07Start to queue mmap frames. Add VIDIOC_QBUF, VIDIOC_DQBUF,Marcus Glocker
VIDIOC_STREAMON for that purpose, too. OK robert@
2008-06-05Add some first mmap bits.Marcus Glocker
Help by miod@
2008-05-30Allocate static buffer for software frame buffer and make sure to notMarcus Glocker
overflow it.
2008-05-26Add more ioctl's (still unfinished); VIDIOC_ENUM_FMT, VIDIOC_ENUMINPUT,Marcus Glocker
VIDIOC_S_INPUT, VIDIOC_TRY_FMT. Allows me at least to use a small V4L2 compatible webcam application to capture some images.
2008-05-25Spacing. Comments. strncpy() -> strlcpy().Marcus Glocker
2008-05-24- Enable userland to read(2) video stream from /dev/video.Marcus Glocker
- Prepare for mmap(2).
2008-04-09Initial import for uvideo(4) and video(4):Robert Nagy
uvideo(4) is a driver for USB video device class devices including webcams, camcorders and other cameras. video(4) is a device-independent layer that implements the V4L2 (Video for Linux Two) API. These drivers are *really* work in progress so don't even try to use them just yet, because the driver still has some issues, even if it can be used to capture simple MJPEG videos. ok mglocker@, deraadt@