aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-03-23[media] drxk_hard: Drop unused parameterJean Delvare1-3/+2
Last parameter of function GetLockStatus() isn't used so drop it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] dvb-frontends: use IS_ENABLEDMauro Carvalho Chehab48-96/+108
Instead of checking everywhere there for 3 symbols, use instead IS_ENABLED macro. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22[media] drxk: fix CNR calculusMauro Carvalho Chehab1-1/+1
Changeset 8f3741e accidentally broke the CNR estimation. It should be calculated as "a + b - c". However, previously, the subtraction by c only occurred if SNR would be positive, due to a bad binding to DVBv3 API. This also fixes the following warning: drivers/media/dvb-frontends/drxk_hard.c:2556:6: warning: variable 'c' set but not used [-Wunused-but-set-variable] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: implement i/o optimized reg table writerAntti Palosaari1-10/+37
Use register address auto increment to reduce I/O when large register / values tables are written. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: sleep on attach()Antti Palosaari1-4/+11
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: move code from it913x to af9033Antti Palosaari1-0/+9
That register is property of demodulator so move it correct place. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] it913x: remove unused af9033 demod tuner config initsAntti Palosaari1-6/+0
Those are demodulator init tables according to used tuner tuner config. af9033 demod driver does those inits currently and due to that these duplicate inits could be removed. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: add IT9135 tuner config "62" init tableAntti Palosaari2-1/+217
Dumped out from the Windows driver version 12.07.06.1 Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: add IT9135 tuner config "61" init tableAntti Palosaari2-1/+218
Dumped out from the Windows driver version 12.07.06.1 Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: add IT9135 tuner config "60" init tableAntti Palosaari2-0/+218
Dumped out from the Windows driver version 12.07.06.1 Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: add IT9135 tuner config "52" init tableAntti Palosaari2-0/+220
Dumped out from the Windows driver version 12.07.06.1 Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: add IT9135 tuner config "51" init tableAntti Palosaari2-0/+220
Dumped out from the Windows driver version 12.07.06.1 Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: add IT9135 tuner config "38" init tableAntti Palosaari2-0/+220
Dumped out from the Windows driver version 12.07.06.1 Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: add IT9135 demod reg init tablesAntti Palosaari2-1/+214
Dumped out from Windows driver version 12.07.06.1, 07/06/2012. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: IT9135 v2 supported related changesAntti Palosaari1-3/+28
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: support for it913x tunersAntti Palosaari2-13/+36
Add support for tuners integrated to the IT9135 and IT9137. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] ts2020: use customise option correctlyPaul Bolle1-1/+1
The Kconfig entry for "TS2020 based tuners" defaults to modular if DVB_FE_CUSTOMISE is set. But that Kconfig symbol was replaced with MEDIA_SUBDRV_AUTOSELECT as of v3.7. So use the new symbol. And negate the logic, so we are in line with all the similar entries in this file. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] drxk: Fix bogus signal strength indicatorMauro Carvalho Chehab1-30/+3
The DVBv3 signal strength indicator is bogus: it doesn't range from 0 to 65535 as it would be expected. Also, 0 means the max signal strength. Now that a better way to estimate it was added, use the new way. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] drxk: use a better calculus for RF strengthMauro Carvalho Chehab1-17/+109
The AZ6007 driver released by Terratec has a better way to estimate the signal strength, at CtrlSigStrength(). Port it to the driver. It should be noticed that there are two parameters there that are tuner-specific. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] drxk: Add pre/post BER and PER/UCB statsMauro Carvalho Chehab3-12/+172
The original az6007 driver has the code to calculate such stats. Add it to the driver, reporting them via DVBv5 stats API. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] drxk: remove dummy BER read codeMauro Carvalho Chehab1-16/+0
The BER code does nothing but filling it with zero. Remove it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-14[media] stv090x: do not unlock unheld mutex in stv090x_sleep()Alexey Khoroshilov1-10/+12
goto err and goto err_gateoff before mutex_lock(&state->internal->demod_lock) lead to unlock of unheld mutex in stv090x_sleep(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Cc: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04[media] mb86a20s: Don't assume a 32.57142MHz clockMauro Carvalho Chehab2-4/+30
Now that some devices initialize register 0x2a with different values, add the calculus formula, instead of hardcoding it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04[media] mb86a20s: Implement set_frontend cache logicMauro Carvalho Chehab1-11/+63
Up to now, the driver was simply assuming TV mode, 13 segs. Implement the logic to control the ISDB operational mode. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04[media] mb86a20s: cleanup the status at set_frontend()Mauro Carvalho Chehab1-0/+1
As the device got re-initialized, the stats should vanish until the device gets lock again. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04[media] mb86a20s: Don't reset strength with the other statsMauro Carvalho Chehab1-1/+0
Signal strength is always available. There's no reason to reset it, as it has its own logic to reset it already. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04[media] mb86a20s: Always reset the frontend with set_frontendMauro Carvalho Chehab1-12/+7
Always init the frontend when set_frontend is called. The rationale is: it was noticed that, on some devices, it fails to lock with a different channel. It seems that some other registers need to be restored to its initial state, when the channel changes. As it is better to reset everything, even wasting a few more miliseconds than to loose channel lock, let's change the logic to always reset. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04[media] mb86a20s: change AGC tuning parametersMauro Carvalho Chehab1-42/+44
Use the AGC settings present on a newer device. The initial settings were taken from one of the first devices with mb86a20s, and there are several reports that this is not working properly on some places. So, instead of keeping using it, get the parameters taken from a newer device. Tests are welcomed. Tested also with cx231xx PixelView SBTVD Hybrid with no regressions noticed so far. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04[media] mb86a20s: don't allow updating signal strength too fastMauro Carvalho Chehab1-7/+17
Getting signal strength requires some loop poking with I2C. Don't let it happen too fast. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04[media] mb86a20s: Fix signal strength calculusMauro Carvalho Chehab1-1/+1
A register typo made the calculation to not work. Fix it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04[media] mb86a20s: provide CNR stats before FE_HAS_SYNCMauro Carvalho Chehab1-8/+16
State 9 means TS started to be output, and it should be associated with FE_HAS_SYNC. The mb86a20scan get CNR statistics at state 7, when frame sync is obtained. As CNR may help to adjust the antenna, provide it earlier. A latter patch could eventually start outputing MER measures earlier, but that would require a bigger change, and probably won't be better than the current way, as the time between changing from state 8 to 9 is generally lower than the time to get the stats collected. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04[media] mb86a20s: adjust IF based on what's set on the tunerMauro Carvalho Chehab1-4/+53
Instead of hardcoding a fixed IF frequency of 3.3 MHz, use the IF frequency provided by the tuner driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04[media] mb86a20s: don't pollute dmesg with debug messagesMauro Carvalho Chehab1-3/+3
There are a few debug tests that are shown with dev_err() or dev_info(). Replace them by dev_dbg(). Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-08[media] stv0900: remove unnecessary null pointer checkCong Ding2-15/+6
The address of a variable is impossible to be null, so we remove the check. Signed-off-by: Cong Ding <dinggnu@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-06[media] use IS_ENABLED() macroPeter Senna Tschudin42-44/+43
This patch introduces the use of IS_ENABLED() macro. For example, replacing: #if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE)) with: #if IS_ENABLED(CONFIG_I2C) All changes made by this patch respect the same replacement pattern. Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Acked-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24[media] stv090x: On STV0903 do not set registers of the second pathAndreas Regel1-9/+132
Sometimes there is a problem when trying to access the non-existing registers of the second demodulator path on the STV0903. This change removes the calls in case the driver is used on a STV0903. Signed-off-by: Andreas Regel <andreas.regel@gmx.de> Acked-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24[media] mb86a20s: remove global BER/PER counters if per-layer counters vanishMauro Carvalho Chehab1-3/+9
If, for any reason, all per-layers counters stop, remove the corresponding global counter. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24[media] mb86a20s: add a logic for post-BER measurementMauro Carvalho Chehab1-24/+196
The logic here is similar to the preBER. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24[media] mb86a20s: fix the PER reset logicMauro Carvalho Chehab1-5/+35
The logic that resets the device is wrong. It should be resetting just the layer that got read. Also, stop is needed before updating the counters. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24[media] mb86a20s: some fixes at preBER logicMauro Carvalho Chehab1-12/+39
The logic that resets the device is wrong. It should be resetting just the layer that got read. Also, stop is needed before updating the counters. While there, rename it, as we'll soon introduce a postBER logic there. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24[media] mb86a20s: add block count measures (PER/UCB)Mauro Carvalho Chehab1-10/+180
Add both per-layer and global block error count and block count, for PER and UCB measurements. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23[media] mb86a20s: add CNR measurementMauro Carvalho Chehab1-2/+334
Add Signal/Noise ratio measurement. On this device, a global measure is taken by the demod. It also provides per-layer CNR measurements, based on Modulation Error measures (MER). Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23[media] mb86a20s: improve bit error count for BERMauro Carvalho Chehab1-3/+157
Do a better job on setting the bit error counters, in order to have all layer measures to happen in a little less than one second. Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23[media] mb86a20s: add BER measurementMauro Carvalho Chehab1-3/+178
Add the methods to read bit error/bit count measurements from mb86a20s. On ISDB-T devices, those reads are done per layer. However, as userspace applications may not be aware of that, add a global measure that will sum the bit errors and bit counts for each layer, storing them into a global value. Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23[media] mb86a20s: calculate statistics at .read_status()Mauro Carvalho Chehab1-39/+224
Instead of providing separate callbacks to read the several FE stats properties, the better seems to use just one method that will: - Read lock status; - Read signal strength; - if locked, get TMCC data; - if locked, get DVB statistics. As the DVB frontend thread will call this read_status callback on every 3 seconds, and userspace can even call it earlier, all stats data and layers layout will be updated together if available, with is a good thing. Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23[media] mb86a20s: don't use state before initializing itMauro Carvalho Chehab1-5/+5
As reported by Feng's kbuild test: From: kbuild test robot <fengguang.wu@intel.com> Subject: drivers/media/dvb-frontends/mb86a20s.c:706 mb86a20s_attach() error: potential null dereference 'state'. (kzalloc returns null) Date: Wed, 23 Jan 2013 19:30:43 +0800 commit: f66d81b54dac26d4e601d4d7faca53f3bdc98427 [media] mb86a20s: convert it to use dev_info/dev_err/dev_dbg drivers/media/dvb-frontends/mb86a20s.c:706 mb86a20s_attach() error: potential null dereference 'state'. (kzalloc returns null) drivers/media/dvb-frontends/mb86a20s.c:706 mb86a20s_attach() error: we previously assumed 'state' could be null (see line 705) As, at mb86a20s_attach(), we have an i2c pointer, use it for all printk messages there, instead of state->i2c. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22[media] mb86a20s: convert it to use dev_info/dev_err/dev_dbgMauro Carvalho Chehab1-44/+52
Instead of having its own set of macros, use the Kernel default ones for debug, error and info. While here, do some cleanup on the debug printk's. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22[media] mb86a20s: Function reorderMauro Carvalho Chehab1-105/+110
Reorder functions to have everything related to stats/status read close. That will make the file more organized as other stats routines will be added. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22[media] mb86a20s: Split status read logic from DVB callbackMauro Carvalho Chehab1-7/+24
Split the logic that reads the status from the DVB callback. That helps to properly return an error code, if status read fails. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22[media] mb86a20s: fix interleaving and FEC retrivalMauro Carvalho Chehab1-5/+17
Get the proper bits from the TMCC table registers. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>