Commit Graph

2152 Commits (070e5c3f9989a72076e83fdd5ede3f0f3eb17264)

Author SHA1 Message Date
Julian Scheel 114323ede9 V4L/DVB (12481): Fix lowband tuning with tda8261
Attached is a patch which fixes tuning to low frequency channels with
stb0899+tda8261 cards like the KNC TV-Station DVB-S2.
The cause of the issue was a broken if construct, which should have been
an if/else if, so that the setting for the lowest matching frequency is
applied.

Without this patch for example tuning to "arte" on Astra 19.2, 10744MHz
SR22000 failed most times and when it failed the communication between
driver and tda8261 was completely broken.
This problem disappears with the attached patch.

Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:07 -03:00
Mart Raudsepp c92f056308 V4L/DVB: af9015: add new USB ID for KWorld PlusTV Dual DVB-T Stick (DVB-T 399U)
Add new USB ID (1b80:e400) for KWorld PlusTV Dual DVB-T Stick (DVB-T 399U).
The model number on the devices sticker label is "KW-DVB-T 399UR".

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:06 -03:00
Julia Lawall 3227c860b6 V4L/DVB (12477): Use dst_type field instead of type_flags
It seems from other code that it is the dst_type field rather than the
type_flags field that contains values of the form DST_TYPE_IS...
The type_flags field contains values of the form DST_TYPE_HAS...

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ struct dst_state E; @@

(
*E.type_flags ==
  \( DST_TYPE_IS_SAT\|DST_TYPE_IS_TERR\|DST_TYPE_IS_CABLE\|DST_TYPE_IS_ATSC \)
|
*E.type_flags !=
  \( DST_TYPE_IS_SAT\|DST_TYPE_IS_TERR\|DST_TYPE_IS_CABLE\|DST_TYPE_IS_ATSC \)
)
// </smpl>

Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:03 -03:00
Nam Phạm Thành ce212f052f V4L/DVB (12475): Add support for Humax/Coex DVB-T USB Stick 2.0 High Speed
This patch adds support for Humax/Coex DVB-T USB Stick 2.0 High Speed
which is a very popular tuner sold in Vietnam.
Tested with at least 3 tuners.

Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Pham Thanh Nam <phamthanhnam.ptn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:03 -03:00
Igor M. Liplianin d0a1ddad1c V4L/DVB (12462): Add TeVii S630 USB DVB-S card support.
The card includes Intel ce5039(Zarlink zl10039) tuner
and Intel ce6313 (Zarlink zl10313) demod.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:56 -03:00
Igor M. Liplianin 2ccf5a9906 V4L/DVB (12461): Add ce5039(zl10039) tuner support.
The code from Jan D. Louw with some minor changes.
http://article.gmane.org/gmane.linux.drivers.dvb/38163
Tested with TeVii S630 DVB-S USB card by me (Igor)

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:55 -03:00
Roel Kluin bd0eb12f61 V4L/DVB (12435): strlcpy() will always null terminate the string.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:50 -03:00
Hans Verkuil eb2de30b31 V4L/DVB (12427): cx24113: fix mips compiler warning
do_div requires an u64 as the first argument, not a s64.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:49 -03:00
David T.L. Wong 6bf1a997ed V4L/DVB (12423): cxusb, d680 dmbth use unified lgs8gxx code instead of lgs8gl5
Use unified lgs8gxx frontend instead of reverse engineered lgs8gl5 frontend.
After this patch, lgs8gl5 frontend could be mark as deprecated.
Future development should base on unified lgs8gxx frontend.

Signed-off-by: David T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:47 -03:00
Pete Hildebrandt c53d83ccc8 V4L/DVB (12396): [patch] Added Support for STK7700D (DVB)
This patch adds support for the STK7700D USB-DVB-Device.

lsusb identifies it as:
idVendor           0x1164 YUAN High-Tech Development Co., Ltd
idProduct          0x1efc
 iProduct                2 STK7700D

The device is build into a Samsung R55-T5500 notebook.

Signed-off-by: Pete Hildebrandt <send2ph@googlemail.com>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:36 -03:00
Eberhard Mattes 0b0157398e V4L/DVB (12388): dvb-usb: fix tuning with Cinergy T2
cinergyInitialize param.flags.

