Commit Graph

47841 Commits

Author SHA1 Message Date
Jean-Francois Moine b77c0046a6 V4L/DVB (8872): gspca: Bad image format and offset with rev072a of spca561.
- have 2 pixfmt tables
- offset of Bayer frames at 16 instead of 20.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-04 16:22:56 -03:00
Hans de Goede bf2a2202f7 V4L/DVB (8870): gspca: Fix dark room problem with sonixb.
When using the sonixb driver in a dark room and given that the autoexposure
algorithm starts with a setting most suitable for daylight, the picture
produced by the cam may actually be 100% black leading to a avg_lum value of 0,
so an avg_lum value of 0 does not always signal an exposure settings change
(which it normally does). This patch adds a check for the really black image
case and stops dropping all frames as invalid in this case.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-04 16:22:56 -03:00
Hans de Goede a94a508691 V4L/DVB (8869): gspca: Move the Sonix webcams with TAS5110C1B from sn9c102 to gspca.
This patch makes gspca claim the USB-ID for sn9c101/2 cams with a TAS5110C1B
sensor even if both gspca and sn9c102 are enabled, as these cams are much
better supported under gspca (and extensively tested with gspca).
It also removes an usb-id from sn9c102 for one more unsupported bridge
sensor combo.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-04 16:22:55 -03:00
Hans de Goede 9362773624 V4L/DVB (8868): gspca: Support for vga modes with sif sensors in sonixb.
- Add documentation for some known registers
- Add support for vga modes (320x240, 160x120) for sif sensors
- Remove F_RAW sensor flag raw mode should work on any sensor as its a bridge
   only thing and keeping the flag was becoming awkward.
- Fixup ov6650 and pas106 auto exposure window settings

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-04 16:20:12 -03:00
Andi Kleen 5ed459102d Merge branch 'wmi-fix' into release-2.6.27 2008-09-04 14:41:02 +02:00
Russ Dill 7d964c352b acer-wmi: remove debugfs entries upon unloading
The exit function neglects to remove debugfs entries, leading to a BUG
on reload.

[akpm@linux-foundation.org: cleanups]
Signed-off-by: Russ Dill <Russ.Dill@gmail.com>
Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-09-04 14:40:48 +02:00
Andi Kleen 4fd23436f1 Merge branches 'smbus' and 'fujitsu-fix' into release-2.6.27 2008-09-04 14:33:03 +02:00
Zhao Yakui 266feefeb9 ACPI: Avoid bogus timeout about SMbus check
In the function of wait_transaction_complete when the timeout happens,
OS will try to check the status of SMbus again. If the status is what OS
expected, it will be regarded as the bogus timeout. Otherwise it will be
treated as ETIME.

http://bugzilla.kernel.org/show_bug.cgi?id=10483

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
tested-by    : Oldřich Jedlička < <oldium.pro@seznam.cz>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-09-04 14:32:28 +02:00
Jonathan Woithe d8196a93b1 fujitsu-laptop: fix regression for P8010 in 2.6.27-rc
The following patch (based on a patch from Stephen Gildea) fixes a
regression with the LCD brightness keys on Fujitsu P8010 laptops which was
observed with the 2.6.27-rc series (basically they stopped working due to
changes within the fujitsu-laptop and video modules).  Please apply to
2.6.27-rc and acpi git.

A more complete solution for this laptop will be included in an upcoming
patch, hopefully for 2.6.28.  In the meantime this restores most
functionality for P8010 users.

