summaryrefslogtreecommitdiffstats
path: root/drivers/media/common
Commit message (Collapse)AuthorAgeFilesLines
* [media] xc5000: Add MODULE_FIRMWARE statementsTim Gardner2012-07-311-2/+6
| | | | | | | | | | | | This will make modinfo more useful with regard to discovering necessary firmware files. Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Michael Krufky <mkrufky@kernellabs.com> Cc: Eddi De Pieri <eddi@depieri.net> Cc: linux-media@vger.kernel.org Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-xc2028: unlock on error in xc2028_get_afc()Dan Carpenter2012-07-311-1/+1
| | | | | | | We need to do a mutex_unlock(&priv->lock) before returning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-xc2028: fix "=" vs "==" typoDan Carpenter2012-07-311-1/+1
| | | | | | | We intended to do a compare here, not an assignment. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-xc2028: tag the usual firmwares to help dracutMauro Carvalho Chehab2012-07-061-0/+2
| | | | | | | | | When tuner-xc2028 is not compiled as a module, dracut will need to copy the firmware inside the initfs image. So, use MODULE_FIRMWARE() to indicate such need. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] media: Remove VIDEO_MEDIA Kconfig optionMauro Carvalho Chehab2012-07-051-31/+32
| | | | | | | | | | | | | | | | | | | | | | | In the past, it was possible to have either DVB or V4L2 core as module and the other as builtin. Such config never make much sense, and created several issues in order to make the Kconfig dependency to work, as all drivers that depend on both (most TV drivers) would need to be compiled as 'm'. Due to that, the VIDEO_MEDIA config option were added. Instead of such weird approach, let's just use the MEDIA_SUPPORT =y or =m to select if the media subsystem core will be either builtin or module, simplifying the building system logic. Also, fix the tuners configuration, by enabling them only if a tuner is required. So, if just webcam/grabbers support is selected, no tuner option will be selected. Also, if only digital TV is selected, no analog tuner support is selected. That removes the need of using EXPERT customise options, when analog TV is not selected. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] media: reorganize the main Kconfig itemsMauro Carvalho Chehab2012-07-051-0/+1
| | | | | | | | | | | | | | | | | Change the main items to: <m> Multimedia support ---> [ ] Cameras/video grabbers support [ ] Analog TV support [ ] Digital TV support [ ] AM/FM radio receivers/transmitters support [ ] Remote Controller support This provides an interface that is clearer to end users that are compiling the Kernel, and will allow the building system to automatically unselect drivers for unused functions. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc5000: Add support for DMB-TH and ISDB-TMauro Carvalho Chehab2012-07-051-0/+6
| | | | | | | | | | | xc5000 is just a tuner, not a decoder, so both DMB-TH and ISDB-T should work properly there: it is just a matter of teaching the driver what saw filter should be used and how to calculate the center frequency. Requested-by: Choi Wing Chan <chanchoiwing@gmail.com> Cc: Steven Toth <stoth@linuxtv.org> Cc: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner, xc2028: add support for get_afc()Mauro Carvalho Chehab2012-07-041-1/+45
| | | | | | | | | Implement API support to return AFC frequency shift, as this device supports it. The only other driver that implements it is tda9887, and the frequency there is reported in Hz. So, use Hz also for this tuner. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-xc2028: Fix signal strength reportMauro Carvalho Chehab2012-07-041-9/+16
| | | | | | | | | | | | There are several bugs at the signal strength algorithm: - It is using logical OR, instead of bit OR; - It doesn't wait up to 18 ms as it should; - the strength range is not ok. Rework on it, in order to make it work. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner-xc2028: use request_firmware_nowait()Mauro Carvalho Chehab2012-06-301-49/+129
| | | | | | | | | | | | Change the firmware logic to use request_firmware_nowait(), and to preserve the loaded firmwares in memory, to reduce the risk of troubles with buggy userspace apps. With this change, while the firmware is being loaded, the driver will return -EAGAIN to any calls. If, for some reason, firmware failed to be loaded from userspace, it will return -ENODEV. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7146: Variable set but not usedPeter Senna Tschudin2012-06-191-5/+0Star
| | | | | | | | In function fops_open variable type was set but not used. Tested by compilation only. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Acked-by: Michael Hunold <michael@mihu.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fc0013 ver. 0.2: introduction of get_rf_strength functionHans-Frieder Vogt2012-05-201-1/+73
| | | | | | | | | | Changes compared to version 0.1 of driver (sent 6 May): - Initial implementation of get_rf_strength function. - Introduction of a warning message Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fc0012 ver. 0.6: introduction of get_rf_strength functionHans-Frieder Vogt2012-05-201-1/+71
| | | | | | | | | Changes compared to version 0.5 of driver (sent 6 May): - Initial implementation of get_rf_strength function. Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fc001x: tuner driver for FC0013Hans-Frieder Vogt2012-05-205-0/+671
| | | | | | | | Support for tuner Fitipower FC0013 Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fc001x: tuner driver for FC0012, version 0.5Hans-Frieder Vogt2012-05-205-0/+492
| | | | | | | | Support for tuner Fitipower FC0012 Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fc001x: common header file for FC0012 and FC0013Hans-Frieder Vogt2012-05-201-0/+39
| | | | | | | | Common defines for the FC0012 (v0.5) and FC0013 tuner drivers Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] av7110: fix v4l2_compliance test issuesHans Verkuil2012-05-142-2/+6
| | | | | | | | | Besides the usual inconsistencies in input enumeration there was also a kernel crash if you tried to poll on a vbi node. The checks for sliced vbi output vs vbi capture were not complete enough. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7146: fix querycap, vbi/video separation and g/s_registerHans Verkuil2012-05-142-6/+37
| | | | | | | | | | | | | | The querycap ioctl returned an incorrect version number and incorrect capabilities (mixing up vbi and video caps). The reason for that was that video nodes could do vbi activities: that should be separated between the vbi and video nodes. There were also a few minor problems with dbg_g/s_register that have been resolved. The mxb/saa7146 driver now passes the v4l2_compliance tests. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7146: support control events and priority handlingHans Verkuil2012-05-142-6/+16
| | | | | | | Use v4l2_fh which gives you control events and priority handling for free. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7146: rename vbi/video_q to vbi/video_dmaqHans Verkuil2012-05-142-24/+23Star
| | | | | | | There was also a vbi_q and video_q in saa7146_fh, so that was confusing. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7146: remove the unneeded type field from saa7146_fhHans Verkuil2012-05-141-13/+17
| | | | | | | This information can also be retrieved from struct video_device. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7146: move vbi fields from saa7146_fh to saa7146_vvHans Verkuil2012-05-143-19/+24
| | | | | | | This fields are global and don't belong in a fh struct. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7146: move video_fmt from saa7146_fh to saa7146_vvHans Verkuil2012-05-142-34/+38
| | | | | | | This is a global structure and does not belong to saa7146_fh. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7146: move overlay information from saa7146_fh into saa7146_vvHans Verkuil2012-05-143-28/+42
| | | | | | | This is global information, not per-filehandle information. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mxb/saa7146: first round of cleanupsHans Verkuil2012-05-142-172/+65Star
| | | | | | | Convert to the control framework, fix the easy v4l2-compliance failures. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-dev: add flag to have the core lock all file operationsHans Verkuil2012-05-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This used to be the default if the lock pointer was set, but now that lock is by default only used for ioctl serialization. Those drivers that already used core locking have this flag set explicitly, except for some drivers where it was obvious that there was no need to serialize any file operations other than ioctl. The drivers that didn't need this flag were: drivers/media/radio/dsbr100.c drivers/media/radio/radio-isa.c drivers/media/radio/radio-keene.c drivers/media/radio/radio-miropcm20.c drivers/media/radio/radio-mr800.c drivers/media/radio/radio-tea5764.c drivers/media/radio/radio-timb.c drivers/media/video/vivi.c sound/i2c/other/tea575x-tuner.c The other drivers that use core locking and where it was not immediately obvious that this flag wasn't needed were changed so that the flag is set together with a comment that that driver needs work to avoid having to set that flag. This will often involve taking the core lock in the fops themselves. Eventually this flag should go and it should not be used in new drivers. There are a few reasons why we want to avoid core locking of non-ioctl fops: in the case of mmap this can lead to a deadlock in rare situations since when mmap is called the mmap_sem is held and it is possible for other parts of the code to take that lock as well (copy_from_user()/copy_to_user() perform a down_read(&mm->mmap_sem) when a page fault occurs). It is very unlikely that that happens since the core lock serializes all fops, but the kernel warns about it if lock validation is turned on. For poll it is also undesirable to take the core lock as that can introduce increased latency. The same is true for read/write. While it was possible to make flags or something to turn on/off taking the core lock for each file operation, in practice it is much simpler to just not take it at all except for ioctl and leave it to the driver to take the lock. There are only a handful fops compared to the zillion ioctls we have. I also wanted to make it obvious which drivers still take the lock for all fops, so that's why I chose to have drivers set it explicitly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc5000: xtal_khz should be a u16 rather than a u32Michael Krufky2012-04-192-2/+2
| | | | | Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc5000: log firmware upload failures in xc5000_fwuploadMichael Krufky2012-04-191-1/+4
| | | | | Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc5000: support 32MHz & 31.875MHz xtal using the 41.024.5 firmwareMichael Krufky2012-04-192-4/+36
| | | | | | | | Rather than loading firmware specific for the xtal frequency, just use the standard firmware and set the xtal frequency after firmware upload. Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fc0011: Reduce number of retriesMichael Büsch2012-04-091-1/+1
| | | | | | | | Now that i2c transfers are fixed, 3 retries are enough. Signed-off-by: Michael Buesch <m@bues.ch> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fc0011: use usleep_range()Michael Büsch2012-04-091-2/+2
| | | | | | | | Use usleep_range() instead of msleep() to improve power saving opportunities. Signed-off-by: Michael Buesch <m@bues.ch> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Add fc0011 tuner driverMichael Büsch2012-04-094-0/+573
| | | | | | | | This adds support for the Fitipower fc0011 DVB-t tuner. Signed-off-by: Michael Buesch <m@bues.ch> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Infineon TUA 9001 silicon tuner driverAntti Palosaari2012-04-095-0/+302
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] media: tuners: append $(srctree) to -I parametersAndy Shevchenko2012-03-081-2/+2
| | | | | | | | | 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>
* [media] mt2063: remove mt2063_setTune from headerDanny Kukawka2012-02-281-4/+0Star
| | | | | | | | | 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>
* [media] xc5000: declare firmware configuration structures as static constMichael Krufky2012-02-141-4/+5
| | | | | Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc5000: drivers should specify chip revision rather than firmwareMichael Krufky2012-02-142-19/+17Star
| | | | | | | | | 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>
* [media] xc5000: remove static dependencies on xc5000 created by previous ↵Michael Krufky2012-02-142-13/+26
| | | | | | | | | | | 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>
* [media] remove unneeded #define's in xc5000.hMichael Krufky2012-02-141-5/+2Star
| | | | | Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner: add support for Xceive XC5000CMichael Krufky2012-02-141-0/+4
| | | | | Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc5000: add XC5000C_DEFAULT_FIRMWARE: dvb-fe-xc5000c-41.024.5-31875.fwMichael Krufky2012-02-142-1/+9
| | | | | Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc5000: allow drivers to set desired firmware in xc5000_attachMichael Krufky2012-02-142-6/+29
| | | | | | | | | 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>
* [media] max2165: trival fix for some -Wuninitialized warningDanny Kukawka2012-02-141-3/+6
| | | | | | | Fix for some -Wuninitialized compiler warnings. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mt2063: increase frequency_max to tune channel 69Jose Alberto Reguero2012-02-081-1/+1
| | | | | | | | | 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>
* [media] az6007: Fix compilation troubles at az6007Mauro Carvalho Chehab2012-01-211-1/+1
| | | | | | | | | | 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>
* [media] Add registers names to XC2028 tuner from datahseet and use themMiroslav Slugen2012-01-161-6/+21
| | | | | Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: add support for signal strength measuresMiroslav Slugen2012-01-161-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>
* [media] mxl5007t: bugfix DVB-T 7 MHz and 8 MHz bandwidthAntti Palosaari2012-01-111-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>
* [media] tda18271-fe: Fix support for ISDB-TMauro Carvalho Chehab2012-01-111-0/+1
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc3028: fix center frequency calculation for DTV78 firmwareGianluca Gennari2012-01-061-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>