Signed-off-by: Eberhard Mattes <eberhard.mattes@web.de>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:35 -03:00
Jan Nikitenko 43f8de7ac6 V4L/DVB (12342): af9015: avoid magically sized temporary buffer in eeprom_dump
Replace printing to magically sized temporary buffer with use
of KERN_CONT for continual printing of eeprom registers dump.

Since deb_info is defined as dprintk, which is conditionally defined
to printk without additional parameters, meaning that deb_info is equivalent
to direct printk (without adding KERN_ facility), we can use KERN_DEBUG and
KERN_CONT in there, eliminating the need for sprintf into temporary buffer
with not easily readable/magical size.

Though it's strange, that deb_info definition uses printk without KERN_
facility and callers don't use it either.

Signed-off-by: Jan Nikitenko <jan.nikitenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:13 -03:00
Igor M. Liplianin d8300df9fb V4L/DVB (12332): Create card parameters array in SDMC DM1105 driver
Create card parameters array in SDMC DM1105 driver.
It is useful for cards with the same pci id, but different
tuners, lnb power control circuits, etc.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:09 -03:00
Igor M. Liplianin c846121058 V4L/DVB (12313): stv6110: Read registers through one time i2c_transfer calling
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:03 -03:00
Abylay Ospan fc7e4a3e72 V4L/DVB (12312): stv0900: fix i2c repeater configuration must be set to manual
In automatic mode every stop event on SDA line ends repetition.
However, in  NetUP Dual card on the same i2c bus we have several devices.
If someone using both adapters to lock simultaneously or working with CAM interface
during lock procedure, it lead to end repetition prematurely quite often.
Set stv0900 i2c repeater to manual mode prevents such situation.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:03 -03:00
Igor M. Liplianin ee5e7d94c9 V4L/DVB (12310): stv6110 tuner: remove unused iq_wiring configuration parameter.
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:02 -03:00
Igor M. Liplianin 92782bb003 V4L/DVB (12309): Add output clock configuration for stv6110 tuner.
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:00 -03:00
Trent Piepho 7a6fbd8337 V4L/DVB (12294): b2c2: Use dvb-pll for Cablestar2
The dvb-pll code should do the same thing that
alps_tdee4_stv0297_tuner_set_params() was doing.  Except the dvb-pll code
will check for tuner presence when attaching, while the old code didn't.

This tuner appears to not be behind the stv0297's I2C gate but is instead
on a different I2C adapter provided by the flexcop chip.  The old code
would turn the I2C gate off each time the tuner was used.  I've changed it
to turn the gate off when the tuner is attached and then disable the gate
control function.  This should result in the gate staying off, which should
be even better.

[hverkuil@xs4all.nl: fix compile error]

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:52 -03:00
Trent Piepho 016e53de0a V4L/DVB (12293): b2c2: Use dvb-pll for Skystar2 rev 2.3 and rev 2.6
The code in skystar23_samsung_tbdu18132_tuner_set_params() and
samsung_tbmu24112_tuner_set_params() is equivalent to what the dvb-pll code
does.  There could be an issue because the dvb-pll code will probe to check
for the tuner, while the previous code didn't do any checks.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:52 -03:00
Trent Piepho 6d67c9717b V4L/DVB (12292): b2c2: Use dvb-pll for AirStar DVB-T's tuner
The code in samsung_tdtc9251dh0_calc_regs() is equivalent to what dvb-pll's
code does.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:51 -03:00
Trent Piepho d799ce5708 V4L/DVB (12290): dvb-pll: Add support for Alps TDEE4 DVB-C NIM
No datasheet, data take from code in flexcop driver.  That code rounded
down the divisor rather than rounding to nearest, which was probably not
intentional and the dvb-pll code will round to nearest.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:50 -03:00
Trent Piepho 9d5d75a9eb V4L/DVB (12289): dvb-pll: Add support for Samsung TBMU24112 DVB-S NIM
Tuner parameters determined from code in flexcop driver.  That code rounded
the divisor down instead of to the nearest value.  This was probably not
intentional and the dvb-pll version will round to nearest.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:49 -03:00
Trent Piepho f52c48535f V4L/DVB (12288): dvb-pll: Add support for Samsung TBDU18132 DVB-S NIM
Tuner parameters taken from flexcop driver.  This PLL has a 17 bit divisor
while the dvb-pll driver is designed for 15 bit divisors.  It's not a
problem as 15 bits is enough for the tuner's entire range.  But if a larger
range was wanted, it could be done by adding additional bands with the
extra divisor bits appearing as band switch bits.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:48 -03:00
Trent Piepho a104ed073b V4L/DVB (12287): dvb-pll: Add Samsung TDTC9251DH0 DVB-T NIM
No datasheet, tuner data comes from code in flexcop driver.  This tuner is
also used on the AVerTV 771 supported by the bttv driver, but that code
uses a different tuner configuration, which is surprising.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:48 -03:00
Andreas Oberritter a4afd65870 V4L/DVB (12276): Remove a useless check from dvb_dmx_swfilter_packet()
Values for 'pid' range from 0 to 0x1fff. Therefore 'feed->pid' can never
be equal to both 'pid' and 0x2000. This makes the continue statement have
no effect.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:44 -03:00
Andreas Oberritter 1cb662a314 V4L/DVB (12275): Add two new ioctls: DMX_ADD_PID and DMX_REMOVE_PID
DMX_ADD_PID allows to add multiple PIDs to a transport stream filter
previously set up with DMX_SET_PES_FILTER and output=DMX_OUT_TSDEMUX_TAP.