Signed-off-by: Stephen Gildea <stepheng+fujitsu-laptop@gildea.com>
Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-09-04 14:31:08 +02:00
Russell King c3df1a2685 [ARM] omap: fix build error in ohci-omap.c
drivers/usb/host/ohci-omap.c: In function 'ohci_omap_init':
drivers/usb/host/ohci-omap.c:228: error: 'start_hnp' undeclared (first use in this function)

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-04 09:45:47 +01:00
Linus Torvalds 5f17cfce57 PCI: fix pbus_size_mem() resource alignment for CardBus controllers
Commit 884525655d ("PCI: clean up resource
alignment management") changed the resource handling to mark how a
resource was aligned on a per-resource basis.

Thus, instead of looking at the resource number to determine whether it
was a bridge resource or a regular resource (they have different
alignment rules), we should just ask the resource for its alignment
directly.

The reason this broke only cardbus resources was that for the other
types of resources, the old way of deciding alignment actually still
happened to work.  But CardBus bridge resources had been changed by
commit 934b7024f0 ("Fix cardbus resource
allocation") to look more like regular resources than PCI bridge
resources from an alignment handling standpoint.

Reported-and-tested-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-04 01:33:59 -07:00
Linus Torvalds 316343e2cf Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  bnx2x: Accessing un-mapped page
  ath9k: Fix TX control flag use for no ACK and RTS/CTS
  ath9k: Fix TX status reporting
  iwlwifi: fix STATUS_EXIT_PENDING is not set on pci_remove
  iwlwifi: call apm stop on exit
  iwlwifi: fix Tx cmd memory allocation failure handling
  iwlwifi: fix rx_chain computation
  iwlwifi: fix station mimo power save values
  iwlwifi: remove false rxon if rx chain changes
  iwlwifi: fix hidden ssid discovery in passive channels
  iwlwifi: W/A for the TSF correction in IBSS
  netxen: Remove workaround for chipset quirk
  pcnet-cs, axnet_cs: add new IDs, remove dup ID with less info
  ixgbe: initialize interrupt throttle rate
  net/usb/pegasus: avoid hundreds of diagnostics
  tipc: Don't use structure names which easily globally conflict.
2008-09-03 16:21:02 -07:00
David S. Miller fca1287a3a Merge branch 'davem-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2008-09-03 14:43:30 -07:00
Eilon Greenstein 437cf2f1c5 bnx2x: Accessing un-mapped page
The allocated RX buffer size was 64 bytes bigger than the PCI mapped
size with no good reason. If the packet was actually using the buffer up
to its limit and if the last 64 bytes of the buffer crossed 4KB boundary
then an unmapped PCI page was accessed. The fix is to use only one
parameter for the buffer size - there is no need to differentiate
between the buffer size and the PCI mapping size since the extra 64
bytes can actually be used by the FW to align the Ethernet payload to
64 bytes.

Also updating the driver version and date

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-03 14:38:00 -07:00
Adrian Bunk 5d8538c1c6 V4L/DVB (8844): dabusb_fpga_download(): fix a memory leak
This patch fixes a memory leak in an error path.

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:55 -03:00
Adrian Bunk 877b5f4eda V4L/DVB (8843): tda10048_firmware_upload(): fix a memory leak
This patch fixes a memory leak ("fw" wasn't freed).

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:54 -03:00
Adrian Bunk 8da9bae329 V4L/DVB (8842): vivi_release(): fix use-after-free
video_device_release() does kfree(), which made the following printk()
doing a use-after-free.

printk() first and release then.

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:53 -03:00
Michael Krufky 9a0c04a1ee V4L/DVB (8840): dib0700: add basic support for Hauppauge Nova-TD-500 (84xxx)
This adds basic support for the Hauppauge Nova-TD-500 84xxx series.

A future patch will allow for one aerial input to supply both tuners.

With the current code, an aerial must be plugged into each antannae input
in order for both tuners to function.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:52 -03:00
Michael Krufky af2a887c9a V4L/DVB (8839): dib0700: add comment to identify 35th USB id pair
This comment helps to make the code more readable.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:51 -03:00
Jean Delvare 1d434012f2 V4L/DVB (8837): dvb: fix I2C adapters name size
Some DVB drivers are incorrectly assuming that the size of
i2c_adapter.name is I2C_NAME_SIZE.  Here's a fix.

Also change strncpy to strlcpy, as the former is error-prone (and was
indeed incorrectly used.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Uwe Bugla <uwe.bugla@gmx.de>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:50 -03:00
Hans de Goede c437d657c5 V4L/DVB (8835): gspca: Same pixfmt as the sn9c102 driver and raw Bayer added in sonixb.
1) Lower the hstart setting for all sensor by 1 so that we generate
   (compressed) BGGR data just like sn9c102 does (instead of GBRG data)
2) Add support for raw bayer output in the lowest resolutions (not enough
   bandwidth for higher resolutions), this should work with all sensors but
   to be sure only enable it for sensors where it has been tested.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:49 -03:00
Hans de Goede 5c51518da2 V4L/DVB (8834): gspca: Have a bigger buffer for sn9c10x compressed images.
Under certain conditions sonixb compressed frame size can get bigger then
the uncompressed size (seen with 0c45:6028), so make the buffers slightly
bigger.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:48 -03:00
Hans de Goede f45f06b648 V4L/DVB (8833): gspca: Cleanup the sonixb code.
-the usb-id table caried several flags which were not usb-id specific but
 sensor specific, add a sensor_data array and move these flag there
-fr_h_sz was being abused to store and check which bridge was being used
 instead add a bridge member to the sd struct
-now that we have a sensor_data table use that to store pointers to
 init_sequences instead of using switch cases on sd->sensor

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:46 -03:00
Jean-Francois Moine 20122542df V4L/DVB (8832): gspca: Bad pixelformat of vc0321 webcams.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:45 -03:00
Hans de Goede 222a07ffd8 V4L/DVB (8831): gspca: Resolve webcam conflicts between some drivers.
-remove USB-id's from zc0301 for cams for which zc0301.c does not support
  the sensor
-remove USB-id's from sn9c102 for cams where sn9c102 does not support the
  bridge sensor combination
-no longer make inclusion of usb id's removed from zc0301 and sn9c102
  conditional in gspca
-fix conditional inclusion of USB-id's in gspca to also work when the
  conflicting drivers are build as a module
-add a number of USB-id's to gspca from various windows .inf files:
0c45:608f from generic sonix sn9c103 inf file (+ ov7630 which we support)
041e:4022 from creative webcam nx pro, same as already supported 041e:401e
0ac8:0301 from generic zc0301 driver which supports many sensors
10fd:804d from typhoon webshot driver (also FlyCAM-USB 300 plus)

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:44 -03:00
Hans de Goede 271315a9b4 V4L/DVB (8830): gspca: Move some probe code to the new init function.
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:43 -03:00
Jean-Francois Moine 8295d99ee5 V4L/DVB (8829): gspca: Have a clean kmalloc-ated buffer for USB exchanges.
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.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:42 -03:00
Jean-Francois Moine 91de65ac00 V4L/DVB (8828): gspca: Set the clock at the end of initialization in sonixj.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:41 -03:00
Hans de Goede 038ec7c772 V4L/DVB (8827): gspca: Stop pac7302 autogain oscillation.
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:40 -03:00
Jean-Francois Moine 086272555d V4L/DVB (8826): gspca: Webcam Labtec 2200 (093a:2626) added in pac7311.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:39 -03:00
Hans de Goede 8a5b2e909d V4L/DVB (8825): gspca: More controls for pac73xx and new webcam 093a:2624.
-Add usb id for 093a:2624 (pac7302)
-Report some controls to userspace with 7302 only, as they are 7302 only
-Add gain and exposure controls
-Add autogain
-Fix 7302 imaged being mirrored by default

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:38 -03:00
Jean-Francois Moine a1e8288b1d V4L/DVB (8824): gspca: Too much code removed in the suspend/resume changeset.
- the stream must stop when the main application closes the device.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:37 -03:00
Jean-Francois Moine de00448f70 V4L/DVB (8823): gspca: H and V flips work for ov7670 only in ov519.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:36 -03:00
Jean-Francois Moine 012d6b029e V4L/DVB (8822): gspca: Change some subdriver functions for suspend/resume.
- new function 'init' called on probe and resume
- remove the functions 'open' and 'closed'
- 'stopN' and 'stop0' are optional

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:35 -03:00
Jean-Francois Moine 66e4124f41 V4L/DVB (8820): gspca: Change initialization and gamma of zc3xx - pas106.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:34 -03:00
Jean-Francois Moine 4202f71ca1 V4L/DVB (8819): gspca: Initialize the ov519 at open time and source cleanup.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:33 -03:00
Jean-Francois Moine 1e89e2da48 V4L/DVB (8818): gspca: Reinitialize the device on resume.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:32 -03:00
Hans de Goede 65f33396ab V4L/DVB (8817): gspca: LED and proble changes in sonixb.
- turn the led of the cam off after plugging in the cam
- move the probe code from open to config, so that if the probe fails
  we never register

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:30 -03:00
Hans de Goede e2ad2a54ad V4L/DVB (8816): gspca: Set disabled ctrls and fix a register pb with ovxxxx in sonixb.
- set some controls as disabled instead of copying the device descr.
- in the ov6650 / 7650 exposure code clamp reg 11 before (instead of after)
  using it to calculate reg 10.
- disable brightness (instead of ignoring it) for the TAS5110.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:29 -03:00
Hans de Goede 0f523c2ff6 V4L/DVB (8815): gspca: Fix problems with disabled controls.
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:28 -03:00
Jean-Francois Moine f50ba1bed3 V4L/DVB (8814): gspca: Set DISABLED the disabled controls at query control time.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:27 -03:00
Hans de Goede 221e7dbe55 V4L/DVB (8813): gspca: Adjust SOF detection for pac73xx.
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:25 -03:00
Hans de Goede 327c4abf74 V4L/DVB (8812): gspca: Do pac73xx webcams work.
- documentation for some registers
- some preparations for adding autogain_n_exposure functionality
- various pac7311 fixes
- disable brightness and colors controls for 7311
- fix contrast control for 7311
- add hflip and vflip controls for 7311
- minimal jpeg header
- proper SOF detection

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:24 -03:00
Jean-Francois Moine 62ee8eeebd V4L/DVB (8810): gspca: Compile error when CONFIG_PM not defined.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:23 -03:00
Hans de Goede d6db35e89c V4L/DVB (8809): gspca: Revert commit 9a9335776548d01525141c6e8f0c12e86bbde982
the previous patch (sensor upside down).

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:22 -03:00
Steven Toth 6d8976164d V4L/DVB (8805): Steven Toth email address change
I need this so I can better isolate my linux email from my
corporate email.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:21 -03:00
Steven Toth 5ca947a999 V4L/DVB (8804): s5h1411: Enable QAM_AUTO mode
If apps pass QAM_AUTO then we need to obey it.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:20 -03:00
Steven Toth 4fc85c74b4 V4L/DVB (8803): s5h1409: Enable QAM_AUTO mode
If apps pass QAM_AUTO then we need to obey it.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:19 -03:00
Hans Verkuil c5bf204f42 V4L/DVB (8790): saa7115: call i2c_set_clientdata only when state != NULL
Not a bug as such, but it looks really strange doing this before
checking whether the state structure could be allocated.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:18 -03:00
Hans Verkuil dc60de338f V4L/DVB (8779): v4l: fix more incorrect video_register_device result checks
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:17 -03:00
Hans Verkuil cba99ae819 V4L/DVB (8778): radio: fix incorrect video_register_device result check
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:16 -03:00
Andy Walls 6c9de52884 V4L/DVB (8769): cx18: Simplify queue flush logic to prevent oops in cx18_flush_queues()
cx18: Simplify queue flush logic to prevent oops in cx18_flush_queues().
If accounting of a queue is in error, logic borrowed from ivtv will cause
an oops when flushing the queues for a stream.  This change greatly
simplifies the queue flush logic, and sets the queue back to sane
defaults on a flush.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:14 -03:00
Hans Verkuil c6eb8eafdb V4L/DVB (8757): v4l-dvb: fix a bunch of sparse warnings
Fixed a lot of sparse warnings: mostly warnings about shadowed variables
and signed/unsigned mismatches.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:13 -03:00
Mauro Carvalho Chehab 980d4f1734 V4L/DVB (8751): vivi: Fix some issues at vivi register routine
This patch fixes several small issues at vivi register routines:

1) minor and n_devs should be unsigned;
2) n_devs = 0 were not properly handled;
3) if n_devs specify a high number, the driver would just roll back and
won't register any device. The proper behaviour is to keep all succeded
devices registered;
4) both n_devs and minor were using 0 as permissions. Better to have
them with 0444.

