summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/gspca.c
AgeCommit message (Collapse)Author
2008-12-30v4l2: introduce v4l2_file_operations.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Introduce a struct v4l2_file_operations for v4l2 drivers. Remove the unnecessary inode argument. Move compat32 handling (and llseek) into the v4l2-dev core: this is now handled in the v4l2 core and no longer in the drivers themselves. Note that this changeset reverts an earlier patch that changed the return type of__video_ioctl2 from int to long. This change will be reinstated later in a much improved version. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-12-24gspca - main: Don't lock the kernel on ioctl.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-12-19gspca - main: Check if a buffer has been queued on streamon.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-12-19gspca - main: Remove useless tests of the buffer type.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> The buffer type is already checked in v4l2-ioctl. Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-12-10gspca - main: Allow subdrivers to handle v4l2_streamparm requests.Jean-Francois Moine
From: Jim Paris <jim@jtan.com> Add get_streamparm and set_streamparm operations so subdrivers can get/set stream parameters such as framerate. Priority: normal Signed-off-by: Jim Paris <jim@jtan.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-12-10gspca - main: Fix vidioc_s_jpegcomp locking.Jean-Francois Moine
From: Jim Paris <jim@jtan.com> Priority: high Signed-off-by: Jim Paris <jim@jtan.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-11-28gspca: Do the webcam microphone work when present.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> This patch adds the set/get/enum audio controls. Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-11-24gspca: Use msleep instead of mdelay.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-11-23gspca: Delay when trying an other altsetting on streaming start.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-11-22gspca: Fix an access to freed memory at disconnect time.Jean-Francois Moine
From: leandro Costantino <lcostantino@gmail.com> On disconnection (USB or rmmod subdriver), the device is freed by video_unregister_device(). Setting the 'present' and 'streaming' flags must be done before the call to this function. Priority: high Signed-off-by: leandro Costantino <lcostantino@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-11-22gspca: Remove some unuseful core in main.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-11-19gspca: Remove the event counter and simplify the frame wait.Jean-Francois Moine
From: Hans de Goede <hdegoede@redhat.com> Priority: normal Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-11-19gspca: Use the ref counting of v4l2 for disconnection.Jean-Francois Moine
From: Hans de Goede <hdegoede@redhat.com> Priority: normal Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-11-19gspca: Revert the previous change.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-11-19gspca: Move the video device to a separate area.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> The video device was part of the gspca device. On device disconnection while streaming, the device structure is freed at close time. In this case, the remaining close job on the video device run out of allocated memory. Priority: high Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-11-18gspca: Lock the subdrivers via module_get/put.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> The previous subdriver protection against rmmod was done via the file operations table in the device descriptor. On device disconnection while streaming, the device structure was freed at close time, and the module_put still used the module name in the freed area. Now, explicit module get/put are done on open and close. Priority: high Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-11-18gspca: Memory leak when disconnect while streaming.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> As a side effect, the sd routine stop0 is called on disconnect. This permits the subdriver to free its resources. Priority: high Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-11-18gspca: Reset the bulk URB status before resubmitting at irq level.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-11-17merge: v4l-dvbJean-Francois Moine
2008-11-14gspca: New subdriver parameter 'bulk_nurbs'.Jean-Francois Moine
From: Antonio Ospite <ospite@studenti.unina.it> Some webcams with image transfer by bulk messages accept one or many permanent bulk read. Priority: normal Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-11-13drivers/media: use ARRAY_SIZEMauro Carvalho Chehab
From: Julia Lawall <julia@diku.dk> ARRAY_SIZE is more concise to use when the size of an array is divided by the size of its type or the size of its first element. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @i@ @@ @depends on i using "paren.iso"@ type T; T[] E; @@ - (sizeof(E)/sizeof(E[...])) + ARRAY_SIZE(E) @depends on i using "paren.iso"@ type T; T[] E; @@ - (sizeof(E)/sizeof(T)) + ARRAY_SIZE(E) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-10gspca: Remove empty lines in traces.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-10-24gspca: Version change.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-10-23gspca: Add a flag for empty ISOC packets.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> - This flag is needed by some subdrivers as tv8532 for start of frame detection. Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-10-22gspca: Clear the bulk endpoint at starting time when bulk transfer.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> - usb_clear_halt() added in gspca and removed in finepix. Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-10-17gspca: Compilation problem of gspca.c and the kernel version.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-10-13Properly iterate the urbs when destroying them.Erik Andrén
From: Erik Andrén <erik.andren@gmail.com> Properly iterate the allocated when freeing the urbs, this fixes a memory leak Priority: normal Signed-off-by: Erik Andrén <erik.andren@gmail.com>
2008-10-05gspca: Don't destroy the URBs on disconnect.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-10-03gspca: Cleanup code and small changes.Jean-Francois Moine
From: Erik Andren <erik.andren@gmail.com> - convert some #define to enum. - remove some comments. - return ENOMEM on memory allocation failure. Priority: normal Signed-off-by: Erik Andren <erik.andren@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-09-29gspca: Image transfer by bulk uses altsetting 0 with any buffer size.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> - gspca_dev field 'bulk_size' added. - when only one altsetting usable, do image transfer by bulk. Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-09-28gspca: Use a kref to avoid potentialy blocking forever in disconnect.Jean-Francois Moine
From: Frank Zago <frank@zago.net> Priority: normal Signed-off-by: Frank Zago <frank@zago.net> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-09-28gspca: URB_NO_TRANSFER_DMA_MAP is required for isoc and bulk transfers.Jean-Francois Moine
From: Frank Zago <frank@zago.net> Priority: normal Signed-off-by: Frank Zago <frank@zago.net> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-09-26gspca: Fixed a few typos in comments.Jean-Francois Moine
From: Frank Zago <frank@zago.net> Priority: normal Signed-off-by: Frank Zago <frank@zago.net> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-09-26gspca: URB_NO_TRANSFER_DMA_MAP is not useful for isoc transfers.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-09-20gspca: Return error code from stream start functions.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-09-20gspca: New exported function to retrieve the current frame buffer.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-09-15gspca: Set the right V4L2_DEBUG values in the main driver.Jean-Francois Moine
From: Frank Zago <frank@zago.net> Priority: normal Signed-off-by: Frank Zago <frank@zago.net> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-09-08gspca: The image transfer by bulk is started by the subdrivers.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-09-06gspca: Version change to 2.3.0.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-09-05gspca: Bad fix of leak memory (changeset 43d2ead315b1).Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: high Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-09-05merge: http://linuxtv.org/hg/~jfrancois/gspca/Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-04gspca: fix memory leakMauro Carvalho Chehab
From: Douglas Schilling Landgraf <dougsland@linuxtv.org> Free allocated memory Priority: high Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org> CC: Jean-Francois Moine <moinejf@free.fr> CC: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-04gspca: Add support of image transfer by bulk and minor change.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> - image transfer by bulk - set the max number of transfer URS's to 4 (was 16) Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-08-29merge: http://linuxtv.org/hg/~jfrancois/gspca/Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-08-27gspca: Have a clean kmalloc-ated buffer for USB exchanges.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> The USB buffer may be used for DMA and there may be a caching problem if the buffer is part of the device structure. Thanks to Alan Stern. Priority: high Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-08-26gspca: Too much code removed in the suspend/resume changeset.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> - the stream must stop when the main application closes the device. Priority: high Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-08-26gspca: Change some subdriver functions for suspend/resume.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> - new function 'init' called on probe and resume - remove the functions 'open' and 'closed' - 'stopN' and 'stop0' are optional Priority: high Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-08-24gspca: Reinitialize the device on resume.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: high Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-08-24gspca: Fix problems with disabled controls.Jean-Francois Moine
From: Hans de Goede <j.w.r.degoede@hhs.nl> Priority: high Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-08-23gspca: Set DISABLED the disabled controls at query control time.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: high Signed-off-by: Jean-Francois Moine <moinejf@free.fr>