DMX_REMOVE_PID is used to drop a PID from a filter.

These ioctls are to be used by readers of /dev/dvb/adapterX/demuxY. They
may be called at any time, i.e. before or after the first filter on the
shared file descriptor was started.

They make it possible to record multiple services without the need to de-
or re-multiplex TS packets.

To accomplish this, dmxdev_filter->feed.ts has been converted to a list
of struct dmxdev_feeds, each containing a PID value and a pointer to a
struct dmx_ts_feed.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:43 -03:00
David Wong b80dc1c673 V4L/DVB (12271): lgs8gxx: add lgs8g75 support
lgs8gxx: add lgs8g75 demodulator support

Signed-off-by: David T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:38 -03:00
Matthias Schwarzott 0389b34e7c V4L/DVB (12200): mt312: Fix checkpatch warnings
This patch fixes some checkpatch warnings in mt312-driver.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:24 -03:00
Roel Kluin de81c3c3f5 V4L/DVB (12199): remove redundant tests on unsigned
input, inp and i are unsigned. When negative they are wrapped and caught by the
other test.

Cc: Andy Walls <awalls@radix.net>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:23 -03:00
Joe Perches 1ebcad7707 V4L/DVB (12197): Remove unnecessary semicolons
Cc: Patrick Boettcher <patrick.boettcher@desy.de>
Cc: Steven Toth <stoth@linuxtv.org>
Cc: Igor M. Liplianin <liplianin@netup.ru>
Cc: Srinivasa Deevi <srinivasa.deevi@conexant.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:23 -03:00
Udi Atar 31e0ad693f V4L/DVB (12451): Update KConfig File to enable SDIO and USB interfaces
Update KConfig file to enbale selection of SDIO and USB
interfaces, and add dependancy on relevant modules.

[mchehab@redhat.com: fix merge conflicts, remove default: m, add missing endmenu]

Signed-off-by: Udi Atar <udia@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-31 02:24:53 -03:00
Udi Atar ef2d12ce12 V4L/DVB (12450): Siano: Fixed SDIO compilation bugs
Fixed SDIO compilation bugs
Also fixed a memory overrun issue in buffer management.

Signed-off-by: Udi Atar <udia@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-31 02:24:53 -03:00
Michael Krufky 3746b61780 V4L/DVB (12446): sms1xxx: restore GPIO functionality for all Hauppauge devices
Previous changesets broke Hauppauge devices and their GPIO configurations.

This changeset restores the LED & LNA functionality.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-31 02:24:52 -03:00
Roel Kluin 08b39642b1 V4L/DVB (12441): siano: read buffer overflow
With mode DEVICE_MODE_RAW_TUNER a read occurs past the end of smscore_fw_lkup[].
Subsequently an attempt is made to load the firmware from the resulting
filename.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-13 20:39:14 -03:00
Matthias Schwarzott 084e24acc9 V4L/DVB (12440): Use kzalloc for frontend states to have struct dvb_frontend properly
This patch changes most frontend drivers to allocate their state structure via
kzalloc and not kmalloc. This is done to properly initialize the
embedded "struct dvb_frontend frontend" field, that they all have.