With the current patch, if n_devs specify a very large value, it will
register all possible devices. For example, on a machine without any
other V4L drivers loaded, with this patch, we will have something like:

vivi: V4L2 device registered as /dev/video0
vivi: V4L2 device registered as /dev/video1
vivi: V4L2 device registered as /dev/video2
	...
vivi: V4L2 device registered as /dev/video31
video_register_device_index: get_index failed
Video Technology Magazine Virtual Video Capture Board ver 0.5.0 successfully loaded.

5) The number of allocated devices on success is now kept at n_devs:

$ cat /sys/module/vivi/parameters/n_devs
32

Thanks to Henne <henne@nachtwindheim.de> for pointing that there were
some issues at vivi.

Cc: Henne <henne@nachtwindheim.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:12 -03:00
Henrik Kretzschmar f3b9f50ef7 V4L/DVB (8750): V4L: check inval in video_register_device_index()
Better check the video_device pointer before using it.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:11 -03:00
Mauro Carvalho Chehab 5b5aff83a5 V4L/DVB (8749): Fix error code, when camera is not turned on by sonypi
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:10 -03:00
Rene Herman 4ce0b65968 V4L/DVB (8728): 1-make-pms-not-autoprobe-when-builtin update
On 10-08-08 23:37, Alan Cox wrote:
>
> Would probably make the printk "pms: not enabled, use pms.enable=1 to
> probe"
>
> So you know
> a) What is wittering about not being probed
> b) How to undo it.
>
> But thats trivia really.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:37:09 -03:00
Rene Herman b54ff9398a V4L/DVB (8727): V4L1: make PMS not autoprobe when builtin.
The old Mediavision Pro Movie Studio legacy ISA V4L1 driver was found to
hang the boot during Ingo Molnar's testing of randconfig kernels.  Have it
require a "pms.enable=1" kernel parameter to enable the driver when
builtin which avoids such problems.

