01 Jun, 2011

1 commit


20 May, 2011

1 commit


23 Mar, 2011

3 commits


22 Mar, 2011

2 commits

  • V4L2 devices are media entities. As such they need to inherit from
    (include) the media_entity structure.

    When registering/unregistering the device, the media entity is
    automatically registered/unregistered. The entity is acquired on device
    open and released on device close.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Sakari Ailus
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart
     
  • Create a device node named subdevX for every registered subdev.

    As the device node is registered before the subdev core::s_config
    function is called, return -EGAIN on open until initialization
    completes.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Vimarsh Zutshi
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart
     

21 Oct, 2010

3 commits

  • Drivers can optionally set a pointer to a mutex in struct video_device.
    The core will use that to lock before calling open, read, write, unlocked_ioctl,
    poll, mmap or release.

    Updated the documentation as well and ensure that v4l2-event knows about the
    lock: it will unlock it before doing a blocking wait on an event and relock it
    afterwards.

    Ensure that the 'video_is_registered' check is done when the lock is held:
    a typical disconnect will take the lock as well before unregistering the
    device nodes, so to prevent race conditions the video_is_registered check
    should also be done with the lock held.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • The get_unmapped_area file operation is unused. Remove.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Remove the vtx (aka videotext aka teletext) API from the v4l2 core.
    This API was scheduled for removal in kernel 2.6.35.

    The vtx device nodes have been superseded by vbi device nodes
    for many years. No applications exist that use the vtx support.
    Of the two i2c drivers that actually support this API the saa5249
    has been impossible to use for a year now and no known hardware
    that supports this device exists. The saa5246a is theoretically
    supported by the old mxb boards, but it never actually worked.

    In summary: there is no hardware that can use this API and there
    are no applications actually implementing this API.

    The vtx support still reserves minors 192-223 and we would really
    like to reuse those for upcoming new functionality. In the unlikely
    event that new hardware appears that wants to use the functionality
    provided by the vtx API, then that functionality should be build
    around the sliced VBI API instead.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

09 Aug, 2010

1 commit

  • Add a new framework to handle controls which makes life for driver
    developers much easier.

    Note that this patch moves some of the control support that used to be in
    v4l2-common.c to v4l2-ctrls.c. The tables were copied unchanged. The body
    of v4l2_ctrl_query_fill() was copied to a new v4l2_ctrl_fill() function
    in v4l2-ctrls.c. This new function doesn't use the v4l2_queryctrl
    struct anymore, which makes it more general.

    The remainder of v4l2-ctrls.c is all new. Highlights include:

    - No need to implement VIDIOC_QUERYCTRL, QUERYMENU, S_CTRL, G_CTRL,
    S_EXT_CTRLS, G_EXT_CTRLS or TRY_EXT_CTRLS in either bridge drivers
    or subdevs. New wrapper functions are provided that can just be plugged in.
    Once everything has been converted these wrapper functions can be removed as well.

    - When subdevices are added their controls can be automatically merged
    with the bridge driver's controls.

    - Most drivers just need to implement s_ctrl to set the controls.
    The framework handles the locking and tries to be as 'atomic' as possible.

    - Ready for the subdev device nodes: the same mechanism applies to subdevs
    and their device nodes as well. Sub-device drivers can make controls
    local, preventing them from being merged with bridge drivers.

    - Takes care of backwards compatibility handling of VIDIOC_S_CTRL and
    VIDIOC_G_CTRL. Handling of V4L2_CID_PRIVATE_BASE is fully transparent.
    CTRL_CLASS controls are automatically added.

    Signed-off-by: Hans Verkuil
    Reviewed-by: Laurent Pinchart
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

19 May, 2010

1 commit

  • This patch adds a list of v4l2_fh structures to every video_device.
    It allows using file handle related information in V4L2. The event interface
    is one example of such use.

    The use of v4l2_fh is not mandatory for drivers.

    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Sakari Ailus
     

16 Dec, 2009

2 commits


19 Sep, 2009

2 commits


30 Mar, 2009

1 commit


03 Jan, 2009

2 commits

  • Since internal to v4l2 the ioctl prototype is the same regardless of it
    being called through .ioctl or .unlocked_ioctl, we need to convert it all
    to the long return type of unlocked_ioctl.

    Thanks to Jean-Francois Moine for posting an initial patch for this and
    thus bringing it to our attention.

    Cc: Jean-Francois Moine
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Introduce a struct v4l2_file_operations for v4l2 drivers.

    Remove the unnecessary inode argument.

    Move compat32 handling (and llseek) into the v4l2-dev core: this is now
    handled in the v4l2 core and no longer in the drivers themselves.

    Note that this changeset reverts an earlier patch that changed the return
    type of__video_ioctl2 from int to long. This change will be reinstated
    later in a much improved version.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

30 Dec, 2008

2 commits


12 Oct, 2008

7 commits


27 Jul, 2008

3 commits


26 Jul, 2008

2 commits


24 Jul, 2008

3 commits


20 Jul, 2008

4 commits

  • Those changes, together with some proper patches, will allow out-of-tree
    compilation for for kernels < 2.6.19

    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Various ioctl debugging fixes and improvements:

    - use %x rather than %d for control IDs and bitmask fields
    - make two arrays const
    - show the whole control array for the ext_ctrl ioctls
    - print pix_fmt for V4L2_BUF_TYPE_VIDEO_OUTPUT
    - show full type name rather than an integer
    - fix CROPCAP debugging
    - fix G/S_TUNER debugging
    - show error code in case of an error
    - other small cleanups

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • A number of V4L drivers have a mod param to specify their preferred minors.
    This is because it is often desirable for applications to have a static /dev
    name for a particular device. However, using minors has several disadvantages:

    1) the requested minor may already be taken
    2) using a mod param is driver specific
    3) it requires every driver to add a param
    4) requires configuration by hand

    This patch introduces an "index" attribute that when combined with udev rules
    can create static device paths like this:

    /dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video0
    /dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video1
    /dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video2

    $ ls -la /dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video0
    lrwxrwxrwx 1 root root 12 2008-04-28 00:02 /dev/v4l/by-path/pci-0000:00:1d.2-usb-0:1:1.0-video0 -> ../../video1

    These paths are steady across reboots and should be resistant to rearranging
    across Kernel versions.

    video_register_device_index is available to drivers to request a
    specific index number.

    Signed-off-by: Brandon Philips
    Signed-off-by: Kees Cook
    Signed-off-by: Kay Sievers
    Signed-off-by: Mauro Carvalho Chehab

    brandon@ifup.org
     
  • The naming for the callbacks that handle the VIDIOC_ENUM_FMT and
    VIDIOC_S/G/TRY_FMT ioctls was very confusing. Renamed it to match
    the v4l2_buf_type name.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil