dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

147 Commits

Author SHA1 Message Date
Daniel Mack 997ea58eb9 USB: rename usb_buffer_alloc() and usb_buffer_free() users
For more clearance what the functions actually do,

  usb_buffer_alloc() is renamed to usb_alloc_coherent()
  usb_buffer_free()  is renamed to usb_free_coherent()

They should only be used in code which really needs DMA coherency.

All call sites have been changed accordingly, except for staging
drivers.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Pedro Ribeiro <pedrib@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20 13:21:38 -07:00
Hans de Goede e7637521ac V4L/DVB: gspca_main: Fix a compile error when CONFIG_INPUT is not set
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-26 15:11:10 -03:00
Hans de Goede 10ee240200 V4L/DVB: gspca_main: some input error handling fixes
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-26 15:11:09 -03:00
Hans de Goede ac82f59f9c V4L/DVB: gspca_main: Allow use of input device creation code for non int. inputs
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-26 15:11:09 -03:00
Hans de Goede 26984b0995 V4L/DVB: gscpa_sonixb: Differentiate between sensors with a coarse and fine 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-26 15:11:08 -03:00
Jean-François Moine e070bf9ef8 V4L/DVB: gspca - main: Fix a compile error when CONFIG_INPUT is not set
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-26 15:11:04 -03:00
Jean-François Moine 55461f4c58 V4L/DVB: gspca - main: Change version to 2.9.0.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:49 -03:00
Márton Németh 0274d42e05 V4L/DVB: gspca - main: Add input support for interrupt endpoints.
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-26 15:10:49 -03:00
Jean-Francois Moine ab6c8cf21e V4L/DVB: gspca - main: Clear any previous USB error when starting the transfer
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:47 -03:00
Jean-Francois Moine b7a597d110 V4L/DVB (13925): gspca - main: Change the check of the USB video interface.
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-26 15:10:32 -03:00
Jean-Francois Moine 52a9d3ef00 V4L/DVB (13897): gspca - main: Check the interface class at probe time.
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-26 15:10:29 -03:00
Jean-Francois Moine 47aaca961f V4L/DVB (13866): gspca - main: Add the cam flag 'no_urb_create'.
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-26 15:10:27 -03:00
Jean-Francois Moine db870875c0 V4L/DVB (13865): gspca - main: Optimize code.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:26 -03:00
Jean-Francois Moine 8c32aa5945 V4L/DVB (13816): gspca - main: Set the current frame pointer when first qbuf.
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>
2010-01-17 11:31:34 -02:00
Jean-Francois Moine 8395555666 V4L/DVB (13626): gspca - many subdrivers: Fix some warnings.
- 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-16 00:18:49 -02:00
Jean-Francois Moine 8c4ebae45f V4L/DVB (13566): gspca - main: New variable usb_err for USB exchanges.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:01 -02:00
Antonio Ospite 28ffe77fe2 V4L/DVB (13564): gspca - main: Implement vidioc_enum_frameintervals.
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-16 00:18:00 -02:00
Márton Németh 747c710098 V4L/DVB (13561): gspca - main: Remove unnecessary set to alternate 0.
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-16 00:17:59 -02:00
Jean-Francois Moine d50e257ee8 V4L/DVB (13560): gspca - main: Cleanup source.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:58 -02:00
Laurent Pinchart 46b21094ce V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments
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-16 00:17:57 -02:00
Laurent Pinchart 38c7c03603 V4L/DVB (13550): v4l: Use the new video_device_node_name function
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-16 00:17:55 -02:00
Jean-Francois Moine 76dd272b56 V4L/DVB (13453): gspca - all subdrivers: Remove the unused frame ptr from pkt_scan().
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:59 -02:00
Jean-Francois Moine d131c3c9e1 V4L/DVB (13452): gspca - main: Let the driver scan URB packets when no frame buffer.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:59 -02:00
Jean-Francois Moine 3ec342f250 V4L/DVB (13451): gspca - main: Memorize the current frame buffer.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:59 -02:00
Jean-Francois Moine 8157852f73 V4L/DVB (13450): gspca - main: Clear the urb status before resubmit.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:58 -02:00
Jean-Francois Moine 4af8566858 V4L/DVB (13448): gspca - main: Add a gspca flag for inactive controls.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:57 -02:00
Jean-Francois Moine 4bdf4a8342 V4L/DVB (13421): gspca - main: Clearer message when bandwidth too small.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:48 -02:00
Jean-Francois Moine b760812ed7 V4L/DVB (13387): gspca - main: Fix a compilation warning.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:39 -02:00
Jean-Francois Moine 77ee33184f V4L/DVB (13386): gspca - main: Change version to 2.8.0.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:38 -02:00
Hans de Goede 6a540bdf01 V4L/DVB (13185): gspca: Don't resubmit error status URB's when suspending
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-05 18:40:47 -02:00
Hans de Goede bf926adfbb V4L/DVB (13184): gspca: Don't forget to resubmit URB's in case of an error
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-05 18:40:47 -02:00
Hans de Goede a511ba9476 V4L/DVB (13178): gspca: Add support for Winbond W9967CF and W9968CF camera's
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-05 18:40:44 -02:00
Jean-Francois Moine 0d07e240c5 V4L/DVB (13115): gspca - main: More information messages.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:25 -02:00
Alexey Dobriyan f0f37e2f77 const: mark struct vm_struct_operations
* 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-27 11:39:25 -07:00
Marton Nemeth d40a1da2b4 V4L/DVB (12382): gspca - main: Remove vidioc_s_std().
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-12 12:18:34 -03:00
Jean-Francois Moine 1c8336d338 V4L/DVB (12358): gspca - main: Memorize the current alt before setting it
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-12 12:18:22 -03:00
Jean-Francois Moine a0d64456f7 V4L/DVB (12231): gspca - main: Version change.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:37 -03:00
Jean-Francois Moine 1f53b0b010 V4L/DVB (12229): gspca - main: Change the ISOC initialization mechanism.
- 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-09-12 12:17:37 -03:00
Brian Johnson af1d9afa75 V4L/DVB (12282): gspca - main: Support for vidioc_g_chip_ident and 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-07-24 14:03:30 -03:00
Hans de Goede b8bfb5fb34 V4L/DVB (12071): gspca: fix NULL pointer deref in query_ctrl
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-23 03:11:07 -03:00
Hans de Goede 11c635a25b V4L/DVB (11870): gspca - main: VIDIOC_ENUM_FRAMESIZES ioctl added.
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-16 19:14:44 -03:00
Hans de Goede a0001a289f V4L/DVB (11972): gspca - main: Skip disabled controls.
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-16 19:07:44 -03:00
Jean-Francois Moine 49cb6b046d V4L/DVB (11715): gspca - main: Set the number of packets per ISOC message.
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>
2009-06-16 18:20:55 -03:00
Jean-Francois Moine 8dd07ef123 V4L/DVB (11712): gspca - main: Set the current alternate setting only when needed
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:20:55 -03:00
Jean-Francois Moine 30d35e4950 V4L/DVB (11711): gspca - main: Fix a crash when no bandwidth available
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>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:20:54 -03:00
Jean-Francois Moine 6929dc6b30 V4L/DVB (11710): gspca - main: Webcams cannot do both isoc and bulk image transfers.
Let the subdrivers to set the 'image transfer by bulk' flag.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:20:54 -03:00
Jean-Francois Moine 11bd199aa0 V4L/DVB (11708): gspca - main: Version change.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:20:54 -03:00
Hans de Goede 2444163122 V4L/DVB (11448): gspca - main: Use usb interface as parent.
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-16 18:20:23 -03:00
Adam Baker dfa76fa282 V4L/DVB (11387): Sensor orientation reporting
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.

[mchehab@redhat.com: Changed "Output is" to "Frames are" at the comments, as suggested at LMML]
Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:44:29 -03:00
Trent Piepho 5a27578667 V4L/DVB (11263): gspca: Stop setting buffer type, and avoid memset in querycap
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.

Cc: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:44 -03:00