Commit graph

1451 commits

Author SHA1 Message Date
Michael Krufky
52dbb57c23 [media] au8522_common: dont EXPORT_SYMBOL(au8522_led_gpio_enable)
This function is only called from within au8522_common.c - mark it static.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-19 09:49:53 -03:00
Michael Krufky
0a7b5e2747 [media] au8522_common: add missing MODULE_LICENSE
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-19 09:49:23 -03:00
Michael Krufky
b31506c47c [media] au8522: build ATV/DTV demodulators as separate modules
au8522_dig.o and au8522_decoder.o function independentantly
of each other, each for a different hardware function using
a different software subsystem api, each with its own set
of subsystem module dependencies.

Since these drivers do not depend on each other, and it is
in fact possible to build hardware designs using one function
and not the other, lets split this module into two, allowing
system integrators to enable the hardware without dragging in
undesired dependencies.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-19 09:49:06 -03:00
Alexey Khoroshilov
e4459e1682 [media] drxk: Does not unlock mutex if sanity check failed in scu_command()
If sanity check fails in scu_command(), goto error leads to unlock of
an unheld mutex. The check should not fail in reality, but it nevertheless
worth fixing.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-18 11:04:28 -03:00
Antti Palosaari
de7f14fcad [media] af9033: do some minor changes for .get_frontend()
Minor functionality and style changes.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:55:46 -03:00
Gianluca Gennari
0a4df239af [media] af9033: implement get_frontend
Implement the get_frontend function.
The code is derived from the old af9033 driver by Antti Palosaari.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:55:21 -03:00
Gianluca Gennari
ce1fe3799c [media] af9035: add support for the tda18218 tuner
Add basic support for the tda18218 tuner and the AVerMedia A835 devices.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:52:34 -03:00
Hans-Frieder Vogt
540fd4ba05 [media] af9035: add Avermedia Volar HD (A867R) support
Support of AVerMedia AVerTV HD Volar, with tuner MxL5007t.

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:51:47 -03:00
Michael Büsch
ffc501f654 [media] af9035: Add fc0011 tuner support
This adds Fitipower fc0011 tuner support to the af9035 driver.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:50:45 -03:00
Antti Palosaari
8e8a5ac763 [media] af9035: add log writing if unsupported Xtal freq is given
Supports currently only 12 MHz Xtals. It is better to print log
and not to attach frontend in that case.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:44:59 -03:00
Antti Palosaari
e898ef6272 [media] af9033: implement .read_snr()
Returns values as 0.1 dB resolution as preferred nowadays.
Actual resolution is 1 dB.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:44:45 -03:00
Antti Palosaari
3a871ca270 [media] af9033: correct debug print
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:44:12 -03:00
Antti Palosaari
4b64bb268f [media] Afatech AF9033 DVB-T demodulator driver
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:33:42 -03:00
Klaus Schmidinger
0e377819b9 [media] stb0899: fix the limits for signal strength values
stb0899: fix the limits for signal strength values

stb0899_read_signal_strength() adds an offset to the result of the table lookup.
That offset must correspond to the lowest value in the lookup table, to make sure
the result doesn't get below 0, which would mean a "very high" value since the
parameter is unsigned.
'strength' and 'snr' need to be initialized to 0 to make sure they have a
defined result in case there is no "internal->lock".

Signed-off-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 23:06:40 -03:00
Malcolm Priestley
593a2ce0ae [media] m88rs2000 ver 1.13 Correct deseqc and tuner gain functions
Remove incorrect SEC_MINI_B settings-TODO complete this section.

Correct break and remove return -EINVAL within set tone. It appears
there is a bug that occasionally something other than ON/OFF is
sent stalling the driver. Just continue and write back registers.

Set register b2 in setup. This is the set voltage pin which
isn't used in lmedm04 driver but it is always set to 0x1.

Correct the if statements in set_tuner_rf.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 19:51:03 -03:00
Michael Krufky
ef3d2dc366 [media] au8522: bug-fix: enable modulation AFTER tune (instead of before tuning)
The au8522 driver programs the tuner after programming the demodulator,
but the tuner should be programmed first. This patch fixes this behavior.

EDIT: Apparantly Devin created a similar patch some time ago, but hasn't
submitted it for merge.  I never saw his patch, but I thank him anyhow
for his efforts.  In addition, Devin pointed out a flaw in my patch:

This newly generated patch takes Devin's comments into account.

