summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/gspca.c
AgeCommit message (Collapse)Author
2009-04-25gspca - main: Set the number of packets per ISOC message.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> The number of packets per isochronous message may now be set by the subdrivers (default value 32). Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2009-04-21gspca - main: Set the current alternate setting only when needed.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2009-04-21gspca - main: Fix a crash when no bandwidth available.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> When the bandwidth is not wide enough, the transfer endpoint may be set to the one of the alternate setting 0. This one may be null and this causes a divide by 0 oops. Reported-by: Hans de Goede <hdegoede@redhat.com> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2009-04-21gspca - main: Webcams cannot do both isoc and bulk image transfers.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Let the subdrivers to set the 'image transfer by bulk' flag. Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2009-04-21gspca - main: Version change.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2009-03-27gspca - main: Use usb interface as parent.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>
2009-03-29Sensor orientation reportingMauro Carvalho Chehab
From: Adam Baker <linux@baker-net.org.uk> Add support to the SQ-905 driver to pass back to user space the sensor orientation information obtained from the camera during init. Modifies gspca and the videodev2.h header to create the necessary API. Signed-off-by: Adam Baker <linux@baker-net.org.uk> [mchehab@redhat.com: Changed "Output is" to "Frames are" at the comments, as suggested at LMML] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-28gspca: Stop setting buffer type, and avoid memset in querycapTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> The v4l2-ioctl core checks the buffer type now by only allowing buffer types for which the corresponding ->vidioc_try_fmt_xxx() methods are defined. This driver only defines ->vidioc_try_fmt_vid_cap() so only VIDEO_CAPTURE buffers are allowed to be used with vidioc_g_parm. Also, ->vidioc_enum_fmt_vid_cap() is only called for VIDEO_CAPTURE buffers. There is no need to set the buffer type since it must already be the correct value. The struct which ->vidioc_querycap() is supposed to fill in is already zeroed so it's not necessary to call memset on it. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> CC: Jean-Francois Moine <moinejf@free.fr>
2009-03-19gspca - main: May have isochronous transfers on altsetting 0.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2009-03-03gspca: Don't need to zero ioctl parameter fieldsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> The v4l2 core code in v4l2_ioctl will zero out the structure the driver is supposed to fill in for read-only ioctls. For read/write ioctls, all the fields which aren't supplied from userspace will be zeroed out. Zeroing code is removed from g_audio, enum_input, g_parm and gmbuf. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-02-12gspca - main: More checks of the device disconnection.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> - prevent application oops when the device is disconnected - wake up the application at disconnection time - check the disconnection in ioctl dqbuf and poll Priority: high Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2009-02-04gspca - main: Destroy the URBs at disconnection time.Jean-Francois Moine
From: Adam Baker <linux@baker-net.org.uk> If a device using the gspca framework is unplugged while it is still streaming then the call that is used to free the URBs that have been allocated occurs after the pointer it uses becomes invalid at the end of gspca_disconnect. Make another cleanup call in gspca_disconnect while the pointer is still valid (multiple calls are OK as destroy_urbs checks for pointers already being NULL. Priority: high Signed-off-by: Adam Baker <linux@baker-net.org.uk> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2009-01-29commit backportMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29gspca: version.h is needed in order to compile upstreamMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> drivers/media/video/gspca/gspca.c: In function ‘vidioc_querycap’: drivers/media/video/gspca/gspca.c:963: error: implicit declaration of function ‘KERNEL_VERSION’ kernel-sync: CC: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-24gspca - main: Fix memory leak when USB disconnection while streaming.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Resetting the streaming flag on disconnection prevented the URBs to be freed when streaming was active. Also, USBs cannot be killed after disconnection (oops in [usbcore] unlink1). Priority: high Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2009-01-21gspca - main: Use usb_make_path() for VIDIOC_QUERYCAP.Jean-Francois Moine
From: Thierry MERLE <thierry.merle@free.fr> Priority: normal Signed-off-by: Thierry MERLE <thierry.merle@free.fr> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2009-01-20gspca - main: Avoid error on set interface on disconnection.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2009-01-17gspca - main: Have 3 URBs instead of 2 for ISOC transfers.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2009-01-16gspca - mr97310a: New subdriver.Jean-Francois Moine
From: Kyle Guinn <elyk03@gmail.com> This patch adds support for USB webcams based on the MR97310A chip. It was tested with an Aiptek PenCam VGA+ webcam. Priority: normal Signed-off-by: Kyle Guinn <elyk03@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2009-01-13gspca - main: Cleanup code.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2009-01-07gspca - main: Remove #include version.h.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-12-31gspca - main and many subdrivers: Remove the epaddr variable.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> The transfer endpoint address is now automatically chosen. Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-12-31gspca - main: Version change.Jean-Francois Moine
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
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>