The visible effect of this struct being uninitalized is, that the member "id"
that is used to set the name of kernel thread is totally random.

Some board drivers (for example cx88-dvb) set this "id" via
videobuf_dvb_alloc_frontend but most do not.

So I at least get random id values for saa7134, flexcop and ttpci based cards.
It looks like this in dmesg:
DVB: registering adapter 1 frontend -10551321 (ST STV0299 DVB-S)

The related kernel thread then also gets a strange name
like "kdvb-ad-1-fe--1".

Cc: Michael Krufky <mkrufky@linuxtv.org>
Cc: Steven Toth <stoth@linuxtv.org>
Cc: Timothy Lee <timothy.lee@siriushk.com>
Cc: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Acked-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-13 20:39:14 -03:00
Randy Dunlap 27059b3539 V4L/DVB (12437): dvb: siano uses/depends on INPUT
siano uses input_*() functions so it should depend on INPUT
to prevent build errors:

ERROR: "input_event" [drivers/media/dvb/siano/sms1xxx.ko] undefined!
ERROR: "input_register_device" [drivers/media/dvb/siano/sms1xxx.ko] undefined!
ERROR: "input_free_device" [drivers/media/dvb/siano/sms1xxx.ko] undefined!
ERROR: "input_unregister_device" [drivers/media/dvb/siano/sms1xxx.ko] undefined!
ERROR: "input_allocate_device" [drivers/media/dvb/siano/sms1xxx.ko] undefined!

Cc: Michael Krufky <mkrufky@linuxtv.org>
Cc: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-13 20:39:13 -03:00
Michael Krufky 79a6382551 V4L/DVB (12386): sms1xxx: fix build warning: unused variable 'board'
Remove the following build warning:

sms-cards.c: In function 'sms_board_event':
sms-cards.c:120: warning: unused variable 'board'

Thanks to Hans Verkuil for pointing this out.

The problem code has been #if 0'd for now, this will likely be
used again in the future, once the event interface is complete.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-13 20:39:06 -03:00
Michael Krufky d1ae4e1d05 V4L/DVB (12374): sms1xxx: fix broken Hauppauge devices
The current GPIO configuration breaks all Hauppauge devices.

The code being removed affects Hauppauge devices only,
and is the cause of the breakage.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-13 20:39:04 -03:00
Nils Kassube ba1bc64272 V4L/DVB (12371): af9015: Fix for crash in dvb-usb-af9015
Moving BOOT fixes problem.

Signed-off-by: Nils Kassube <kassube@gmx.net>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-13 20:39:03 -03:00
Jan Nikitenko 458f9aa391 V4L/DVB (12341): zl10353 and qt1010: fix stack corruption bug
Fixes stack corruption bug present in dump_regs function of zl10353 and
qt1010 drivers: the buffer buf was one byte smaller than required -
there are 4 chars for address prefix, 16 * 3 chars for dump of 16 eeprom
bytes per line and 1 byte for zero ending the string required, i.e. 53
bytes, but only 52 were provided.

The one byte missing in stack based buffer buf can cause stack
corruption possibly leading to kernel oops, as discovered originally
with af9015 driver (af9015: fix stack corruption bug).

Signed-off-by: Jan Nikitenko <jan.nikitenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-13 20:39:02 -03:00
David S. Miller aa11d958d1 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	arch/microblaze/include/asm/socket.h
2009-08-12 17:44:53 -07:00
Trent Piepho 68b7f7616a V4L/DVB (12291): b2c2: fix frontends compiled into kernel
A recent patch didn't take into account that frontends can be compiled into
the kernel.  Or that frontends compiled as modules can't be used by the
b2c2 driver if it is not a module itself.

Some frontends require multiple drivers, e.g. a demod driver and a tuner
driver.  The code for the frontend support was getting added if the demod
driver was available.  Change this to also require any needed tuner or SEC
drivers as well.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-07-24 14:03:31 -03:00
Antti Palosaari a2f5a8117c V4L/DVB (12269): af9013: auto-detect parameters in case of garbage given by app
Request demodulator auto-detect transmission parameters in case of
garbage parameters provided by application for compatibility.
That's needed at least for MPlayer compatibility currently.

