Commit Graph

6081 Commits (f3b8436ad9a8ad36b3c9fa1fe030c7f38e5d3d0b)

Author SHA1 Message Date
Andy Walls f7823f8f43 V4L/DVB (9513): cx18: Reduce number of mmio read retries
cx18: Reduce number of mmio read retries to improve performance.  Experiments
have shown 2 things: read retries never improve the result of a suspect mmio
read from the CX23418 (the result stays all 0xff's), and that most of the
suspected read failures are actually proper reads of values that should be
all 0xff's.  This change reduces the number of read retries and keeps the
count separate from write retries.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:00 -02:00
Manu Abraham f2e52cd176 V4L/DVB (9442): Revert back previous change to 90MHz
Note:
* At High Symbol Rates we do not have enouph machine cycles to handle the
  incoming symbols and hence might run into problems at the very end of the
  specified definition
* Most of the equations have been calculated for a master clock of 99 MHz,
  running at 90MHz, raises lot of issues such as the need to recalculate
  all of them , which is eventually very painful.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:00 -02:00
Manu Abraham 07b9bf7de5 V4L/DVB (9431): Bug ID #19: Diseqc works properly at 90MHz only on Cut 1.1 and 2.0
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:37:59 -02:00
Manu Abraham 697be0679e V4L/DVB (9425): Initialize at 90MHz itself
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:37:59 -02:00
Mauro Carvalho Chehab 8c2399895d V4L/DVB (9767): em28xx: improve board description messages
Print manufacturer/product info from USB device and also card entry.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:43 -02:00
Mauro Carvalho Chehab 6a18eaf61a V4L/DVB (9766): em28xx: improve probe messages
Prints usb speed used by em28xx interface. While there, fixes USB ID's
endiannes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:43 -02:00
Mauro Carvalho Chehab 017ab4b1e2 V4L/DVB (9765): em28xx: move tuner gpio's to the cards struct
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:43 -02:00
Mauro Carvalho Chehab 2fe3e2ee72 V4L/DVB (9764): em28xx: Add support for suspend the device when not used
Several chips may be turned off when the device is not used, like audio,
video and dvb demods. This patch adds a gpio callback at the core
structs to allow turning off such devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:43 -02:00
Mauro Carvalho Chehab f502e86184 V4L/DVB (9763): em28xx: fix gpio settings
A previous changeset moved gpio from em28xx struct into em28xx_board.
However, the driver were not updated to properly honor those gpio's.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:42 -02:00
Mauro Carvalho Chehab 1c67e76f71 V4L/DVB (9762): em28xx: fix tuner absent entries
Before this patch, several devices without tuner were kept the value 0
for tuner_type. However, this means TUNER_TEMIC_PAL. Replace those
entries for the proper TUNER_ABSENT value.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:42 -02:00
Mauro Carvalho Chehab a5942b5c26 V4L/DVB (9761): em28xx: replace magic numbers for mux aliases
Instead of using magic vmux/amux, let's use an alias where possible.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:42 -02:00
Mauro Carvalho Chehab 122b77e59e V4L/DVB (9760): em28xx: move gpio lines into board table description
Instead of a large, ugly switch specifying the gpio tables for each
device, let's move it into the boards struct. This also helps to see
what boards have already the gpio's for DVB.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:42 -02:00
Mauro Carvalho Chehab 0ec202d183 V4L/DVB (9759): em28xx: move gpio tables to the top of em28xx-cards
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:42 -02:00
Mauro Carvalho Chehab 2a29a0d770 V4L/DVB (9758): em28xx: replace some magic by register descriptions where known
Replaces all occurrences of em28xx_write_regs_req() and em28xx_write_reg()
used to setup register names by em28xx_write_reg().

Also, documents the register names that are known.

This patch were generated by this small perl script:

my %reg_map = (
	# Register table - the same as defined on parse_em28xx.pl script
);

while (<>) {
	if (m/(.*)em28xx_write_regs_req\(dev\,\s*0x00\,\s*(.*)\,\s*\"\\x(..)\",\s*1\)\;(.*)/) {
		my $reg = $2;
		my $val = $3;
		$val =~ tr/A-f/a-f/;
		$reg = $reg_map{$reg} if defined($reg_map{$reg});
		printf "$1em28xx_write_reg(dev, %s, 0x%s);$4\n", $reg, $val;
	} elsif (m/(.*)em28xx_write_regs\(dev\,\s*(.*)\,\s*\"\\x(..)\",\s*1\)\;(.*)/) {
		my $reg = $2;
		my $val = $3;
		$val =~ tr/A-f/a-f/;
		$reg = $reg_map{$reg} if defined($reg_map{$reg});
		printf "$1em28xx_write_reg(dev, %s, 0x%s);$4\n", $reg, $val;
	} else {
		print $_;
	}
}

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:42 -02:00
Mauro Carvalho Chehab c864405747 V4L/DVB (9755): em28xx: cleanup: We need just one tuner callback
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:42 -02:00
Mauro Carvalho Chehab 1bee0184f6 V4L/DVB (9754): em28xx: improve debug messages
Now, the first message states board names. Also, removed printing the alternate
settings by default. I2C messages are now clearer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:42 -02:00
Mauro Carvalho Chehab ec5de990d9 V4L/DVB (9753): em28xx: cleanup: saa7115 module auto-detects saa711x type
Since saa7115 has saa711x chip auto-detection, there's no need on differenciating
it at cards table. Just use the generic name for all boards that use a philips
saa711x decoder.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:41 -02:00
Mauro Carvalho Chehab 505b6d0b77 V4L/DVB (9752): Remove duplicated fields on em28xx_board and em28xx structs
Several fields are duplicated on both structs. Let's just copy em28xx_board instead.

A later cleanup could just copy the fields that are changed, in order to keep em28xx_board
const.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:41 -02:00
Mauro Carvalho Chehab d4d889e329 V4L/DVB (9751): em28xx: card description cleanups
Remove unused em28xx_board.vchannels and em28xx.video_channels.
Also, .is_em2800 = 0 is not needed, as all data is zeroed by kernel loader.

The table also included a notice that svideo weren't test on Hauppauge
USB2. Remove this notice, since this input also works properly.

Also, it does some whitespace cleanups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:41 -02:00
Mauro Carvalho Chehab a2070c6654 V4L/DVB (9747): em28xx: Properly handles XCLK and I2C speed
The previous patches removed XCLK and I2C magic. Now, we finally know
what those registers do. Also, only a very few cards need different
setups for those.

Instead of keeping the setups for those values inside the per-device
hack magic switch, move the uncommon values to the board-specific
struct, and have a common setup for all other boards.

So, almost 100 lines of hacking magic were removed.

A co-lateral effect of this patch is that it also fixes a bug at em28xx-core, where xclk
were set, without taking any care about not overriding a previous xclk setup.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:41 -02:00
Devin Heitmueller 6d676d8af8 V4L/DVB (9745): em28xx: Cleanup GPIO/GPO setup code
Cleanup the calls to set the GPIOs and GPOs for various devices,
replacing the register number with the #define from em28xx-reg.h and
converting over to using em28xx_write_reg()

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:41 -02:00
Devin Heitmueller 55927684e7 V4L/DVB (9744): em28xx: cleanup XCLK register usage
Convert over to setting the XCLK register usage with the new em28xx_write_reg()
function.

Thanks to Ray Lu from Empia for providing the em2860/2880 datasheet.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:41 -02:00
Uri Shkolnik 2f56c34b2b V4L/DVB (9740): sms1xxx: add USB suspend and hibernation support
This patch provides USB suspend and hibernation support
for Siano's SMS chipset based USB device

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-12-29 17:53:41 -02:00
Michael Krufky 7b29e10d60 V4L/DVB (9739): sms1xxx: enable signal quality indicator LEDs on Hauppauge WinTV MiniStick
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:41 -02:00
Michael Krufky 851a909143 V4L/DVB (9738): sms1xxx: fix invalid unc readings
Add function smsdvb_read_ucblocks to report uncorrectable error counts.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:41 -02:00
Michael Krufky 7a6fbed650 V4L/DVB (9736): sms1xxx: enable power LED on Hauppauge WinTV MiniStick
Enable power LED while the frontend is in use.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:40 -02:00
Michael Krufky 250fa674fd V4L/DVB (9735): sms1xxx: turn off LEDs after initialization of Hauppauge WinTV MiniStick
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:40 -02:00
Michael Krufky 3f7d99f65a V4L/DVB (9733): sms1xxx: add autodetection support for Hauppauge WinTV MiniCard
add USB IDs for Hauppauge WinTV MiniCard DVB-T

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:40 -02:00
Michael Krufky 76052bc868 V4L/DVB (9734): sms1xxx: add functions to configure and set gpio
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:40 -02:00
Mauro Carvalho Chehab c9455fbb15 V4L/DVB (9717): em28xx: improve message probing logs
On some em28xx devices, there's an unused interface. This is printed on
the logs as an error. We can just ignore that interface.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:40 -02:00
Jean-Francois Moine 6e4ae872c5 V4L/DVB (9713): gspca: Add the ov534 webcams in the gspca documentation.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:40 -02:00
Antonio Ospite fbb4c6d20f V4L/DVB (9712): gspca:Subdriver ov534 added.
The OmniVision OV534 is the USB bridge chip used in Sony Playstation EYE,
it is found also in other webcams like Hercules Blog Webcam and
Hercules Dualpix HD.
This driver is the port to gspca of a prototype driver by Mark Ferrell
based on vivi. The original code to initialize the camera and start the
capture is from Jim Paris on ps2dev.org, here integrated with the analysis
of the USB communications taken by the windows driver.

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-29 17:53:40 -02:00
Jean-Francois Moine a08d81af37 V4L/DVB (9711): gspca: Let gspca handle the webcams 045e:00f5 & 00f7 instead of sn9c102.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:40 -02:00
Jean-Francois Moine 342b4a2adf V4L/DVB (9709): gspca: Fix typos and name errors in Kconfig.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:39 -02:00
Jean-Francois Moine 1432f3062a V4L/DVB (9708): gspca: Do the sn9c105 - ov7660 work again in sonixj.
The sn9c105 and sn9c120 bridges must be differently programmed for the ov7660.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:39 -02:00
Hans de Goede d01823069f V4L/DVB (9706): gspca: Use the ref counting of v4l2 for disconnection.
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>
2008-12-29 17:53:39 -02:00
Erik Andrén 579ef87999 V4L/DVB (9703): Move the s5k4aa vflip quirk table to the main sensor file in order to avoid compilation errors on older kernels
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:39 -02:00
Erik Andrén 30881ab7b3 V4L/DVB (9702): Move the ov9650 vflip table to avoid compilation warnings on older kernels
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:39 -02:00
Erik Andrén 8eaaf4034f V4L/DVB (9701): Add a minor comment to the sensor init
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:39 -02:00
Erik Andrén 2ea487e2d0 V4L/DVB (9698): Add another vflip quirk for the s5k4aa
The msi gx7xx range of computers seem to be a strange lot with lots of different sys vendor names and differently oriented sensors. This commit adds another quirk for a range of them.

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:39 -02:00
Erik Andrén 9267b1e824 V4L/DVB (9696): Remove accidental typo
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:39 -02:00
Erik Andrén 000e177f78 V4L/DVB (9694): Indent the m5602 register definitions
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:38 -02:00
Erik Andrén d7280518ef V4L/DVB (9693): Remove some unused defines
The gspca conversion deprecated a number of defines. Remove them.

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:38 -02:00
Jean-Francois Moine 880ae24d35 V4L/DVB (9688): gspca: Reset the bulk URB status before resubmitting at irq level.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:38 -02:00
Hans de Goede 9a23f5fcb0 V4L/DVB (9687): gspca: Split brightness and red and blue balance in spca501.
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>
2008-12-29 17:53:38 -02:00
Hans de Goede bd131f38aa V4L/DVB (9686): gspca: Don't return the control values from the webcams in spca501.
The bridge takes some time to update after a write, so apps doing a quick
write/read can get the old value back.

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>
2008-12-29 17:53:38 -02:00
Hans de Goede cc043428e5 V4L/DVB (9685): gspca: Correct restart of webcams in spca501.
Currently the spca501 driver only works the first time used, then the cam needs
to be unplugged or the driver reloaded, this is because currently the data
which should be send each time the stream is started is send only once.
Likewise currently the data to initialize the cam is send from the probe
function, and thus will not get send after a suspend/resume.
This patch fixes this by sending both at the right time.

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>
2008-12-29 17:53:38 -02:00
Antonio Ospite dff369aad6 V4L/DVB (9682): gspca: New subdriver parameter 'bulk_nurbs'.
Some webcams with image transfer by bulk messages accept one or many
permanent bulk read.

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-29 17:53:38 -02:00
Jean-Francois Moine 6270330abe V4L/DVB (9681): gspca: Rewrite the exchanges with the sensor ov7648 of sonixj.
The new exchanges are adapted from MS-win traces and the webcams work better.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:38 -02:00
Jean-Francois Moine 821ced29a4 V4L/DVB (9680): gspca: Let gspca handle the webcam 0c45:613a instead of sn9c102.
The driver sn9c102 has no code for the ov7648 sensor.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:37 -02:00
Hans Verkuil c58701b263 V4L/DVB (9678): af9015: Cleanup switch for usb ID
It is much more readable to swap the byteorder in the switch rather
than in each case statement.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:37 -02:00
Dirk Heer 0558362571 V4L/DVB (9677): bttv: fix some entries on Phytec boards and add missing ones
This Patch does modify the bttv-cards.c and bttc.h so that the driver
supports VD-011, VD-012, VD-012-X1 and VD-012-X2 Framegrabber from
Phytec Messtechnik GmbH.

Signed-off-by: Dirk Heer <d.heer@phytec.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:37 -02:00
Mauro Carvalho Chehab 31e0530c32 V4L/DVB (9676): em28xx: fix a regression caused by 22c90ec6a5e07173ee670dc2ca75e0df0a7772c0
If removing and reiserting the driver on some devices, tuner type will
be unset at the second time. This patch fixes this issue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:37 -02:00
Mauro Carvalho Chehab 3ce6509456 V4L/DVB (9675): em28xx: devices with xc2028/3028 don't have tda9887
This patch cleans up the entries of xc2028/3028, since those devices
don't need or use a tda9887.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:37 -02:00
Mauro Carvalho Chehab 30e4ac7c03 V4L/DVB (9673): em28xx: fix Pixelview PlayTV board entry
Pixelview uses a Sigmatel stac codec. It has an external line out pin,
connected to AC97_MASTER_VOL. It also provides I2S output, but using a

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:37 -02:00
Mauro Carvalho Chehab e879b8ebb0 V4L/DVB (9672): Allow opening more than one output at the same time
Some devices use more than one AC97 outputs. This patch allows such
devices to properly work.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:37 -02:00
Mauro Carvalho Chehab 209acc0224 V4L/DVB (9671): em28xx: Add detection of Sigmatel Stac97xx series of AC97 devices
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:37 -02:00
Mauro Carvalho Chehab 35ae6f04ad V4L/DVB (9670): em28xx: allow specifying audio output
Some boards use different AC97 setups for output. This patch adds the
capability of specifying the output to be used. Currently, only one
output is selected, but the better is to allow user to select it via a
mixer, on alsa driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:37 -02:00
Mauro Carvalho Chehab f1990a9c39 V4L/DVB (9669): em28xx: Fix a stupid cut-and-paste error
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:36 -02:00
Oldrich Jedlicka bdf398eb09 V4L/DVB (9667): Fixed typo in sizeof() causing NULL pointer OOPS
Signed-off-by: Oldřich Jedlička <oldium.pro@seznam.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:36 -02:00
Alain Kalker 0537156f6c V4L/DVB (9665): af9015: Add support for the Digittrade DVB-T USB Stick remote
Adds support for the Digittrade DVB-T USB Stick remote.
As the Digittrade USB stick identifies itself as a generic Afatech AF9015
device, the remote cannot be autodetected. To enable it, add the following
to /etc/modprobe.d/dvb-usb-af9015 or /etc/modprobe.conf:

options dvb-usb-af9015 remote=4

Signed-off-by: Alain Kalker <miki@dds.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:36 -02:00
Laurent Pinchart 308bb52c19 V4L/DVB (9662): uvcvideo: Fix printk badness when printing ioctl names
Add a trailing newline character after calling v4l_printk_ioctl() to avoid
messing the kernel log up and merge the uvc_v4l2_ioctl message with the ioctl
name.

Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:36 -02:00
Laurent Pinchart 23867b2511 V4L/DVB (9661): uvcvideo: Commit streaming parameters when enabling the video stream
Sonix-based cameras seem to require the host to commit video streaming
parameters before selecting the alternate endpoint. While most applications
issue a VIDIOC_S_FMT ioctl before starting streaming, this is not required
by the V4L2 specification.

The problem has been noticed on Ubuntu 8.10 with applications using libv4l.
The library blocks VIDIOC_S_FMT calls when the requested format is identical
to the currently selected format. As the driver commits video streaming
parameters when initialising the device, only the first run of a
libv4l-enabled application would succeed.

For the sake of completeness, experiment showed that the camera keeps sending
12 bytes isochronous packets (header only, no data) without toggling the FID
bit if video streaming parameters haven't been committed before selecting the
alternate endpoint.

Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:36 -02:00
Michael Hennerich 9bc6218dc1 V4L/DVB (9660): uvcvideo: Fix unaligned memory access.
Use the unaligned memory access macros when accessing unaligned memory.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:36 -02:00
Laurent Pinchart 4d3939f6ee V4L/DVB (9659): uvcvideo: Use {get|set}_unaligned_le32 macros
Replace combination of endianess conversion and unaligned access macros with
{get|set}_unaligned_*.

Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:36 -02:00
Devin Heitmueller 23159a0bfc V4L/DVB (9658): em28xx: use em28xx_write_reg() for i2c clock setup
Convert the calls that write the i2c clock register over to the new
em28xx_write_reg() function that allows for or'ing bits

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:36 -02:00
Devin Heitmueller b697248994 V4L/DVB (9657): em28xx: add a functio to write on a single register
Introduce a new function that writes to a single register.  This is
useful because the vast majority of register writes are a single
register, and this format permits or'ing register value bits together.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:36 -02:00
Jelle Foks f8de18d430 V4L/DVB (9654): new email address
Please accept this patch to refer to my new email address

Signed-off-by: Jelle Foks <jelle@foks.us>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:35 -02:00
Mauro Carvalho Chehab 5faff78904 V4L/DVB (9653): em28xx: improve AC97 handling
AC97 devices provide several input and outputs. However, before this
patch, em28xx device weren't properly allowing the usage of ac97
possible combinations. Also, several input volumes were left untouched,
instead of making sure that the volumes were set on mute state.

This patch improves support for ac97 devices by allowing to use any
inputs, and making sure that unused inputs are set on mute state.

Yet, some work is still needed to select the AC97 output.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:35 -02:00
Mauro Carvalho Chehab 16c7bcadff V4L/DVB (9652): em28xx: merge AC97 vendor id's into a single var
This makes easier to identify vendor ID, since AC97 vendors are
generally identified by 3 bytes. The remaining byte is used by the
vendor to identify its devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:35 -02:00
Mauro Carvalho Chehab 35643943be V4L/DVB (9651): em28xx: Improve audio handling
This patch properly implements audio handling on em28xx. Before this
patch, it was assumed that every device has an Empia 202 audio chip.
However, this is not true.

After this patch, specific AC97 chipset setup and configurations can be
done.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:35 -02:00
Mauro Carvalho Chehab 8a5caa6bcb V4L/DVB (9650): em28xx: replace magic numbers to something more meaningful
audio mux entries were described by 0 and 1 magic numers. Use an enum
alias for each entry type.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:35 -02:00
Mauro Carvalho Chehab a42aa191cc V4L/DVB (9649): em28xx: remove two amux entries used only on one card
This patch parepares for an audio refactor patch that auto-detects ac97
chips.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:35 -02:00
Devin Heitmueller 5c2231c843 V4L/DVB (9648): em28xx: get audio config from em28xx register
Make use of the em28xx chip configuration register to determine whether
we have AC97 audio, I2S audio, or no audio support at all.

Thanks for Ray Lu from Empia for providing the em2860/em2880 datasheet.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:35 -02:00
Devin Heitmueller 67c96f6706 V4L/DVB (9644): em28xx: add em2750 to the list of known em28xx chip ids
Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:35 -02:00
Mauro Carvalho Chehab 8975111396 V4L/DVB (9643): em28xx: remove the previous register names
Previously, AC97 registers were named as if they were part of em28xx
device, generating some confusion. Replace such names for a more general
naming convention.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:35 -02:00
Mauro Carvalho Chehab 6fbcebf06a V4L/DVB (9642): Add AC97 registers found on em28xx devices
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:34 -02:00
Mauro Carvalho Chehab f09fb53075 V4L/DVB (9641): Add chip ID's for em2820 and em2840
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:34 -02:00
Julia Lawall 802971257a V4L/DVB (9638): drivers/media: use ARRAY_SIZE
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-12-29 17:53:34 -02:00
Harvey Harrison 292ee46107 V4L/DVB (9637): usb vendor_ids/product_ids are __le16
Noticed by sparse:
drivers/media/dvb/dvb-usb/af9015.c:756:25: warning: restricted __le16 degrades to integer
drivers/media/dvb/dvb-usb/af9015.c:744:28: warning: restricted __le16 degrades to integer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:34 -02:00
Harvey Harrison b3d8466fd0 V4L/DVB (9636): dvb: cinergyt2 annotate struct endianness, remove unused variable, add static
All noticed by sparse:
drivers/media/dvb/dvb-usb/cinergyT2-core.c:35:5: warning: symbol 'disable_remote' was not declared. Should it be static?
drivers/media/dvb/dvb-usb/cinergyT2-core.c:48:23: warning: symbol 'cinergyt2_usb_device' was not declared. Should it be static?
drivers/media/dvb/dvb-usb/cinergyT2-fe.c:160:15: warning: cast to restricted __le16
drivers/media/dvb/dvb-usb/cinergyT2-fe.c:190:9: warning: cast to restricted __le32
drivers/media/dvb/dvb-usb/cinergyT2-fe.c:208:9: warning: cast to restricted __le32
drivers/media/dvb/dvb-usb/cinergyT2-fe.c:227:24: warning: cast to restricted __le16
drivers/media/dvb/dvb-usb/cinergyT2-fe.c:275:12: warning: incorrect type in assignment (different base types)
drivers/media/dvb/dvb-usb/cinergyT2-fe.c:275:12:    expected unsigned short [unsigned] [assigned] [usertype] tps
drivers/media/dvb/dvb-usb/cinergyT2-fe.c:275:12:    got restricted __le16 [usertype] <noident>
drivers/media/dvb/dvb-usb/cinergyT2-fe.c:276:13: warning: incorrect type in assignment (different base types)
drivers/media/dvb/dvb-usb/cinergyT2-fe.c:276:13:    expected unsigned int [unsigned] [assigned] [usertype] freq
drivers/media/dvb/dvb-usb/cinergyT2-fe.c:276:13:    got restricted __le32 [usertype] <noident>

Cc: Thierry Merle <thierry.merle@free.fr>
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:34 -02:00
Devin Heitmueller 726cf2000b V4L/DVB (9633): Put s5h1411 into low power mode at end of attach() call
Place the s5h1411 into low power mode until first use (to handle the case where
the user plugs in the device and then doesn't use it for a while).  On the
Pinnacle 801e, this brings the power usage from 126ma down to 82ma.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:34 -02:00
Mauro Carvalho Chehab 66767920e3 V4L/DVB (9630): Some boards need to specify tuner address
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:34 -02:00
Devin Heitmueller 60245e858d V4L/DVB (9629): Add support for the ATI TV Wonder HD 600 USB Remote Control
Add support for the ATI TV Wonder HD 600 USB Remote Control
(required a new keymap)

[mchehab@redhat.com: Fix CodingStyle]
Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:34 -02:00
Devin Heitmueller 4b92253acc V4L/DVB (9628): em28xx: refactor IR support
Refactor the em28xx IR support based on the em2860/em2880 and em2874
datasheets.

Tested on the HVR-950 (em2883), Pinnacle 800e (em2883), Pinnacle 80e (em2874)
using the remote controls that came with those products.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:33 -02:00
Mauro Carvalho Chehab 0a6b8a851e V4L/DVB (9612): Fix key repetition with HVR-950 IR
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:33 -02:00
Mauro Carvalho Chehab 91812fa74f V4L/DVB (9611): em28xx: experimental support for HVR-950 IR
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:33 -02:00
Mauro Carvalho Chehab a924a499ad V4L/DVB (9607): em28xx: Properly implement poll support for IR's
The first em28xx were based on i2c IR's. However, some newer designs
are coming with a polling-based IR. Those are done by reading a register
set at em28xx.

This patch adds core polling support for those devices. Later patches will
add support for some device-specific IR's.

This patch adds the same basic IR polling code used by bttv, cx88 and saa7134, and
shares the common getkey masks defined at ir-common.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:33 -02:00
Mauro Carvalho Chehab 1958578da6 V4L/DVB (9591): v4l core: fix debug printk for enumberating framerates
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:33 -02:00
Devin Heitmueller 864ec0b7a0 V4L/DVB (9590): Add registration for Pinnacle 80e ATSC tuner
Add registration for Pinnacle 80e ATSC tuner

Register the em2874 based Pinnacle 80e device.  Note that support for this
device also requires the new drx-j driver (which is not available yet)

Thanks for Ray Lu from Empia for providing the em2874 datasheet.
Thanks to Joerg Schindler from Pinnacle for providing sample hardware.
Thanks to Rainer Miethling from Pinnacle for providing engineering support.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:32 -02:00
Devin Heitmueller ebef13d480 V4L/DVB (9589): Properly support capture start on em2874
Properly support capture start on em2874

The transport stream enable register moved in the em2874, so make it work
properly.

Thanks for Ray Lu from Empia for providing the em2874 datasheet.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:32 -02:00
Devin Heitmueller 24a613e4b0 V4L/DVB (9588): Don't load em28xx audio module for digital-only devices
Rework the logic so that the em28xx-alsa module does not get loaded for devices
that don't support analog audio (such as the em2874)

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:32 -02:00
Devin Heitmueller 95ea470574 V4L/DVB (9587): Handle changes to endpoint layout in em2874
Empia moved around their endpoint configuration in newer chips, so accommodate
the changes

Thanks for Ray Lu from Empia for providing the em2874 datasheet.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:32 -02:00
Devin Heitmueller 4924044495 V4L/DVB (9586): Fix possible null pointer dereference in info message
Fix case where we could end up dereferencing a NULL pointer if dev->vdev or
dev->vbi_dev were not set properly.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:32 -02:00
Devin Heitmueller a527c9f827 V4L/DVB (9585): Skip reading eeprom in newer Empia devices
Empia switched to a 16-bit addressable eeprom in newer devices.  While we
could certainly write a routine to read the eeprom, there is nothing of use
in there that cannot be accessed through registers, and there is the risk that
we could corrupt the eeprom (since a 16-bit read call is interpreted as a
write call by 8-bit eeproms).  So just be safe and bail out of the function.

Thanks for Ray Lu from Empia for providing the em2874 datasheet.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:32 -02:00
Devin Heitmueller 6a1acc3bc5 V4L/DVB (9584): Support different GPIO/GPO registers for newer devices
Empia moved the location of the GPIO/GPO registers in newer devices.  Add the
ability to specify the relocated registers (including caching of register
contents).

Thanks for Ray Lu from Empia for providing the em2874 datasheet.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:32 -02:00
Devin Heitmueller 600bd7f0ed V4L/DVB (9583): Remember chip id of devices at initialization
When setting up the device, remember the chip id, so we can control behavior
in the future without having to read the register continuously.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:32 -02:00
Devin Heitmueller 1ed1dd54b0 V4L/DVB (9582): Add a EM28XX_NODECODER option to the list of available decoders
Add a EM28XX_NODECODER option to the list of available decoders.  This option
becomes important for devices that do not have analog support.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:31 -02:00
Devin Heitmueller 65c9fd4609 V4L/DVB (9581): Remove unused variable from em28xx-audio.c
Remove unused variable from em28xx-audio.c

Fix warning for unused "ret" variable

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:31 -02:00
Devin Heitmueller 5caeba045c V4L/DVB (9580): Add chip id for em2874 to list of known chips
Add em2874 chip id

Add chip id for em2874 to list of known chips

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:31 -02:00
Mauro Carvalho Chehab a56a18c3ed V4L/DVB (9579): v4l core: a few get ioctls were lacking memory clean
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:31 -02:00
Mauro Carvalho Chehab 74d83fa024 V4L/DVB (9578): v4l core: add support for enumerating frame sizes and intervals
video_ioctl2 lacks implementation of those two ioctls:
	- VIDIOC_ENUM_FRAMESIZES and VIDIOC_ENUM_FRAMEINTERVALS

Adds implementation for those.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:31 -02:00
Darron Broad f3f741e711 V4L/DVB (9577): saa7134-dvb: MFE attachment clean-up for saa-7134 dvb
This cleans-up MFE attachment for saa-7134 dvb
devices.

note: MFE is not fully implemented here yet.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:31 -02:00
Darron Broad 60a5a92759 V4L/DVB (9576): cx88-dvb: MFE attachment clean-up for HVR-3000/4000
This cleans-up MFE attachment for these cards plus
two cases of potential memory leak on attachment
failure.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:31 -02:00
Mauro Carvalho Chehab 2c9bcea1a1 V4L/DVB (9572a): Whitespace cleanup
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:31 -02:00
Laurent Pinchart 44f0079ec7 V4L/DVB (9570): uvcvideo: Handle failed video GET_{MIN|MAX|DEF} requests more gracefully
Failed requests will now generate a one-time warning message instead of the
usual "Failed to query..." error, which should be more user-friendly. The
driver will also recover automatically from failed GET_MIN/GET_MAX requests
when the device is half-broken without requiring the MINMAX quirk (fully
broken devices still need the quirk).

Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:31 -02:00
Jean-Francois Moine 7e21fda17e V4L/DVB (9563): gspca: Let gspca handle the webcam 0471:0328 instead of sn9c102.
According to http://bugzilla.kernel.org/show_bug.cgi?id=11997,
the driver sn9c102 does not work for this webcam.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:30 -02:00
Jean-Francois Moine 29fbdf3d94 V4L/DVB (9560): gspca: Let gspca handle the webcam 0c45:602c instead of sn9c102.
According to http://bugzilla.kernel.org/show_bug.cgi?id=11920,
the driver sn9c102 does not work for this webcam.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:30 -02:00
Frederic Cand 95c730beb2 V4L/DVB (9548): gspca: Fix Kconfig CodingStyle
Signed-off-by: Frederic Cand <frederic.cand@anevia.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:30 -02:00
Alexey Klimov 54b7b0deb4 V4L/DVB (9540): dsbr100: add disabled controls and fix version
Patch adds disabled controls in
v4l2_queryctrl struct. Also version of driver corrected.

--

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:30 -02:00
Alexey Klimov 04e0ffbbdd V4L/DVB (9539): dsbr100: add suspend and resume
This patch adds support for suspend and resume methods in driver.
Without this kradio and gnomeradio crashes during resume.
Also .supports_autosuspend in usb_driver struct set equal to 0 to avoid
suspending of module if usb_autosuspend enabled.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:30 -02:00
Mauro Carvalho Chehab f34253dfe6 V4L/DVB (9572): Whitespace cleanup
Some recent patches added a few bad whitespaces. Remove that.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:30 -02:00
Laurent Pinchart c9535db3d2 V4L/DVB (9569): uvcvideo: Sort the frame descriptors during parsing
The UVC specification does not require frame descriptors to be sorted by
bFrameIndex. At least one camera (145f:013e) is known not to sort the
descriptors properly, so they need to be sorted during parsing as the driver
then accesses them by index.

Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:30 -02:00
Laurent Pinchart 2f38483bc4 V4L/DVB (9568): uvcvideo: Add support for Lenovo Thinkpad SL500 integrated webcam
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:30 -02:00
Laurent Pinchart 562f0fed97 V4L/DVB (9567): uvcvideo: Add support for Samsung Q310 integrated webcam
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:30 -02:00
Jean-Francois Moine 1c44d81dbb V4L/DVB (9565): gspca: Remove empty lines in traces.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:29 -02:00
Jean-Francois Moine 53e745157b V4L/DVB (9562): gspca: Set the default frame rate to 30 fps for sensor ov764x in ov519.
This patch fixes the bad picture at low resolution (320x240).

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:29 -02:00
Jean-Francois Moine ac40b1fae5 V4L/DVB (9561): gspca: Cleanup the source of ov519.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:29 -02:00
Jean-Francois Moine 917118745a V4L/DVB (9553): gspca: Webcam 145f:013a added in pac207.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:29 -02:00
Jean-Francois Moine 2e0903b001 V4L/DVB (9552): gspca: Simplify the ISOC packet scanning in tv8532.
This patch
- makes unuseful the temporary buffers
- and also fixes the bad colors problem.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:29 -02:00
Frederic Cand 42ec3135b1 V4L/DVB (9548): gspca: Properly indent Kconfig
Signed-off-by: Frederic Cand <frederic.cand@anevia.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:29 -02:00
Jean-Francois Moine 240d3ad8ea V4L/DVB (9547): gspca: Version change.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:29 -02:00
Jean-Francois Moine ba13cca706 V4L/DVB (9546): gspca: Bad scanning of ISOC packets in tv8532.
- The scan function must know about empty packets.
- Packets starting with 0x80 must not be counted.
- Wrong size of the translated frame.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:29 -02:00
Jean-Francois Moine ff374747ce V4L/DVB (9545): gspca: Add a flag for empty ISOC packets.
- This flag is needed by some subdrivers as tv8532 for start
  of frame detection.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:29 -02:00
Jean-Francois Moine 8fe2f1d522 V4L/DVB (9544): gspca: Clear the bulk endpoint at starting time when bulk transfer.
- usb_clear_halt() added in gspca and removed in finepix.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:28 -02:00
Hans de Goede 5017c7bde4 V4L/DVB (9543): gspca: Adjust autoexpo values for cams with a vga sensor in sonixb.
- This patch makes sonixb.c strife to different values during autoexposure
  for sif versus vga sensors.

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>
2008-12-29 17:53:28 -02:00
Jean-Francois Moine 0cae89647e V4L/DVB (9541): gspca: Add infrared control for sonixj - mi0360.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:28 -02:00
Igor M. Liplianin 4cc0edff34 V4L/DVB (9537): Add TerraTec Cinergy S USB support
Add TerraTec Cinergy S USB support

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Acked-by: Thorsten Leupold <th86@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:28 -02:00
Vincent Pelletier 5cff91a033 V4L/DVB (9536): WinFast DTV2000 H: add support for missing analog inputs
Add support for the following inputs:
 - radio tuner
 - composite 1 & 2 (only 1 is physically available, but composite 2 is also
   advertised by windows driver)
 - svideo

Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:28 -02:00
Igor M. Liplianin 93f26c147b V4L/DVB (9535): cx88-dvb: Remove usage core->prev_set_voltage from cx24116 based cards.
Remove usage core->prev_set_voltage from cx24116 based cards,
as it does not make sense for the demod.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:28 -02:00
Igor M. Liplianin cd3cde1271 V4L/DVB (9534): cx88: Add support for Prof 6200 DVB-S PCI card
The card based on stv0299 or stv0288 demodulators.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:28 -02:00
Igor M. Liplianin 4b29631db3 V4L/DVB (9533): cx88: Add support for TurboSight TBS8910 DVB-S PCI card
The card based on stv0299 or stv0288 demodulators.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:28 -02:00
Mauro Carvalho Chehab 1f6340bd43 V4L/DVB (9532): Properly handle error messages during alsa registering
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:28 -02:00
Igor M. Liplianin 886134e4be V4L/DVB (9520): stb0899 Remove double .read_status assignment
Currently in stb0899 code  it appears double .read_status assignment
Send patch to fix it.

Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:27 -02:00
Andy Walls f4167342b5 V4L/DVB (9514): cx18: Fix PLL freq computation for debug display
cx18: Fix PLL freq computation for debug display.
The code to compute the PLL freq from register values was storing an
intermediate 56 bit result in a 32 bit type, causing a nonsense value to
be displayed.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:27 -02:00
Patrice Levesque bc13ae1122 V4L/DVB (9529): cx88: add a second PCI ID for ATI TV Wonder Pro
There's a second PCI identifier for the ATI TV WONDER PRO card
(0x1002:0x00f9).

Attached is a patch to kernel 2.6.27 that adds autodetection for this
version.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:27 -02:00
Antti Palosaari 163e9cd074 V4L/DVB (9526): af9015: add support for KWorld USB DVB-T TV Stick II (VS-DVBT 395U)
- add USB-ID 1b80:e396 for KWorld USB DVB-T TV Stick II (VS-DVBT 395U)

Thanks-to: Bo Hansen <bohans@online.no>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:27 -02:00
Jose Alberto Reguero c78de71ca3 V4L/DVB (9525): af9015: add support for AverMedia Volar X remote.
This patch add support for AverMedia Volar X remote.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:27 -02:00
Alan McIvor 2499abe710 V4L/DVB (9523): Increase number of BT8XX devices supported in a system
The BT8XX device driver currently only supports 16 such devices in a
system. This is too small for many surveillance applications. This
patch increases the number to 32.

Signed-off-by: Alan McIvor <alan.mcivor@reveal.co.nz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:27 -02:00
Alan McIvor 9be4daa09a V4L/DVB (9522): Increase number of SAA7134 devices supported in a system
The SAA7134 device driver currently only supports 8 such devices in a
system. This is too small for many surveillance applications. This
patch increases the number to 32.

Signed-off-by: Alan McIvor <alan.mcivor@reveal.co.nz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:27 -02:00
Kay Sievers af128a102c V4L/DVB (9521): V4L: struct device - replace bus_id with dev_name(), dev_set_name()
This patch is part of a larger patch series which will remove
the "char bus_id[20]" name string from struct device. The device
name is managed in the kobject anyway, and without any size
limitation, and just needlessly copied into "struct device".

To set and read the device name dev_name(dev) and dev_set_name(dev)
must be used. If your code uses static kobjects, which it shouldn't
do, "const char *init_name" can be used to statically provide the
name the registered device should have. At registration time, the
init_name field is cleared, to enforce the use of dev_name(dev) to
access the device name at a later time.

We need to get rid of all occurrences of bus_id in the entire tree
to be able to enable the new interface. Please apply this patch,
and possibly convert any remaining remaining occurrences of bus_id.

We want to submit a patch to -next, which will remove bus_id from
"struct device", to find the remaining pieces to convert, and finally
switch over to the new api, which will remove the 20 bytes array
and does no longer have a size limitation.

Thanks,
Kay

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:26 -02:00
Huang Weiyi 9b2fb337a1 V4L/DVB: remove unused #include <version.h>
The file(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  drivers/media/dvb/frontends/si21xx.c

This patch removes the said #include <version.h>.

Cc: Igor M. Liplianin <liplianin@tut.by>
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:26 -02:00
Alexey Klimov e60b022e13 V4L/DVB (9518): radio-mr800: remove warn, info and err messages
Patch removes warn(), err() and info() statements in
drivers/media/radio/radio-mr800.c, and place dev_warn, dev_info in right
places.
Printk changed on pr_info and pr_err macro. Also new macro
amradio_dev_warn defined. Name in usb driver struct changed on
MR800_DRIVER_NAME.

--

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Acked-by: David Ellingsworth <david@identd.dyndns.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:26 -02:00
Andy Walls ced07371d9 V4L/DVB (9512): cx18: Fix write retries for registers that always change - part 3.
cx18: Fix write retries for registers that always change - part 3.
Fix the io for the rest of the registers that will often not read back the
value just written.  Modified register readback checks to make sure the
intended effect was achieved without constantly rewriting the registers.
The one outstanding register remaining is 0xc72014 CX18_AUDIO_ENABLE, whose
behavior on writes I have yet to determine.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:26 -02:00
Hans Verkuil 48fc6bb37b V4L/DVB (9508): ivtv: enable tuner support for Yuan PG600-2
The Yuan PG600-2 has a working tuner, so this can be enabled.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:26 -02:00
Hans Verkuil 91121d9cfd V4L/DVB (9507): v4l: remove EXPERIMENTAL from several drivers
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:26 -02:00
Hans Verkuil b7496780e8 V4L/DVB (9504): dvbdev: fix typo causing 2.6.28 compile error
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:26 -02:00
Hans Verkuil f473bf76c7 V4L/DVB (9503): v4l: remove inode argument from video_usercopy
The inode argument was never used. Removing it from video_usercopy
brings the function pointer type of video_usercopy in line with similar
v4l2 functions, thus simplifying several drivers.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:26 -02:00
Hans Verkuil bef216b7ed V4L/DVB (9502): ov772x: CodingStyle improvements
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:26 -02:00
Darron Broad cbd8244106 V4L/DVB (9500): cx88-dvb: MFE attachment fix-up
MFE attachment fix-up

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:25 -02:00
Mauro Carvalho Chehab 5910e820cd V4L/DVB (9498): Simplify video standards enumeration
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:25 -02:00
Frederic CAND b84ca9f2a0 V4L/DVB (9497): tda9887/cx88: Adds SECAM/BGH standards
Adds secam bgh support

Signed-off-by: Frederic CAND <frederic.cand@anevia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:25 -02:00
Alan Cox d9b01449e7 V4L/DVB (9491): rationalise addresses to one common one
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:25 -02:00
Stephen Rothwell ac2657c10c V4L/DVB (9490): linux-next: v4l-dvb tree build failure
Today's linux-next build (x86_64 allmodconfig) failed like this:
drivers/media/dvb/dvb-core/dvbdev.c: In function 'dvb_register_device':
drivers/media/dvb/dvb-core/dvbdev.c:254: error: implicit declaration of function 'nums2minor'

Caused by commit f3d9182030d9655d9ffff33dfceb45b4a127b6ec ("V4L/DVB
(9361): Dynamic DVB minor allocation") which clearly has not even been
built with CONFIG_DVB_DYNAMIC_MINORS=y.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:25 -02:00
Kuninori Morimoto 08a66aea55 V4L/DVB (9488): Add ov772x driver
This patch adds ov772x driver that use soc_camera framework.
It was tested on SH Migo-r board.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:25 -02:00
Hans Verkuil d1f81da236 V4L/DVB (9484): v4l: rename compat_ioctl32.c to v4l2-compat-ioctl32.c
All core v4l sources should start with 'v4l2-'
This file was the last one for which this was not the case.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:25 -02:00
Manu Abraham da40b59305 V4L/DVB (9479): Wait for a maximum of 100mS
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:25 -02:00
Andy Walls 667d75e7c6 V4L/DVB (9474): cx18: Remove redundant block scope variable in cx18_probe() for sparse
cx18: Remove redundant block scope variable in cx18_probe() to eliminate sparse
build warning.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:24 -02:00
Kay Sievers a5f4c0ce68 V4L/DVB (9473): add DVB_DEVICE_NUM and DVB_ADAPTER_NUM to uevent
This allows udev to create proper device nodes without any
hacky shell scripts/programs to call, which guess these numbers
from the kernel device names.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:24 -02:00
FUJITA Tomonori 7b51a70cbf V4L/DVB (9472): dm1105: fix the misuse of pci_dma_mapping_error
pci_dma_mapping_error can't be used for pci_alloc_consistent
(pci_dma_mapping_error is for dma_map_single and dma_map_page).
pci_alloc_consistent returns NULL if the allocation fails.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:24 -02:00
Ales Jurik 20dafb3b06 V4L/DVB (9470): Disable PLL Loop while tuning
Signed-off-by: Ales Jurik <ajurik@quick.cz>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:24 -02:00
Manu Abraham 3f4009255b V4L/DVB (9469): Port STB0899 and STB6100
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:24 -02:00
Reinhard Nissl 9bb17eee39 V4L/DVB (9468): Miscellaneous fixes
- Fix a bitfield
 - Set gain appropriately
 - Slept for the wrong duration

Signed-off-by: Reinhard Nissl <rnissl@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:24 -02:00
Reinhard Nissl c615a27a53 V4L/DVB (9467): Fix runtime verbosity
Signed-off-by: Reinhard Nissl <rnissl@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:24 -02:00
Manu Abraham aa912921d8 V4L/DVB (9466): Bug: Fix incorrect Register definitions
Thanks to Robert Schlabbach <robert_s@gmx.net> for pointing this out

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:24 -02:00
Manu Abraham 9acfee56df V4L/DVB (9465): Fix incorrect IF_AGC Bitfield definition
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:24 -02:00
Manu Abraham 8f04c70fe2 V4L/DVB (9464): Remove unreferenced delivery
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:23 -02:00
Manu Abraham e399a78960 V4L/DVB (9463): Make delivery system standalone.
Eventhough the delivery system is made standalone, DVBFE_SET_DELSYS
needs to be set as the very first operation, for a multistandard frontend

Splitting delivery system out as a new ioctl, makes things a bit more
easier to understand.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:23 -02:00
Manu Abraham b91a7cb026 V4L/DVB (9462): Allow specifying clock per device
Optimizations galore: Blistering barnacles! The KNC1 and friends
like 90 Mhz clock much better rather than running at a higher
throttle, for almost similar hardware. he exact cause unknown,
possibly due to a lower voltage applied for the demod power supply.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:23 -02:00
Manu Abraham ef3052bc98 V4L/DVB (9461): Initialize SYSREG register
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:23 -02:00
Manu Abraham 54fb122d12 V4L/DVB (9460): Code Simplification
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:23 -02:00
Manu Abraham e94a4470b1 V4L/DVB (9459): We can now reduce the debug levels, just need to look at errors only.
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:23 -02:00
Manu Abraham 9a286097b0 V4L/DVB (9458): Bugfix: gate control needs to be handled
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:23 -02:00
Manu Abraham 40e8ce3dba V4L/DVB (9457): Optimization, Fix a Bug
* cut down some I/O operations by disabling "disable gate"
* budget_av was left with the gate open, thereby more susceptible
to RF interference due to I/O operations

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:23 -02:00
Manu Abraham ed3d150eac V4L/DVB (9456): Select STB0899, STB6100, TDA8261 for budget_ci and budget_av respectively.
Thanks to Marco Schluessler <marco@lordzodiac.de> for pointing it out

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:23 -02:00
Manu Abraham b359325d1e V4L/DVB (9455): Cleanup: remove some superfluous stuff and dead commented out code
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:22 -02:00
Manu Abraham 3d6a3bebda V4L/DVB (9454): Fix a compile warning
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:22 -02:00
Manu Abraham 85eabac439 V4L/DVB (9453): stb0899: fix compilation warnings
Cleanup/Optimization:
* Fix compile warnings
* The compile warnings helped to identify 2 unnecessary I/O operations

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:22 -02:00
Manu Abraham d681208650 V4L/DVB (9452): Fix invalid GCT mode
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:22 -02:00
Manu Abraham 18527bee91 V4L/DVB (9451): Bug! F/3 Clock domain was incorrectly used
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:22 -02:00
Manu Abraham 8be969b313 V4L/DVB (9450): Code Review: #4 Consolidate configurations
* Better readability
* Avoids duplication

Comments from Oliver Endriss <o.endriss@gmx.de>

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:22 -02:00
Reinhard Nissl 27713c8ba4 V4L/DVB (9449): Code Simplification: use do_div() instead
Signed-off-by: Reinhard Nissl <rnissl@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Reinhard Nissl 561374113e V4L/DVB (9448): Bug: fix array size
Bug: a string which contains 4 digits needs an array
of size 5. The fifth character will hold the terminating '\0'

Signed-off-by: Reinhard Nissl <rnissl@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Reinhard Nissl 6f6c268b0f V4L/DVB (9447): stb6100: improve rounding
Optimization: Round the requested value to achieve a
+/-1MHz error instead of +0/-2MHz

Signed-off-by: Reinhard Nissl <rnissl@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Reinhard Nissl 02ec9d8ff4 V4L/DVB (9446): Bug Fix an overflow in bandwidth calculation
Signed-off-by: Reinhard Nissl <rnissl@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Reinhard Nissl 89693b7d7b V4L/DVB (9445): Bug: Bandwidth calculation at upper and lower boundaries
Signed-off-by: Reinhard Nissl <rnissl@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Manu Abraham 043a68b36d V4L/DVB (9444): Initialize post process events to NULL
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Manu Abraham 763fbaf65a V4L/DVB (9443): Bug: Bandwidth calculation
Bug #1: The 5 tap equaliser is set to correct simple perturbations
like reflections on the IF cable for DVB-S. In the case of DVB-S2
a more powerful equalizer is used to correct the filter group delay
allowing the bandwidth to be reduced by a factor of 1/3

Bug #2: The ZIF tuner takes badwidth to be set in Hz

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Manu Abraham 27a330d124 V4L/DVB (9442): Revert back previous change to 90MHz
Note:
* At High Symbol Rates we do not have enouph machine cycles to handle the
  incoming symbols and hence might run into problems at the very end of the
  specified definition
* Most of the equations have been calculated for a master clock of 99 MHz,
  running at 90MHz, raises lot of issues such as the need to recalculate
  all of them , which is eventually very painful.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Manu Abraham 72f7841613 V4L/DVB (9441): Code simplification: clock is already initialized, no need to initialize again.
Thanks to Marko Schluessler <marco@lordzodiac.de> for pointing it out

Signed-off-by: Marko Schluessler <marco@lordzodiac.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Arvo Jarve d0a41e8f8f V4L/DVB (9440): Bug in previous commit
Signed-off-by: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Manu Abraham 1b792e05e9 V4L/DVB (9439): Bug! SFRL nibble got swapped
The Bug was found by Arvo Jarve <arvo@softshark.ee>

It was a wonder how it worked in the case with this bug,
STM verified this that this nibble was in fact insignificant
and can be ignored.

But still we need to fix all inconsistencies.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Arvo Jarve eadf29b941 V4L/DVB (9438): Bug! RTF is signed
Signed-off-by: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Manu Abraham ba8862a83f V4L/DVB (9437): Disable Symbol rate auto scan feature
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Manu Abraham 9efdd297bc V4L/DVB (9436): Fix a typo in the previous commit
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Manu Abraham b168e351a5 V4L/DVB (9435): Add post process interfaces
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Manu Abraham 947881a999 V4L/DVB (9434): Limit initial RF AGC gain
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Arvo Jarve 1e3d8abe6d V4L/DVB (9433): Limit bandwidth with a 3dB response fall
In this case, we will be sure that there exists a carrier
and the center frequency would be simply f1 - f2. In such
a circumstance, the TR loop is simplified to doing a simple
check for timing, rather than searching for the same.

Signed-off-by: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Arvo Jarve b2fe5c6b01 V4L/DVB (9432): Increment the AGC1 and AGC2 gain respectively, improves sensitivity slightly
Signed-off-by: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Manu Abraham ac8fdc47cc V4L/DVB (9431): Bug ID #19: Diseqc works properly at 90MHz only on Cut 1.1 and 2.0
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:19 -02:00
Arvo Jarve b655b6cbc9 V4L/DVB (9430): stb0899: avoid parameter overwriting
BUG! Setting CRL parameter overwrote the CR Algorithm type,
eventually leading to wrong search algorithm to be employed in
the DVB-S carrier loop optimization.

Symptom: Once the CR optimization stage is passed either way, in
a successful or failed manner, the very next carrier search will
fail, due to no Carrier Search Algorithm specified.

Signed-off-by: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:19 -02:00
Arvo Jarve 5dc1611cb2 V4L/DVB (9429): Add support for the Satelco Easywatch DVB-S2 PCI card
Signed-off-by: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:19 -02:00
Marko Schluessler 7d8f1e5764 V4L/DVB (9428): Fix: assignment of wrong values
Signed-off-by: Marko Schluessler <marco@lordzodiac.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:19 -02:00
Manu Abraham 7e4e8c52e3 V4L/DVB (9427): Code simplification: Sleep only for the required time interval.
* Saves 70 mS LOCK time on the STB6100 based
* Saves 100 mS LOCK time on the TDA8261 based

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:19 -02:00
Manu Abraham ddbee1c6e2 V4L/DVB (9426): Add a missing break
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:19 -02:00
Manu Abraham 3d16d19eff V4L/DVB (9425): Initialize at 90MHz itself
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:19 -02:00
Manu Abraham e0a28c95af V4L/DVB (9424): Deviation from the reference, pullup is 12k instead
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:19 -02:00
Manu Abraham c1f0ce2228 V4L/DVB (9423): Though insignificant, removes an unnecessary read of the LOCK_LOSS register,
which should have happenend in the DVB-S2 mode only, but reading it as it is
for the other delivery systems causes nothing to say but LOCK_LOST, which
just causes confusion amongst users.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham 0867f57185 V4L/DVB (9422): Bug: Fix a typo
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham 6efb0ffe09 V4L/DVB (9421): We must wait for the PLL to stabilize
Thanks to Peter for the in depth explanation

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham 417dd69de8 V4L/DVB (9420): return -EINVAL for invalid parameters
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham cf6efeb670 V4L/DVB (9419): Bug: unnecessary large current causes large phasor errors
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham 6199ceef8b V4L/DVB (9418): DVB_ATTACH for STB0899, STB6100, TDA8261
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham ae9902da96 V4L/DVB (9417): DVB_ATTACH for STB0899, STB6100, TDA8261
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham e0ee77acb1 V4L/DVB (9416): Hmmph, a proper calculation broke the working behaviour.
Need some thoughts, temporary for now ..

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham 6c1022cbc8 V4L/DVB (9414): Initialize DiSEqC
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham baa40e48d9 V4L/DVB (9413): Bug: Set Auxilliary Clock Register correctly
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:17 -02:00
Manu Abraham b11eb46344 V4L/DVB (9412): Fix tuner name and comment
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:17 -02:00
Manu Abraham 3479474b36 V4L/DVB (9411): Bug! Timing recovery was calculated for 99MHz not 90 MHz
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:17 -02:00
Manu Abraham c14eaedd6c V4L/DVB (9410): Bug: Missing reference clock definition
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:17 -02:00
Manu Abraham aa4a9e1ae0 V4L/DVB (9409): Bug! inverted logic
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:17 -02:00
Manu Abraham f6e6382764 V4L/DVB (9408): tda8261: check status to avoid lock loss
We need to check for tuner LOCK LOSS, especially in the case of simple PLL's

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:17 -02:00
Manu Abraham d98c02859f V4L/DVB (9407): Optimizations Reduce capture range from 10MHz to 3Mhz
* Reduces szapping time a lot
* increased stability at Low Symbol rates
* overall increases reliability in tuning

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:17 -02:00
Marko Schluessler 421b2970d2 V4L/DVB (9406): Really silly bug, setting bandwidth into frequency
probably should stop fiddling with code late nights. :-(

Thanks to Marco for pointing it out and fixing it.

Signed-off-by: Marko Schluessler <marco@lordzodiac.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:17 -02:00
Manu Abraham e99d00cb17 V4L/DVB (9405): Practical tests show that the TT S2 3200 has I/Q inputs inverted, similar to the KNC1.
Don't have this hardware and cannot verify this for myself, but from the reports this
looks to be quite a reasonable and correct hypothesis.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:17 -02:00
Manu Abraham 7dd82f7473 V4L/DVB (9404): the KNC1 and clones also don't have the I/Q inputs swapped
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:16 -02:00
Manu Abraham 6ea223c20d V4L/DVB (9403): Fix the CA module not working issue
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:16 -02:00
Manu Abraham b48e2de3b2 V4L/DVB (9402): TT S2 3200 shouldn't need Inversion ON and Inversion AUTO at the same time
This is a racy situation.
Inversion is default OFF on the TT S2 3200 hardware,
unlike the KNC1 where it is default Inverted

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:16 -02:00
Manu Abraham ecdec31180 V4L/DVB (9401): Code Simplification
Use an enumeration for I/Q Swap rather than an int,
easier to spot the nasty ones

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:16 -02:00
Manu Abraham db1d3b80b3 V4L/DVB (9400): stb6100: Code Simplification
The 2 callbacks created nothing more than confusion

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:16 -02:00
Manu Abraham a55bc84855 V4L/DVB (9399): some cleanups at budget-ci
Still messing up:
* Cleanup
* Use KNC1's default settings to startup with
* Add in tuner wrapper calls

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:16 -02:00
Marko Schluessler 9e0dc6606a V4L/DVB (9398): Initial support for the Technotrend TT S2 3200
Signed-off-by: Marko Schluessler <marco@lordzodiac.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:16 -02:00
Manu Abraham c7d85a2deb V4L/DVB (9397): fix some bugs at tda8261
Fix bug obviously, some enhancements as well

* enable i2c_gate before doing any transaction
* read is one single message with 2 words
* reduce sleep from 100mS to 20mS

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:16 -02:00
Manu Abraham de29eb8259 V4L/DVB (9396): Fix clocks at stb0899
Really silly! Disabled all clocks and expected it to run.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:16 -02:00
Manu Abraham 41e1151b33 V4L/DVB (9395): Add initial support for two KNC1 DVB-S2 boards
Add initial support for:
* KNC1 DVB-S2 Plus
* KNC1 DVB-S2 OEM (known as Satelco DVB-S2)

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Manu Abraham 0b8f15dceb V4L/DVB (9394): cache last successful state
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Manu Abraham 654dbad45d V4L/DVB (9393): Add TDA8261 to build
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Manu Abraham 00360205b9 V4L/DVB (9392): initial go at TDA8261 tuner
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Marko Schluessler 43498ade8a V4L/DVB (9391): Register definition bugs
Signed-off-by: Marko Schluessler <marco@lordzodiac.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Marko Schluessler 08bcdbec68 V4L/DVB (9390): Offset Freq has been set in reg
Signed-off-by: Marko Schluessler <marco@lordzodiac.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Marko Schluessler a18d43156a V4L/DVB (9389): Use kzalloc instead of kmalloc
Signed-off-by: Marko Schluessler <marco@lordzodiac.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Marko Schluessler 3e3263e665 V4L/DVB (9388): Reference Clock is in kHz
Signed-off-by: Marko Schluessler <marco@lordzodiac.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Manu Abraham 57ad94a635 V4L/DVB (9387): FIX: Write to the correct register
Thanks to Marko Schluessler <marco@lordzodiac.de> for pointing it out

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Manu Abraham d189f3ef9e V4L/DVB (9386): FIX: Add in missing inversion (should be ideally in the config struct)
Thanks to Marco Schluessler <marco@lordzodiac.de> for pointing it out

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham 381d804703 V4L/DVB (9384): FIX: register value is not reset to 0 after write
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham bb29cc6ffa V4L/DVB (9383): Let's neither sleep nor wakeup for now
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham 795b72b21a V4L/DVB (9382): Use a delay for tracking acquisition status
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham 54c358fc23 V4L/DVB (9381): On the KNC1 cards the CLOCK is clamped to a maximum limit of 90MHz, eventhough
not limited in hardware, this causes instabilities at a higher clock due to
issues such as thermal, also the divider wraps around, which causes the
demodulator core to actually run at a lower frequency. This needs to be
empirically tested whether it affects other cards. If found necessary, this
parameter needs to be moved out to the config struct such that it can be made
hardware dependant.

Reducing the CLOCK from 99MHz to 90MHz improved the acquisition time taken on
the KNC1 cards and hence such a change.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham b797c20616 V4L/DVB (9380): FIX: a possible division by zero
Thanks to Marko Schluessler <marco@lordzodiac.de>

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham b3332a983d V4L/DVB (9379): FIX: fix a bug in the charge pump setting
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham 040dcc3e51 V4L/DVB (9378): Add STB6100 Support
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham c46b656210 V4L/DVB (9377): Add STB6100 Support
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham e50e8e3338 V4L/DVB (9376): Add STB0899 to build
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:13 -02:00
Manu Abraham 8bd135bab9 V4L/DVB (9375): Add STB0899 support
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:13 -02:00
Mauro Carvalho Chehab f71f11ed46 V4L/DVB (9367): Move lgdt3304 driver to the proper place and allow it to compile
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:13 -02:00
Mauro Carvalho Chehab c2e591fcb7 V4L/DVB (9366): Move S921 driver to the proper place and allow it to compile
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:13 -02:00
Markus Rechberger 67ea14f250 V4L/DVB (9365): adding lgdt3304 based driver
lgdt3304.c:
    frontend driver for the lgdt3304 chip, this driver is not compatible
    with the lgdt330x.

Signed-off-by: Markus Rechberger <mrechberger@sundtek.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:13 -02:00
Markus Rechberger aa56cb9db0 V4L/DVB (9364): adding sharp s921 ISDB-T driver
s921_module.c:
    wrapper for the dvb frontend interface
    s921_core.c:
    core s921 1seg ISDB-T driver, everything is set to auto as much as possible
    in order to not require certain parameters which currently cannot be passed
    to the ISDB-T chip.

    ISDB-T support can be tested using dvbscan, dvbstream/snoop and mplayer
    Tested 1seg H264/aac stream with this driver using a custom linux
ISDB-T player

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:13 -02:00
Markus Rechberger 2c5aacc6c7 V4L/DVB (9363): tvp5150: add support to enable raw vbi
Signed-off-by: Markus Rechberger <mrechberger@sundtek.de>
[mchehab@redhat.com: Fix bad whitespaces]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:13 -02:00
Markus Rechberger a9dbe5dc2e V4L/DVB (9362): zl10353: add new register configuration for zl10353/especially 6mhz taiwan.
Signed-off-by: Markus Rechberger <mrechberger@sundtek.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:12 -02:00
Andreas Oberritter 5dd3f30710 V4L/DVB (9361): Dynamic DVB minor allocation
Implement dynamic minor allocation for DVB, to allow more than four
devices of the same type per adapter, based on drivers/usb/core/file.c.

Add a new config option, DVB_DYNAMIC_MINORS, to make use of this
feature, which defaults to no for backwards compatibility.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:12 -02:00
Huang Weiyi 568e9bb8d7 V4L/DVB: remove unused #include <version.h>
The file(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  drivers/media/dvb/dm1105/dm1105.c
  drivers/media/dvb/dvb-usb/dw2102.c

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:12 -02:00
Marco Schluessler 9962ac5331 V4L/DVB (9480): Fix frontend DVBFE_ALGO_CUSTOM Search
Issue: Currently, the DVBFE_ALGO_CUSTOM is called only at the first tuning.
After the first call, the status is never set to force a new tuning.

Signed-off-by: Marco Schluessler <marco@lordzodiac.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:12 -02:00
Manu Abraham f04c3ca8a2 V4L/DVB (9478): Fix: parameters not supplied in the search process
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:12 -02:00
Matthias Schwarzott f7c9bf96ad V4L/DVB (9477): Fix: Commit 9344 breaks tning of cx24123
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:12 -02:00
Arvo Jarve 7bcbdf386b V4L/DVB (9345): Add event with changed status only
Signed-off-by: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:12 -02:00
Manu Abraham c59e7870fd V4L/DVB (9344): DVB-Core update
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:12 -02:00
Jean-Francois Moine a12ca6a6e1 V4L/DVB (9691): gspca: Some cleanups at device register
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:12 -02:00
Linus Torvalds 0191b625ca Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits)
  net: Allow dependancies of FDDI & Tokenring to be modular.
  igb: Fix build warning when DCA is disabled.
  net: Fix warning fallout from recent NAPI interface changes.
  gro: Fix potential use after free
  sfc: If AN is enabled, always read speed/duplex from the AN advertising bits
  sfc: When disabling the NIC, close the device rather than unregistering it
  sfc: SFT9001: Add cable diagnostics
  sfc: Add support for multiple PHY self-tests
  sfc: Merge top-level functions for self-tests
  sfc: Clean up PHY mode management in loopback self-test
  sfc: Fix unreliable link detection in some loopback modes
  sfc: Generate unique names for per-NIC workqueues
  802.3ad: use standard ethhdr instead of ad_header
  802.3ad: generalize out mac address initializer
  802.3ad: initialize ports LACPDU from const initializer
  802.3ad: remove typedef around ad_system
  802.3ad: turn ports is_individual into a bool
  802.3ad: turn ports is_enabled into a bool
  802.3ad: make ntt bool
  ixgbe: Fix set_ringparam in ixgbe to use the same memory pools.
  ...

Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due
to the conversion to %pI (in this networking merge) and the addition of
doing IPv6 addresses (from the earlier merge of CIFS).
2008-12-28 12:49:40 -08:00
Linus Torvalds 81d6e59dab Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (132 commits)
  sh: oprofile: Fix up the module build.
  sh: add UIO support for JPU on SH7722.
  serial: sh-sci: Fix up port pinmux for SH7366.
  sh: mach-rsk: Use uImage generation by default for rsk7201/7203.
  sh: mach-sh03: Fix up pata_platform build breakage.
  sh: enable deferred io LCDC on Migo-R
  video: sh_mobile_lcdcfb deferred io support
  video: deferred io with physically contiguous memory
  video: deferred io cleanup
  video: fix deferred io fsync()
  sh: add LCDC interrupt configuration to AP325 and Migo-R
  sh_mobile_lcdc: use FB_SYS helpers instead of FB_CFB
  sh: split coherent pages
  sh: dma: Kill off ISA DMA wrapper.
  sh: Conditionalize the code dumper on CONFIG_DUMP_CODE.
  sh: Kill off the unused SH_ALPHANUMERIC debug option.
  sh: Enable skipping of bss on debug platforms for sh32 also.
  doc: Update sh cpufreq documentation.
  sh: mrshpc_setup_windows() needs to be inline.
  serial: sh-sci: sci_poll_get_char() is only used by CONFIG_CONSOLE_POLL.
  ...
2008-12-28 11:39:19 -08:00
Devin Heitmueller 231ffc9c07 V4L/DVB (9920): em28xx: fix NULL pointer dereference in call to VIDIOC_INT_RESET command
Fix a NULL pointer dereference that would occur if the video decoder tied to
the em28xx supports the VIDIOC_INT_RESET call (for example: the cx25840 driver)

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-23 09:13:50 -02:00
Paul Mundt af505b1eab media: sh_mobile_ceu_camera: Add HAVE_CLK dependency.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:52 +09:00
Magnus Damm a42b6dd69c sh: sh_mobile ceu clock framework support
Add clock framework support to the sh_mobile ceu and
adjust the board specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-12-22 18:42:51 +09:00
Hans Verkuil 3ca81a5525 V4L/DVB (9906): v4l2-compat: test for unlocked_ioctl as well.
The v4l_compat_ioctl32() function only tested for the presence of the
ioctl op, not for unlocked_ioctl. So it would always return an error
when used with drivers that use unlocked_ioctl instead of ioctl.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-16 16:43:59 -02:00
Mauro Carvalho Chehab 8b21c1e90e V4L/DVB (9885): drivers/media Kconfig's: fix bugzilla #12204
When the tuner modules were moved to common/tuners, a separate customize
option were added for tuners. However, the automatic selection of the
tuners were still using the older option.

This causes that the automatic selection to fail, if DVB_FE_CUSTOMISE is
selected. Also, since those tuners are now under MEDIA_TUNER_CUSTOMIZE
menu, if you unset MEDIA_TUNER_CUSTOMIZE, you can't manually select the
tuners.

This patch fixes this error by replacing DVB_FE_CUSTOMISE by
MEDIA_TUNER_CUSTOMIZE on all places were a tuner is selected.

The patch were generated by this small script:

for i in `find drivers/media -name Kconfig`; do
  cat $i|perl -ne 's/(MEDIA_TUNER.*)DVB_FE_CUSTOMISE/\1MEDIA_TUNER_CUSTOMIZE/; print $_' >a
  mv a $i
done

Also, manually reordered the tuner entries.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-16 16:43:59 -02:00
Jim Paris f86d4a9173 V4L/DVB (9875): gspca - main: Fix vidioc_s_jpegcomp locking.
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-16 16:43:58 -02:00
Antti Seppälä 11c6c7fb89 V4L/DVB (9781): [PATCH] Cablestar 2 I2C retries (fix CableStar2 support)
At some point the Flexcop driver was changed to support newer Flexcop cards.
These modifications however broke the detection of Cablestar 2 DVB-C cards.

The reason is that the earlier version of the driver used to retry
unsuccessful i2c operations. The demodulator of Cablestar 2 cards (stv0297)
seems to be very dependent on these retries and adding them back fixes
Cablestar detection.

This patch restores this behaviour for the CableStar2.

Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-16 16:43:58 -02:00
Devin Heitmueller 4b330bee66 V4L/DVB (9780): dib0700: Stop repeating after user stops pushing button
A user noticed that there would continue to be 4-6 keypresses even after the
user stopped holding down the button.  This was because we were not reading
the bulk pipe faster than the firmware was injecting information, which would
result in a backlog.

Make the query interval faster, and increase the number of cycles before we
start repeating to compensate.

Thanks to Knud Poulsen <knud.poulsen@nokia.com> for pointing this out.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-16 16:43:58 -02:00
Russell King 72aaf09fda Merge git://git.marvell.com/orion into devel 2008-12-13 09:12:51 +00:00
Wang Chen 0eade1f930 dvb: Kill directly reference of netdev->priv
Simply replace netdev->priv with netdev_priv().

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-03 21:13:13 -08:00
David S. Miller aa2ba5f108 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/ixgbe/ixgbe_main.c
	drivers/net/smc91x.c
2008-12-02 19:50:27 -08:00
Russell King c5b84b3bb0 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel
Conflicts:

	arch/arm/mach-pxa/pxa25x.c
2008-12-02 22:07:40 +00:00
Eric Miao 013132cae8 [ARM] pxa: move camera (QCI) registers definition out of pxa-regs.h
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
2008-12-02 14:42:37 +08:00
Mauro Carvalho Chehab a693b0cdba em28xx: remove backward compat macro added on a previous fix
commit 50f3beb50a fixed em28xx-alsa
locking schema. However, a backport macro was kept.

This patch removes the macro, since it is not needed for the module
compilation against upstream.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-01 18:04:14 -02:00
Hans Verkuil 484ab62c5e V4L/DVB (9748): em28xx: fix compile warning
Label fail_unreg is no longer used.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-01 17:12:57 -02:00
Douglas Schilling Landgraf faa3bd2e48 V4L/DVB (9743): em28xx: fix oops audio
Replaced usb_kill_usb for usb_unlink_usb
(wait until urb to fully stop require USB core to put the calling process to sleep).

Oops:
http://www.kerneloops.org/raw.php?rawid=71799&msgid=

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-01 17:09:42 -02:00
Russell King e0d8b13ae1 [ARM] pxa: don't pass a consumer clock name for devices with unique clocks
Where devices only have one consumer, passing a consumer clock ID
has no real benefit.  Remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-27 12:38:23 +00:00
Mauro Carvalho Chehab 50f3beb50a V4L/DVB (9742): em28xx-alsa: implement another locking schema
Instead of using a spinlock, it is better to call the proper pcm stream
locking schema.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-24 12:24:52 -02:00
Michael Krufky 7a8f4ccfd5 V4L/DVB (9732): sms1xxx: use new firmware for Hauppauge WinTV MiniStick
New firmware image brings enhanced tuning performance.

Firmware is available for download at the following location:
http://www.steventoth.net/linux/sms1xxx

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-24 12:17:33 -02:00
Jean-Francois Moine e07a1d8ab2 V4L/DVB (9691): gspca: Move the video device to a separate area.
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.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-24 12:01:38 -02:00
Jean-Francois Moine 5c4fa002b1 V4L/DVB (9690): gspca: Lock the subdrivers via module_get/put.
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.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-24 12:01:23 -02:00
Jean-Francois Moine 98522a7be9 V4L/DVB (9689): gspca: Memory leak when disconnect while streaming.
As a side effect, the sd routine stop0 is called on disconnect.
This permits the subdriver to free its resources.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-24 12:01:07 -02:00
Mauro Carvalho Chehab 818a557eeb V4L/DVB (9668): em28xx: fix a race condition with hald
Newer versions of hald tries to open it to call QUERYCAP.

Due to the lack of a proper locking, it is possible to open the device
before it finishes initialization.

This patch adds a lock to avoid this risk, and to protect the list of
em28xx devices.

While here, remove the uneeded BKL lock.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20 18:12:02 -02:00
Jose Alberto Reguero cce257109f V4L/DVB (9664): af9015: don't reconnect device in USB-bus
Don't reconnect device in the USB-bus. Reconnect command was not
executed every time by device firmware and that causes harm.
Reconnection is not needed so remove it.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20 18:07:31 -02:00
Mauro Carvalho Chehab f2a2e49105 V4L/DVB (9647): em28xx: void having two concurrent control URB's
Now that we have a polling task for IR, there's a race condition, since
IR can be polling while other operations are being doing. Also, we are
now sharing the same urb_buf for both read and write control urb
operations. So, we need a mutex.

Thanks to Davin Heitmueller <devin.heitmueller@gmail.com> for warning me.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20 17:20:14 -02:00
Mauro Carvalho Chehab c4a98793a6 V4L/DVB (9646): em28xx: avoid allocating/dealocating memory on every control urb
Before this patch, every register setup on em28xx were dynamically
allocating a temporary buffer for control URB's to be handled.

To avoid this ping-pong, use, instead a pre-allocated buffer.

Also, be sure that read control URB's also use the buffer, instead of
relying on a stack buffer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20 17:19:31 -02:00
Mauro Carvalho Chehab 625ff16794 V4L/DVB (9645): em28xx: Avoid memory leaks if registration fails
em28xx_init_dev() has some error conditions that are not properly
de-allocating dev var, nor freeing the device number for a future usage.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20 17:19:20 -02:00
David S. Miller 198d6ba4d7 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/isdn/i4l/isdn_net.c
	fs/cifs/connect.c
2008-11-18 23:38:23 -08:00
Devin Heitmueller 99afb989b0 V4L/DVB (9639): Make dib0700 remote control support work with firmware v1.20
The format for reading the IR controller changed in firmware 1.20.  It now
provides the events on bulk endpoint 1 instead of using a control request.

Support the new format, providing backward compatibility for users who might
be using older firmware.

Thanks to Patrick Boettcher <patrick.boettcher@desy.de> for providing the
required information on how the version 1.20 firmware works.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-16 23:57:53 -02:00
Harvey Harrison deaf53e3c8 V4L/DVB (9635): v4l: s2255drv fix firmware test on big-endian
Noticed by sparse:
drivers/media/video/s2255drv.c:2531:6: warning: restricted __le32 degrades to integer

Cc: Dean Anderson <dean@sensoray.com>
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-16 23:57:23 -02:00
Devin Heitmueller 41286d9725 V4L/DVB (9634): Make sure the i2c gate is open before powering down tuner
It is not safe to assume that the i2c gate will be open before issuing the
command to power down the tuner.  In fact, many demods only open the gate
long enough to issue the tuning command.

This fix allows power management to work properly for those tuners behind an
i2c gate (in my case the problem was with the HVR-950Q)

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-16 23:57:13 -02:00
Devin Heitmueller 3f9b46c154 V4L/DVB (9632): make em28xx aux audio input work
The attached patch makes the em28xx auxillary audio input work.
Tested with the HVR-950.

em28xx: make auxillary audio input work

The tuner audio input was working but the aux input wasn't.  Tested with
the HVR-950.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-16 23:56:25 -02:00
Devin Heitmueller 3fa37deb1a V4L/DVB (9631): Make s2api work for ATSC support
ATSC should be considered a legacy delivery system, or else fields such as
p->u.vsb.modulation do not get populated (resulting in set_frontend failures)

Cc: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-16 23:56:11 -02:00
Mauro Carvalho Chehab c41109fc9a V4L/DVB (9627): em28xx: Avoid i2c register error for boards without eeprom
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-16 23:55:48 -02:00
Igor M. Liplianin df4533af7f V4L/DVB (9608): Fix section mismatch warning for dm1105 during make
--

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-16 23:55:05 -02:00
Douglas Schilling Landgraf 4faf1004c3 V4L/DVB (9605): usb-urb: fix memory leak
Free allocated memory

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-16 23:54:48 -02:00
Douglas Schilling Landgraf 7935eeae79 V4L/DVB (9604): ttusb_dec: fix memory leak
Free allocated memory

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-16 23:54:44 -02:00
Douglas Schilling Landgraf b7ed785b5f V4L/DVB (9603): dvb-ttusb-budget: Add validation for ttusb_alloc_iso_urbs
Added validation for ttusb_alloc_iso_urbs

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-16 23:54:40 -02:00
Douglas Schilling Landgraf 11eb260a70 V4L/DVB (9602): dvb-ttusb-budget: Add NULL pointer validation
Added validation for NULL pointer

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-16 23:54:35 -02:00
Douglas Schilling Landgraf d7c31a1e75 V4L/DVB (9601): ttusb_dec: Add NULL pointer validation
Added validation for NULL pointer

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-16 23:54:29 -02:00
Mauro Carvalho Chehab 01a1a3cc1e V4L/DVB (9624): CVE-2008-5033: fix OOPS on tvaudio when controlling bass/treble
This bug were supposed to be fixed by 5ba2f67afb,
where a call to NULL happens.

Not all tvaudio chips allow controlling bass/treble. So, the driver
has a table with a flag to indicate if the chip does support it.

Unfortunately, the handling of this logic were broken for a very long
time (probably since the first module version). Due to that, an OOPS
were generated for devices that don't support bass/treble.

This were the resulting OOPS message before the patch, with debug messages
enabled:

tvaudio' 1-005b: VIDIOC_S_CTRL
BUG: unable to handle kernel NULL pointer dereference at 00000000
IP: [<00000000>]
*pde = 22fda067 *pte = 00000000
Oops: 0000 [#1] SMP
Modules linked in: snd_hda_intel snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device
snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_hwdep snd soundcore tuner_simple tuner_types tea5767 tuner
tvaudio bttv bridgebnep rfcomm l2cap bluetooth it87 hwmon_vid hwmon fuse sunrpc ipt_REJECT
nf_conntrack_ipv4 iptable_filter ip_tables ip6t_REJECT xt_tcpudp nf_conntrack_ipv6 xt_state nf_conntrack
ip6table_filter ip6_tables x_tables ipv6 dm_mirrordm_multipath dm_mod configfs videodev v4l1_compat
ir_common 8139cp compat_ioctl32 v4l2_common 8139too videobuf_dma_sg videobuf_core mii btcx_risc tveeprom
i915 button snd_page_alloc serio_raw drm pcspkr i2c_algo_bit i2c_i801 i2c_core iTCO_wdt
iTCO_vendor_support sr_mod cdrom sg ata_generic pata_acpi ata_piix libata sd_mod scsi_mod ext3 jbdmbcache
uhci_hcd ohci_hcd ehci_hcd [last unloaded: soundcore]

Pid: 15413, comm: qv4l2 Not tainted (2.6.25.14-108.fc9.i686 #1)
EIP: 0060:[<00000000>] EFLAGS: 00210246 CPU: 0
EIP is at 0x0
EAX: 00008000 EBX: ebd21600 ECX: e2fd9ec4 EDX: 00200046
ESI: f8c0f0c4 EDI: f8c0f0c4 EBP: e2fd9d50 ESP: e2fd9d2c
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process qv4l2 (pid: 15413, ti=e2fd9000 task=ebe44000 task.ti=e2fd9000)
Stack: f8c0c6ae e2ff2a00 00000d00 e2fd9ec4 ebc4e000 e2fd9d5c f8c0c448 00000000
       f899c12a e2fd9d5c f899c154 e2fd9d68 e2fd9d80 c0560185 e2fd9d88 f8f3e1d8
       f8f3e1dc ebc4e034 f8f3e18c e2fd9ec4 00000000 e2fd9d90 f899c286 c008561c
Call Trace:
 [<f8c0c6ae>] ? chip_command+0x266/0x4b6 [tvaudio]
 [<f8c0c448>] ? chip_command+0x0/0x4b6 [tvaudio]
 [<f899c12a>] ? i2c_cmd+0x0/0x2f [i2c_core]
 [<f899c154>] ? i2c_cmd+0x2a/0x2f [i2c_core]
 [<c0560185>] ? device_for_each_child+0x21/0x49
 [<f899c286>] ? i2c_clients_command+0x1c/0x1e [i2c_core]
 [<f8f283d8>] ? bttv_call_i2c_clients+0x14/0x16 [bttv]
 [<f8f23601>] ? bttv_s_ctrl+0x1bc/0x313 [bttv]
 [<f8f23445>] ? bttv_s_ctrl+0x0/0x313 [bttv]
 [<f8b6096d>] ? __video_do_ioctl+0x1f84/0x3726 [videodev]
 [<c05abb4e>] ? sock_aio_write+0x100/0x10d
 [<c041b23e>] ? kmap_atomic_prot+0x1dd/0x1df
 [<c043a0c9>] ? enqueue_hrtimer+0xc2/0xcd
 [<c04f4fa4>] ? copy_from_user+0x39/0x121
 [<f8b622b9>] ? __video_ioctl2+0x1aa/0x24a [videodev]
 [<c04054fd>] ? do_notify_resume+0x768/0x795
 [<c043c0f7>] ? getnstimeofday+0x34/0xd1
 [<c0437b77>] ? autoremove_wake_function+0x0/0x33
 [<f8b62368>] ? video_ioctl2+0xf/0x13 [videodev]
 [<c048c6f0>] ? vfs_ioctl+0x50/0x69
 [<c048c942>] ? do_vfs_ioctl+0x239/0x24c
 [<c048c995>] ? sys_ioctl+0x40/0x5b
 [<c0405bf2>] ? syscall_call+0x7/0xb
 [<c0620000>] ? cpuid4_cache_sysfs_exit+0x3d/0x69
 =======================
Code:  Bad EIP value.
EIP: [<00000000>] 0x0 SS:ESP 0068:e2fd9d2c

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-14 14:39:47 -02:00
Mauro Carvalho Chehab c6241b6c64 V4L/DVB (9623): tvaudio: Improve debug msg by printing something more human
Before the patch, the used ioctl were printed as an hexadecimal code,
hard to be understand without consulting the way _IO macros work.
Instead, use the V4L default handler for printing such errors into a way
that would be easier to understand.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-14 14:24:45 -02:00
Mauro Carvalho Chehab 41f5230f3f V4L/DVB (9622): tvaudio: Improve comments and remove a unneeded prototype
Some comments are not clear enough. Improve it to allow a better
understanding of the driver behavior.

While there, remove an unneeded struct prototype.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-14 14:24:45 -02:00
Mauro Carvalho Chehab 494264379d V4L/DVB (9621): Avoid writing outside shadow.bytes[] array
There were no check about the limits of shadow.bytes array. This offers
a risk of writing values outside the limits, overriding other data
areas.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-14 14:24:45 -02:00
Mauro Carvalho Chehab 81cb5c4f7f V4L/DVB (9620): tvaudio: use a direct reference for chip description
Instead of storing the pointer for the proper entry at chip description
table, the driver were storing an indirect reference, by using an index.
Better to reference directly the data.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-14 14:24:45 -02:00
Mauro Carvalho Chehab b4ab114cf7 V4L/DVB (9619): tvaudio: update initial comments
A driver used on several bttv boards since 2000 is not experimental
anymore ;) Remove it from the comments.

While there, update copyrights addind a quick note about the "recent"
updates since 2005.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-14 14:24:44 -02:00
Mauro Carvalho Chehab 099b7fcc77 V4L/DVB (9618): tvaudio: add additional logic to avoid OOPS
This patch checks for volume, bass, treble, set mode and get mode
callbacks before actually enabling the code that would use them.

Instead of aborting the driver for load, this patch will allow it to
load with a reduced number of functionatities.

This prevents OOPS if some board entry is missing a needed callback.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-14 14:24:44 -02:00
Mauro Carvalho Chehab dd03e970a1 V4L/DVB (9617): tvtime: remove generic_checkmode callback
generic_checkmode() were called, via a callback, for some tvaudio chips.
There's just one callback code used on all those boards. So, it makes no
sense on keeping this as a callback.

Since there were some OOPS reported on tvaudio on kerneloops.org, this
patch removes this callback, adding the code at the only place were it
is called: inside chip_tread. A flag were added to indicate the need for
a kernel thread to set stereo mode on cards that needs it.

Using this more direct approach simplifies the code, making it more
robust against human errors.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-14 14:24:44 -02:00
Mauro Carvalho Chehab af1a9951fc V4L/DVB (9616): tvaudio: cleanup - group all callbacks together
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-14 14:24:44 -02:00
Mauro Carvalho Chehab 04e6f99025 V4L/DVB (9615): tvaudio: instead of using a magic number, use ARRAY_SIZE
Also, the default standard is the first one. So, fix the comment at the
array.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-14 14:24:44 -02:00
Mauro Carvalho Chehab 5c65335103 V4L/DVB (9613): tvaudio: fix a memory leak
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-14 14:24:44 -02:00
David S. Miller 7e452baf6b Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/message/fusion/mptlan.c
	drivers/net/sfc/ethtool.c
	net/mac80211/debugfs_sta.c
2008-11-11 15:43:02 -08:00
Andy Walls 1d6782bda5 V4L/DVB (9516): cx18: Move DVB buffer transfer handling from irq handler to work_queue
cx18: Move DVB buffer transfer handling from irq handler to work_queue thread.
In order to properly lock the epu2cpu mailbox for driver to CX23418 commands,
the DVB/TS buffer handling needs to be moved from the IRQ handler and IRQ
context to a work queue.  This work_queue implmentation is strikingly similar
to the ivtv implementation - for better or worse.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:33 -02:00
Jean-Francois Moine c9ff1b689a V4L/DVB (9557): gspca: Small changes for the sensor HV7131B in zc3xx.
- touch only one register for brightness change
- no quality control
- don't probe again at streamon time.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:32 -02:00
Jean-Francois Moine 03bf75654c V4L/DVB (9556): gspca: Bad init sequence for sensor HV7131B in zc3xx.
This patch fixes the H flip and the R & B color inversion of mode 320x240.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:32 -02:00
Krzysztof Helt 93d0f0385a V4L/DVB (9549): gspca: Fix a typo in one of gspca chips name.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:31 -02:00
Andy Walls 465f8a805d V4L/DVB (9515): cx18: Use correct Mailbox IRQ Ack values and misc IRQ handling cleanup
cx18: Use correct Mailbox IRQ Ack values and misc IRQ handling cleanup.
The SCB field definitions for Ack IRQ's for mailboxes were inconsistent with
the bitmasks being loaded into those SCB fields and the SW2 Ack IRQ handling
logic.  Renamed fields in SCB to make things consistent and did misc IRQ
handling cleanups: removing legacy ivtv dma_reg_lock, HPU IRQ flags, etc.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:31 -02:00
Frederic CAND 17ff61cb20 V4L/DVB (9493): kconfig patch
Ok I made a patch that converts gspca kconfig file to a more standard=
one, with tabs + 2 white spaces, so that if a warning is added it still
compiles
please find it attached

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:30 -02:00
Antti Palosaari 349d042f34 V4L/DVB (9527): af9015: fix compile warnings
- use static to avoid compile warnings

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:30 -02:00
roel kluin 891bd1331e V4L/DVB (9524): af9013: fix bug in status reading
- ! has a higher precedence than &

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:29 -02:00
Andy Walls 4e6b61047d V4L/DVB (9511): cx18: Mark CX18_CPU_DE_RELEASE_MDL as a slow API call
cx18: Mark CX18_CPU_DE_RELEASE_MDL as a slow API call.
Give the encoder time to complete the MDL release before destroying the
encoder internal task.  This avoids an encoder lockup on the next digital
capture and error messages about buffers being returned for an inactive
encoder task handle.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:29 -02:00
Andy Walls f056d29eeb V4L/DVB (9510): cx18: Fix write retries for registers that always change - part 2.
cx18: Fix write retries for registers that always change - part 2.
Some registers, especially interrupt related ones, will never read
back the value just written.  Modified interrupt register readback
checks to make sure the intended effect was achieved.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:28 -02:00
Hans Verkuil 58ae1c2318 V4L/DVB (9506): ivtv/cx18: fix test whether modules should be loaded or not.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:28 -02:00
Darron Broad 1a8dc86db1 V4L/DVB (9499): cx88-mpeg: final fix for analogue only compilation + de-alloc fix
Final fix for when analogue only is selected
for compilation (ie, !CX88_DVB)

This tidies up previous fix and adds missing
de-alloc memory leak on fault (eg, if fe1 fails to alloc
where fe0 was allocated).

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:27 -02:00
Frederic CAND 9c8e0a260e V4L/DVB (9496): cx88-blackbird: bugfix: cx88-blackbird-mpeg-users
Allows multiple access to the mpeg device

Signed-off-by: Frederic CAND <frederic.cand@anevia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:27 -02:00
Frederic CAND a2482377c9 V4L/DVB (9495): cx88-blackbird: bugfix: cx88-blackbird-poll-fix
Starts encoder not only on a read call but also on a poll command.

Signed-off-by: Frederic CAND <frederic.cand@anevia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:27 -02:00
Akinobu Mita dec0c46ac2 V4L/DVB (9494): anysee: initialize anysee_usb_mutex statically
anysee_usb_mutex is initialized at every time the anysee device is probed.
If the second anysee device is probed while anysee_usb_mutex is locked by
the first anysee device, the mutex is broken.

This patch fixes by initialize anysee_usb_mutex statically rather
than initialize at probe time.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:26 -02:00
Daniel J Blueman 8268c8f545 V4L/DVB (9492): unplug oops from dvb_frontend_init...
When inadvertently hot-unplugging a WT-220U USB DVB-T receiver with
2.6.24, I was met with an oops [1]. The problem is relevant to
2.6.25/26-rc also.

dvb_frontend_init() was called either from re-creation of the kdvb-fe0
thread - seems unlikely, or someone called
dvb_frontend_reinitialise(), causing this path in the thread - really
unlikely, as I can't find any call-site for it.

Either way, quite a number of drivers call dvb_usb_generic_rw() [2]
without checking the validity of the relevant member in the
dvb_usb_device struct - which had changed. Having dvb_usb_generic_rw()
sanity-check and fail (rather than loading from 0x120) seems
reasonable defensive programming [3], in light of it being called in
this way.

The problem with this, is that drivers don't check the return code of
the init call [4]. Does it make sense to cook a patch which allows the
failure to be propagated back up, or am I missing something else?

Thanks,
  Daniel

<whoops, hot unplug>

[83711.538485] dvb-usb: bulk message failed: -71 (1/0)
[83711.538875] dvb-usb: bulk message failed: -71 (1/0)
[83711.538899] usb 7-5: USB disconnect, address 3
[83711.538905] dvb-usb: bulk message failed: -22 (1/0)
[83711.538924] dvb-usb: bulk message failed: -22 (1/0)
[83711.538943] dvb-usb: bulk message failed: -22 (1/0)
[83711.588979] dvb-usb: bulk message failed: -22 (1/0)
[83711.589031] dvb-usb: bulk message failed: -22 (1/0)
[83711.589078] dvb-usb: bulk message failed: -22 (1/0)
[83711.589122] dvb-usb: bulk message failed: -22 (1/0)
[83711.589167] dvb-usb: bulk message failed: -22 (1/0)
[83711.639233] dvb-usb: bulk message failed: -22 (1/0)
[83711.639282] dvb-usb: bulk message failed: -22 (1/0)
[83711.639330] dvb-usb: bulk message failed: -22 (1/0)
[83711.639374] dvb-usb: bulk message failed: -22 (1/0)
[83711.639421] dvb-usb: bulk message failed: -22 (1/0)
[83711.658391] dvb-usb: bulk message failed: -22 (1/0)
[83768.174281] dvb-usb: bulk message failed: -22 (2/-32512)
[83768.174350] Unable to handle kernel NULL pointer
dereference<6>dvb-usb: WideView WT-220U PenType Receiver
(Typhoon/Freecom) successfully deinitialized and disconnected.
[83768.174459]  at 0000000000000120 RIP:
[83768.174459]  [<ffffffff88339b4f>] :dvb_usb:dvb_usb_generic_rw+0x2f/0x1a0
[83768.174580] PGD 0
[83768.174643] Oops: 0000 [1] SMP
[83768.174723] CPU 0
[83768.174782] Modules linked in: nfsd auth_rpcgss exportfs nfs lockd
nfs_acl sunrpc af_packet xt_length ipt_tos ipt_TOS xt_CLASSIFY sch_sfq
sch_htb ipt_MASQUERADE ipt_REDIRECT xt_limit xt_state xt_tcpudp
iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack iptable_mangle
iptable_filter ip_tables x_tables xfs sbp2 parport_pc lp parport loop
ftdi_sio usbserial evdev dvb_usb_dtt200u dvb_usb dvb_core i2c_core
sky2 iTCO_wdt iTCO_vendor_support snd_hda_intel shpchp snd_pcm
snd_timer snd_page_alloc snd_hwdep snd pci_hotplug soundcore ipv6
button intel_agp ext3 jbd mbcache sg sd_mod ata_generic pata_acpi ahci
ata_piix libata scsi_mod ohci1394 ieee1394 ehci_hcd uhci_hcd usbcore
e1000 thermal processor fan fbcon tileblit font bitblit softcursor
fuse
[83768.176968] Pid: 5732, comm: kdvb-fe-0 Not tainted 2.6.24-16-server #1
[83768.177009] RIP: 0010:[<ffffffff88339b4f>]  [<ffffffff88339b4f>]
:dvb_usb:dvb_usb_generic_rw+0x2f/0x1a0
[83768.177096] RSP: 0018:ffff810021939df0  EFLAGS: 00010286
[83768.177138] RAX: ffff81003bc7cc00 RBX: 0000000000000001 RCX: 0000000000000000
[83768.177181] RDX: 0000000000000001 RSI: ffff810021939e67 RDI: 0000000000000000
[83768.177223] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[83768.177267] R10: ffff810001009880 R11: 0000000000000001 R12: ffff81003c10b400
[83768.177311] R13: ffff81003c10b5b0 R14: ffff810021939ec0 R15: 0000000000000000
[83768.177354] FS:  0000000000000000(0000) GS:ffffffff805c3000(0000)
knlGS:0000000000000000
[83768.177409] CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
[83768.177449] CR2: 0000000000000120 CR3: 0000000000201000 CR4: 00000000000006e0
[83768.177491] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[83768.177534] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[83768.177576] Process kdvb-fe-0 (pid: 5732, threadinfo
ffff810021938000, task ffff81003bd1b7a0)
[83768.177629] Stack:  ffff81003e9b6828 0000000000000000
ffff8100378369f8 0000000000000000
[83768.177800]  ffff81003bd1b7a0 ffff810037836d48 ffff81003bc7cc30
ffff81003c10b400
[83768.177943]  ffff81003c10b5b0 ffff810021939ec0 ffff81003c10b5e0
ffffffff88342452
[83768.178054] Call Trace:
[83768.178130]  [<ffffffff88342452>] :dvb_usb_dtt200u:dtt200u_fe_init+0x22/0x30
[83768.178178]  [<ffffffff88339f6a>] :dvb_usb:dvb_usb_fe_wakeup+0x3a/0x50
[83768.178229]  [<ffffffff88325c41>] :dvb_core:dvb_frontend_init+0x21/0x70
[83768.178278]  [<ffffffff8832746b>] :dvb_core:dvb_frontend_thread+0x8b/0x370
[83768.178329]  [<ffffffff883273e0>] :dvb_core:dvb_frontend_thread+0x0/0x370
[83768.178382]  [<ffffffff80253e3b>] kthread+0x4b/0x80
[83768.178427]  [<ffffffff8020d198>] child_rip+0xa/0x12
[83768.178473]  [<ffffffff80253df0>] kthread+0x0/0x80
[83768.178514]  [<ffffffff8020d18e>] child_rip+0x0/0x12
[83768.178557]
[83768.178594]
[83768.178594] Code: 44 8b 87 20 01 00 00 49 89 f4 45 89 ce 45 85 c0
0f 84 ad 00
[83768.179167] RIP  [<ffffffff88339b4f>] :dvb_usb:dvb_usb_generic_rw+0x2f/0x1a0
[83768.179234]  RSP <ffff810021939df0>
[83768.179271] CR2: 0000000000000120
[83768.179419] ---[ end trace dba8483163cb1700 ]---

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:26 -02:00
Hans Verkuil 7c34158f20 V4L/DVB (9486): ivtv/ivtvfb: no longer experimental
Remove the EXPERIMENTAL tag.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:25 -02:00
Hans Verkuil 6a95ec5906 V4L/DVB (9485): ivtv: remove incorrect V4L1 & tvaudio dependency
ivtv used tvaudio in the past and at the time tvaudio required V4L1.
Since tvaudio is no longer dependent on V4L1 and since ivtv actually
no longer uses tvaudio at all, this is no removed from Kconfig.

Without this patch ivtv won't be build if V4L1 is disabled.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:25 -02:00
Tobias Lorenz 6aadf82eb8 V4L/DVB (9482): Documentation, especially regarding audio and informational links
This patch adds a recommendation to select SND_USB_AUDIO for listing and
adds a documentation file for si470x.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:24 -02:00
Andy Walls f3a3e881b8 V4L/DVB (9475): cx18: Disable write retries for registers that always change - part 1.
cx18: Disable write retries for registers that always change - part 1.
Interrupt related registers will likely not read back the value we just wrote.
Disable retries for these registers for now to avoid accidently discarding
interrupts.  More intelligent read back verification criteria are needed for
these and other registers (e.g. GPIO line registers), which will be addressed in
subsequent changes.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:24 -02:00
Jean Delvare 8182ff69f8 V4L/DVB (9372): Minor fixes to the saa7110 driver
* Apparently the author of the saa7110 driver was confused by the
  number of outputs returned by DECODER_GET_CAPABILITIES. Of course a
  decoder chip has no analog ouputs, but it must have at least one
  digital output.

* Fix an off-by-one error when checking the input value of
  DECODER_SET_INPUT.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:23 -02:00
Rafael Diniz b058e3f395 V4L/DVB (9368): VBI fix for cx88 cards
The attached patch fix VBI support cx88 card.
I'm running a capture for hours, getting the closed caption from it[1], and
it's working perfect - the output is the same of a bttv card.
Please apply this patch as soon as possible.

[1] - using zvbi-ntsc-cc of zvbi project.

Signed-off-by: Rafael Diniz <diniz@wimobilis.com.br>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:23 -02:00
Thierry MERLE bdb6ee3253 V4L/DVB (9358): CinergyT2: fix Kconfig typo
config\tDVB_USB_CINERGY_T2 causes the make_kconfig.pl to forget to enable by default the compilation of cinergyT2 module.

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:22 -02:00
Matthias Schwarzott 0e8bac9791 V4L/DVB (9357): cx88-dvb: Fix Oops in case i2c bus failed to register
There already is an report at kernel bugzilla about this issue:
http://bugzilla.kernel.org/show_bug.cgi?id=9455

When enabling extra checks for the i2c-bus of cx88 based cards by
loading i2c_algo_bit with bit_test=1 this may trigger an oops
when loading cx88_dvb.

This is caused by the extra check code that detects that the
sda-line is stuck high and thus does not register the i2c-bus.

cx88-dvb however does not check if the i2c-bus is valid and just
uses core->i2c_adap to attach dvb frontend modules.
This leads to an oops at the first call to i2c_transfer:

$ modprobe i2c_algo_bit bit_test=1
$ modprobe cx8802

cx88/2: cx2388x MPEG-TS Driver Manager version 0.0.6 loaded
cx88[0]: quirk: PCIPCI_NATOMA -- set TBFX
cx88[0]: subsystem: 0070:9202, board: Hauppauge Nova-S-Plus DVB-S [card=37,autodetected], frontend(s): 1
cx88[0]: TV tuner type 4, Radio tuner type -1
cx88[0]: SDA stuck high!
cx88[0]: i2c register FAILED
input: cx88 IR (Hauppauge Nova-S-Plus  as /class/input/input5
cx88[0]/2: cx2388x 8802 Driver Manager
cx88-mpeg driver manager 0000:00:10.2: enabling device (0154 -> 0156)
cx88-mpeg driver manager 0000:00:10.2: PCI INT A -> Link[LNKD] -> GSI 9 (level, low) -> IRQ 9
cx88[0]/2: found at 0000:00:10.2, rev: 5, irq: 9, latency: 64, mmio: 0xfb000000
cx8802_probe() allocating 1 frontend(s)
cx88/2: cx2388x dvb driver version 0.0.6 loaded
cx88/2: registering cx8802 driver, type: dvb access: shared
cx88[0]/2: subsystem: 0070:9202, board: Hauppauge Nova-S-Plus DVB-S [card=37]
cx88[0]/2: cx2388x based DVB/ATSC card
BUG: unable to handle kernel NULL pointer dereference at 00000000
IP: [<e084d4ef>] :i2c_core:i2c_transfer+0x1f/0x80
*pde = 00000000
Modules linked in: cx88_dvb(+) cx8802 cx88xx ir_common i2c_algo_bit tveeprom videobuf_dvb btcx_risc
mga drm ipv6 fscpos eeprom nfsd exportfs stv0299 b2c2_flexcop_pci b2c2_flexcop cx24123 s5h1420 ves1x93
dvb_ttpci dvb_core saa7146_vv saa7146 videobuf_dma_sg videobuf_core videodev v4l1_compat ttpci_eeprom
lirc_serial lirc_dev usbhid rtc uhci_hcd 8139too i2c_piix4 i2c_core usbcore evdev
Pid: 4249, comm: modprobe Not tainted (2.6.27-gentoo #3)
EIP: 0060:[<e084d4ef>] EFLAGS: 00010296 CPU: 0
EIP is at i2c_transfer+0x1f/0x80 [i2c_core]
EAX: 00000000 EBX: ffffffa1 ECX: 00000002 EDX: d6c71e3c
ESI: d80cd050 EDI: d8093c00 EBP: d6c71e20 ESP: d6c71e0c
DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:21 -02:00
Suresh Siddha d522af581c V4L/DVB (9356): [PATCH] saa7134: fix resource map sanity check conflict
Impact: driver could possibly stomp on resources outside of its scope

{mchehab@redhat.com: I got two versions of the same patch (identical,
except for whitespacing). One authored by Andy Burns and another
authored by Suresh Siddha. Due to that, I'm applying the one that has
less CodingStyle errors. I'm also adding both comments and the SOB's for
both patches, since they are both interesting}

Suresh Siddha commented:

  Alexey Fisher reported:

  > resource map sanity check conflict: 0xcfeff800 0xcff007ff 0xcfe00000
  > 0xcfefffff PCI Bus 0000:01

  BAR base is located in the middle of the 4K page and the hardcoded
  size argument makes the request span two pages causing the conflict.

  Fix the hard coded size argument in ioremap().

Andy Burns commented:

  I have already sent this patch on the linux-dvb list, but it didn't get
  much attention, so re-sending direct, I hope you all don't mind.

  While attempting to run mythtv in a xen domU, I encountered problems
  loading the driver for my saa7134 card, with an error from ioremap().

  This error was due to the driver allocating an incorrectly sized mmio
  area, which was trapped by xen's permission checks, but this would go
  un-noticed on a kernel without xen.

  My card has a 1K sized mmio area, I've had information that other cards
  have 2K areas, perhaps others have different sizes, yet the driver
  always attempts to map 4K.  I realise that the granularity of mapping is
  the page size, which typically would be 4K, but unless the card's base
  address happens to fall on a 4K boundary (mine does not) then the
  base+4K will end up spanning two pages, and this is when the error
  occurs under xen.

  My patch uses the pci_resource_len macro to determine the size required
  for the user's particular card, instead of the hardcoded 4K value. I've
  tested with a couple of printk() inside ioremap() that the start address
  and size do get rounded to the closest page boundary.

  With this patch I am able to successfully load the saa7134 driver and
  run mythtv under xen with my card, subject to correct pollirq settings
  in case of shared IRQ, I am still seeing occasional DMA panics, which I
  think are related to swiotlb handling by dom0/domU, usually the panic
  occurs when changing mux, once tuned to a mux, 12 hour continuous
  recordings are possible without errors.

Reported-by: Alexey Fisher <bug-track@fisher-privat.net>
Tested-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Andy Burns <andy@burns.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:21 -02:00
Jonathan Corbet 74084d33cb V4L/DVB (9355): de-BKL cafe_ccic.c
Remove lock_kernel() call from cafe_ccic.c

Commit d56dc61265 added lock_kernel()
calls to cafe_ccic.c.  But that driver was written with proper locking
and does not need the BKL, so take it back out.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:20 -02:00
Gregor Jasny c7f09db685 V4L/DVB (9352): Add some missing compat32 ioctls
This patch adds the missing compat ioctls that are needed to
operate Skype in combination with libv4l and a MJPEG only camera.

If you think it's trivial enough please submit it to -stable, too.

Signed-off-by: Gregor Jasny <gjasny@web.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:20 -02:00
Mauro Carvalho Chehab a24ddee36c V4L/DVB (9351): ibmcam: Fix a regression caused by a482f327ff
As reported by David Ellingsworth:
> I'm not sure if it matters or not, but the ibmcam driver in the
> Mauro's linux-2.6 git tree in the for_linus branch is currently
> broken.

uvd is equal to NULL during most of ibmcam_probe. Due to that, an OOPS is
generated at dev_info. This patch replaces uvd->dev->dev to dev->dev
inside this routine.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Reviewed-by: David Ellingsworth <david@identd.dyndns.org>
2008-11-11 08:11:19 -02:00
Alexey Klimov 69df96c3da V4L/DVB (9350): radio-si470x: add support for kworld usb radio
This patch add support for new device named KWorld USB FM Radio
SnapMusic Mobile 700 (FM700).
And changes few lines in comments.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:19 -02:00
Antoine Jacquet e62b47565a V4L/DVB (9348): dtv5100: add dependency on zl10353
Update Kconfig to add missing dependency on zl10353 for dtv5100 driver.

Signed-off-by: Antoine Jacquet <royale@zerezo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:18 -02:00
Manu Abraham 3b37a15c2d V4L/DVB (9346): Optimization: Enable gate in a symmetric/disciplined way,
rather than implementing different ways leading to confusion.

This allows multiple gate_enable/disable's in the tuner_read/write
functions, thereby lesser number of I/O operations throughout,
eventually leading to better results. As a side effect demods that
detect the STOP bit for auto closing of the gate can be avoided, thereby
a very minimal gain in disabling the auto detect feature as well.
Improves readability on the device control.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:18 -02:00
Johannes Berg 7c510e4b73 net: convert more to %pM
A number of places still use %02x:...:%02x because it's
in debug statements or for no real reason. Make a few
of them use %pM.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-27 17:47:26 -07:00
Darron Broad becd43056c V4L/DVB (9336): cx88: always de-alloc frontends on fault condition
De-alloc frontends on fault condition.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:32:12 -02:00
Darron Broad 878595f6e7 V4L/DVB (9335): videobuf: split unregister bus creating self-contained frontend de-allocator
This creates a self contained frontend de-allocator
for the instances where an adapter has not been
registered yet frontend de-allocation may
be required.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:32:08 -02:00
Darron Broad 0fcd488d8d V4L/DVB (9334): cx88: dvb_remove debug output
Add debug output for dvb_remove enter.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:32:03 -02:00
Mauro Carvalho Chehab 3007703db8 V4L/DVB (9333): cx88: Not all boards that requires cx88-mpeg has frontends
The multifrontend changes on cx88 assumed that all boards that use cx88-mpeg
supports DVB. This is not true. There also a few analog-only boards based on
Blackboard design that also uses cx88-mpeg. For those boards, there's no need
to allocate dvb frontends.

This patch fixes videobuf allocation for those devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:59 -02:00
Darron Broad 9212a572dd V4L/DVB (9332): cx88: initial fix for analogue only compilation
Initial fix for when analogue only is selected
for compilation (ie, !CX88_DVB)

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:55 -02:00
Mauro Carvalho Chehab 8a522c916d V4L/DVB (9331): Remove unused inode parameter from video_ioctl2
inode is never used on video_ioctl2. Remove it and rename the function to
__video_ioctl2. This allows its usage directly as a callback at
fops.unlocked_ioctl.

Since we still need a callback with inode to be used with fops.ioctl,
this patch adds video_ioctl2() that is just a call to __video_ioctl2().

Also, this patch adds some comments about video_ioctl2 and __video_ioctl2
usage at v4l2-ioctl.h.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:49 -02:00
Mauro Carvalho Chehab b1f88407f3 V4L/DVB (9330): Get rid of inode parameter at v4l_compat_translate_ioctl()
The inode parameter at v4l_compat_translate_ioctl() were just passed over several
places just to keep compatible with fops.ioctl. However, it weren't used anywere.

This patch gets hid of this unused parameter.

Cc: Laurent Pinchart <laurent.pinchart@skynet.be>
Cc: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:45 -02:00
Ian Armstrong 4e7ca40dbf V4L/DVB (9328): ivtvfb: FB_BLANK_POWERDOWN turns off video output
When using FBIOBLANK, FB_BLANK_POWERDOWN will now switch off the video output.
Since some televisions turn themselves off after a while with no signal, this
is the closest we can get to power-saving.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:41 -02:00
Hans Verkuil c6330fb86f V4L/DVB (9327): v4l: use video_device.num instead of minor in video%d
The kernel number of a v4l2 node (e.g. videoX, radioX or vbiX) is now
independent of the minor number. So instead of using the minor field
of the video_device struct one has to use the num field: this always
contains the kernel number of the device node.

I forgot about this when I did the v4l2 core change, so this patch
converts all drivers that use it in one go. Luckily the change is
trivial.

Cc: michael@mihu.de
Cc: mchehab@infradead.org
Cc: corbet@lwn.net
Cc: luca.risolia@studio.unibo.it
Cc: isely@pobox.com
Cc: pe1rxq@amsat.org
Cc: royale@zerezo.com
Cc: mkrufky@linuxtv.org
Cc: stoth@linuxtv.org
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:37 -02:00
Martin Dauskardt 323a491a29 V4L/DVB (9326): ivtv: avoid green flashing when loading ivtv
When loading ivtv the TV-out of the PVR-350 will flash green since the
saa712x is activated before the MPEG decoder has been initialized.

Deactivate the saa712x until the MPEG decoder has been initialized.

Signed-off-by: Martin Dauskardt <martin.dauskardt@gmx.de>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:31 -02:00
Hans Verkuil 09882f0044 V4L/DVB (9325): ivtv: switch to unlocked_ioctl.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:28 -02:00
Hans Verkuil d5fbf32f38 V4L/DVB (9324): v4l2: add video_ioctl2_unlocked for unlocked_ioctl support.
Based on an older patch from Sakari Ailus.

Cc: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:25 -02:00
Sakari Ailus 36499e525f V4L/DVB (9322): v4l2-int-if: Export more interfaces to modules
Export v4l2_int_device_try_attach_all. This allows initiating the
initialisation of int if device after the drivers have been registered.

Also allow drivers to call ioctls if v4l2-int-if was compiled as
module.

Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:20 -02:00
Devin Heitmueller 11fc9a4a44 V4L/DVB (9316): s5h1411: Power down s5h1411 when not in use
Power down the s5h1411 demodulator when not in use (on the Pinnacle 801e, this
brings idle power from 123ma down to 84ma).

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Acked-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:06 -02:00
Devin Heitmueller 50eac6bc46 V4L/DVB (9315): s5h1411: Skip reconfiguring demod modulation if already at the desired modulation
If we are already at the desired modulation, there is no need to reconfigure
the demod (at a tuning time cost)

Note that this change revealed that although the datasheet says the demod
starts out in VSB-8 mode, the first tuning was failing consistently unless
we went through the work of setting the registers.  So add a field to denote
this case so we always do the enable_frontend call, even if the first tuning
request is for VSB-8.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:04 -02:00
Devin Heitmueller f0d041e50b V4L/DVB (9314): s5h1411: Perform s5h1411 soft reset after tuning
If you instruct the tuner to change frequencies, it can take up to 2500ms to
get a demod lock.  By performing a soft reset after the tuning call (which
is consistent with how the Pinnacle 801e Windows driver behaves), you get
a demod lock inside of 300ms

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:01 -02:00
Steven Toth 1874c44328 V4L/DVB (9313): s5h1411: Add the #define for an existing supporting I/F
s5h1411: Add the #define for an existing supporting I/F

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:30:59 -02:00
Steven Toth 5bd47311fe V4L/DVB (9312): s5h1411: Remove meaningless code
s5h1411: Remove meaningless code

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:30:55 -02:00
Steven Toth 1af46b450f V4L/DVB (9311): s5h1411: bugfix: Setting serial or parallel mode could destroy bits
Adding a serialmode function to read/and/or/write the register for safety.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:30:51 -02:00
Steven Toth e16c63de92 V4L/DVB (9310): s5h1411: read_status() locking detection fixes.
This includes new bit definitions for previously unknown bits.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:30:48 -02:00
Steven Toth c96de5197d V4L/DVB (9309): s5h1411: I/F related bugfix for 3.25 and remove spurious define
This should improve performance.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:30:43 -02:00
Steven Toth f4ef033ee0 V4L/DVB (9308): s5h1411: Improvements to the default registers
s5h1411: Improvements to the default registers

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:30:36 -02:00
Alexey Klimov b9f3573731 V4L/DVB (9306): dsbr100: Add frequency check
Add checking for frequency and printk if -1 returned.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:29:29 -02:00
Alexey Klimov 0fabb78332 V4L/DVB (9305): radio-mr800: Add BKL for usb_amradio_open()
Added BKL for usb_amradio_open()

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:29:17 -02:00
Alexey Klimov 223377e76d V4L/DVB (9304): dsbr100: CodingStyle issue
Fixed few coding style issues in dsbr100

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:28:42 -02:00
Alexey Klimov 448441cf2f V4L/DVB (9303): dsbr100: Correct bus_info string
Replaced bus_info string from ISA to USB

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:21:08 -02:00
Boris Dores 3f93d1adca V4L/DVB (9301): pvrusb2: Keep MPEG PTSs from drifting away
(Mike Isely) This change was empirically figured out by Boris Dores
after empirically comparing against behavior in the Windows driver.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:21:01 -02:00
Mike Isely c82732a428 V4L/DVB (9300): pvrusb2: Fix deadlock problem
Fix deadlock problem in 2.6.27 caused by new USB core behavior in
response to a USB device reset request.  With older kernels, the USB
device reset was "in line"; the reset simply took place and the driver
retained its association with the hardware.  However now this reset
triggers a disconnect, and worse still the disconnect callback happens
in the context of the caller who asked for the device reset.  This
results in an attempt by the pvrusb2 driver to recursively take a
mutex it already has, which deadlocks the driver's worker thread.
(Even if the disconnect callback were to happen on a different thread
we'd still have problems however - because while the driver should
survive and correctly disconnect / reconnect, it will then trigger
another device reset during the repeated initialization, which will
then cause another disconect, etc, forever.)  The fix here is simply
to not attempt the device reset (it was of marginal value anyway).

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:20:51 -02:00
Andy Walls 9b4a7c8a83 V4L/DVB (9299): cx18: Don't mask many real init error codes by mapping them to ENOMEM
Changes to let error return codes bubble up to the user visible
error message on card initialization.  A number of them were being remapped to
ENOMEM when no memory or array resource shortage existed.  That hampered
diagnosis of user trouble reports.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:20:47 -02:00
Andy Walls 06869713de V4L/DVB (9298): cx18: Add __iomem address space qualifier to cx18_log_*_retries() argument
cx18: Add __iomem address space qualifier to cx18_log_*_retries() addr
argument to clean up sparse build warnings.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:20:43 -02:00
Andy Walls ff086575b7 V4L/DVB (9297): cx18: Fix memory leak on card initialization failure
On error exit, the cx18_probe() function did not use the proper entry in
cx18_cards[] with kfree() when card init failed; leaking memory.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:20:39 -02:00
Harvey Harrison 1a651a00e2 byteorder: remove direct includes of linux/byteorder/swab[b].h
A consolidated implementation will provide this generically through
asm/byteorder, remove direct includes to avoid breakage when the
changeover to the new implementation occurs.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Acked-by: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20 08:52:40 -07:00
Linus Torvalds 0cfd81031a Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (94 commits)
  USB: remove err() macro from more usb drivers
  USB: remove err() macro from usb misc drivers
  USB: remove err() macro from usb core code
  USB: remove err() macro from usb class drivers
  USB: remove use of err() in drivers/usb/serial
  USB: remove info() macro from usb mtd drivers
  USB: remove info() macro from usb input drivers
  USB: remove info() macro from usb network drivers
  USB: remove info() macro from remaining usb drivers
  USB: remove info() macro from usb/misc drivers
  USB: remove info() macro from usb/serial drivers
  USB: remove warn macro from HID core
  USB: remove warn() macro from usb drivers
  USB: remove warn() macro from usb net drivers
  USB: remove warn() macro from usb media drivers
  USB: remove warn() macro from usb input drivers
  usb/fsl_qe_udc: clear data toggle on clear halt request
  usb/fsl_qe_udc: fix response to get status request
  fsl_usb2_udc: Fix oops on probe failure.
  fsl_usb2_udc: Add a wmb before priming endpoint.
  ...
2008-10-17 15:43:52 -07:00
Greg Kroah-Hartman aa82661baf USB: remove warn() macro from usb media drivers
USB should not be having it's own printk macros, so remove warn() and
use the system-wide standard of dev_warn() wherever possible.  In the
few places that will not work out, use a basic printk().

Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17 14:41:08 -07:00
Igor M. Liplianin d4305c68cc V4L/DVB (9296): Patch to remove warning message during cx88-dvb compilation
Remove warning message during cx88-dvb compilation.
Also fixes double underline in function and struct names.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:41:30 -03:00
Jean-Francois Moine eb229b22fb V4L/DVB (9294): gspca: Add a stop sequence in t613.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:41:20 -03:00
Leandro Costantino ad62fb08de V4L/DVB (9293): gspca: Separate and fix the sensor dependant sequences in t613.
Signed-off-by: Leandro Costantino <lcostantino@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:41:14 -03:00
Jean-Francois Moine 35480b6bc3 V4L/DVB (9292): gspca: Call the control setting functions at init time in t613.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:41:09 -03:00
Jean-Francois Moine cbc51c6d6e V4L/DVB (9291): gspca: Do not set the white balance temperature by default in t613.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:41:00 -03:00
Jean-Francois Moine 392ee5a59d V4L/DVB (9290): gspca: Adjust the sensor init sequences in t613.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:40:55 -03:00
Jean-Francois Moine 236088d215 V4L/DVB (9289): gspca: Other sensor identified as om6802 in t613.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:40:50 -03:00
Jean-Francois Moine 0bc99b5cf7 V4L/DVB (9288): gspca: Write to the USB device and not USB interface in t613.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:40:43 -03:00
Jean-Francois Moine f89be036eb V4L/DVB (9287): gspca: Change the name of the multi bytes write function in t613.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:40:37 -03:00
Jean-Francois Moine cf0fe08dd7 V4L/DVB (9286): gspca: Compilation problem of gspca.c and the kernel version.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:40:31 -03:00
Erik Andrén 88d99fcac4 V4L/DVB (9283): Correct typo and enable setting the gain on the mt9m111 sensor
A typo was introduced during the gspca conversion, crippling the ability to control the gain on the mt9m111 sensor.

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:40:25 -03:00
Erik Andrén 447328194e V4L/DVB (9282): Properly iterate the urbs when destroying them.
Properly iterate the allocated when freeing the urbs, this fixes a memory leak

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:40:18 -03:00