summaryrefslogtreecommitdiff
path: root/drivers/media
AgeCommit message (Collapse)Author
2012-07-30video/uvc: use memweight()Akinobu Mita
Use memweight() to count the total number of bits set in memory area. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-30[media] rc: ati_remote.c: code style fixingDu, Changbin
changes: 1. wrap some lines that are longer than 80 characters. 2. remove local function prototype declarations which do not need. 3. replace TAB character with a space character in function comments. Signed-off-by: Du, Changbin <changbin.du@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] Avoid sysfs oops when an rc_dev's raw device is absentDouglas Bagnall
For some reason, when the lirc daemon learns that a usb remote control has been unplugged, it wants to read the sysfs attributes of the disappearing device. This is useful for uncovering transient inconsistencies, but less so for keeping the system running when such inconsistencies exist. Under some circumstances (like every time I unplug my dvb stick from my laptop), lirc catches an rc_dev whose raw event handler has been removed (presumably by ir_raw_event_unregister), and proceeds to interrogate the raw protocols supported by the NULL pointer. This patch avoids the NULL dereference, and ignores the issue of how this state of affairs came about in the first place. Version 2 incorporates changes recommended by Mauro Carvalho Chehab (-ENODEV instead of -EINVAL, and a signed-off-by). Signed-off-by: Douglas Bagnall <douglas@paradise.net.nz> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] v4l2-dev.c: Move video_put() after debug printkEzequiel García
It is possible that video_put() releases video_device struct, provoking a panic when debug printk wants to get video_device node name. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] vivi: fix a few format-related compliance issuesHans Verkuil
This patch will always set the field to INTERLACED (this fixes a bug were a driver should never return FIELD_ANY), and will default to YUYV pixelformat if an unknown pixelformat was specified. This way S/TRY_FMT will always return a valid format struct. Regards, Hans Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] az6007: fix incorrect memcpyAlan Cox
Some parts of the C language are subtle and evil. This is one example. Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44041 Reported-by: dcb314@hotmail.com Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] cx25821,medusa: incorrect check on decoder typeAlan Cox
Unsupported requests should be ignored but in fact affected VDEC_A Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44051 Reported-by: dcb314@hotmail.com Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Palash Bandyopadhyay <Palash.Bandyopadhyay@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] ov9640: fix missing breakAlan Cox
Without this rev2 ends up behaving as rev3 Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44081 Reported-by: dcb314@hotmail.com Signed-off-by: Alan Cox <alan@linux.intel.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] davinci: vpbe: fix build error when CONFIG_VIDEO_ADV_DEBUG is enabledPrabhakar Lad
Fix build error when CONFIG_VIDEO_ADV_DEBUG is enabled, declare the vpbe_dev variable. Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] v4l: fix copy/paste typo in vb2_reqbufs commentNicolas THERY
Signed-off-by: Nicolas Thery <nicolas.thery@st.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] davinci: vpbe: fix check for s_dv_preset function pointerPrabhakar Lad
fix check for s_dv_preset function pointer to be NULL. return -EINVAL if function pointer is NULL. Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.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-30[media] vivi: remove pointless video_nr++Hans Verkuil
Remove the pointless video_nr++. It doesn't do anything useful and it has the unexpected side-effect of changing the video_nr module option, so cat /sys/module/vivi/parameters/video_nr gives a different value back then what was specified with modprobe. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] radio-si470x: Add support for the new band APIsHans de Goede
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] radio-si470x: Fix band selectionHans de Goede
The mask was wrong resulting in band 0 and 1 always ending up as band 0 in the register. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] radio-si470x: restore ctrl settings after suspend/resumeHans de Goede
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] radio-cadet: implement frequency band enumerationHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] radio-cadet: fix RDS handlingHans Verkuil
The current RDS code suffered from bit rot. Clean it up and make it work again. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] radio-cadet: upgrade to latest frameworksHans Verkuil
- add control framework - use core locking - use V4L2_TUNER_CAP_LOW - remove volume support: there is no hardware volume control Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] v4l2: add core support for the new VIDIOC_ENUM_FREQ_BANDS ioctlHans Verkuil
This adds the usual core support code for this new ioctl. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] tvp5150: signedness bug in tvp5150_selmux()Dan Carpenter
tvp5150_read() returns negative error codes so this needs to be an int for the error handling to work. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] videobuf-dma-contig: Use NULL instead of plain integerSachin Kamat
Fixes the following sparse warning: drivers/media/video/videobuf-dma-contig.c:59:46: warning: Using plain integer as NULL pointer Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] radio-si470x: Lower firmware version requirementsHans de Goede
Testing with a firmware version 12 usb radio stick has shown version 12 to work fine too. Reported-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] adv7180.c: convert to v4l2 control frameworkFederico Vaga
[mchehab@redhat.com: fix checkpatch.pl ERROR: Macros with complex values should be enclosed in parenthesis] Signed-off-by: Federico Vaga <federico.vaga@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] V4L: Use NULL pointer instead of plain integer in v4l2-ctrls.c fileSachin Kamat
Fixes the following sparse warning: drivers/media/video/v4l2-ctrls.c:2123:43: warning: Using plain integer as NULL pointer Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] media/video: vpif: fixed vpfe->vpif typoDror Cohen
Signed-off-by: Dror Cohen <dror@liveu.tv> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] cx25821: Replace struct memcpy with struct assignmentEzequiel García
Copying structs by assignment is type safe. Plus, is shorter and easier to read. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] cx231xx: Replace struct memcpy with struct assignmentEzequiel García
Copying structs by assignment is type safe. Plus, is shorter and easier to read. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] cx23885: Replace struct memcpy with struct assignmentEzequiel García
Copying structs by assignment is type safe. Plus, is shorter and easier to read. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] saa7164: Replace struct memcpy with struct assignmentEzequiel García
Copying structs by assignment is type safe. Plus, is shorter and easier to read. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] saa7164: Remove unused saa7164_call_i2c_clients()Ezequiel García
This function has no users, so it's safe to remove it. Tested by compilation only. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] cx25821: Remove useless struct i2c_algo_bit_dataEzequiel García
The field 'struct i2c_algo_bit_data i2c_algo' is wrongly confused with struct i2c_algorithm. Moreover, i2c_algo field is not used since i2c is registered using i2c_add_adpater() and not i2c_bit_add_bus(). Therefore, it's safe to remove it. Tested by compilation only. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] cx231xx: Remove useless struct i2c_algo_bit_dataEzequiel García
The field 'struct i2c_algo_bit_data i2c_algo' is wrongly confused with struct i2c_algorithm. Moreover, i2c_algo field is not used since i2c is registered using i2c_add_adpater() and not i2c_bit_add_bus(). Therefore, it's safe to remove it. Tested by compilation only. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] cx23885: Remove useless struct i2c_algo_bit_dataEzequiel García
The field 'struct i2c_algo_bit_data i2c_algo' is wrongly confused with struct i2c_algorithm. Moreover, i2c_algo field is not used since i2c is registered using i2c_add_adpater() and not i2c_bit_add_bus(). Therefore, it's safe to remove it. Tested by compilation only. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] saa7164: Remove useless struct i2c_algo_bit_dataEzequiel García
The field 'struct i2c_algo_bit_data i2c_algo' is wrongly confused with struct i2c_algorithm. Moreover, i2c_algo field is not used since i2c is registered using i2c_add_adpater() and not i2c_bit_add_bus(). Therefore, it's safe to remove it. Tested by compilation only. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] V4L: Add capability flags for memory-to-memory devicesSylwester Nawrocki
This patch adds new V4L2_CAP_VIDEO_M2M and V4L2_CAP_VIDEO_M2M_MPLANE capability flags that are intended to be used for memory-to-memory (M2M) devices, instead of ORed V4L2_CAP_VIDEO_CAPTURE and V4L2_CAP_VIDEO_OUTPUT. V4L2_CAP_VIDEO_M2M flag is added at the drivers, CAPTURE and OUTPUT capability flags are left untouched and will be removed in future, after a transition period required for existing applications to be adapted to check only for V4L2_CAP_VIDEO_M2M. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Kamil Debski <k.debski@samsung.com> Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] m5mols: Correct reported ISO valuesSylwester Nawrocki
The V4L2_CID_ISO_SENSITIVITY control menu values should be standard ISO values multiplied by 1000. Multiply all menu items by 1000 so ISO is properly reported as 50...3200 range. This applies to kernels 3.5+. Cc: stable@vger.kernel.org Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] s5p-fimc: Use switch statement for better readabilitySylwester Nawrocki
Use switch statement rather than multiple 'else if'. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] s5p-fimc: Replace custom err() macro with v4l2_err() macroSachin Kamat
Replace custom err() macro with v4l2_err() macro. [s.nawrocki: added missing end-of-line at the log print] Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] s5p-fimc: Remove V4L2_FL_LOCK_ALL_FOPS flagSylwester Nawrocki
This patch adds locking for open(), close(), poll() and mmap() file operations in the driver as a follow up to the changes done in commit 5126f2590bee412e3053de851cb07f531 "v4l2-dev: add flag to have the core lock all file operations". Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] v4l2-dev: G_PARM was incorrectly enabled for all video nodesHans Verkuil
G_PARM should only be enabled if: - vidioc_g_parm is present - or: it is a video node and vidioc_g_std or tvnorms are set. Without this additional check v4l2-compliance would complain about being able to use g_parm when it didn't expect it. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] mem2mem_testdev: set default size and fix colorspaceHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] mem2mem_testdev: add control events supportHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] v4l2-mem2mem: support events in v4l2_m2m_pollHans Verkuil
v4l2_m2m_poll didn't support events, but that's essential if you want to be able to use control events for example. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] mem2mem_testdev: set bus_info and device_capsHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] mem2mem_testdev: convert to the control framework and v4l2_fhHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] tw9910: Don't access the device in the g_mbus_fmt operationLaurent Pinchart
The g_mbus_fmt operation only needs to return the current mbus frame format and doesn't need to configure the hardware to do so. Fix it to avoid requiring the chip to be powered on when calling the operation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] ov772x: Don't access the device in the g_mbus_fmt operationLaurent Pinchart
The g_mbus_fmt operation only needs to return the current mbus frame format and doesn't need to configure the hardware to do so. Fix it to avoid requiring the chip to be powered on when calling the operation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30[media] ov2640: Don't access the device in the g_mbus_fmt operationLaurent Pinchart
The g_mbus_fmt operation only needs to return the current mbus frame format and doesn't need to configure the hardware to do so. Fix it to avoid requiring the chip to be powered on when calling the operation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>