Thanks to Jelle de Jong for reporting issue and providing SSH access to
Devin for debugging.

Thanks to Devin Heitmueller for hard debug work he did to find that bug.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: Jelle de Jong <jelledejong@powercraft.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-07-24 14:03:29 -03:00
Alexey Dobriyan 405f55712d headers: smp_lock.h redux
* Remove smp_lock.h from files which don't need it (including some headers!)
* Add smp_lock.h to files which do need it
* Make smp_lock.h include conditional in hardirq.h
  It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

  This will make hardirq.h inclusion cheaper for every PREEMPT=n config
  (which includes allmodconfig/allyesconfig, BTW)

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-12 12:22:34 -07:00
Patrick McHardy 6ed106549d net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functions
This patch is the result of an automatic spatch transformation to convert
all ndo_start_xmit() return values of 0 to NETDEV_TX_OK.

Some occurences are missed by the automatic conversion, those will be
handled in a seperate patch.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05 19:16:04 -07:00
Hans Verkuil 3175da83a0 V4L/DVB (12153): ttpci: config TTPCI_EEPROM depends on I2C
If I2C is not enabled, then we shouldn't build ttpci_eeprom.c.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-07-05 14:29:55 -03:00
Manu Abraham eebf8d86ac V4L/DVB (12131): BUGFIX: An incorrect Carrier Recovery Loop optimization table was being
loaded for a given chip version. This would cause the optimization in
tuning not to be applied and thus a failed expectation, in tuning speed
increment. The patch swaps the tables in use. It also fixes a possible
one in a million condition where state->dev_ver implies an older Cut
(Cut < 2.0, eventhough the driver doesn't attach to any Cut older than
2.0) or even negative (due to a bad I2C bus master driver) for the card
combination.

Thanks to Mauro Carvalho Chehab <mchehab@infradead.org> for pointing
out the issue at large.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:29:57 -03:00
Manu Abraham 0a5ded56fd V4L/DVB (12130): Fix a redundant compiler warning
drivers/media/dvb/frontends/stv090x.c: In function ‘stv090x_optimize_carloop_short’:
drivers/media/dvb/frontends/stv090x.c:2677: warning: ‘short_crl’ may be used uninitialized in this function

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:29:50 -03:00
Michael Krufky 9d68fc0ad4 V4L/DVB (12115): tda10048: add missing entry to pll_tab for 3.8 MHz IF
Thanks for Terry Wu for pointing out the missing entry.

Cc: Terry Wu <terrywu2009@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:14:56 -03:00
Hans Verkuil be5daa9bd2 V4L/DVB (12107): smscoreapi: fix compile warning
gcc 4.3.1 generates this warning:

v4l/smscoreapi.c: In function 'smscore_gpio_configure':
v4l/smscoreapi.c:1481: warning: 'GroupNum' may be used uninitialized in this function
v4l/smscoreapi.c:1480: warning: 'TranslatedPinNum' may be used uninitialized in this function

While in practice this will not happen, it is something that the compiler
can't determine. Initializing these two local variables to 0 suppresses
this warning.

