Commit Graph

53 Commits (4b7875407b2fb56433586877ca0a564b8d999f4e)

Author SHA1 Message Date
Mosalam Ebrahimi 4b7875407b V4L/DVB: gspca - ov534: Add Powerline Frequency control
Note that setting this options to 50Hz can reduce the framerate, so it is
still disabled (60Hz) by default.

Signed-off-by: Mosalam Ebrahimi <m.ebrahimi@ieee.org>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:00 -03:00
Antonio Ospite 7f9e9e8dc2 V4L/DVB: gspca - ov534: Cosmetics: fix indentation and hex digits
* Indent with tabs, not with spaces, nor with mixed style.
  * Less indentation for controls index comments.
  * Use lowercase hex digits.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:59 -03:00
Max Thrun eb171073b6 V4L/DVB: gspca - ov534: Fix unsetting hflip and vflip bits
Also set default values unconditionally, for readability.

Signed-off-by: Max Thrun <bear24rw@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:58 -03:00
Max Thrun 3149cfbfac V4L/DVB: gspca - ov534: Fixes for sharpness control
* Adjust comments for sharpness control
  * Set default value unconditionally, for readability

Signed-off-by: Max Thrun <bear24rw@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:58 -03:00
Max Thrun 8fef9d9622 V4L/DVB: gspca - ov534: Fix Auto White Balance control
Set only the needed bits for AWB, and enable it by default.

Signed-off-by: Max Thrun <bear24rw@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:57 -03:00
Antonio Ospite 18cf8c91ad V4L/DVB: gspca - ov534: Fix and document setting manual exposure
Document that even if the state is a u8 value, both MSB and LSB are set
as sd->exposure represents half of the value we are going to set into
registers.

Skip setting exposure when AEC is enabled.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:56 -03:00
Max Thrun f293882252 V4L/DVB: gspca - ov534: Add Auto Exposure
This also makes manual exposure actually work: it never worked before
because AEC was always enabled.

Signed-off-by: Max Thrun <bear24rw@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:55 -03:00
Max Thrun 8b7fbda484 V4L/DVB: gspca - ov534: Fix autogain control, enable it by default
* Use 'agc' instead of 'autogain' in the code so to align the naming
    as in AEC/AWB.
  * Tweak brightness and contrast default values.
  * Fix setting/resetting registers values for AGC.
  * Set actual gain back when disabling AGC.
  * Skip setting GAIN register when AGC is enabled.
  * Enable AGC by default.

Note that as Auto Gain Control is now enabled by default, if you are
using the driver for visual computing applications you might need to
disable it explicitly in your software.

Signed-off-by: Max Thrun <bear24rw@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:54 -03:00
Antonio Ospite 0c41acf158 V4L/DVB: gspca - ov534: Remove hue control
Hue control doesn't work and the sensor datasheet is not clear about how
to set hue properly.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:54 -03:00
Max Thrun c3f52f630d V4L/DVB: gspca- ov534: Remove ambiguous controls
Remove Blue/Red Channel Target Value, they are meant for Black Level
Calibration but it is not completely clear how to use them.