Thanks-to: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 19:05:46 -03:00
Mauro Carvalho Chehab
40841e7469 [media] m88rs2000: Don't fill info.type
This field is handled internally by the DVB core, with uses the
selected delivery system to fill it, when a DVBv3 call is
handled. So, drivers should not touch on it.

Cc: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:55:27 -03:00
Malcolm Priestley
ae8dc8ee2b [media] m88rs2000 1.12 v2 DVB-S frontend and tuner module
Support for m88rs2000 chip used in lmedm04 driver.

Note there are still lock problems.

Slow channel change due to the large block of registers sent in set_frontend.

Version 2 differences.
Front end is completely shut down when in sleep mode. This allow user to regain
control of device.
Kaffeine scan problem solved by removing register calls from get_frontend.
Kaffeine seems to call get_frontend when updating signal data. This can happen
in the middle of a tune stalling the driver.
Change calculations to those in the DS3000 driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:52:59 -03:00
Santosh Nayak
3caaa20121 [media] dvb: negative value assigned to unsigned int in CDRXD()
In CDRXD(), Negative number is assigned to unsigned variable
'state->noise_cal.tdCal2.

Members of 'SNoiseCal' should be 'signed short'.

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:39:14 -03:00
Alexey Khoroshilov
f3033aecf2 [media] dib9000: implement error handling for DibAcquireLock
DibAcquireLock() is implemented as mutex_lock_interruptible()
but the driver does not handle unsuccessful locking.
As a result it may lead to unlock of an unheld mutex.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:36:24 -03:00
Alexey Khoroshilov
9bb24a7e49 [media] dib9000: fix explicit lock mismatches
There are several error paths, where &state->platform.risc.mem_mbx_lock
is not unlocked. The patch fixes it.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:36:17 -03:00
Malcolm Priestley
77768e4b75 [media] STV0288 increase delay between carrier search
The current delay of 30uS is too short to recover any carrier.

In the lmedm04 driver delays were added to overcome carrier lock
problems. The typical delay was 30mS (2 x 15ms register write
0x2c and read 0x24).

Other drivers that use STV0288 don't appear to have any delay are
likely to have also suffered this problem.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:12:32 -03:00
Andreas Regel
ef3d23de05 [media] stb0899: fixed reading of IF_AGC_GAIN register
When reading IF_AGC_GAIN register a wrong value for the base address
register was used (STB0899_DEMOD instead of STB0899_S2DEMOD). That
lead to a wrong signal strength value on DVB-S2 transponders.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Acked-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 11:22:52 -03:00
Andreas Regel
91caad3195 [media] stb0899: set FE_HAS_SIGNAL flag in read_status
In stb0899_read_status the FE_HAS_SIGNAL flag was not set in case of a
successful carrier lock. This change fixes that.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Acked-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 11:22:19 -03:00
Antti Palosaari
2b49fad595 [media] tda10071: fix the delivery system
Commit b2a29b578d sets accidentally
supported delivery systems as DVB-T/T2 whilst it should be
DVB-S/S2. Due to that frontend cannot be used at all.

Reported-by: Jiří Zelenka <klacek@bubakov.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 10:47:50 -03:00
Jesper Juhl
f1ed321944 [media] [trivial] DiB0090: remove redundant '; ' from dib0090_fw_identify()
One semi-colon is enough.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-11 09:40:44 -03:00
Andy Shevchenko
6797e7ad9c [media] media: dvb: append $(srctree) to -I parameters
Without this we have got the warnings like following if build with "make W=1
O=/var/tmp":
  cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:41:22 -03:00
Xi Wang
34817174fc [media] lgdt330x: fix signedness error in i2c_read_demod_bytes()
The error handling in lgdt3303_read_status() and lgdt330x_read_ucblocks()
doesn't work, because i2c_read_demod_bytes() returns a u8 and (err < 0)
is always false.

        err = i2c_read_demod_bytes(state, 0x58, buf, 1);
        if (err < 0)
                return err;

Change the return type of i2c_read_demod_bytes() to int.  Also change
the return value on error to -EIO to make (err < 0) work.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 09:01:12 -03:00
Jean Delvare
06302ffbb4 [media] cx22702: Fix signal strength
The signal strength value returned is not quite correct, it decreases
when I increase the gain of my antenna, and vice versa. It also
doesn't span over the whole 0x0000-0xffff range. Compute a value which
at least increases when signal strength increases, and spans the whole
allowed range.