Cc: Udi Atar <udi.linuxtv@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:14:35 -03:00
Igor M. Liplianin f867c3f4ea V4L/DVB (12098): Create table for customize stv0900 ts registers.
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:14:12 -03:00
Abylay Ospan ee1ebcfea6 V4L/DVB (12097): Implement reading uncorrected blocks for stv0900
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:14:07 -03:00
Abylay Ospan 68191edeb5 V4L/DVB (12096): Bug fix: stv0900 register read must using i2c in one transaction
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:14:03 -03:00
Linus Torvalds 0dd5198672 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (425 commits)
  V4L/DVB (11870): gspca - main: VIDIOC_ENUM_FRAMESIZES ioctl added.
  V4L/DVB (12004): poll method lose race condition
  V4L/DVB (11894): flexcop-pci: dmesg visible names broken
  V4L/DVB (11892): Siano: smsendian - declare function as extern
  V4L/DVB (11891): Siano: smscore - bind the GPIO SMS protocol
  V4L/DVB (11890): Siano: smscore - remove redundant code
  V4L/DVB (11889): Siano: smsdvb - add DVB v3 events
  V4L/DVB (11888): Siano: smsusb - remove redundant ifdef
  V4L/DVB (11887): Siano: smscards - add board (target) events
  V4L/DVB (11886): Siano: smscore - fix some new GPIO definitions names
  V4L/DVB (11885): Siano: Add new GPIO management interface
  V4L/DVB (11884): Siano: smssdio - revert to stand alone module
  V4L/DVB (11883): Siano: cards - add two additional (USB) devices
  V4L/DVB (11824): Siano: smsusb - change exit func debug msg
  V4L/DVB (11823): Siano: smsusb - fix typo in module description
  V4L/DVB (11822): Siano: smscore - bug fix at get_device_mode
  V4L/DVB (11821): Siano: smscore - fix isdb-t firmware name
  V4L/DVB (11820): Siano: smscore - fix byte ordering bug
  V4L/DVB (11819): Siano: smscore - fix get_common_buffer bug
  V4L/DVB (11818): Siano: smscards - assign gpio to HPG targets
  ...
2009-06-16 21:15:42 -07:00
Matthias Schwarzott 1c905a4522 V4L/DVB (11894): flexcop-pci: dmesg visible names broken
Changeset 1589a993f0 broke user visible
names of flexcop-pci devices, as it did reorder the enum of card types,
but did not adjust the array containing the card names.

Reorder the names, and uses [FC_AIR_DVBT] = "Air2PC/AirStar 2 DVB-T"
assignment style for more clarity.

It also adds the revision Number to the name for SkyStar rev. 2.3 and rev 2.6
as I think it is useful to see in log output.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:43 -03:00
Uri Shkolnik d95e9883ce V4L/DVB (11892): Siano: smsendian - declare function as extern
Declare the object function as 'extern'

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:43 -03:00
Uri Shkolnik 34601caa64 V4L/DVB (11891): Siano: smscore - bind the GPIO SMS protocol
Bind SMS protocol commands to the GPIO commands

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:42 -03:00
Uri Shkolnik 6675167cab V4L/DVB (11890): Siano: smscore - remove redundant code
remove redundant code, which in the past handled the
various components (now independent modules) registrations.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:41 -03:00
Uri Shkolnik 4db989f774 V4L/DVB (11889): Siano: smsdvb - add DVB v3 events
Add various DVB-API v3 events, those events will trig
target (card) events.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:41 -03:00
Uri Shkolnik 07f56002c1 V4L/DVB (11888): Siano: smsusb - remove redundant ifdef
Remove a redundant ifdef

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:40 -03:00
Uri Shkolnik 5b8db89783 V4L/DVB (11887): Siano: smscards - add board (target) events
Add events handling for targets. All board-specific
(target specific) should reside here.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:40 -03:00
Uri Shkolnik 4887f7b4ef V4L/DVB (11886): Siano: smscore - fix some new GPIO definitions names
Fix some definitions' names, in order to emphasize the names

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:39 -03:00
Uri Shkolnik 7c4ca79f49 V4L/DVB (11885): Siano: Add new GPIO management interface
Add new GPIO management interface to replace old (buggy) one.
Keeping old interface intact for now.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:38 -03:00
Uri Shkolnik db9582a1e4 V4L/DVB (11884): Siano: smssdio - revert to stand alone module
Make the SDIO interface driver a stand alone module.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:38 -03:00
Uri Shkolnik d0b66180c3 V4L/DVB (11883): Siano: cards - add two additional (USB) devices
Add two additional USB targets, add these to the 'cards' modules
and to the 'smsusb' module.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:37 -03:00
Uri Shkolnik bebfa762b1 V4L/DVB (11824): Siano: smsusb - change exit func debug msg
Change the debug message of the USB interface driver exit
function.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:37 -03:00
Uri Shkolnik 05a073769d V4L/DVB (11823): Siano: smsusb - fix typo in module description
Fix small typo in the module description

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:36 -03:00
Uri Shkolnik 5d2387e3ca V4L/DVB (11822): Siano: smscore - bug fix at get_device_mode
Fix bug that cause error log to echo also if success

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:35 -03:00
Uri Shkolnik 8cc8ef2650 V4L/DVB (11821): Siano: smscore - fix isdb-t firmware name
Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:35 -03:00
Uri Shkolnik 01abc0b076 V4L/DVB (11820): Siano: smscore - fix byte ordering bug
Fix byte ordering bug.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:34 -03:00
Uri Shkolnik a9349315f6 V4L/DVB (11819): Siano: smscore - fix get_common_buffer bug
get common buffers() should block operation until valid buffer
is avaliable.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:34 -03:00
Uri Shkolnik 9504ccacd7 V4L/DVB (11818): Siano: smscards - assign gpio to HPG targets
Assign using the new gpio structures, i/o for exist HPG
targets, without removing the old implementation.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:33 -03:00
Uri Shkolnik 266b95a548 V4L/DVB (11817): Siano: smscards - fix wrong firmware assignment
Remove wrong firmware assignments for Nova, Stellar

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:33 -03:00
Uri Shkolnik a804800a29 V4L/DVB (11816): Siano: USB - move the device id table to the cards module
The card modules is the component which handles various targets,
so the IDs table should reside within it.

