summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends
AgeCommit message (Collapse)AuthorFilesLines
2013-02-09[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-25[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-24[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-24[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-24[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-24[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>
2013-01-22[media] mb86a20s: make AGC work betterMauro Carvalho Chehab1-1/+2
It is recommented to change register 0x0440 value to 0, in order to fix some AGC bug. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22[media] mb86a20s: Fix i2c gate on errorMauro Carvalho Chehab1-1/+5
If an error happens, restore tuner I2C gate to the right value. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22[media] mb86a20s: improve error handling at get_frontendMauro Carvalho Chehab1-58/+80
The read/write errors are not handled well on get_frontend. Fix it, by letting the frontend cached values to represent the DVB properties that were successfully retrieved. While here, use "c" for dtv_frontend_properties cache, instead of "p", as this is more common. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] stv0900: Multistream supportEvgeny Plehov2-0/+29
Multistream support for stv0900. For Netup Dual S2 CI with STV0900BAC/AAC. Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] ts2020: call get_rf_strength from frontendMalcolm Priestley3-2/+13
Restore ds3000.c read_signal_strength. Call tuner get_rf_strength from frontend read_signal_strength. We are able to do a NULL check and doesn't limit the tuner attach to the frontend attach area. At the moment the lmedm04 tuner attach is stuck in frontend attach area. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] ts2020.c: ts2020_set_params [BUG] point to fe->tuner_privMalcolm Priestley1-1/+1
Fixes corruption of fe->demodulator_priv Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] af9033: update fc2580 init sequenceAntti Palosaari1-3/+4
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] af9033: update fc0011 init sequenceAntti Palosaari1-36/+36
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] af9033: update tua9001 init sequenceAntti Palosaari1-2/+3
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] af9033: update demod init sequenceAntti Palosaari1-3/+2
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] af9035: dual mode related changesAntti Palosaari1-0/+2
Various small changes and fixes releated to dual mode. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] af9035: dual mode supportJose Alberto Reguero1-0/+12
Adds initial support for af9035 dual mode designs. Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net> [crope@iki.fi: fix merge conflict] Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] af9033: add support for Fitipower FC0012 tunerAntti Palosaari3-0/+48
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-29[media] m88rs2000: make use ts2020Igor M. Liplianin4-478/+318
Tuner part of Montage rs2000 chip is similar to ts2020 tuner. Patch to use ts2020 code. [mchehab@redhat.com: a few CodingStyle fixes] Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-29[media] ds3000: lock led procedure addedIgor M. Liplianin2-0/+14
TeVii s660 and others have LED for lock indication. Let's use it in right order. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-29[media] m88rs2000: SNR, BER implementedIgor M. Liplianin1-8/+36
Trivial patch to implement SNR, BER, UCB counter for Montage rs2000 demod. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-28[media] TeVii DVB-S s421 and s632 cards support, rs2000 partIgor M. Liplianin1-1/+5
One register needs to be changed to TS to work. So we use separate inittab. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Acked-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-28[media] ds3000: bail out early on i2c failures during firmware loadRémi Cardona1-5/+7
- if kmalloc() returns NULL, we can return immediately without trying to kfree() a NULL pointer. - if i2c_transfer() fails, error out immediately instead of trying to upload the remaining bytes of the firmware. - the error code is then properly propagated down to ds3000_initfe(). Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-28[media] ts2020: fix two warnings added by changeset 73f0af4Mauro Carvalho Chehab1-4/+2
drivers/media/dvb-frontends/ts2020.c: In function 'ts2020_set_params': drivers/media/dvb-frontends/ts2020.c:126:47: warning: variable 'div4' set but not used [-Wunused-but-set-variable] drivers/media/dvb-frontends/ts2020.c: At top level: drivers/media/dvb-frontends/ts2020.c:262:5: warning: no previous prototype for 'ts2020_get_signal_strength' [-Wmissing-prototypes] Cc: Konstantin Dimitrov <kosio.dimitrov@gmail.com> Cc: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-28[media] make the other drivers take use of the new ts2020 driverKonstantin Dimitrov1-0/+1
make the other drivers take use of the separate ts2020 driver Signed-off-by: Konstantin Dimitrov <kosio.dimitrov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-28[media] ts2020: add ts2020 tuner driverKonstantin Dimitrov4-0/+380
add separate ts2020 tuner driver Signed-off-by: Konstantin Dimitrov <kosio.dimitrov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-28[media] ds3000: remove ts2020 tuner related codeKonstantin Dimitrov2-223/+27
remove ts2020 tuner related code from ds3000 driver prepare ds3000 driver for using external tuner driver Signed-off-by: Konstantin Dimitrov <kosio.dimitrov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-28[media] dvb-frontends: Replace memcpy with struct assignmentEzequiel Garcia3-5/+4
This kind of memcpy() is error-prone. Its replacement with a struct assignment is prefered because it's type-safe and much easier to read. Found by coccinelle. Hand patched and reviewed. Tested by compilation only. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier struct_name; struct struct_name to; struct struct_name from; expression E; @@ -memcpy(&(to), &(from), E); +to = from; // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-28[media] drxd: allow functional gate control after, attachPatrice Chotard1-0/+4
Previously, gate control didn't work until drxd_init() execution. Migrate necessary set of commands in drxd_attach to allow gate control to be used by tuner which are accessible through i2c gate. Reported-by: frederic.mantegazza@gbiloba.org Signed-off-by: Patrice Chotard <patricechotard@free.fr> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-27Merge tag 'v3.8-rc1' into staging/for_v3.9Mauro Carvalho Chehab1-1/+1
Linux 3.8-rc1 * tag 'v3.8-rc1': (10696 commits) Linux 3.8-rc1 Revert "nfsd: warn on odd reply state in nfsd_vfs_read" ARM: dts: fix duplicated build target and alphabetical sort out for exynos dm stripe: add WRITE SAME support dm: remove map_info dm snapshot: do not use map_context dm thin: dont use map_context dm raid1: dont use map_context dm flakey: dont use map_context dm raid1: rename read_record to bio_record dm: move target request nr to dm_target_io dm snapshot: use per_bio_data dm verity: use per_bio_data dm raid1: use per_bio_data dm: introduce per_bio_data dm kcopyd: add WRITE SAME support to dm_kcopyd_zero dm linear: add WRITE SAME support dm: add WRITE SAME support dm: prepare to support WRITE SAME dm ioctl: use kmalloc if possible ... Conflicts: MAINTAINERS
2012-12-22[media] budget-av: only use t_state if initializedPaul Bolle1-1/+1
Building budget-av.o triggers this GCC warning: In file included from drivers/media/pci/ttpci/budget-av.c:44:0: drivers/media/dvb-frontends/tda8261_cfg.h: In function ‘tda8261_get_bandwidth’: drivers/media/dvb-frontends/tda8261_cfg.h:68:21: warning: ‘t_state.bandwidth’ may be used uninitialized in this function [-Wuninitialized] Move the printk() that uses t_state.bandwith to the location where it should be initialized to fix this. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-21[media] tda10071: fix a warning introduced by changeset 41f55d5755Mauro Carvalho Chehab1-0/+2
The two new tests don't set the returned value. Cc: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-21[media] tda10071: make sure both tuner and demod i2c addresses are specifiedMichael Krufky2-5/+17
display an error message if either tuner_i2c_addr or demod_i2c_addr are not specified in the tda10071_config structure Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-21[media] or51211: apply pr_fmt and use pr_* macros instead of printkAndy Shevchenko1-51/+43
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-21[media] ix2505v: use %*ph[N] to dump small buffersAndy Shevchenko1-1/+1
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-21[media] or51211: use %*ph[N] to dump small buffersAndy Shevchenko1-4/+1
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-18[media] tda10071: add tuner_i2c_addr to struct tda10071_configMichael Krufky2-1/+7
The default i2c address for the tuner is 0x14, allow this to be overridden with a configuration parameter Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-14Merge branch 'v4l_for_linus' of ↵Linus Torvalds15-67/+42
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Missing MAINTAINERS entries were added for several drivers - Adds V4L2 support for DMABUF handling, allowing zero-copy buffer sharing between V4L2 devices and GPU - Got rid of all warnings when compiling with W=1 on x86 - Add a new driver for Exynos hardware (s3c-camif) - Several bug fixes, cleanups and driver improvements * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (243 commits) [media] omap3isp: Replace cpu_is_omap3630() with ISP revision check [media] omap3isp: Prepare/unprepare clocks before/after enable/disable [media] omap3isp: preview: Add support for 8-bit formats at the sink pad [media] omap3isp: Replace printk with dev_* [media] omap3isp: Find source pad from external entity [media] omap3isp: Configure CSI-2 phy based on platform data [media] omap3isp: Add PHY routing configuration [media] omap3isp: Add CSI configuration registers from control block to ISP resources [media] omap3isp: Remove unneeded module memory address definitions [media] omap3isp: Use monotonic timestamps for statistics buffers [media] uvcvideo: Fix control value clamping for unsigned integer controls [media] uvcvideo: Mark first output terminal as default video node [media] uvcvideo: Add VIDIOC_[GS]_PRIORITY support [media] uvcvideo: Return -ENOTTY for unsupported ioctls [media] uvcvideo: Set device_caps in VIDIOC_QUERYCAP [media] uvcvideo: Don't fail when an unsupported format is requested [media] uvcvideo: Return -EACCES when trying to access a read/write-only control [media] uvcvideo: Set error_idx properly for extended controls API failures [media] rtl28xxu: add NOXON DAB/DAB+ USB dongle rev 2 [media] fc2580: write some registers conditionally ...