summaryrefslogtreecommitdiff
path: root/drivers/media/common
AgeCommit message (Collapse)Author
2012-09-26[media] v4l2: make vidioc_s_fbuf constHans Verkuil
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_fbuf. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21[media] flexcop: Show the item to enable debug after the driverMauro Carvalho Chehab
Instead of showing the option to show debug at the end, show it after each driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21[media] Kconfig: merge all customise options into just oneMauro Carvalho Chehab
Instead of having 3 options to allow customizing the media sub-drivers (tuners, I2C drivers, frontends), merge all of them into just one. That simplifies the life for users, as they can just keep this untouched. Life for developers is also simpler, as there's now just one Kconfig item to remember, for the ancillary sub-drivers providing supports for chips that could change from one board design to another. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-17[media] b2c2: export b2c2_flexcop_debug symbolMauro Carvalho Chehab
ERROR: "b2c2_flexcop_debug" [drivers/media/pci/b2c2/b2c2-flexcop-pci.ko] undefined! Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-16[media] Fix some Makefile rulesMauro Carvalho Chehab
On a few places, := were using instead of +=, causing drivers to not compile. While here, standardize the usage of += on all cases where multiple lines are needed, and for obj-y/obj-m targets, and := when just one line is needed, on <module>-obj rules. Reported-by: Hans Verkuil <hverkuil@xs4all.nl> Identified-by: Antti Polosaari <crope@iki.fi> Tested-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-14[media] siano: break it into common, mmc and usbMauro Carvalho Chehab
siano is, in fact, 2 drivers: one for MMC and one for USB, plus a common bus-independent code. Break it accordingly. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-14[media] saa7146: Move it to its own directoryMauro Carvalho Chehab
In order to better organize the directory tree, move the saa7146 common driver to its own directory. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-14[media] common: move media/common/tuners to media/tunersMauro Carvalho Chehab
Move the tuners one level up, as the "common" directory will be used by drivers that are shared between more than one driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-14[media] b2c2: break it into common/pci/usb directoriesMauro Carvalho Chehab
b2c2 is, in fact, 2 drivers: one for PCI and one for USB, plus a common bus-independent code. Break it accordingly. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-14[media] move the dvb/frontends to drivers/media/dvb-frontendsMauro Carvalho Chehab
Raise the DVB frontends one level up, as the intention is to remove the drivers/media/dvb directory. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-14[media] dvb: move the dvb core one level upMauro Carvalho Chehab
just like the V4L2 core, move the DVB core to drivers/media, as the intention is to get rid of both "video" and "dvb" directories. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] common: tunners: use %*ph to dump small buffersAndy Shevchenko
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-12[media] qt1010: signedness bug in qt1010_init_meas1()Dan Carpenter
qt1010_init_meas2() returns zero on success and negative error codes on failure so the return type should be int instead of u8. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-12[media] tda18218: silence compiler warningAntti Palosaari
Trivial fix. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-12[media] tda18212: use Kernel dev_* loggingAntti Palosaari
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-12[media] tda18212: silence compiler warningAntti Palosaari
Trivial fix. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-12[media] tuner-xc2028: add missing else caseHans Petter Selasky
>From 59306435992d9349f10ad82a8adf14d98becbbe8 Mon Sep 17 00:00:00 2001 Signed-off-by: Hans Petter Selasky <hselasky@c2i.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-10[media] xc5000: change filename to production/redistributable xc5000c firmwareDevin Heitmueller
The original xc5000c driver support was based on a beta version of the firmware, and there were no redistribution rights. Change over to using the release version, for which freely redistributable firmware can be found here: http://kernellabs.com/firmware/xc5000/README.xc5000c http://kernellabs.com/firmware/xc5000/dvb-fe-xc5000c-4.1.30.7.fw Thanks to Ramon Cazares from Cresta Technology for making the firmware available as well as working out the licensing issues. [mchehab@redhat.com: Fix a merge conflict with the patch that added support for MODULE_FIRMWARE() macro] Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Cc: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] xc5000: show debug version fields in decimal instead of hexDevin Heitmueller
The driver prints out a dotted version number but it's in hex. As a result, the version doesn't visibly match the filename for the firmware, and it caused a bunch of confusion while discussing different versions with the chip manufacturer. Change the firmware printout to be in decimal. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] xc5000: add support for firmware load check and init statusDevin Heitmueller
The xc5000c and newer versions of the xc5000a firmware need minor revisions to their initialization process. Add support for validating the firmware was properly loaded, as well as checking the init status after initialization. Based on advice from CrestaTech support as well as xc5000 datasheet v2.3. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] xc5000: reset device if encountering PLL lock failureDevin Heitmueller
It's possible for the xc5000 to enter an unknown state such that all subsequent tuning requests fail. The only way to recover is to reset the tuner and reload the firmware. This problem was detected after several days straight of issuing tuning requests every five seconds. Reset the firmware in the event that the PLL is in an unlocked state. This solution was provided by the engineer at CrestaTech (the company that acquired Xceive). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] xc5000: don't invoke auto calibration unless we really did reset tunerDevin Heitmueller
The current code invokes the auto calibration of the tuner whenever the init routine is called (whenever the DVB frontend opens the device). However we should really only be invoking the calibration if we actually did reset the device and reload the firmware. Rework the routine to only do calibration if reset and firmware load was performed. Also because the called function is now a no-op if the firmware is already loaded, the caller no longer needs to invoke is_firmware_loaded(). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] xc5000: properly report i2c write failuresDevin Heitmueller
The logic as written would *never* actually return an error condition, since the loop would run until the counter hit zero but the check was for a value less than zero. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] xc5000: add support for showing the SNR and gain in the debug outputDevin Heitmueller
When debugging is enabled, also show the analog SNR and the total gain status values. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] xc5000: properly show quality register valuesDevin Heitmueller
The quality register only has relevant data in bits 2-0, so discard the other bits (which results in a value being printed that is consistent with the expected 0-7 range). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] saa7146: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. I also removed some dead code in the form of the saa7146_devices list and saa7146_devices_lock mutex: these were used once but that was a long time ago. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-31[media] xc5000: Add MODULE_FIRMWARE statementsTim Gardner
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>
2012-07-30[media] tuner-xc2028: unlock on error in xc2028_get_afc()Dan Carpenter
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>
2012-07-30[media] tuner-xc2028: fix "=" vs "==" typoDan Carpenter
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>
2012-07-06[media] tuner-xc2028: tag the usual firmwares to help dracutMauro Carvalho Chehab
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>
2012-07-05[media] media: Remove VIDEO_MEDIA Kconfig optionMauro Carvalho Chehab
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>
2012-07-05[media] media: reorganize the main Kconfig itemsMauro Carvalho Chehab
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>
2012-07-05[media] xc5000: Add support for DMB-TH and ISDB-TMauro Carvalho Chehab
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>
2012-07-04[media] tuner, xc2028: add support for get_afc()Mauro Carvalho Chehab
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>
2012-07-04[media] tuner-xc2028: Fix signal strength reportMauro Carvalho Chehab
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>
2012-06-30[media] tuner-xc2028: use request_firmware_nowait()Mauro Carvalho Chehab
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>
2012-06-18[media] saa7146: Variable set but not usedPeter Senna Tschudin
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>
2012-05-20[media] fc0013 ver. 0.2: introduction of get_rf_strength functionHans-Frieder Vogt
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>
2012-05-20[media] fc0012 ver. 0.6: introduction of get_rf_strength functionHans-Frieder Vogt
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>
2012-05-20[media] fc001x: tuner driver for FC0013Hans-Frieder Vogt
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>
2012-05-20[media] fc001x: tuner driver for FC0012, version 0.5Hans-Frieder Vogt
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>
2012-05-20[media] fc001x: common header file for FC0012 and FC0013Hans-Frieder Vogt
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>
2012-05-14[media] av7110: fix v4l2_compliance test issuesHans Verkuil
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>
2012-05-14[media] saa7146: fix querycap, vbi/video separation and g/s_registerHans Verkuil
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>
2012-05-14[media] saa7146: support control events and priority handlingHans Verkuil
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>
2012-05-14[media] saa7146: rename vbi/video_q to vbi/video_dmaqHans Verkuil
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>
2012-05-14[media] saa7146: remove the unneeded type field from saa7146_fhHans Verkuil
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>
2012-05-14[media] saa7146: move vbi fields from saa7146_fh to saa7146_vvHans Verkuil
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>
2012-05-14[media] saa7146: move video_fmt from saa7146_fh to saa7146_vvHans Verkuil
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>
2012-05-14[media] saa7146: move overlay information from saa7146_fh into saa7146_vvHans Verkuil
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>