In practice I get 67% with my antenna fully amplified and 51% with
no amplification. This is close enough to what I get on my other
DVB-T adapter with the same antenna.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 08:54:42 -03:00
Malcolm Priestley
6c5637e4ed [media] it913x-fe ver 1.15 read signal strenght using reg VAR_P_INBAND
Read signal strength using VAR_P_INBAND and apply FEC preferred values.

Note this does not work on IT9137 devices even with dvb-usb-it9135-01.fw
firmware.

Config read_sl allows switch between read signal strength and signal
level.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 08:53:39 -03:00
Axel Lin
c6e8d86fff [media] convert drivers/media/* to use module_i2c_driver()
This patch converts the drivers in drivers/media/* to use the
module_i2_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Heungjun Kim <riverful.kim@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Andrew Chew <achew@nvidia.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: Johannes Obermaier <johannes.obermaier@gmail.com>
Cc: Steven Toth <stoth@kernellabs.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 08:48:01 -03:00
Gianluca Gennari
479e3492a2 [media] rtl2830: __udivdi3 undefined
Il 29/02/2012 22:30, Geert Uytterhoeven ha scritto:
> http://kisskb.ellerman.id.au/kisskb/buildresult/5759200/ ERROR:
> "__udivdi3" [drivers/media/dvb/frontends/rtl2830.ko] undefined!
>
The following patch fixed the warning on my 32 bit system.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 07:13:57 -03:00
Antti Palosaari
a8567cf22e [media] rtl2830: prevent .read_status() when sleeping
Hardware is not accessible when device is sleeping.
Preventing such IOCTLs when sleep should be job of DVB CORE...

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-28 18:44:25 -03:00
Antti Palosaari
0485a7089b [media] rtl2830: correct I2C functionality
Implement I2C functionality according to real RTL2830 demod.

Do not send register page in first byte of each I2C write, instead
use logic to set page using own write when needed. Page register is
physical register 0 as generally used.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-28 18:42:23 -03:00
Antti Palosaari
c0adca7340 [media] Realtek RTL2830 DVB-T demodulator driver
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-28 18:31:37 -03:00
Masanari Iida
546c973628 [media] [trivial] frontends: Fix typo in tda1004x.c
Correct spelling "alocate" to "allocate" in
drivers/media/dvb/frontends/tda1004x.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14 17:13:22 -02:00
Jose Alberto Reguero
dc66d7f455 [media] drxk: Fix get_tune_settings for DVB-T
DVB-T also use step_size=0.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-08 10:52:27 -02:00
Jesper Juhl
e4b444369c [media] drxk_hard: does not need to include linux/version.h
This patch removes the unneeded include.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-26 15:35:25 -02:00
Mauro Carvalho Chehab
59b30294e1 Merge branch 'v4l_for_linus' into staging/for_v3.4
* v4l_for_linus:
  [media] cxd2820r: sleep on DVB-T/T2 delivery system switch
  [media] anysee: fix CI init
  [media] cxd2820r: remove unused parameter from cxd2820r_attach
  [media] cxd2820r: fix dvb_frontend_ops
2012-01-23 18:11:30 -02:00
Antti Palosaari
7256522460 [media] cxd2820r: sleep on DVB-T/T2 delivery system switch
Fix bug introduced by multi-frontend to single-frontend change.
It is safer to put DVB-T parts sleeping when auto-switching to DVB-T2
and vice versa. That was original behaviour.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 18:10:52 -02:00
Antti Palosaari
c2bbbe7b5e [media] cxd2820r: remove unused parameter from cxd2820r_attach
Fix bug introduced by multi-frontend to single-frontend change.
This parameter is no longer used after multi-frontend to single-frontend change.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 18:10:36 -02:00
Antti Palosaari
9bf31efa84 [media] cxd2820r: fix dvb_frontend_ops
Fix bug introduced by multi-frontend to single-frontend change.

* Add missing DVB-C caps
* Change frontend name as single frontend does all the standards

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 18:10:26 -02:00
Mauro Carvalho Chehab
d585681374 [media] drxk: Allow enabling MERR/MVAL cfg
Those two settings are different when used with az6007. Add
a config option to enable it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:46:39 -02:00
Mauro Carvalho Chehab
6fb65a66a2 [media] drxk: add support for Mpeg output clock drive strength config
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:46:35 -02:00
Mauro Carvalho Chehab
67f0461737 [media] drxk: Allow setting it on dynamic_clock mode
This is used on az6007.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:46:19 -02:00
Mauro Carvalho Chehab
da989e0bc7 [media] drxk: Don't assume a default firmware name
Move the ngene/ddbridge firmware into their drivers.

There are two reasons for that:
	1) The firmware used there didn't work for a few devices
I tested here (Terratec H5, H6 and H7);
	2) At least Terratec H7 doesn't seem to require a firmware
for it to work.

After this change, if firmware is not specified, the driver will
use a rom-based firmware (this seems to be the case for Terratec
H7, although I need to better check the USB dumps to be sure about
that).

In any case, the firmware seems to be optional, as the DRX-K driver
don't return the firmware load error.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:45:25 -02:00
Dan Carpenter
3a9888f913 [media] ds3000: using logical && instead of bitwise &
The intent here was to test if the FE_HAS_LOCK was set.  The current
test is equivalent to "if (status) { ..."

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 23:05:13 -02:00
Antti Palosaari
3b6a567afa [media] cxd2820r: do not allow get_frontend() when demod is not initialized
This fixes bug introduced by multi-frontend to single-frontend change.

Finally HAS_LOCK is got back!
We are not allowed to access hardware in sleep mode...
Chip did not like when .get_frontend() reads some registers while
chip was sleeping and due to that HAS_LOCK bit was never gained.

TODO: We should add logic for dvb-core to drop out illegal calls like that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 12:55:47 -02:00
Antti Palosaari
1f64972937 [media] cxd2820r: wait demod lock for DVB-C too
Fix yet another bug introduced be recent cxd2820r multi-frontend to
single-frontend change.

Finally, we have at least almost working picture for DVB-C too.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 12:55:26 -02:00
Jesper Juhl
016961e0d9 [media] tda18271c2dd: Remove pointless linux/version.h include
As pointed out by 'make versioncheck', there's no need for
drivers/media/dvb/frontends/tda18271c2dd.c to

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 12:55:04 -02:00
Antti Palosaari
d04ca8df70 [media] cxd2820r: do not switch to DVB-T when DVB-C fails
Fix another bug introduced by recent multi-frontend to single-frontend
change.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 12:47:32 -02:00
Dan Carpenter
82033bc52a [media] mb86a20s: fix off by one checks
Clearly ">=" was intended here instead of ">".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16 11:37:07 -02:00
Mauro Carvalho Chehab
ebe967492c mb86a20s: Add a few more register settings at the init seq
Some time ago, Manoel sent us a patch adding more stuff
to the init sequence. However, his patch were also doing
non-related stuff, by changing the init logic without
any good reason. So, it was asked for him to submit a
patch with just the data that has changed, in order to
allow us to better analyze it.

As he didn't what it was requested, I finally found some
time to dig into his init sequence and add it here.

Basically, new stuff is added there. There are a few changes:

1) The removal of the extra (duplicated) logic that puts
   the chip into the serial mode;
2) Some Viterbi VBER measurement init data was changed from
   0x00 to 0xff for layer A, to match what was done for
   layers B and C.

None of those caused any regressions and both make sense
on my eyes.

The other parameters additions actually increased the
tuning quality for some channels. Yet, some channels that
were previously discovered with scan disappered, while
others appeared instead. This were tested in Brasilia,
with an external antena.

At the overall, it is now a little better. So, better to
add these, and then try to figure out a configuration that
would get even better scanning results.

Reported-by: Manoel Pinheiro <pinusdtv@hotmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-11 11:15:38 -02:00
Mauro Carvalho Chehab
a7025edfff mb86a20s: Group registers into the same line
On mb86a20s, some registers have sub-addresses, while others not.
In order to make easier to compare different settings, group them.

No functional changes in this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-11 10:56:30 -02:00
Malcolm Priestley
9544e8a647 [media] [BUG] it913x-fe fix typo error making SNR levels unstable
Fix error where SNR unstable and jumps levels.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-10 23:44:05 -02:00
Antti Palosaari
dab734ec95 [media] hd29l2: fix review findings
Fix some issues pointed out by Mauro.
Mauro Carvalho Chehab <mchehab@redhat.com>

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-10 22:58:55 -02:00
Antti Palosaari
852023b58b [media] hd29l2: add debug for used IF frequency
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-10 22:58:18 -02:00
Antti Palosaari
6964c308ec [media] hd29l2: synch for latest DVB core changes
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-10 22:57:14 -02:00
Antti Palosaari
ee9b8c8c27 [media] HDIC HD29L2 DMB-TH demodulator driver
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-10 22:56:55 -02:00
Mauro Carvalho Chehab
959a119f86 [media] mb86a20s: implement get_frontend()
Reports the auto-detected parameters to userspace.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-10 22:35:29 -02:00
Mauro Carvalho Chehab
c0fdbd3367 [media] drxk_hard: Remove dead code
As reported by Oliver, some old dead code were preserved there.

Thanks-to: Oliver endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-07 11:47:31 -02:00
Dan Carpenter
938ca36ef7 [media] af9013: change & to &&
This is just a cleanup, it doesn't change how the code works.  These
are compound conditions and not bitwise operations so it should be &&
and not &.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-06 17:17:43 -02:00
Gianluca Gennari
6a2329ad1c [media] af9013: Fix typo in get_frontend() function
This patch fixes an obvious typo in the get_frontend() function
of the af9013 driver, recently rewritten by Antti Palosaari.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-06 13:12:34 -02:00
Malcolm Priestley
82a0501473 [media] it913x-fe ver 1.13 add BER and UNC monitoring
Add BER monitoring with Pre-Viterbi error rate.

Add UCBLOCKS based on Aborted packets.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-06 13:08:02 -02:00
Malcolm Priestley
245900c4a7 [media] it913x ver 1.22 corrections to Tuner IDs
Correction to tuner ID 0x51.

Don't force tuner ID 0x60 unless eprom data zero.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-06 13:07:42 -02:00
Mauro Carvalho Chehab
6cb393c822 [media] drxk_hard: fix locking issues when changing the delsys
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-05 16:44:10 -02:00
Mauro Carvalho Chehab
fa4b2a171d [media] drxk: create only one frontend for both DVB-C and DVB-T
Instead of creating two DVB frontend entries for the same device,
create just one entry, and fill the delivery_system according with
the supported standards.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-05 16:44:09 -02:00
Mauro Carvalho Chehab
9348393aaf [media] drxk: remove ops.info.frequency_stepsize from DVB-C
ops.info.frequency_stepsize is used only for DVB-T & friends. For
DVB-C, the step size is calculated using the symbol rate.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-05 16:44:08 -02:00
Mauro Carvalho Chehab
534e048103 [media] drxk: Add support for parallel mode and prints mpeg mode
While the driver has support for both serial and parallel mode,
There's was way to select serial mode via configuration. Add
a config option for that, while keeping the default in serial mode.

Also, at debug mode, it will now print a message when mpeg is
enabled/disabled, and showing if parallel or serial mode were
selected, helping developers to double-check if the DRX-K is at
the right mode.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04 22:49:10 -02:00
Mauro Carvalho Chehab
0d3e6fe7cb [media] drxk: Improve a few debug messages
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04 22:49:08 -02:00
Mauro Carvalho Chehab
7581e61d8d [media] dvb: Remove ops->info.type from frontends
Now that this field is deprecated, and core generates it for
DVBv3 calls, remove it from the drivers.

It also adds .delsys on the few drivers where this were missed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04 17:30:34 -02:00
Mauro Carvalho Chehab
1e73fa5d56 [media] stb6100: Properly retrieve symbol rate
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 17:26:23 -02:00
Mauro Carvalho Chehab
a95c471eb7 stv0297: Fix delivery system
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 11:34:14 -02:00
Mauro Carvalho Chehab
533b673b19 [media] dvb: Add ops.delsys to the remaining frontends
A few drivers don't have .delsys. Add it, in order to allow
future patches for dvb_frontend.c to not use info.type.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:38:23 -02:00
Mauro Carvalho Chehab
7c61d80a9b [media] dvb: don't require a parameter for get_frontend
Just like set_frontend, use the dvb cache properties for get_frontend.
This is more consistent, as both functions are now symetric. Also,
at the places get_frontend is called, it makes sense to update the
cache.

Most of this patch were generated by this small perl script:

	while (<>) { $file .= $_; }
	if ($file =~ m/\.get_frontend\s*=\s*([\d\w_]+)/) {
		my $get = $1;
		$file =~ s/($get)(\s*\([^\,\)]+)\,\s*struct\s+dtv_frontend_properties\s*\*\s*([_\d\w]+)\)\s*\{/\1\2)\n{\n\tstruct dtv_frontend_properties *\3 = &fe->dtv_property_cache;/g;
	}
	print $file;

Of course, the changes at dvb_frontend.[ch] were made by hand,
as well as the changes on a few other places, where get_frontend()
is called internally inside the driver.

On some places, get_frontend() were just a void function. Those
occurrences were removed, as the DVB core handles such cases.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:28:23 -02:00
Mauro Carvalho Chehab
63aad05b8d [media] s921: Properly report the delivery system
Before this patch, a query for the delivery systems were
returned SYS_UNDEFINED.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:23:40 -02:00
Mauro Carvalho Chehab
c6f56e7d79 [media] dvb: don't use DVBv3 bandwidth macros
Every frontend now uses DVBv5 way. So, let's not use the DVBv3
macros internally anymore.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:22:49 -02:00
Mauro Carvalho Chehab
88ab898f66 [media] dvb-core: don't use fe_bandwidth_t on driver
Now that everybody is talking DVBv5 API dialect, using this
DVBv3 macro internally is not ok.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:22:41 -02:00
Mauro Carvalho Chehab
1b5d8716b1 [media] dvb: remove the track() fops
This callback is not used anywhere. Maybe it were used in the
past to optimize the custom algo, but, as it is not used anymore,
let's just remove it.

If later needed, some patch may re-add it with a proper
implementation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:22:29 -02:00
Mauro Carvalho Chehab
41da5320df [media] dvb: don't pass a DVBv3 parameter for search() fops
Just like the other DVB algorithms, drivers should use the DVBv5
way to retrieve parameters: via the cache struct.

Actually, several drivers were partially using the DVBv3 struct
and partially using the DVBv5 way, with is confusing and may
lead into troubles.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:16:32 -02:00
Mauro Carvalho Chehab
7e0722215a [media] dvb-core: Don't pass DVBv3 parameters on tune() fops
As all parameters are passed via DVBv5 to the frontends, there's
no need to pass them again via fops. Also, most drivers weren't using
it anyway. So, instead, just pass a parameter to indicate if the
hardware algorithm wants the driver to re-tune or not.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:08:46 -02:00
Mauro Carvalho Chehab
5581e130ad [media] dvb: simplify get_tune_settings() struct
In the past, dvb_frontent_parameters were passed inside the
struct where get_tuner_settings should store their result.

This is not needed anymore, as all parameters needed are stored
already at the fe property cache. So, use it, where needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 10:04:45 -02:00
Mauro Carvalho Chehab
59d3cc1975 [media] af9013: convert get|set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:58:19 -02:00
Mauro Carvalho Chehab
f311f68abb [media] cxd2820: convert get|set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:58:09 -02:00
Mauro Carvalho Chehab
f6c699680c [media] vez1820: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:48:55 -02:00
Mauro Carvalho Chehab
042e5eb79f [media] tda8083: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:48:47 -02:00
Mauro Carvalho Chehab
102a820d36 [media] s55h1411: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:47:32 -02:00
Mauro Carvalho Chehab
fd12984456 [media] s5h1409: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:47:27 -02:00
Mauro Carvalho Chehab
d42c08695a [media] or51211: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:47:22 -02:00
Mauro Carvalho Chehab
d8f7cc2846 [media] or51132: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:46:10 -02:00
Mauro Carvalho Chehab
81931e940e [media] nxt200x: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:43:36 -02:00
Mauro Carvalho Chehab
6714049e04 [media] tda10086: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:43:10 -02:00
Mauro Carvalho Chehab
b2a29b578d [media] tda10071: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:42:28 -02:00
Mauro Carvalho Chehab
787d92e176 [media] tda10023: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:42:19 -02:00
Mauro Carvalho Chehab
7826bcd584 [media] tda10021: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:40:24 -02:00
Mauro Carvalho Chehab
836a52bff7 [media] stv090x: use .delsys property, instead of get_property()
Now that the DVB ops struct contains the supported delivery
systems, use it, instead of adding a get_property() callback
just due to that.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:39:20 -02:00
Mauro Carvalho Chehab
38d945e05c [media] stv900: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:39:16 -02:00
Mauro Carvalho Chehab
45f4a8ea52 [media] stv0299: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:38:21 -02:00
Mauro Carvalho Chehab
35aa48e749 [media] stv0297: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:37:19 -02:00
Mauro Carvalho Chehab
5c6b4e2b32 [media] stv0288: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.

Also, fill the supported delivery systems at dvb_frontend_ops
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31 09:37:12 -02:00