summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [media] v4l: Document V4L2 control endianness as machine endiannessSakari Ailus2011-07-271-0/+8
| | | | | | | Document V4L2 control endianness as machine endianness. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] adp1653: Add driver for LED flash controllerSakari Ailus2011-07-274-0/+627
| | | | | | | | | | | | | | | This patch adds the driver for the adp1653 LED flash controller. This controller supports a high power led in flash and torch modes and an indicator light, sometimes also called privacy light. The adp1653 is used on the Nokia N900. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Tuukka Toivonen <tuukkat76@gmail.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: David Cohen <dacohen@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l: Add flash control documentationSakari Ailus2011-07-273-0/+293
| | | | | | | | Add documentation for V4L2 flash controls. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l: Add a class and a set of controls for flash devicesSakari Ailus2011-07-272-0/+81
| | | | | | | | | Add a control class and a set of controls to support LED and Xenon flash devices. An example of such a device is the adp1653. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DocBook: document V4L2_CTRL_TYPE_BITMASKHans Verkuil2011-07-273-6/+27
| | | | | | | [mchehab@redhat.com: Fix a merge conflict and make compat.xml coherent with v4l2.xml] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] vivi: add bitmask test controlHans Verkuil2011-07-271-2/+16
| | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-ctrls: add new bitmask control typeHans Verkuil2011-07-273-1/+21
| | | | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] vivi: Fix sleep-in-atomic-contextHans Verkuil2011-07-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix sleep-in-atomic-context bug in vivi: Jun 28 18:14:39 tschai kernel: [ 80.970478] BUG: sleeping function called from invalid context at kernel/mutex.c:271 Jun 28 18:14:39 tschai kernel: [ 80.970483] in_atomic(): 0, irqs_disabled(): 1, pid: 2854, name: vivi-000 Jun 28 18:14:39 tschai kernel: [ 80.970485] INFO: lockdep is turned off. Jun 28 18:14:39 tschai kernel: [ 80.970486] irq event stamp: 0 Jun 28 18:14:39 tschai kernel: [ 80.970487] hardirqs last enabled at (0): [< (null)>] (null) Jun 28 18:14:39 tschai kernel: [ 80.970490] hardirqs last disabled at (0): [<ffffffff8109a90b>] copy_process+0x61b/0x1440 Jun 28 18:14:39 tschai kernel: [ 80.970495] softirqs last enabled at (0): [<ffffffff8109a90b>] copy_process+0x61b/0x1440 Jun 28 18:14:39 tschai kernel: [ 80.970498] softirqs last disabled at (0): [< (null)>] (null) Jun 28 18:14:39 tschai kernel: [ 80.970502] Pid: 2854, comm: vivi-000 Tainted: P 3.0.0-rc1-tschai #372 Jun 28 18:14:39 tschai kernel: [ 80.970504] Call Trace: Jun 28 18:14:39 tschai kernel: [ 80.970509] [<ffffffff81089be3>] __might_sleep+0xf3/0x130 Jun 28 18:14:39 tschai kernel: [ 80.970512] [<ffffffff8176967f>] mutex_lock_nested+0x2f/0x60 Jun 28 18:14:39 tschai kernel: [ 80.970517] [<ffffffffa0acee3e>] vivi_fillbuff+0x20e/0x3f0 [vivi] Jun 28 18:14:39 tschai kernel: [ 80.970520] [<ffffffff81407004>] ? do_raw_spin_lock+0x54/0x150 Jun 28 18:14:39 tschai kernel: [ 80.970524] [<ffffffff8104ef5e>] ? read_tsc+0xe/0x20 Jun 28 18:14:39 tschai kernel: [ 80.970528] [<ffffffff810c9d87>] ? getnstimeofday+0x57/0xe0 Jun 28 18:14:39 tschai kernel: [ 80.970531] [<ffffffffa0acf1b1>] vivi_thread+0x191/0x2f0 [vivi] Jun 28 18:14:39 tschai kernel: [ 80.970534] [<ffffffff81093aa0>] ? try_to_wake_up+0x2d0/0x2d0 Jun 28 18:14:39 tschai kernel: [ 80.970537] [<ffffffffa0acf020>] ? vivi_fillbuff+0x3f0/0x3f0 [vivi] Jun 28 18:14:39 tschai kernel: [ 80.970541] [<ffffffff810bff46>] kthread+0xb6/0xc0 Jun 28 18:14:39 tschai kernel: [ 80.970544] [<ffffffff817743e4>] kernel_thread_helper+0x4/0x10 Jun 28 18:14:39 tschai kernel: [ 80.970547] [<ffffffff8176b4d4>] ? retint_restore_args+0x13/0x13 Jun 28 18:14:39 tschai kernel: [ 80.970550] [<ffffffff810bfe90>] ? __init_kthread_worker+0x70/0x70 Jun 28 18:14:39 tschai kernel: [ 80.970552] [<ffffffff817743e0>] ? gs_change+0x13/0x13 This bug was introduced in 2.6.39. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DocBook: fix typo: vl42_plane_pix_format -> v4l2_plane_pix_formatHans Verkuil2011-07-271-1/+1
| | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-ctrls: always send an event if a control changed implicitlyHans Verkuil2011-07-271-1/+6
| | | | | | | | | | | By default no control events are sent to the application that caused the control value or flags change (i.e. the control(s) passed to VIDIOC_S_CTRL or VIDIOC_S_EXT_CTRLS). But if a change in one control causes a change in another control that was not part of the control(s) in VIDIOC_S_CTRL or S_EXT_CTRLS, then the application should be notified. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-ctrls.c: copy-and-paste error: user_to_new -> new_to_userHans Verkuil2011-07-271-1/+1
| | | | | | | | | The new values were never copied to userspace due to this copy and paste error. This was introduced during the rewrite of this part of the code in commit 3219f8a362640b7e4b7e2187b1094c4e46d85aa0. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: clean-up header filesHans de Goede2011-07-277-367/+3
| | | | | | | | Remove unused pwc-ioctl.h (the copy in include/media is used everywhere) Remove almost empty pwc-uncompress.h, move single define to pwc.h Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: Enable power-management by default on tested modelsHans de Goede2011-07-271-0/+6
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: Add a bunch of pwc custom API to feature-removal-schedule.txtHans de Goede2011-07-271-0/+35
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: Add v4l2 controls for pan/tilt on Logitech QuickCam Orbit/SphereHans de Goede2011-07-273-1/+66
| | | | | | | | | | | | This makes the API for this: 1) v4l2 spec compliant 2) match that of the UVC Logitech QuickCam Sphere models For now this operates in parellel to the sysfs interface for this, but the intend is to deprecate the sysfs interface and remove it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: Allow dqbuf / read to complete while waiting for controlsHans de Goede2011-07-273-4/+38
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: Replace control code with v4l2-ctrls frameworkHans de Goede2011-07-274-1084/+823
| | | | | | | | | Also remove all the converting from native range to 0-65535 and back that was going on. This is no longer needed now that we no longer support v4l1. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: properly allocate dma-able memory for ISO buffersHans de Goede2011-07-272-59/+28
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: Allow multiple opensHans de Goede2011-07-273-18/+42
| | | | | | | | Allow multiple opens of the /dev/video node so that control panel apps can be open to-gether with streaming apps. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: Move various initialization to driver load and / or stream startHans de Goede2011-07-277-246/+114
| | | | | | | | | | | | Doing a bunch of initialization every time /dev/video is opened, and thus for example when the udev rules probe for capabilities makes no sense, do it at driver load, resp. stream start instead. This is a preparation patch for allowing multiple opens of the /dev/video node. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: Make power-saving a per device optionHans de Goede2011-07-273-37/+35
| | | | | | | as vcinterface must be set before calling pwc_camera_power() Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: Remove some unused PWC_INT_PIPE left oversHans de Goede2011-07-271-8/+0
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: Get rid of error_status and unplugged variablesHans de Goede2011-07-273-23/+41
| | | | | | | | | Having 2 ways of tracking disconnection is too much, remove both and instead simply set pdev->udev to NULL on disconnect. Also check for pdev->udev being NULL in all possible entry paths. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: Fix non CodingStyle compliant 3 space indent in pwc.hHans de Goede2011-07-271-63/+68
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: Replace private buffer management code with videobuf2Hans de Goede2011-07-277-808/+275
| | | | | | | | | | | | | | | | | | | Looking at the pwc buffer management code has made it clear to me it needed some serious fixing. Not only was there a ton of code duplication even internally to pwc (read and mmap wait for frame code was duplicated), the code also was outright buggy. With the worst offender being dqbuf, which just round robin returned all the mmap buffers, without paying any attention to them being queued by the app with qbuf or not. And qbuf itself was a noop. So I set out to fix this and already had some cleanups in place when I read Jonathan Corbet's lwn article on videobuf2, this inspired me to just rip out the buffer management code and replace it with videobuf2, greatly reducing the amount of code, and fixing all bugs in one go: Many thanks to Jonathan for the timely article on this ! Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: remove __cplusplus guards from private headerHans de Goede2011-07-271-10/+0
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] pwc: Remove a bunch of bogus sanity checks / don't return EFAULT wronglyHans de Goede2011-07-273-45/+5
| | | | | | | | | | | | | The chances if any of these becoming NULL magically are 0% And if they do become NULL oopsing is the right thing to do (so that the user logs a bug with the kernel rather then with whatever app he was using). Returning EFAULT to userspace should only be done when userspace supplies a bad address, not on driver bugs / hw issues, so in the few cases where the check is not bogus return something else. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca: s/strncpy/strlcpy/Hans de Goede2011-07-272-4/+4
| | | | | | | | Just like in userspace strncpy does not guarantee 0 termination. Use strlcpy instead which does guarantee 0 termination. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca_sunplus: Fix streaming on logitech quicksmart 420Hans de Goede2011-07-271-3/+0
| | | | | | | | Don't issue a stream stop to the camera at the end of sd_start, this fixes streaming with this particular model. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca: Add new se401 camera driverHans de Goede2011-07-274-0/+876
| | | | | | | | Based on the old v4l1 camera by Jeroen Vreeken driver which recently got removed from the kernel. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca: reset image_len to 0 on LAST_PACKET when discarding frameHans de Goede2011-07-271-1/+4
| | | | | | | | | | | Reset image and image_len to NULL/0 on LAST_PACKET when we're in discard frame mode, just like we do when not discarding the current frame. The new se401 driver uses image_len for SOF/EOF detection and thus depends on this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] videodev2.h Add SE401 compressed RGB formatHans de Goede2011-07-272-0/+6
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - ov519: Fix a LED inversionJean-François Moine2011-07-271-1/+2
| | | | | | | In the webcam 041e:405f, the LED is inverted. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] gspca - ov519: Fix sensor detection problemsJean-François Moine2011-07-271-0/+3
| | | | | | | | | The sensor of some webcams could not be detected due to timing problems in sensor register reading. This patch adds bridge register readings before sensor register reading. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] firedtv: change some -EFAULT returns to more fitting error codesStefan Richter2011-07-272-19/+17
| | | | | | | | | | | | | | | | | | | | | | | Mauro Carvalho Chehab wrote: > I'm validating if all drivers are behaving equally with respect to the > error codes returned to userspace, and double-checking with the API. > > On almost all places, -EFAULT code is used only to indicate when > copy_from_user/copy_to_user fails. However, firedtv uses a lot of > -EFAULT, where it seems to me that other error codes should be used > instead (like -EIO for bus transfer errors and -EINVAL/-ERANGE for > invalid/out of range parameters). This concerns only the CI (CAM) related code of firedtv of which I know little. Let's just pass through the error returns of lower level I/O code where applicable, and -EACCES (permission denied) when a seemingly valid but negative FCP response or an unknown-to-firedtv CA message is received. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: Henrik Kurelid <henrik@kurelid.se> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] return -ENOTTY for unsupported ioctl's at legacy driversMauro Carvalho Chehab2011-07-274-25/+4
| | | | | | | | | | Those drivers are not relying at the V4L2 core to handle the ioctl's. So, we need to manually patch them every time a change goes to the core. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-By: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2 core: return -ENOTTY if an ioctl doesn't existMauro Carvalho Chehab2011-07-273-9/+10
| | | | | | | | Currently, -EINVAL is used to return either when an IOCTL is not implemented, or if the ioctl was not implemented. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DocBook/dvb: Use generic descriptions for the video APIMauro Carvalho Chehab2011-07-271-340/+0
| | | | | | | While here, removes the bogus EINTERNAL error codes. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DocBook/dvb: Use generic descriptions for the frontend APIMauro Carvalho Chehab2011-07-273-449/+24
| | | | | | | | | Move generic stuff into gen-errors.xml, and remove them from DVB API. While here, removes two bogus error codes that aren't supported or used on Linux: EINTERNAL and ENOSIGNAL. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dvb-bt8xx: Don't return -EFAULT when a device is not foundMauro Carvalho Chehab2011-07-271-2/+2
| | | | | | | | | When a device (or their PCI structs) are not found, the error should be -ENODEV. -EFAULT is reserved for errors while copying arguments from/to userspace. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DocBook/demux.xml: Remove generic errorsMauro Carvalho Chehab2011-07-272-88/+5
| | | | | | | | Remove generic errors from ioctl() descriptions. For other ioctl's, there's no generic section. So, just keep whatever is there. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DocBook/audio.xml: Remove generic errorsMauro Carvalho Chehab2011-07-272-309/+4
| | | | | | | | | | Remove generic errors from ioctl() descriptions. For other ioctl's, there's no generic section. So, just keep whatever is there. Also remove the EINTERNAL error code, as no DVB driver returns it, and this error code is not defined on POSIX or on Linux. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DVB: Point to the generic error chapterMauro Carvalho Chehab2011-07-277-161/+83
| | | | | | | | | | | | Just like the V4L, MC and LIRC API's, point to the generic error chapter for ioctl's. This will allow moving generic error codes to just one place inside all media API's. A latter patch will remove the generic errors from each specific ioctl. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] nxt6000: i2c bus error should return -EIOMauro Carvalho Chehab2011-07-271-1/+1
| | | | | | | data from/to userspace. Don't mix it with I2C bus error (-EIO). Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: bad parameter is -EINVAL and not -EFAULTMauro Carvalho Chehab2011-07-271-1/+1
| | | | | Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DocBook: Add return error codes to LIRC ioctl sessionMauro Carvalho Chehab2011-07-271-4/+2
| | | | | | | | Add a reference for the generic error code chapter to LIRC ioctl description. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DocBook: Add an error code session for LIRC interfaceMauro Carvalho Chehab2011-07-271-0/+4
| | | | | Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DocBook: Remove V4L generic error description for ioctl()Mauro Carvalho Chehab2011-07-273-70/+13
| | | | | | | | | V4L ioctl function descripton also has a generic error chapter. Remove it, as it is now obsoleted by a general, multi-API generic error descriptions. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DocBook/media-ioc-setup-link.xml: Remove EBUSYMauro Carvalho Chehab2011-07-271-9/+0
| | | | | | | | The EBUSY is already described as a generic error condition, with a similar text. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DocBook: Use the generic error code page also for MC APIMauro Carvalho Chehab2011-07-273-49/+18
| | | | | | | | | Instead of having their own generic error codes at the MC API, move its section to the generic one and be sure that all media ioctl's will point to it. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
OpenPOWER on IntegriCloud