This is a deprecated and, very likely, unused driver.  Nothing changes
modular behaviour moreover.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:37:08 -03:00
Simon Arlott f46466e7d6 V4L/DVB (8726): link tuner before saa7134
If saa7134_init is run before v4l2_i2c_drv_init (tuner), then
saa7134_board_init2 will try to set the tuner type for devices that don't
exist yet.  This moves tuner to before all of the device-specific drivers
so that it's loaded early enough on boot.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:37:07 -03:00
Michael Krufky 09a29b7715 V4L/DVB (8722): sms1xxx: fix typo in license header
This should have read, "GNU General Public License version 2"
rather than, "GNU General Public License version 3"

This was actually a typo mass-blunder -- this is not a change in licence,
as the code was always GPLv2.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:01 -03:00
Hans de Goede 89a44b8a69 V4L/DVB (8720): gspca: V4L2_CAP_SENSOR_UPSIDE_DOWN added as a cap for some webcams.
This patch adds a V4L2_CAP_SENSOR_UPSIDE_DOWN flag to the capabilities flags,
and sets this flag for the Philips SPC200NC cam (which has its sensor installed
upside down). The same flag is also needed and added for the Philips SPC300NC.

Together with a patch to libv4l which adds flipping the image in software this
fixes the upside down display with the SPC200NC cam.

