aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/gspca/gspca.c
AgeCommit message (Collapse)Author
2010-05-19V4L/DVB: gspca - main: Convert wMaxPacketSize from little endian 16 to cpuJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: gspca - main: Stop the webcam when bandwidth too smallJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: gspca - main: Restart streaming after reqbufJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: gspca - main: Check the file doing stream on/offJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: gspca: Change some copyrights and module authorsJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: [-next] gspca: fix build for INPUT=m or INPUT=nRandy Dunlap
Handle case of GSPCA=m, INPUT=m when building gspca core; also handle case of INPUT=n by using stubs. drivers/media/video/gspca/gspca.c:662: error: implicit declaration of function 'gspca_input_destroy_urb' drivers/media/video/gspca/gspca.c:668: error: implicit declaration of function 'gspca_input_create_urb' drivers/media/video/gspca/gspca.c:2284: error: implicit declaration of function 'gspca_input_connect' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB: gspca: fixes compilation when input is not selectedMauro Carvalho Chehab
It seems that I merged a wrong version of the patch or that changeset 4d770eeb926d0bc44c0bd68d051d3d2a5568ef41 got mangled somehow: It were missed the #else to avoid compilation troubles. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB: gspca - main: Use ktime instead of jiffies for buffer timestampingPaulo Assis
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: gspca_main: Fix a compile error when CONFIG_INPUT is not setHans de Goede
gspca_main: Fix a compile error when CONFIG_INPUT is not set. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: gspca_main: some input error handling fixesHans de Goede
2 small changes to input device error handling: 1) Make it fatal when we fail to create an input device (it is either this or add checks for gspca_dev->input_dev being NULL in a lot of places) 2) Since we allow gspca_input_create_urb() to fail everywhere we call it, and thus never check its return value, make it void. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: gspca_main: Allow use of input device creation code for non int. inputsHans de Goede
Allow use of the gspca core input device creation code by subdrivers which have non interrupt driven camera buttons. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: gscpa_sonixb: Differentiate between sensors with a coarse and fine ↵Hans de Goede
expo ctrl Some sensors only allow controlling the exposure by changing the clockdiv, which means that exposure takes pretty large jumps (for example when going from a div of 1 to 2, the exposure doubles). Use 2 different entries in the controls array for these 2 different types of exposure (always disabling one), and; Add a new autogain algorithm for the coarse exposure case, which normally changes the gain setting, only touching the exposure setting if the desired luminance cannot be reached with gain, and after an exposure change once more first tries gain, etc. Thus avoiding exposure changes, and the resulting oscilation because of the huge steps these exposure controls take. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: gspca - main: Fix a compile error when CONFIG_INPUT is not setJean-François Moine
Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: gspca - main: Change version to 2.9.0.Jean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: gspca - main: Add input support for interrupt endpoints.Márton Németh
Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: gspca - main: Clear any previous USB error when starting the transferJean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB (13925): gspca - main: Change the check of the USB video interface.Jean-Francois Moine
Some webcams have many interfaces with the same interface class, so the previous interface check did not work. The new code checks if the interface number is zero or the only one. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB (13897): gspca - main: Check the interface class at probe time.Jean-Francois Moine
The USB video interface was checked as having the number zero, but some webcams have other values. The test is now done on the interface class which may be either 255 (vendor spec) or 0 (class per interface). Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB (13866): gspca - main: Add the cam flag 'no_urb_create'.Jean-Francois Moine
This flag permits subdrivers to create specific transfer URBs. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB (13865): gspca - main: Optimize code.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17V4L/DVB (13816): gspca - main: Set the current frame pointer when first qbuf.Jean-Francois Moine
When not set, some images could be lost. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16V4L/DVB (13626): gspca - many subdrivers: Fix some warnings.Jean-Francois Moine
- gl860.c:332:15: warning: cast to restricted __le16 - gl860.c:333:15: warning: cast to restricted __le16 - gl860-mi1320.c:348:5: warning: symbol 'mi1320_camera_settings' was not declared. Should it be static? - gl860-mi2020.c:772:5: warning: symbol 'mi2020_camera_settings' was not declared. Should it be static? - m5602_ov9650.c:444:7: warning: symbol 'data' shadows an earlier one - m5602_core.c:84:5: warning: symbol 'm5602_wait_for_i2c' was not declared. Should it be static? - m5602_core.c:391:6: warning: symbol 'm5602_disconnect' was not declared. Should it be static? - m5602_s5k4aa.c:530:23: warning: dubious: x | !y - m5602_s5k4aa.c:575:23: warning: dubious: x | !y - gspca.c:1196:13: warning: potentially expensive pointer subtraction - mr97310a.c:70:5: warning: symbol 'force_sensor_type' was not declared. Should it be static? - ov519.c:2025:4: warning: do-while statement is not a compound statement - ov519.c:2063:4: warning: do-while statement is not a compound statement - ov519.c:2089:4: warning: do-while statement is not a compound statement - ov519.c:1985:34: warning: incorrect type in assignment (different base types) - sn9c20x.c:1164:5: warning: symbol 'i2c_r1' was not declared. Should it be static? - sn9c20x.c:1189:5: warning: symbol 'i2c_r2' was not declared. Should it be static? - sn9c20x.c:2237:27: warning: right shift by bigger than source value - sn9c20x.c:2237:27: warning: right shift by bigger than source value Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16V4L/DVB (13566): gspca - main: New variable usb_err for USB exchanges.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16V4L/DVB (13564): gspca - main: Implement vidioc_enum_frameintervals.Antonio Ospite
Some drivers support multiple frameintervals (framerates), make gspca able to enumerate them. Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16V4L/DVB (13561): gspca - main: Remove unnecessary set to alternate 0.Márton Németh
Calling gspca_set_alt0() in gspca_dev_probe() is not needed as gspca_set_alt0() will do nothing because gspca_dev->alt is always zero at that time. Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16V4L/DVB (13560): gspca - main: Cleanup source.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignmentsLaurent Pinchart
Now that the video_device registration is tested using video_is_registered(), drivers don't need to initialize the video_device::minor field to -1 anymore. Remove those unneeded assignments. [mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging] Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16V4L/DVB (13550): v4l: Use the new video_device_node_name functionLaurent Pinchart
Fix all device drivers to use the new video_device_node_name function. This also strips kernel log messages from the "/dev/" prefix, has the device node location is a userspace policy decision unknown to the kernel. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13453): gspca - all subdrivers: Remove the unused frame ptr from ↵Jean-Francois Moine
pkt_scan(). Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13452): gspca - main: Let the driver scan URB packets when no frame ↵Jean-Francois Moine
buffer. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13451): gspca - main: Memorize the current frame buffer.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13450): gspca - main: Clear the urb status before resubmit.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13448): gspca - main: Add a gspca flag for inactive controls.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13421): gspca - main: Clearer message when bandwidth too small.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13387): gspca - main: Fix a compilation warning.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13386): gspca - main: Change version to 2.8.0.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13185): gspca: Don't resubmit error status URB's when suspendingHans de Goede
gspca: Don't resubmit error status URB's when suspending Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13184): gspca: Don't forget to resubmit URB's in case of an errorHans de Goede
The gscpa core was not resubmitting URB's when the URB status was an error, this means we will loose URB's (potentially all stopping the stream) in case of sporadic USB issues. I've seen this with an Aiptek stv0680 based PenCam connected through an USB 2.0 hub. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13178): gspca: Add support for Winbond W9967CF and W9968CF camera'sHans de Goede
This patch adds support to gspca for the Winbond W9967CF and W9968CF camera's. This is mostly a port of the existing v4l1 driver to gspca (making it v4l2). But this also features fixes to the bitbanging i2c code (send a nack not an ack after reading the last byte of a transfer), which gets rid of the weird errors which were being seen there, and of the smbus_refresh() hack to get around these errors. Also the vstart settings have been tweaked to work with different frequency filter settings. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13115): gspca - main: More information messages.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-27const: mark struct vm_struct_operationsAlexey Dobriyan
* mark struct vm_area_struct::vm_ops as const * mark vm_ops in AGP code But leave TTM code alone, something is fishy there with global vm_ops being used. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-12V4L/DVB (12382): gspca - main: Remove vidioc_s_std().Marton Nemeth
The vidioc_s_std() is not necessary when vdev->tvnorms == 0. Signed-off-by: Marton Nemeth <nm127@freemail.hu> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12358): gspca - main: Memorize the current alt before setting itJean-Francois Moine
This prevents a loop if a permanent error occurs in usb_set_interface(). Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12231): gspca - main: Version change.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12229): gspca - main: Change the ISOC initialization mechanism.Jean-Francois Moine
- call a new subdriver function 'isoc_init' before chosing the first alternate setting. - call a new subdriver function 'isoc_nego' when submitting the URBs failed. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-07-24V4L/DVB (12282): gspca - main: Support for vidioc_g_chip_ident and ↵Brian Johnson
vidioc_g/s_register. Signed-off-by: Brian Johnson <brijohn@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23V4L/DVB (12071): gspca: fix NULL pointer deref in query_ctrlHans de Goede
gspca: fix NULL pointer deref in query_ctrl Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11870): gspca - main: VIDIOC_ENUM_FRAMESIZES ioctl added.Hans de Goede
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11972): gspca - main: Skip disabled controls.Hans de Goede
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11715): gspca - main: Set the number of packets per ISOC message.Jean-Francois Moine
The number of packets per isochronous message may now be set by the subdrivers (default value 32). Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>