Signed-off-by: Max Thrun <bear24rw@gmail.com>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:53 -03:00
Antonio Ospite 11edebc264 V4L/DVB: gspca - ov534: Fix end of frame handling
Fix a regression, introduced in the driver split, which made
the ov534 driver unusable.
Plus, the debug message should reflect that we discard also packets
beyond the expected frame size.

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>
2010-02-26 15:10:47 -03:00
Antonio Ospite 29b87f0455 V4L/DVB: gspca - ov534: Allow enumerating supported framerates
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>
2010-02-26 15:10:47 -03:00
Jean-Francois Moine c52af79916 V4L/DVB (13916): gspca - ov534/ov534_9: Split the ov534 subdriver.
The two sensors ov772x and ov965x have too much differences.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:35 -03:00
Marton Nemeth 7e64dc4c4d V4L/DVB (13899): gspca - all subdrivers: Make control descriptors constant.
The ctrls field of struct sd_desc is declared as const
in gspca.h. It is worth to initialize the content also with
constant values.

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>
2010-02-26 15:10:29 -03:00
Jean-Francois Moine bc41797a56 V4L/DVB (13622): gspca - ov534: Fix a compilation warning.
This warning prevented the sharpness setting to work with the ov965x sensor.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17 11:31:35 -02:00
Jean-Francois Moine c22c4a20a6 V4L/DVB (13490): gspca - ov534: Add controls for sensor ov965x.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:42:07 -02:00
Jean-Francois Moine 4e5cf58ecf V4L/DVB (13488): gspca - ov534: Remove extra values at end of ov965x sequences.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:42:07 -02:00
Jean-Francois Moine 569691a5a0 V4L/DVB (13487): gspca - ov534: Add svga, xga and sxga modes for ov965x.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:42:06 -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 2d19a2c118 V4L/DVB (13449): gspca - ov534: The AWB control works only when autogain is set.
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 c76e6f1166 V4L/DVB (13425): gspca - ov534: Bad name of the ov965x 320x240 resolution.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:50 -02:00
Jean-Francois Moine 69f1fe28f0 V4L/DVB (13424): gspca - ov534: Fix ov772x brightness and ov965x frame rate.
- the ov772x brightness was not setteble (fixed by M. Thrun)
- the set_frame_rate function does not work for ov965x

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:49 -02:00
Jean-Francois Moine b014f94b28 V4L/DVB (13423): gspca - ov534: More ov772x changes from Max Thrun.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:49 -02:00
Jean-Francois Moine 189d92af70 V4L/DVB (13422): gspca - ov534: ov772x changes from Richard Kaswy.
- 320x240 resolution added
- controls added
- different sd_desc tables

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:49 -02:00
Jean-Francois Moine c874f3aa7e V4L/DVB (11973): gspca - ov534: Do the ov772x work again.
The scan of the image packets of the sensor ov772x was broken when
the sensor ov965x was added.

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 191d0e7fba V4L/DVB (11869): gspca - ov534: JPEG 320x240 and 640x480 formats for ov965x.
The YUYV 640x480 format did not work with ov965x.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:21:15 -03:00
Jean-Francois Moine ed47119fb7 V4L/DVB (11713): gspca - ov534: Don't discard the images when no UVC EOF
A new image may start without any UVC EOF in the last packet of the
previous image.

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 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 2ce949ec66 V4L/DVB (11106): gspca - ov534: New sensor ov965x and re-enable the webcam 06f8:3003
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:29 -03:00
Jean-Francois Moine 84fbdf87ab V4L/DVB (11105): gspca - ov534: Adjust the packet scan function
- change max payload size to 2040 bytes (was 2048)
- optimize

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:29 -03:00
Jean-Francois Moine 3481c19854 V4L/DVB (11104): gspca - ov534: Bad frame pointer after adding the last packet
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:29 -03:00
Antonio Ospite 96ff65144c V4L/DVB (10344): gspca - ov534: Disable the Hercules webcams.
The Hercules webcam based on ov534 use different sensor than Playstation Eye,
disable them until full support is provided.

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-03-30 12:42:30 -03:00
Alexey Klimov e6b148490f V4L/DVB (10336): gspca - all subdrivers: Return ret instead of -1 in sd_mod_init.
Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:29 -03:00
Alexey Klimov f69e9529ed V4L/DVB (10335): gspca - all subdrivers: Fix CodingStyle in sd_mod_init function.
Introduce int ret and check it value after call to usb_register().

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:29 -03:00
Jean-Francois Moine 50e06dee95 V4L/DVB (10333): gspca - main and many subdrivers: Remove the epaddr variable.
The transfer endpoint address is now automatically chosen.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:29 -03:00
Jean-Francois Moine cc611b8aef V4L/DVB (10049): gspca - many subdrivers: Set 'const' the pixel format table.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:07 -02:00
Jean-Francois Moine 15f64864e3 V4L/DVB (10046): gspca - ov534: Use the gspca usb buf for usb control messages.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:06 -02:00
Jean-Francois Moine f367b85d9a V4L/DVB (10045): gspca - ov534: Remove empty line in trace.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:05 -02:00
Jean-Francois Moine 5c1a15a149 V4L/DVB (9995): gspca - ov534 and m5602: Set static some functions/variables.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:43 -02:00
Jean-Francois Moine 1dc87b6e2f V4L/DVB (9884): gspca - ov534: Fix a warning when compilation without GSPCA_DEBUG.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:05 -02:00
Antonio Ospite e6e4837827 V4L/DVB (9883): gspca - ov534: Show sensor ID.
The original version of sccb_read_reg() is from Jim Paris.

NOTE: as it is now reading sensor ID won't work for sensors on different
i2c slave address.

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>
2008-12-30 09:39:04 -02:00
Antonio Ospite 15e3209a30 V4L/DVB (9882): gspca - ov534: Fix typo.
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>
2008-12-30 09:39:04 -02:00
Jim Paris 11d9f25da8 V4L/DVB (9877): gspca - ov534: Add framerate support.
Add support for getting and setting framerate via v4l2 controls,
rather than setting a fixed value at module insertion.

Signed-off-by: Jim Paris <jim@jtan.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:02 -02:00
Jim Paris c06eb61941 V4L/DVB (9874): gspca - ov534: Explicitly initialize frame format.
Set frame format registers 0x0a and 0x0b to explicit values
rather than relying on reset-time defaults.

Signed-off-by: Jim Paris <jim@jtan.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:01 -02:00
Jim Paris 0f7a50b29d V4L/DVB (9873): gspca - ov534: Improve payload handling.
Frame data in bulk transfers is separated into 2048-byte payloads.
Each payload has its own header.

Signed-off-by: Jim Paris <jim@jtan.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:00 -02:00
Jean-Francois Moine 8c25205014 V4L/DVB (9861): gspca - ov534: Accept many simultaneous webcams.
This patch moves the last fid and pts from static to the sd structure.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:55 -02:00
Jim Paris fb139224ae V4L/DVB (9860): gspca - ov534: Frame transfer improvements.
The indirect registers at 0x1c/0x1d control frame settings.  If we
leave the values at 0x0a and 0x0b at their reset-time defaults, frame
data from the camera matches the UVC payload format.  This lets us
better reassemble the data into frames and know when data was lost.

This also lets us relax the bulk_size requirement from 600K to 2K,
which should help systems on with limited RAM (like the PS3).

Signed-off-by: Jim Paris <jim@jtan.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:55 -02:00
Jim Paris 5ea9c4def8 V4L/DVB (9859): gspca - ov534: Fix frame size so we don't miss the last pixel.
The frame size is too small, so we lose the last YUYV pixel.
Fix the setup and remove the last_pixel hack.

Signed-off-by: Jim Paris <jim@jtan.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:54 -02:00
Jim Paris 47dfd21fbf V4L/DVB (9858): gspca - ov534: Initialization cleanup.
Signed-off-by: Jim Paris <jim@jtan.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:54 -02:00
Antonio Ospite 442a43f50f V4L/DVB (9857): gspca: Use smaller chunks for urb buffer in ov534.
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>
2008-12-30 09:38:53 -02:00