summaryrefslogtreecommitdiff
path: root/drivers/media/common
AgeCommit message (Collapse)Author
2012-04-19[media] xc5000: support 32MHz & 31.875MHz xtal using the 41.024.5 firmwareMichael Krufky
Rather than loading firmware specific for the xtal frequency, just use the standard firmware and set the xtal frequency after firmware upload. The modified firmware will never be released, so we're better off merging this now rather than waiting for v3.5. Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08[media] media: tuners: 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-02-28[media] mt2063: remove mt2063_setTune from headerDanny Kukawka
Commit 99ac54125490f16f7434f82fcb73bbb88290b38e removed the function mt2063_setTune() from mt2063.c. Remove it also from the header file. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] xc5000: declare firmware configuration structures as static constMichael Krufky
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] xc5000: drivers should specify chip revision rather than firmwareMichael Krufky
Specify chip revision at attach time rather than a firmware image. This is a better way to ensure that the correct firmware is loaded for the correct revision of the chip. Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] xc5000: remove static dependencies on xc5000 created by previous ↵Michael Krufky
changesets convert the firmware configuration attach-time parameter from a pointer to an integer so as to remove the static dependency created by the previous changesets. Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] remove unneeded #define's in xc5000.hMichael Krufky
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] tuner: add support for Xceive XC5000CMichael Krufky
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] xc5000: add XC5000C_DEFAULT_FIRMWARE: dvb-fe-xc5000c-41.024.5-31875.fwMichael Krufky
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] xc5000: allow drivers to set desired firmware in xc5000_attachMichael Krufky
newer versions of the xc5000 silicon require newer firmware while remaining 100% driver compatible. original versions of the xc5000a continue to use the same firmware. Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-13[media] max2165: trival fix for some -Wuninitialized warningDanny Kukawka
Fix for some -Wuninitialized compiler warnings. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-08[media] mt2063: increase frequency_max to tune channel 69Jose Alberto Reguero
Increase mt2063 frequency_max to tune to channel 69(858Mhz). Jose Alberto Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21[media] az6007: Fix compilation troubles at az6007Mauro Carvalho Chehab
Some changes are needed, in order to make az6007 compile with the upstream tree. Most of the changes are due to the upstream drxk module. Even allowing its compilation, the driver is not working yet. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-16[media] Add registers names to XC2028 tuner from datahseet and use themMiroslav Slugen
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 Slugen
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 Palosaari
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 Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-06[media] xc3028: fix center frequency calculation for DTV78 firmwareGianluca Gennari
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 Estevam
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 Ringel
[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 Chehab
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 Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Add support for get_if_frequency()Mauro Carvalho Chehab
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 Chehab
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 Chehab
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 Chehab
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 Chehab
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 Chehab
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 Chehab
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 Chehab
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 Chehab
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 Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Properly document the author of the original driverMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Rearrange the delivery system functionsMauro Carvalho Chehab
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 Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Fix analog/digital set params logicMauro Carvalho Chehab
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 Chehab
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 Chehab
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 Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Remove setParm/getParm abstraction layerMauro Carvalho Chehab
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 Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Simplify mt2063_setTune logicMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: simplify lockstatus logicMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Remove several unused parametersMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Use linux default max functionMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Don't violate the DVB APIMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Simplify device init logicMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Simplify some functionsMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] mt2063: Rewrite read/write logic at the driverMauro Carvalho Chehab
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 Chehab
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>