summaryrefslogtreecommitdiff
path: root/drivers/media
AgeCommit message (Collapse)Author
2013-01-06[media] af9035: dual mode related changesAntti Palosaari
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 Reguero
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] af9035: support for Fitipower FC0012 tuner devicesAntti Palosaari
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 Palosaari
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] em28xx: enable DMABUFMauro Carvalho Chehab
Now that it uses videobuf2, em28xx can support DMABUF. Tested with an HVR-950 on analog mode and a 2gen i5core machine with an i915 graphics adapter. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] ngene: fix commit 36a495a336c3fbbb2f4eeed2a94ab6d5be19d186Mauro Carvalho Chehab
The above commit were applied only partially; it broke tuner and demod attach, but the part that added it to ngene_info was missing. Not sure what happened there, but, without this patch, a regression would be happening. Also, gcc complains about a defined but not used symbol. So, apply manually the missing part. Cc: Patrice Chotard <patricechotard@free.fr> Cc: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] mx2_camera: Convert it to platform driverFabio Estevam
Converting it to platform code can make the code smaller. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] mx2_camera: Remove buffer statesJavier Martin
After removing i.mx25 support and buf_cleanup() callback, buffer states are not used in the code any longer. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] mx2_camera: Remove 'buf_cleanup' callbackJavier Martin
All necessary tasks to end the streaming properly are already implemented in mx2_stop_streaming() and nothing remains to be done in this callback. Furthermore, it only included debug messages so it can be removed. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] mx2_camera: Remove i.mx25 supportJavier Martin
i.MX25 support has been broken for several releases now and nobody seems to care about it. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> [g.liakhovetski@gmx.de: rebased on top of cpu_is_mx27() removal] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] soc-camera: use devm_kzalloc in subdevice driversGuennadi Liakhovetski
I2C drivers can use devm_kzalloc() too in their .probe() methods. Doing so simplifies their clean up paths. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] soc-camera: split struct soc_camera_link into host and subdevice partsGuennadi Liakhovetski
struct soc_camera_link currently contains fields, used both by sensor and bridge drivers. To make subdevice driver re-use simpler, split it into a host and a subdevice parts. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] soc-camera: remove struct soc_camera_device::video_lockGuennadi Liakhovetski
Currently soc-camera has a per-device node lock, used for video operations and a per-host lock for code paths, modifying host's pipeline. Manipulating the two locks increases complexity and doesn't bring any advantages. This patch removes the per-device lock and uses the per-host lock for all operations. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] soc-camera: fix repeated regulator requestingGuennadi Liakhovetski
Currently devm_regulator_bulk_get() is called by soc-camera during host driver probing, but regulators are attached to the camera platform device, that is staying, independent whether the host probed successfully or not. This can lead to repeated regulator requesting, if the host driver is re-probed. Move the call to platform device probing to avoid this. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] soc-camera: properly fix camera probing racesGuennadi Liakhovetski
The recently introduced host_lock causes lockdep warnings, besides, list enumeration in scan_add_host() must be protected by holdint the list_lock. OTOH, holding .video_lock in soc_camera_open() isn't enough to protect the host during its building of the pipeline, because .video_lock is per soc-camera device. If, e.g. more than one sensor can be attached to a host and the user tries to open both device nodes simultaneously, host's .add() method can be called simultaneously for both sensors. Fix these problems by holding list_lock instead of .host_lock in scan_add_host() and taking it shortly at the beginning of soc_camera_open(), and using .host_lock to protect host's .add() and .remove() operations only. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] mt9v022: fix potential NULL pointer dereference in mt9v022_probe()Wei Yongjun
The dereference to 'icl' should be moved below the NULL test. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: declare em28xx_stop_streaming as staticMauro Carvalho Chehab
That fixes the following warning: drivers/media/usb/em28xx/em28xx-video.c:611:5: warning: no previous prototype for 'em28xx_stop_streaming' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] v4l: Reset subdev v4l2_dev field to NULL if registration failsLaurent Pinchart
When subdev registration fails the subdev v4l2_dev field is left to a non-NULL value. Later calls to v4l2_device_unregister_subdev() will consider the subdev as registered and will module_put() the subdev module without any matching module_get(). Fix this by setting the subdev v4l2_dev field to NULL in v4l2_device_register_subdev() when the function fails. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: stable@vger.kernel.org Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: consider the message length limitation of the i2c adapter ↵Frank Schaefer
when reading the eeprom EEPROMs are currently read in blocks of 16 bytes, but the em2800 is limited to 4 bytes per read. All other chip variants support reading of max. 64 bytes at once (according to the em258x datasheet; also verified with em2710, em2882, and em28174). Since em2800_i2c_recv_bytes() has been fixed to return with -EOPNOTSUPP when more than 4 bytes are requested, EEPROM reading with this chip is broken. It was actually broken before that change, too, it just didn't throw an error because the i2c adapter silently returned trash data (for all reads >1 byte !). Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: fix+improve+unify i2c error handling, debug messages and ↵Frank Schaefer
code comments - do not pass USB specific error codes to userspace/i2c-subsystem - unify the returned error codes and make them compliant with the i2c subsystem spec - check number of actually transferred bytes (via USB) everywehere - fix/improve debug messages - improve code comments Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: fix the i2c adapter functionality flagsFrank Schaefer
I2C_FUNC_SMBUS_EMUL includes flag I2C_FUNC_SMBUS_WRITE_BLOCK_DATA which signals that up to 31 data bytes can be written to the ic2 client. But the EM2800 supports only i2c messages with max. 4 data bytes. I2C_FUNC_IC2 should be set if a master_xfer function pointer is provided in struct i2c_algorithm. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: fix two severe bugs in function em2800_i2c_recv_bytes()Frank Schaefer
Function em2800_i2c_recv_bytes() has 2 severe bugs: 1) It does not wait for the i2c read to complete before reading the received message content from the bridge registers. 2) Reading more than 1 byte doesn't work The former can result in data corruption, the latter always does. The rewritten code also superseds the content of function em2800_i2c_check_for_device(). Tested with device "Terratec Cinergy 200 USB". [mchehab@redhat.com: Fix CodingStyle issues] Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: respect the message size constraints for i2c transfersFrank Schaefer
The em2800 can transfer up to 4 bytes per i2c message. All other em25xx/em27xx/28xx chips can transfer at least 64 bytes per message. I2C adapters should never split messages transferred via the I2C subsystem into multiple message transfers, because the result will almost always NOT be the same as when the whole data is transferred to the I2C client in a single message. If the message size exceeds the capabilities of the I2C adapter, -EOPNOTSUPP should be returned. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: IR RC: move assignment of get_key functions from ↵Frank Schaefer
*_change_protocol() functions to em28xx_ir_init() The get_key functions are independent from the selected protocol, so assign them once only at device initialization. [mchehab@redhat.com: fix a merge conflict] Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: refactor the code in em28xx_usb_disconnect()Frank Schaefer
The main purpose of this patch is to move the call of em28xx_release_resources() after the call of em28xx_close_extension(). This is necessary, because some resources might be needed/used by the extensions fini() functions when they get closed. Also mark the device as disconnected earlier in this function and unify the em28xx_uninit_usb_xfer() calls for analog and digital mode. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: simplify device state trackingFrank Schaefer
DEV_INITIALIZED of enum em28xx_dev_state state is used nowhere and there is no need for DEV_MISCONFIGURED, so remove this enum and use a boolean field 'disconnected' in the device struct instead. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: convert to videobuf2Devin Heitmueller
This patch converts the em28xx driver over to videobuf2. It is likely that em28xx_fh can go away entirely, but that will come in a separate patch. [mchehab@redhat.com: fix a non-trivial merge conflict with some VBI patches; CodingStyle fixes] Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: zero vbi_format reserved array and add try_vbi_fmtHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: remove sliced VBI supportHans Verkuil
The sliced VBI support in the tvp5150 is completely broken. And there is no support for the saa7115 sliced VBI implementation in the em28xx driver. So we remove the sliced VBI support completely. It should be possible to get it to work with the tvp5150, but that will require someone to really dig into that driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: std fixes: don't implement in webcam mode, and fix std changesHans Verkuil
When in webcam mode the STD API shouldn't be implemented. When changing the standard the resolution wasn't updated, and there was no check against streaming-in-progress. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] tvp5150: remove compat control opsHans Verkuil
No longer needed now that em28xx has been converted to the control framework. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: fill in readbuffers and fix incorrect return codeHans Verkuil
g/s_parm should fill in readbuffers. For non-webcams s_parm should return -ENOTTY instead of -EINVAL. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: add support for control eventsHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: convert to v4l2_fh, fix priority handlingHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: convert to the control frameworkHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] v4l2-ctrls: add a notify callbackHans Verkuil
Sometimes platform/bridge drivers need to be notified when a control from a sub-device changes value. In order to support this a notify callback was added. [dheitmueller@kernellabs.com: fix merge conflict in v4l2-ctrls.c] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: fix tuner/frequency handlingHans Verkuil
v4l2-compliance found problems with frequency clamping that wasn't reported correctly and missing tuner index checks. Also removed unnecessary tuner type checks (these are now done by the v4l2 core). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: fix VIDIOC_DBG_G_CHIP_IDENT compliance errorsHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: remove bogus input/audio ioctls for the radio deviceHans Verkuil
Radio devices should not implement those ioctls. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05[media] em28xx: fix querycapHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-04[media] em28xx: tell ir-kbd-i2c that WinTV uses an RC5 protocolMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-04[media] em28xx: simplify IR names on I2C devicesMauro Carvalho Chehab
The ir-i2c-kbd already adds I2C IR before the name. The way it is, the devices are named as: "i2c IR (i2c IR (EM2840 Hauppaug" With is ugly and incorrect. After this patch, it is now properly displayed as: "i2c IR (WinTV USB2)" Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-04[media] em28xx: autoload em28xx-rc if the device has an I2C IRMauro Carvalho Chehab
If the device has an I2C IR, em28xx-rc should be loaded by default, except if the user explicitly requested to not load, via modprobe option. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-04[media] em28xx: initialize button/I2C IR earlierMauro Carvalho Chehab
The em28xx-input is used by 3 different types of input devices: - devices with buttons (like cameras and grabber devices); - devices with I2C remotes; - em2860 or latter chips with RC support embedded. When the device has an I2C remote, all it needs to do is to call the proper I2C driver (ir-i2c-kbd), passing the proper data to it, and just leave the code. Also, button devices have its own init code that doesn't depend on having an IR or not (as a general rule, they don't have). So, move its init code to fix bugs introduced by earlier patches that prevent them to work. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-01[media] lmedm04: correct I2C values to 7 bit addressingMalcolm Priestley
The separation the lmedm04 fails on the ts2020 portion because the correct I2C addressing. So, it's time to correct the addressing in the remainder of lmedm04. Tested all tuners. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-01[media] stk1160: Replace BUG_ON with WARN_ONEzequiel Garcia
This situation is not even an error condition so it's stupid to BUG_ON. Learn the lesson: http://permalink.gmane.org/gmane.linux.kernel/1347333 Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-28[media] m88rs2000: make use ts2020Igor M. Liplianin
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-28[media] ds3000: lock led procedure addedIgor M. Liplianin
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-28[media] m88rs2000: SNR, BER implementedIgor M. Liplianin
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] dw2102: autoselect DVB_M88RS2000Igor M. Liplianin
Patch to select rs2000 module to compile automatically for TeVii S421 and S632 cards. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>