From e25436581f4117a0df9bf5539f6a7702a78df317 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 7 Mar 2014 11:17:33 -0300 Subject: [PATCH] [media] DocBook v4l2: update the G/S_EDID documentation Document that it is now possible to call G/S_EDID from video nodes, not just sub-device nodes. Add a note that -EINVAL will be returned if the pad does not support EDIDs. Signed-off-by: Hans Verkuil Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- Documentation/DocBook/media/v4l/v4l2.xml | 2 +- ...oc-subdev-g-edid.xml => vidioc-g-edid.xml} | 36 ++++++++++++------- 2 files changed, 24 insertions(+), 14 deletions(-) rename Documentation/DocBook/media/v4l/{vidioc-subdev-g-edid.xml => vidioc-g-edid.xml} (77%) diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml index 61a7bb1faccf..b445161b912c 100644 --- a/Documentation/DocBook/media/v4l/v4l2.xml +++ b/Documentation/DocBook/media/v4l/v4l2.xml @@ -607,6 +607,7 @@ and discussions on the V4L mailing list. &sub-g-crop; &sub-g-ctrl; &sub-g-dv-timings; + &sub-g-edid; &sub-g-enc-index; &sub-g-ext-ctrls; &sub-g-fbuf; @@ -638,7 +639,6 @@ and discussions on the V4L mailing list. &sub-subdev-enum-frame-size; &sub-subdev-enum-mbus-code; &sub-subdev-g-crop; - &sub-subdev-g-edid; &sub-subdev-g-fmt; &sub-subdev-g-frame-interval; &sub-subdev-g-selection; diff --git a/Documentation/DocBook/media/v4l/vidioc-subdev-g-edid.xml b/Documentation/DocBook/media/v4l/vidioc-g-edid.xml similarity index 77% rename from Documentation/DocBook/media/v4l/vidioc-subdev-g-edid.xml rename to Documentation/DocBook/media/v4l/vidioc-g-edid.xml index bbd18f0e6ede..ce4563b87131 100644 --- a/Documentation/DocBook/media/v4l/vidioc-subdev-g-edid.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-edid.xml @@ -1,12 +1,12 @@ - + - ioctl VIDIOC_SUBDEV_G_EDID, VIDIOC_SUBDEV_S_EDID + ioctl VIDIOC_G_EDID, VIDIOC_S_EDID &manvol; - VIDIOC_SUBDEV_G_EDID - VIDIOC_SUBDEV_S_EDID + VIDIOC_G_EDID + VIDIOC_S_EDID Get or set the EDID of a video receiver/transmitter @@ -16,7 +16,7 @@ int ioctl int fd int request - struct v4l2_subdev_edid *argp + struct v4l2_edid *argp @@ -24,7 +24,7 @@ int ioctl int fd int request - const struct v4l2_subdev_edid *argp + const struct v4l2_edid *argp @@ -42,7 +42,7 @@ request - VIDIOC_SUBDEV_G_EDID, VIDIOC_SUBDEV_S_EDID + VIDIOC_G_EDID, VIDIOC_S_EDID @@ -56,12 +56,20 @@ Description - These ioctls can be used to get or set an EDID associated with an input pad - from a receiver or an output pad of a transmitter subdevice. + These ioctls can be used to get or set an EDID associated with an input + from a receiver or an output of a transmitter device. They can be + used with subdevice nodes (/dev/v4l-subdevX) or with video nodes (/dev/videoX). + + When used with video nodes the pad field represents the + input (for video capture devices) or output (for video output devices) index as + is returned by &VIDIOC-ENUMINPUT; and &VIDIOC-ENUMOUTPUT; respectively. When used + with subdevice nodes the pad field represents the + input or output pad of the subdevice. If there is no EDID support for the given + pad value, then the &EINVAL; will be returned. To get the EDID data the application has to fill in the pad, start_block, blocks and edid - fields and call VIDIOC_SUBDEV_G_EDID. The current EDID from block + fields and call VIDIOC_G_EDID. The current EDID from block start_block and of size blocks will be placed in the memory edid points to. The edid pointer must point to memory at least blocks * 128 bytes @@ -91,15 +99,17 @@ data in some way. In any case, the end result is the same: the EDID is no longer available. - - struct <structname>v4l2_subdev_edid</structname> +
+ struct <structname>v4l2_edid</structname> &cs-str; __u32 pad - Pad for which to get/set the EDID blocks. + Pad for which to get/set the EDID blocks. When used with a video device + node the pad represents the input or output index as returned by + &VIDIOC-ENUMINPUT; and &VIDIOC-ENUMOUTPUT; respectively. __u32 -- 2.20.1