Commit Graph

5732 Commits

Author SHA1 Message Date
Andy Walls
ac50441720 V4L/DVB (9595): cx18: Improve handling of outgoing mailboxes detected to be busy
cx18: Improve handling of outgoing mailboxes detected to be busy.  When
encountering a busy mailbox, sleep instead of polling, and wait for interrupt or
timeout.  If the mailbox is still busy, force it free.  When sending commands,
make sure we never create a situation where we mark the mailbox busy upon
sending, and ensure we always have a method to cleanly recover from a busy
mailbox.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:03 -02:00
Andy Walls
d670b6ff4e V4L/DVB (9594): cx18: Roll driver version number due to significant changes
Driver interrupt and mailbox handling has change significantly.
Time for a roll to v1.0.2.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:02 -02:00
Andy Walls
72c2d6d3ac V4L/DVB (9593): cx18: Add outgoing mailbox mutexes and check for ack via waitq vs poll
Add mutexes to ensure exclusive access for outgoing driver to CX23418 mailboxes.
Also wait on a waitq for mailbox acknowledgement from the CX23418 instead of
polling.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:02 -02:00
Andy Walls
f68d0cf567 V4L/DVB (9592): cx18: Use default kernel work queue; fix streaming flag for work handler
cx18: Use default kernel work queue; fix streaming flag for work handler.
Eliminate cx18 specific work queue and use the kernel default work queue.
Fixed the F_STREAMING_FLAG for the TS stream so cx18_dvb_work_handler()
can know when it is not safe to send MDLs to the firmware.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:01 -02:00
Jean-Francois Moine
13563f44a2 V4L/DVB (9558): gspca: Add the light frequency control for the sensor HV7131B in zc3xx
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:01 -02:00
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