[mchehab@redhat.com: add missing smsendian.h include at smscoreapi.c]
Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:32 -03:00
Uri Shkolnik 90f944a38c V4L/DVB (11815): Siano: bind infra-red component
Add the infra-red to the makefile and declare
the assignment in the cards components.

[mchehab@redhat.com: Fixed a few trivial merge conflicts]
Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:31 -03:00
Uri Shkolnik 3b2d18efd1 V4L/DVB (11814): Siano: smscards - add gpio look-up table
Add gpio look-up table for various requirements, any
target may select any gpio and assign it to a function

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:31 -03:00
Uri Shkolnik c9679e3b0c V4L/DVB (11813): Siano: move dvb-api headers' includes to dvb adapter
Move the DVB-API v3 headers' include list from the core component
to the smsdvb (DVB adapter) which is the only one that uses them.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:30 -03:00
Uri Shkolnik 843d0605ef V4L/DVB (11783): Siano: smsdvb - small typo fix ad module author
Fix type at the module description

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:30 -03:00
Uri Shkolnik 793786d19a V4L/DVB (11782): Siano: smsdvb - use 'push' status mechanism
This patch replace the old method of pulling the device status by
sending "get_statistics" request, to push mode. This make status update
much faster, and reduce various operation time (UHF scan now takes 15s
instead of 2m). In order to make the change the following modification
have been applied:
1) core header - update statistics headers.
2) dvb adapter - omit the statistics request, add handling of
status indications.
3) core 'onresponse' - re-route messages addressed to other adapter
to the dvb adapter.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:29 -03:00
Uri Shkolnik ba79bb2c38 V4L/DVB (11781): Siano: smsdvb - add big endian support
Add support for Siano protocol messages
with big endian systems.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:28 -03:00
Mauro Carvalho Chehab 2c5582e58c V4L/DVB (11780): Siano: fix compilation error due to the lack of EXTERNAL_SYMBOL
Cc: Uri Shkolnik <urishk@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:28 -03:00
Uri Shkolnik 51819f6493 V4L/DVB (11779): Siano: Makefile - add smsendian to build
Add smsendian component to the module build

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:27 -03:00
Uri Shkolnik 8f12d0a4eb V4L/DVB (11778): Siano: smsusb - lost buffers bug fix
This patch fixes a problem were protocol buffers
have been lost during USB disconnect events.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:27 -03:00
Uri Shkolnik c7ce8d37a7 V4L/DVB (11777): Siano: smsusb - handle byte ordering and big endianity
This patch adds support for byte ordering and big endianity
handling for the USB interface driver

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:26 -03:00
Uri Shkolnik 6d4e6972bb V4L/DVB (11776): Siano: smsusb - update license
This patch updates the license of the USB interface driver

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:25 -03:00
Uri Shkolnik 2e25d1428a V4L/DVB (11729): Siano: smsdvb - remove redundent complete instruction
Remove redundant complete instruction from smsdvb, in the
past this was used by the statistics state machine, but
no longer.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:25 -03:00
Uri Shkolnik e527579373 V4L/DVB (11728): Siano: smsdvb - modify license
Siano: smsdvb - Fix license to match all other Siano's files

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:24 -03:00
Uri Shkolnik f95e82c2e5 V4L/DVB (11727): Siano: core header - update include files
Re-order the include files list

