summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/frontends
AgeCommit message (Collapse)Author
2012-03-19[media] stb0899: fix the limits for signal strength valuesKlaus Schmidinger
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[media] m88rs2000 ver 1.13 Correct deseqc and tuner gain functionsMalcolm Priestley
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[media] au8522: bug-fix: enable modulation AFTER tune (instead of before tuning)Michael Krufky
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[media] m88rs2000: Don't fill info.typeMauro Carvalho Chehab
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[media] m88rs2000 1.12 v2 DVB-S frontend and tuner moduleMalcolm Priestley
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[media] dvb: negative value assigned to unsigned int in CDRXD()Santosh Nayak
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[media] dib9000: implement error handling for DibAcquireLockAlexey Khoroshilov
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[media] dib9000: fix explicit lock mismatchesAlexey Khoroshilov
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[media] STV0288 increase delay between carrier searchMalcolm Priestley
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[media] stb0899: fixed reading of IF_AGC_GAIN registerAndreas Regel
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[media] stb0899: set FE_HAS_SIGNAL flag in read_statusAndreas Regel
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[media] tda10071: fix the delivery systemAntti Palosaari
Commit b2a29b578d9c21b2e5c88020f830d3c42115c51d 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-11[media] [trivial] DiB0090: remove redundant '; ' from dib0090_fw_identify()Jesper Juhl
One semi-colon is enough. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08[media] media: dvb: append $(srctree) to -I parametersAndy Shevchenko
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[media] lgdt330x: fix signedness error in i2c_read_demod_bytes()Xi Wang
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[media] cx22702: Fix signal strengthJean Delvare
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[media] it913x-fe ver 1.15 read signal strenght using reg VAR_P_INBANDMalcolm Priestley
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[media] convert drivers/media/* to use module_i2c_driver()Axel Lin
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[media] rtl2830: __udivdi3 undefinedGianluca Gennari
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-02-28[media] rtl2830: prevent .read_status() when sleepingAntti Palosaari
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[media] rtl2830: correct I2C functionalityAntti Palosaari
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[media] Realtek RTL2830 DVB-T demodulator driverAntti Palosaari
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] [trivial] frontends: Fix typo in tda1004x.cMasanari Iida
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-08[media] drxk: Fix get_tune_settings for DVB-TJose Alberto Reguero
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-01-26[media] drxk_hard: does not need to include linux/version.hJesper Juhl
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-23Merge branch 'v4l_for_linus' into staging/for_v3.4Mauro Carvalho Chehab
* 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[media] cxd2820r: sleep on DVB-T/T2 delivery system switchAntti Palosaari
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[media] cxd2820r: remove unused parameter from cxd2820r_attachAntti Palosaari
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[media] cxd2820r: fix dvb_frontend_opsAntti Palosaari
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-21[media] drxk: Allow enabling MERR/MVAL cfgMauro Carvalho Chehab
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[media] drxk: add support for Mpeg output clock drive strength configMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21[media] drxk: Allow setting it on dynamic_clock modeMauro Carvalho Chehab
This is used on az6007. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21[media] drxk: Don't assume a default firmware nameMauro Carvalho Chehab
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-17[media] ds3000: using logical && instead of bitwise &Dan Carpenter
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-16[media] cxd2820r: do not allow get_frontend() when demod is not initializedAntti Palosaari
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[media] cxd2820r: wait demod lock for DVB-C tooAntti Palosaari
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[media] tda18271c2dd: Remove pointless linux/version.h includeJesper Juhl
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[media] cxd2820r: do not switch to DVB-T when DVB-C failsAntti Palosaari
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[media] mb86a20s: fix off by one checksDan Carpenter
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-11mb86a20s: Add a few more register settings at the init seqMauro Carvalho Chehab
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-11mb86a20s: Group registers into the same lineMauro Carvalho Chehab
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-10[media] [BUG] it913x-fe fix typo error making SNR levels unstableMalcolm Priestley
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[media] hd29l2: fix review findingsAntti Palosaari
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[media] hd29l2: add debug for used IF frequencyAntti Palosaari
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-10[media] hd29l2: synch for latest DVB core changesAntti Palosaari
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-10[media] HDIC HD29L2 DMB-TH demodulator driverAntti Palosaari
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-10[media] mb86a20s: implement get_frontend()Mauro Carvalho Chehab
Reports the auto-detected parameters to userspace. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-07[media] drxk_hard: Remove dead codeMauro Carvalho Chehab
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-06[media] af9013: change & to &&Dan Carpenter
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[media] af9013: Fix typo in get_frontend() functionGianluca Gennari
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>