summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/uvideo.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* uncompressed video formats have a fixed per-pixel bit depth, whichjakemsr2011-04-111-64/+99
| | | | | | | | | | | | | | | 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.
* the v4l2 spec says that setting time per frame to zero should reset timejakemsr2011-04-041-8/+9
| | | | per frame to the default, so do that instead of returning EINVAL
* just report the frame interval in the same terms the device gives us.jakemsr2011-03-311-5/+3
| | | | | previously, this was returning the wrong value (frame rate instead of time per frame, d'oh!).
* oops. the frame rate is the inverse of the frame interval. fixesjakemsr2011-03-261-4/+7
| | | | setting the frame rate with luvcview.
* use 'sizeof(struct usb_video_frame_desc)' instead of a hardcodedjakemsr2011-03-261-2/+3
| | | | number
* fill in the timestamp when copying a frame into the mmap bufferjakemsr2011-03-261-1/+4
|
* fill in support for VIDIOC_ENUM_FRAMEINTERVALSjakemsr2011-03-261-6/+47
|
* support VIDIOC_S_PARM and VIDIOC_G_PARM. these ioctls are used forjakemsr2011-03-261-6/+114
| | | | setting and and getting the frame interval.
* print the supported frame intervals when printing the frame descriptorjakemsr2011-03-261-1/+33
|
* * don't try to align our array of frame descriptors with thejakemsr2011-03-251-23/+21
| | | | | | | | | | frame descriptor's bFrameIndex field. the first valid frame in the array is at index 0, not 1. * don't change the format group's default frame when configuring the device, and don't use the default frame as the current frame: these are what the format group's 'frame_cur' is for. tested by several as part of larger diff
* * the mjpeg and uncompressed video frame descriptor structures arejakemsr2011-03-251-107/+27
| | | | | | | | | 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
* * empty the queue of frames in the mmap frame buffer and set thejakemsr2011-03-251-2/+18
| | | | | | | | | | | index of the current frame to -1 when the mmap frame buffer is free'd * set the index of the current frame to 0 when allocating the mmap frame buffer * paranoia: panic if a) the mmap frame buffer is already allocated when we try to allocate it, or b) the mmap frame buffer is not allocated when we try to add frames to it tested by several
* garbage collect "usb events". without /dev/usb there is no way to accessjakemsr2011-01-251-5/+1
| | | | | | them from userland, and nothing in the kernel uses them. ok krw@, miod@
* * instead of NULLing pointers to interface descriptors in the uaa, markjakemsr2011-01-161-9/+19
| | | | | | | | | | | | | interfaces as being claimed in the usbd_device's copy of the interface descriptors * allow ugen(4) to be attached if there are unused interfaces in a configuration that has had drivers attached * make ugen(4) aware that it may be sharing a device with (an)other driver(s), and if so: * do not let ugen(4) change the configuration * do not let ugen(4) access the already claimed interfaces discussed with deraadt and miod
* - use *un*signed byte array for control datajakemsr2010-11-241-17/+14
| | | | | | | - use UGETW/USETW instead of letoh16/htole16 fixes controls that use two-byte signed data (e.g. brighness and hue) on sparc64
* create another kthread to run xfer abort tasks. xfer abort tasks cannotjakemsr2010-10-231-2/+3
| | | | | | | | | | | be run from the generic task kthread, because xfers that need to be aborted block newly queued tasks from running (i.e. the xfer to be aborted blocks the abort of that task). as there are now three types of usb tasks, add an argument to usb_init_task() and another member to struct usb_task to specify the task type. fixes boot hangs that are showing up because we now use usb tasks to attach/detach usb devices.
* bFrameIntervalType affects frame rates, not frame sizesjakemsr2010-10-181-15/+6
|
* when configuring the streaming interface with the video probe andjakemsr2010-10-181-2/+2
| | | | | | commit controls, use the hardware frame idenfitier instead of the software identifier since they can differ, and the hardware only knows about it's own identifiers
* use setting with closest matching bandwidth for the current configurationjakemsr2010-10-181-7/+14
| | | | instead of the first one that has enough bandwidth as it may be too much
* * define structure that represents USB descriptor with variable sizedjakemsr2010-10-091-12/+7
| | | | | | | | | | 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-10/+123
| | | | control.
* don't trust that bFrameIndex in frame descriptors is unique. fixesjakemsr2010-10-081-17/+16
| | | | a crash with Kodak S100 webcam.
* back out support for variable sized processing unit controls untiljakemsr2010-09-291-3/+8
| | | | I can figure out why it causes boot hangs with some Sonix camera
* support variable sized (bControlSize != 2) processing unit bmControls,jakemsr2010-09-261-11/+20
| | | | | and add support for more processing unit controls. from Martin Pieuchot, thanks!
* anonymous unions aren't standard C and don't work with gcc2. name thejakemsr2010-09-121-7/+7
| | | | | | anonymous unions "un". delete some obsolete mpeg/jpeg compression methods that have never been supported, and will not need to be supported.
* Microsoft LifeCam needs the framesize quirk as well.mk2010-07-261-1/+8
| | | | ok mglocker
* Fix some spacing / comment.mglocker2010-07-261-6/+5
|
* Make one more Sonix chipset cam work with 640x480 by a) adding it to themglocker2010-07-261-3/+10
| | | | | | UVIDEO_FLAG_FIX_MAX_VIDEO_FRAME_SIZE quirk list and b) cranking the manually calculated frame size by pixels * 4 bytes (discussed with jakemsr@).
* * Comment poll support in conf.hmglocker2010-07-151-1/+6
| | | | | * Comment why we call the video interrupt in the mmap interface now in uvideo.c
* implement poll() for video(4)jakemsr2010-07-141-1/+2
| | | | ok mglocker
* spacingmarco2010-04-271-2/+3
|
* at close() get rid of the usb task before we start tearing down; ok mglockerderaadt2009-11-241-4/+4
|
* better test for if the parent is ohci; ok mglockerderaadt2009-10-261-2/+3
|
* Get rid of devact enum, substitute it with an int and coresponding defines.pirofti2009-10-131-3/+3
| | | | | | This is needed for the addition of further suspend/resume actions. Okay deraadt@, marco@.
* sizeof ptr vs sizeof *ptr bug; ok mglocker@miod2009-09-071-2/+2
|
* Better wording for the not-supported-video-control message.mglocker2009-06-281-2/+2
| | | | Requested by and OK deraadt@
* Fix tyop.mk2009-04-181-2/+3
| | | | ok mglocker
* Finally fix kernel crash (page fault) when closing bulk devices.mglocker2009-03-291-10/+6
| | | | Help from kettenis@
* Add quirk to support "Chen-Source CM12402 Eagle IR Cam" device, bymglocker2009-03-281-5/+59
| | | | | | | | | fixing wrong dwMaxVideoFrameSize value. As a side effect, broken devices which report dwMaxVideoFrameSize=0 today could be fixed as well. No regressions reported so far. Discussed with fgsch@. Diff from Kenji Aoyama
* Revert 1.119 bulk crash workaround, because it breaks Logitech QuickCammglocker2009-03-251-7/+15
| | | | | 9000 devices. Add a XXX comment that we need to fix the bulk issue properly instead.
* 0x3 is not really a good number for bit flags. Should fix the Logitechmglocker2009-02-271-2/+2
| | | | | | QuickCam OEM attachment finally. OK deraadt@
* Fix a kernel crash for bulk devices when closing the video stream;mglocker2009-02-211-7/+7
| | | | | | We give the kthread loop a moment to recognize that bulk_running=0 before we close the USB pipes. Otherwise it can happen that we close the USB pipes before the kthread loop stopped.
* Add Sony VGP-VCC9 Camera (Ricoh chipset) to the quirk list.mglocker2009-02-201-1/+8
|
* Add more Ricoh chipsets to the quirk list which could work.mglocker2009-02-201-1/+36
|
* Don't attach non-UISUBCLASS_VIDEOCONTROL interfaces from some quirkmglocker2009-02-201-9/+17
| | | | | | | devices. Problem reported by Jerome Pinot (QuickCam OEM). Also tested by deraadt@ with ricoh chipset.
* the uaa structure (and things it points, for instance ifaces) is onlyderaadt2009-02-191-14/+17
| | | | | | | | 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 kernel crash (page fault) for devices with unsorted frame index.mglocker2009-02-061-3/+3
| | | | Problem reported by Kenji Aoyama
* First shoot of the uvideo firmware package.mglocker2008-12-221-3/+3
|
* Fix some logic in the isight specific stream header decode functionmglocker2008-12-221-5/+4
| | | | (still doesn't work).
* Sort quirk device list and fix some comments there.mglocker2008-12-221-8/+10
|