Re-order the include files list, put the DVB-API v3 within its
own section, within a define container.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:24 -03:00
Uri Shkolnik 1339f9108a V4L/DVB (11726): Modify the file license to match all other Siano's files
Modify the file license to match all other Siano's files

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:23 -03:00
Uri Shkolnik cb17f9047d V4L/DVB (11561): Siano: add messages handling for big-endian target
Add code that modify the content of Siano's protocol
messages when running with big-endian target.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:22 -03:00
Uri Shkolnik ebb6c22e80 V4L/DVB (11559): Siano: add support for infra-red (IR) controllers
This patch add support for IR (infra-red)
remote controllers.
Further commits are needed in order to enable the
activation of the IR components.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:22 -03:00
Uri Shkolnik 53838e4b61 V4L/DVB (11556): Siano: core header - indentation
Some more indentation for the smscoreapi.h
There are no implementation changes in this patch.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:21 -03:00
Uri Shkolnik 7c57333dcc V4L/DVB (11555): Siano: core - move and update the main core structure declaration
smscoreapi - move the main core structure declaration
to the header, in order to enable other components
(such as IR) to use it.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:20 -03:00
Uri Shkolnik a6f231a88c V4L/DVB (11554): Siano: core header - add definitions and structures
Add new definitions (of Siano's protocol messages),
and protocol structures (for future commits usage)

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:20 -03:00
Uri Shkolnik f762ee1a0d V4L/DVB (11552): Siano: SDIO interface driver - remove two redundant lines
Remove two redundant lines, based on Klimov Alexey code review.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:19 -03:00
Uri Shkolnik 319afbf97f V4L/DVB (11240): siano: add high level SDIO interface driver for SMS based cards
This patch provides SDIO interface driver for SMS (Siano Mobile
Silicon) based devices. The patch includes SMS high level SDIO driver
and requires patching the kernel SDIO stack, those stack patches had
been provided previously.

I would like to thank Pierre Ossman, MMC maintainer, who wrote this
driver.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:17 -03:00
Michael Krufky 511da45734 V4L/DVB (11877): lgdt3305: fix 64bit division in function lgdt3305_set_if
Signed-off-by: Michael Krufky <kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:15 -03:00
Devin Heitmueller a5beb7b323 V4L/DVB (11875): dvb_frontend: fix case where fepriv->exit not reset
The fact that we now explicitly set fepriv->exit = 1 when the thread is
shutting down exposed an edge case where it was not being reset back to zero
once the thread went away in some cases.  This resulted in failures in cases
where the frontend was closed, and then opened O_RDONLY, since in that case
the thread is not being restarted but it was checking the fepriv->exit flag.

Thanks to Thierry Lelegard, who and encountered and debugged a large portion
of the issue in the same twelve hours that I did (as well as testing my patch).

Cc: Thierry Lelegard <thierry.lelegard@tv-numeric.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:15 -03:00
Uri Shkolnik 9c9c68a8c0 V4L/DVB (11812): Siano: smsusb - add big endian support
Add support for big endien target hosts, which
use USB interface.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:14 -03:00
Devin Heitmueller 57594a586f V4L/DVB (11785): dvb_frontend: fix race condition resulting in dropped tuning commands
A race condition was detected in the case that putting the tuner to sleep takes
an unusually long period of time, combined with applications that quickly
close/open the dvb frontend.

The kaffeine channel scanner closes and reopens the dvb frontend between each
tuning attempt.  If it takes an unusually longer period of time to put the
tuner to sleep (for example, the Pinnacle 801e takes 660 ms), the dvb_frontend
thread will still be in a running state (and hence fepriv->thread is still set)
but the fepriv->exit field will still be zero.  As a result, if a
dvb_frontend_start() call arrives while the frontend thread is in the process
of terminating, the call will return 0 without actually starting a new thread.
This results in the tuning request being dropped.

To address this, mark fepriv->exit as soon as we know the thread is going to
be terminated, so that dvb_frontend_start() knows to start a new instance.

Problem encountered with Kaffeine 0.8.7 doing ATSC scanning against the
Pinnacle 801e tuner, in conjunction with new code to power down the xc5000
when not in use.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:14 -03:00