Signed-of-by: Hans de Goede <j.w.r.degoede@hhs.nl>

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:00 -03:00
Jean-Francois Moine f9b4a377dc V4L/DVB (8719): gspca: Have VIDIOC_QUERYCTRL more compliant to the spec.
- return -EINVAL when control not supported.
- start the private controls at V4L2_CID_PRIVATE_BASE.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:36:59 -03:00
Jean-Francois Moine 6a70974922 V4L/DVB (8718): gspca: suspend/resume added.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:36:58 -03:00
Jean-Francois Moine 5d05294ac8 V4L/DVB (8717): gspca: Frame buffer too small for small resolutions (sonixj and t613).
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:36:57 -03:00
Jean-Francois Moine 5b064da808 V4L/DVB (8716): gspca: Bad start of sn9c110 and sensor ov7630.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:36:56 -03:00
Jean-Francois Moine 4f30f6cf6b V4L/DVB (8714): gspca: Bad start of sn9c110 and sensor om6802.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:36:54 -03:00
Jean-Francois Moine 9c5f70f248 V4L/DVB (8713): gspca: Bad color control again in sonixj.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:36:52 -03:00
Jean-Francois Moine 759aa3c21e V4L/DVB (8712): gspca: Bad start of sonixj webcams since changeset a8779025e7e8.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:36:51 -03:00
Jean-Francois Moine 4a18625e88 V4L/DVB (8711): gspca: Bad controls and quantization table of pac7311.
Patch adapted from a gspca v1 patch by Thomas Kaiser.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:36:50 -03:00
Jean-Francois Moine d55b83d3c4 V4L/DVB (8710): gspca: Bad color control in sonixj.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:36:49 -03:00
Jean-Francois Moine 05b809c702 V4L/DVB (8709): gspca: Fix initialization and controls of sn9x110 - ov7630.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:36:48 -03:00
Jean-Francois Moine 41b469745f V4L/DVB (8707): gspca: Colors, hflip and vflip controls added for pac7302.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:36:47 -03:00
Jean-Francois Moine dff6d321d4 V4L/DVB (8706): Make contrast and brightness work for pac7302.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:36:46 -03:00
Jean-Francois Moine 3a1ea70503 V4L/DVB (8705): gspca: Adjust some control limits in spca561.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:36:45 -03:00
Jean-Francois Moine d698dc6b04 V4L/DVB (8703): gspca: Do controls work for spca561 revision 12a.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:36:44 -03:00
Andy Walls 0058717a1e V4L/DVB (8701): cx18: Add missing lock for when the irq handler manipulates the queues
cx18: Add missing lock for when the irq handler manipulates the queues.  This
was a potential source of stream queue corruption.  Also changed the name of
cx18_queue_find_buf() to cx18_queue_get_buf_irq().

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:36:43 -03:00
Henrik Kretzschmar 46f2c21cfd V4L/DVB (8682): V4L: fix return value of register video func
If a wrong device type is used with video_register_device_index() it should
better return an error number, instead of a constant.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:42 -03:00
Alexander Beregalov b045979d61 V4L/DVB (8681): v4l2-ioctl.c: fix warning
drivers/media/video/v4l2-ioctl.c:496: warning: format '%08ld' expects
type 'long int', but argument 5 has type 'suseconds_t'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:41 -03:00
Adrian Bunk c7087f56a4 V4L/DVB (8678): Remove the dead CONFIG_RADIO_MIROPCM20{,_RDS} code
The CONFIG_RADIO_MIROPCM20{,_RDS} code became dead code 1.5 years ago.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:40 -03:00
Jean-Francois Moine f75c4950bb V4L/DVB (8675): gspca: Pixmap PJPG (Pixart 73xx JPEG) added, generated by pac7311.
The JPEG frames generated by the Pixart 73xx have:
- special markers 'ff ff ff xx' every 1024/512 bytes,
- unused 8 bits at end of JPEG blocks,
and then ask for a new pixel format.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:39 -03:00
Jean-Francois Moine 6ab0b174d2 V4L/DVB (8674): gspca: Webcam 0c45:612e added in sonixj.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:38 -03:00
Jean-Francois Moine 285a4f6c8e V4L/DVB (8673): gspca: Bad frame scanning again and bad init in pac7311.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:37 -03:00
Jean-Francois Moine 7879d459f1 V4L/DVB (8672): gspca: Big rewrite of spca561.
Bug register/value inversions in USB exchanges.
Exposure and gain controls added for rev 12a.
Separate the functions and controls of the revisions 12a and 72a.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:36 -03:00
Jean-Francois Moine a0b508c2d7 V4L/DVB (8671): gspca: Remove the unused field 'dev_name' of the device structure.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:35 -03:00
Jean-Francois Moine 6c9d3c59e6 V4L/DVB (8669): gspca: Add white balance control for spca561 rev 012A.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:34 -03:00
Jean-Francois Moine 5bb0f21a46 V4L/DVB (8668): gspca: Conflict GSPCA / ET61X251 for the webcam 102c:6251.
Fix a double handling of 102c:6251 and no handling of 102c:6151
when both drivers GSPCA and ET61X251.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:33 -03:00
Hans de Goede 3466234229 V4L/DVB (8667): gspca: Bad probe of Z-Star/Vimicro webcams with pas106 sensor.
This patch moves the detection of the 2wr SIF pas106b sensor to before
detecting other sensors.
Patch change by jfm: Check SIF for identified webcams only.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:32 -03:00
Jean-Francois Moine 8559e8da31 V4L/DVB (8666): gspca: Bad scanning of frames in pac7311.
The previous change in packet scanning did not work,
Also, autogain was no more treated at interrupt level.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:31 -03:00
Jean-Francois Moine 9d5c1251bf V4L/DVB (8665): gspca: Fix the 640x480 resolution of the webcam 093a:2621.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:30 -03:00
Jean-Francois Moine 49b57dba2f V4L/DVB (8664): gspca: The bridge/sensor of the webcam 093a:2621 is a PAC 7302.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:29 -03:00
Jean-Francois Moine d2d16e9084 V4L/DVB (8663): gspca: Webcam 0c45:6128 added in sonixj.
Patch adapted from a patch to gspcav1 made by the google microdia group.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:28 -03:00
Jean-Francois Moine 23d9e4776b V4L/DVB (8661): gspca: Bug in the previous changeset about pac7311.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:27 -03:00
Jean-Francois Moine e52a5574de V4L/DVB (8660): gspca: Simplify the scan of URB packets in pac7311.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:26 -03:00
Hans Verkuil d526afe06b V4L/DVB (8648): ivtv: improve CC support
- change the work-queue to a single threaded high prio workqueue
- use DMA instead of PIO for the sliced VBI data.
- remove some incorrect tests
- increase the internal VBI capture queue size for sliced VBI packets
- ignore duplicate VBI lines

