aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-01-16[media] Add registers names to XC2028 tuner from datahseet and use themMiroslav Slugen1-6/+21
Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16[media] xc4000: add support for signal strength measuresMiroslav Slugen1-0/+86
In xc4000 chipsets real signal and noise level is stored in register 0x0A and 0x0B,so we can use those registers to monitor signal strength. I tested this patch on 2 different cards Leadtek DVR3200 and DTV2000H Plus, both with same results, I used special antenna hubs (toner 4x, 6x, 8x and 12x) with mesured signal lost, both registers are in dB value, first represent signal with limit value -113.5dB (should be -114dB) and exactly match with test results. Second represents noise level also in dB and there is no maximum value, but from tests we can drop everything above 32dB which tuner realy can't use, signal was usable till 20dB noise level. In digital mode we can take signal strength but sadly noise level is not relevant and real value is stored in demodulator for now just zl10353, also digital mode is just for testing, because it needs changing other parts of code which reads data only from demodulator. In analog mode I was able to test only FM radio, signal level is not important, it says something about cable and hub losts, but nothing about real quality of reception, so even if we have signal level at minimum 113dB we can still here radio, because of that it is displaied only in debug mode, but for real signal level is used noise register which is again very accurate, radio noise level was betwen 6-20dB for good signal, 20-25dB for medium signal, and above 25dB signal is unusable. For now real benefit of this patch is only for FM radio mode. Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-10[media] mxl5007t: bugfix DVB-T 7 MHz and 8 MHz bandwidthAntti Palosaari1-0/+2
DVB-T did not work at all - only 6 MHz was working but it is not commonly used. Fix it. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-10[media] tda18271-fe: Fix support for ISDB-TMauro Carvalho Chehab1-0/+1
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-06[media] xc3028: fix center frequency calculation for DTV78 firmwareGianluca Gennari1-10/+16
This patch replaces the previous one proposed in the thread "xc3028: force reload of DTV7 firmware in VHF band with Zarlink demodulator", at the linux-media@vger.kernel.org ML. The problem is that the firmware DTV78 works fine in UHF band (8 MHz bandwidth) but is not working at all in VHF band (7 MHz bandwidth). Reading the comments inside the code, I figured out that the real problem could be connected to the formula used to calculate the center frequency offset in VHF band. In fact, removing this adjustment fixes the problem: if ((priv->cur_fw.type & DTV78) && freq < 470000000) offset -= 500000; This is coherent to what was implemented for the DTV7 firmware by an Australian user: if (priv->cur_fw.type & DTV7) offset += 500000; In the end, now the center frequency is the same for all firmwares (DTV7, DTV8, DTV78) and doesn't depend on channel bandwidth. The final code looks clean and simple, and there is no need for any "magic" adjustment: if (priv->cur_fw.type & DTV6) offset = 1750000; else /* DTV7 or DTV8 or DTV78 */ offset = 2750000; Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-06[media] drivers: media: tuners: Fix dependency for MEDIA_TUNER_TEA5761Fabio Estevam1-1/+1
Fix the following build warning: warning: (MEDIA_TUNER) selects MEDIA_TUNER_TEA5761 which has unmet direct dependencies (MEDIA_SUPPORT && VIDEO_MEDIA && I2C && EXPERIMENTAL) Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-05[media] mt2063: fix get_if_frequency callStefan Ringel1-1/+1
[mchehab@redhat.com: patch rebased to apply] Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] Don't test for ops->info.type inside driversMauro Carvalho Chehab1-1/+6
Now, ops->info.type is handled inside the dvb_frontend core, only for DVBv3 calls, and according with the delivery system. So, drivers should not care or use it, otherwise, it may have issues with DVBv5 calls. The drivers that were still using it were detected via this small temporary hack: --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h @@ -29,13 +29,16 @@ #include <linux/types.h> typedef enum fe_type { +#if defined(__DVB_CORE__) || !defined (__KERNEL__) FE_QPSK, FE_QAM, FE_OFDM, FE_ATSC +#else +FE_FOOO +#endif } fe_type_t; - typedef enum fe_caps { FE_IS_STUPID = 0, FE_CAN_INVERSION_AUTO = 0x1, Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Add it to the building systemMauro Carvalho Chehab2-0/+8
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Add support for get_if_frequency()Mauro Carvalho Chehab1-4/+4
get_if_frequency() is needed, in order to work with DRX-K. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: add some useful info for the dvb callback callsMauro Carvalho Chehab1-21/+47
The per-delivery system tables are confusing. Add an extra table that explains them, and some dprintk calls, that allows to check if mt2063 driver is working as expected. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: print the detected versionMauro Carvalho Chehab1-2/+1
Instead of printing it just for debug purposes, outputs the detected version at the logs. This may be useful if someone wants to report a problem. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Fix i2c read messageMauro Carvalho Chehab1-8/+16
While here, improve a few debug messages that helped to track the issue and may be useful in the future. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Print a message about the detected mt2063 typeMauro Carvalho Chehab1-4/+22
This also helps to identify when a device is not initialized, if the bridge doesn't return an error for a I2C failed transfer. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: don't crash if device is not initializedMauro Carvalho Chehab1-0/+25
Instead of crash, return -ENODEV, if the device is not poperly initialized. Also, give a second chance for it to initialize, at set_params calls. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Remove two unused temporary varsMauro Carvalho Chehab1-4/+1
mt2063.c:1531:12: warning: variable 'ofout' set but not used [-Wunused-but-set-variable] mt2063.c:1531:6: warning: variable 'ofin' set but not used [-Wunused-but-set-variable] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Rewrite tuning logicMauro Carvalho Chehab1-49/+13
Several vars at set_parms functions were set, but unused. Remove them and change the logic to return -EINVAL if the analog set_param is used for digital mode. At the analog side, cleans the logic that sets the several analog standards. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Add some debug printk'sMauro Carvalho Chehab1-8/+68
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Convert it to the DVBv5 way for set_params()Mauro Carvalho Chehab1-29/+17
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Properly document the author of the original driverMauro Carvalho Chehab1-2/+4
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Rearrange the delivery system functionsMauro Carvalho Chehab1-77/+66
No functional changes on this patch. Better organize the delivery system information and data types, putting everything together, to improve readability. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Fix commentsMauro Carvalho Chehab1-589/+370
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Fix analog/digital set params logicMauro Carvalho Chehab2-201/+190
The driver were using a hacky way of setting analog and digital frequencies. Remove the hack and properly add the tuner logic for each supported type of standard. I was tempted to add more standards there, like SECAM and to fix radio (as stepping seems broken), but I opted to keep it as-is, as tests would be needed to add additional standards. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: make checkpatch.pl happyMauro Carvalho Chehab1-81/+48
Fix everything but 80 columns and two msleep warnings Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Cleanup some function prototypesMauro Carvalho Chehab1-28/+16
No functional changes here. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Reorder the code to avoid function prototypesMauro Carvalho Chehab1-181/+150
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Remove setParm/getParm abstraction layerMauro Carvalho Chehab2-960/+172
This layer just increases the code size for no good reason, and makes harder to debug. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Rework on the publicly-exported functionsMauro Carvalho Chehab2-32/+14
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Simplify mt2063_setTune logicMauro Carvalho Chehab1-34/+3
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: simplify lockstatus logicMauro Carvalho Chehab1-94/+43
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Remove several unused parametersMauro Carvalho Chehab1-362/+2
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Use linux default max functionMauro Carvalho Chehab1-31/+3
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Don't violate the DVB APIMauro Carvalho Chehab1-42/+9
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Simplify device init logicMauro Carvalho Chehab1-333/+242
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Simplify some functionsMauro Carvalho Chehab1-138/+12
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Rewrite read/write logic at the driverMauro Carvalho Chehab1-189/+73
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Remove the code for more than one adjacent mt2063 tunersMauro Carvalho Chehab1-327/+1
Such code is disabled via ifdef's. Also, they're ugly and rely on some static structures. Just remove. If ever needed, the git log can be used to recover it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Use state for the state structureMauro Carvalho Chehab1-415/+415
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Merge the two state structures into oneMauro Carvalho Chehab1-567/+454
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Remove unused data structuresMauro Carvalho Chehab1-83/+14
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Use Unix standard error handlingMauro Carvalho Chehab1-1220/+1139
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Remove internal version checksMauro Carvalho Chehab1-7/+1
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Move data structures to the driverMauro Carvalho Chehab2-527/+528
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: get rid of compilation warningsMauro Carvalho Chehab2-22/+24
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Remove unused stuffMauro Carvalho Chehab1-512/+0
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Re-define functions as staticMauro Carvalho Chehab2-114/+44
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Remove most of the #if'sMauro Carvalho Chehab2-93/+4
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Use standard Linux types, instead of redefining themMauro Carvalho Chehab2-418/+406
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Fix the driver to make it compileMauro Carvalho Chehab2-9/+17
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Move code from mt2063_cfg.hMauro Carvalho Chehab2-122/+129
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>