With these changes it should finally be possible to get reliable closed
captions.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:25 -03:00
Hans Verkuil c58dc0beaf V4L/DVB (8633): ivtv: update ivtv version number
Since for 2.6.27 ivtvfb uses DMA for write it is important that
you can identify which ivtv version supports this and which doesn't.
Increase the version number so we can tell the difference.

Thanks to Ian Armstrong for pointing this out to me.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:24 -03:00
Hans Verkuil 888fe747b5 V4L/DVB (8629): v4l2-ioctl: do not try to handle private V4L1 ioctls
Some drivers (e.g. zoran) have private V4L1 ioctls. Do not try to
pass them to v4l1_compat_translate because then the driver will
never see them.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:23 -03:00
Michael Krufky e908b6e34c V4L/DVB (8600): au0828: explicitly set 6 MHz IF frequency in hauppauge_hvr950q_config
Explicitly set 6 MHz IF frequency for VSB and QAM in
hauppauge_hvr950q_config.

The default value is 6 MHz, so this patch doesn't change anything --
this only improves code readability and may prevent future bugs.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:22 -03:00
Michael Krufky 3e3e2a8f1f V4L/DVB (8599): au8522: remove if frequency settings from vsb/qam modulation tables
Since IF frequency is set after the vsb/qam modulation tables are written,
remove the redundant register settings from the vsb/qam modulation tables.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:21 -03:00
Michael Krufky df76de098d V4L/DVB (8598): au8522: clean up function au8522_set_if
re-write this function to make it simpler

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:20 -03:00
Michael Krufky 8e8bd229ee V4L/DVB (8556): au0828: add support for Hauppauge Woodbury
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:19 -03:00