From 9583183acbd40fc6e972ac39ae0a2173976f288e Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 13 Mar 2010 19:03:21 -0300 Subject: V4L/DVB: v4l doc: fix font of field name The field 'reserved' was not tagged as a 'structfield' as it should. This made the text a bit confusing. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Documentation/DocBook/v4l/vidioc-reqbufs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/DocBook') diff --git a/Documentation/DocBook/v4l/vidioc-reqbufs.xml b/Documentation/DocBook/v4l/vidioc-reqbufs.xml index 1c0816372074..69800ae23348 100644 --- a/Documentation/DocBook/v4l/vidioc-reqbufs.xml +++ b/Documentation/DocBook/v4l/vidioc-reqbufs.xml @@ -61,7 +61,7 @@ fields of the v4l2_requestbuffers structure. They set the type field to the respective stream or buffer type, the count field to the desired number of buffers, memory -must be set to the requested I/O method and the reserved array +must be set to the requested I/O method and the reserved array must be zeroed. When the ioctl is called with a pointer to this structure the driver will attempt to allocate the requested number of buffers and it stores the actual number -- cgit v1.2.3 From 7a01f6dbc7abb85a6ec048dd45db92ef1b91fe78 Mon Sep 17 00:00:00 2001 From: Devin Heitmueller Date: Thu, 11 Mar 2010 21:27:59 -0300 Subject: V4L/DVB: videodev2: introduce a common control for chroma gain Introduce a new control for modifying the chroma gain. This allows for user intervention in abnormal signal conditions cases where the decoder's chroma AGC cannot compensate and the value needs to be adjusted manually. This work was sponsored by EyeMagnet Limited. Signed-off-by: Devin Heitmueller Signed-off-by: Mauro Carvalho Chehab --- Documentation/DocBook/v4l/controls.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation/DocBook') diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml index f46450610412..e1bdbb6eff84 100644 --- a/Documentation/DocBook/v4l/controls.xml +++ b/Documentation/DocBook/v4l/controls.xml @@ -266,6 +266,12 @@ minimum value disables backlight compensation. boolean Chroma automatic gain control. + + V4L2_CID_CHROMA_GAIN + integer + Adjusts the Chroma gain control (for use when chroma AGC + is disabled). + V4L2_CID_COLOR_KILLER boolean -- cgit v1.2.3 From b3e212dcbddb10b44d472a5f4c23d5aa0b5876ca Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 22 Mar 2010 04:52:21 -0300 Subject: V4L/DVB: v4l: add V4L2_PIX_FMT_Y4 and V4L2_PIX_FMT_Y6 pixelformats Old 4 and 6 bit greyscale pixel formats for the old bw-qcam webcam. This is needed to convert it to V4L2. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Documentation/DocBook/v4l/pixfmt.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Documentation/DocBook') diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml index 885968d6a2fc..c4ad0a8e42dc 100644 --- a/Documentation/DocBook/v4l/pixfmt.xml +++ b/Documentation/DocBook/v4l/pixfmt.xml @@ -792,6 +792,18 @@ http://www.thedirks.org/winnov/ 'YYUV' unknown + + V4L2_PIX_FMT_Y4 + 'Y04 ' + Old 4-bit greyscale format. Only the least significant 4 bits of each byte are used, +the other bits are set to 0. + + + V4L2_PIX_FMT_Y6 + 'Y06 ' + Old 6-bit greyscale format. Only the least significant 6 bits of each byte are used, +the other bits are set to 0. + -- cgit v1.2.3 From 48213fe3f981d2cbccd926d6858fa9cf8617beed Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 20 Jan 2010 12:12:57 -0300 Subject: V4L/DVB: v4l: Add V4L2_CID_IRIS_ABSOLUTE and V4L2_CID_IRIS_RELATIVE controls Those control, as their names imply, control the camera aperture settings. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- Documentation/DocBook/v4l/compat.xml | 11 +++++++++++ Documentation/DocBook/v4l/controls.xml | 19 +++++++++++++++++++ Documentation/DocBook/v4l/videodev2.h.xml | 3 +++ 3 files changed, 33 insertions(+) (limited to 'Documentation/DocBook') diff --git a/Documentation/DocBook/v4l/compat.xml b/Documentation/DocBook/v4l/compat.xml index b9dbdf9e6d29..854235b5208e 100644 --- a/Documentation/DocBook/v4l/compat.xml +++ b/Documentation/DocBook/v4l/compat.xml @@ -2332,6 +2332,17 @@ more information. +
+ V4L2 in Linux 2.6.34 + + + Added +V4L2_CID_IRIS_ABSOLUTE and +V4L2_CID_IRIS_RELATIVE controls to the + Camera controls class. + + +
diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml index e1bdbb6eff84..7e0c68747134 100644 --- a/Documentation/DocBook/v4l/controls.xml +++ b/Documentation/DocBook/v4l/controls.xml @@ -1830,6 +1830,25 @@ wide-angle direction. The zoom speed unit is driver-specific. + + V4L2_CID_IRIS_ABSOLUTE  + integer + This control sets the +camera's aperture to the specified value. The unit is undefined. +Larger values open the iris wider, smaller values close it. + + + + + V4L2_CID_IRIS_RELATIVE  + integer + This control modifies the +camera's aperture by the specified amount. The unit is undefined. +Positive values open the iris one step further, negative values close +it one step further. This is a write-only control. + + + V4L2_CID_PRIVACY  boolean diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml index 068325940658..c18dfebedeff 100644 --- a/Documentation/DocBook/v4l/videodev2.h.xml +++ b/Documentation/DocBook/v4l/videodev2.h.xml @@ -1271,6 +1271,9 @@ enum v4l2_exposure_auto_type { #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) +#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17) +#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18) + /* FM Modulator class control IDs */ #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) #define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) -- cgit v1.2.3 From 860553023bfed0179b3fe5d01838635f54a314a3 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 6 Apr 2010 06:41:28 -0300 Subject: V4L/DVB: V4L2 Spec: fix V4L2_CTRL_TYPE_CTRL_CLASS documentation The spec says that the control ID for these types of controls is the same as that of the control class. But it should read: 'control class + 1'. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Documentation/DocBook/v4l/vidioc-queryctrl.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/DocBook') diff --git a/Documentation/DocBook/v4l/vidioc-queryctrl.xml b/Documentation/DocBook/v4l/vidioc-queryctrl.xml index 4876ff1a1a04..8e0e055ac934 100644 --- a/Documentation/DocBook/v4l/vidioc-queryctrl.xml +++ b/Documentation/DocBook/v4l/vidioc-queryctrl.xml @@ -325,7 +325,7 @@ should be part of the control documentation. n/a This is not a control. When VIDIOC_QUERYCTRL is called with a control ID -equal to a control class code (see ), the +equal to a control class code (see ) + 1, the ioctl returns the name of the control class and this control type. Older drivers which do not support this feature return an &EINVAL;. -- cgit v1.2.3 From e426e8663f028272b99f91e57bbbab6fda603bf1 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 6 Apr 2010 10:32:19 -0300 Subject: V4L/DVB: DocBook/v4l/compat.xml: add missing
The indentation of the sections had gone wrong, causing a mistake with section nesting. Fixed. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Documentation/DocBook/v4l/compat.xml | 115 ++++++++++++++++++----------------- 1 file changed, 58 insertions(+), 57 deletions(-) (limited to 'Documentation/DocBook') diff --git a/Documentation/DocBook/v4l/compat.xml b/Documentation/DocBook/v4l/compat.xml index 854235b5208e..b42b935913cd 100644 --- a/Documentation/DocBook/v4l/compat.xml +++ b/Documentation/DocBook/v4l/compat.xml @@ -2343,15 +2343,15 @@ more information. - + -
- Relation of V4L2 to other Linux multimedia APIs +
+ Relation of V4L2 to other Linux multimedia APIs -
- X Video Extension +
+ X Video Extension - The X Video Extension (abbreviated XVideo or just Xv) is + The X Video Extension (abbreviated XVideo or just Xv) is an extension of the X Window system, implemented for example by the XFree86 project. Its scope is similar to V4L2, an API to video capture and output devices for X clients. Xv allows applications to display @@ -2362,7 +2362,7 @@ capture or output still images in XPixmaps extension available across many operating systems and architectures. - Because the driver is embedded into the X server Xv has a + Because the driver is embedded into the X server Xv has a number of advantages over the V4L2 video overlay interface. The driver can easily determine the overlay target, &ie; visible graphics memory or off-screen buffers for a @@ -2371,16 +2371,16 @@ overlay, scaling or color-keying, or the clipping functions of the video capture hardware, always in sync with drawing operations or windows moving or changing their stacking order. - To combine the advantages of Xv and V4L a special Xv + To combine the advantages of Xv and V4L a special Xv driver exists in XFree86 and XOrg, just programming any overlay capable Video4Linux device it finds. To enable it /etc/X11/XF86Config must contain these lines: - + Section "Module" Load "v4l" EndSection - As of XFree86 4.2 this driver still supports only V4L + As of XFree86 4.2 this driver still supports only V4L ioctls, however it should work just fine with all V4L2 devices through the V4L2 backward-compatibility layer. Since V4L2 permits multiple opens it is possible (if supported by the V4L2 driver) to capture @@ -2388,83 +2388,84 @@ video while an X client requested video overlay. Restrictions of simultaneous capturing and overlay are discussed in apply. - Only marginally related to V4L2, XFree86 extended Xv to + Only marginally related to V4L2, XFree86 extended Xv to support hardware YUV to RGB conversion and scaling for faster video playback, and added an interface to MPEG-2 decoding hardware. This API is useful to display images captured with V4L2 devices. -
+
-
- Digital Video +
+ Digital Video - V4L2 does not support digital terrestrial, cable or + V4L2 does not support digital terrestrial, cable or satellite broadcast. A separate project aiming at digital receivers exists. You can find its homepage at http://linuxtv.org. The Linux DVB API has no connection to the V4L2 API except that drivers for hybrid hardware may support both. -
+
-
- Audio Interfaces +
+ Audio Interfaces - [to do - OSS/ALSA] + [to do - OSS/ALSA] +
-
-
- Experimental API Elements +
+ Experimental API Elements - The following V4L2 API elements are currently experimental + The following V4L2 API elements are currently experimental and may change in the future. - - - Video Output Overlay (OSD) Interface, + + Video Output Overlay (OSD) Interface, . - + - V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, + V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, &v4l2-buf-type;, . - - - V4L2_CAP_VIDEO_OUTPUT_OVERLAY, + + + V4L2_CAP_VIDEO_OUTPUT_OVERLAY, &VIDIOC-QUERYCAP; ioctl, . - - - &VIDIOC-ENUM-FRAMESIZES; and + + + &VIDIOC-ENUM-FRAMESIZES; and &VIDIOC-ENUM-FRAMEINTERVALS; ioctls. - - - &VIDIOC-G-ENC-INDEX; ioctl. - - - &VIDIOC-ENCODER-CMD; and &VIDIOC-TRY-ENCODER-CMD; + + + &VIDIOC-G-ENC-INDEX; ioctl. + + + &VIDIOC-ENCODER-CMD; and &VIDIOC-TRY-ENCODER-CMD; ioctls. - - - &VIDIOC-DBG-G-REGISTER; and &VIDIOC-DBG-S-REGISTER; + + + &VIDIOC-DBG-G-REGISTER; and &VIDIOC-DBG-S-REGISTER; ioctls. - - - &VIDIOC-DBG-G-CHIP-IDENT; ioctl. - - -
+ + + &VIDIOC-DBG-G-CHIP-IDENT; ioctl. + + +
-
- Obsolete API Elements +
+ Obsolete API Elements - The following V4L2 API elements were superseded by new + The following V4L2 API elements were superseded by new interfaces and should not be implemented in new drivers. - - - VIDIOC_G_MPEGCOMP and + + + VIDIOC_G_MPEGCOMP and VIDIOC_S_MPEGCOMP ioctls. Use Extended Controls, . - - + + +
diff --git a/Documentation/DocBook/v4l/v4l2.xml b/Documentation/DocBook/v4l/v4l2.xml index 060105af49e5..9737243377a3 100644 --- a/Documentation/DocBook/v4l/v4l2.xml +++ b/Documentation/DocBook/v4l/v4l2.xml @@ -401,6 +401,7 @@ and discussions on the V4L mailing list.
&sub-dev-teletext;
&sub-dev-radio;
&sub-dev-rds;
+
&sub-dev-event;
@@ -426,6 +427,7 @@ and discussions on the V4L mailing list. &sub-cropcap; &sub-dbg-g-chip-ident; &sub-dbg-g-register; + &sub-dqevent; &sub-encoder-cmd; &sub-enumaudio; &sub-enumaudioout; @@ -467,6 +469,7 @@ and discussions on the V4L mailing list. &sub-reqbufs; &sub-s-hw-freq-seek; &sub-streamon; + &sub-subscribe-event; &sub-mmap; &sub-munmap; diff --git a/Documentation/DocBook/v4l/vidioc-dqevent.xml b/Documentation/DocBook/v4l/vidioc-dqevent.xml new file mode 100644 index 000000000000..eb45c1695d8c --- /dev/null +++ b/Documentation/DocBook/v4l/vidioc-dqevent.xml @@ -0,0 +1,124 @@ + + + ioctl VIDIOC_DQEVENT + &manvol; + + + + VIDIOC_DQEVENT + Dequeue event + + + + + + int ioctl + int fd + int request + struct v4l2_event +*argp + + + + + + Arguments + + + + fd + + &fd; + + + + request + + VIDIOC_DQEVENT + + + + argp + + + + + + + + + Description + + Dequeue an event from a video device. No input is required + for this ioctl. All the fields of the &v4l2-event; structure are + filled by the driver. The file handle will also receive exceptions + which the application may get by e.g. using the select system + call. + + + struct <structname>v4l2_event</structname> + + &cs-str; + + + __u32 + type + + Type of the event. + + + union + u + + + + + + __u8 + data[64] + Event data. Defined by the event type. The union + should be used to define easily accessible type for + events. + + + __u32 + pending + + Number of pending events excluding this one. + + + __u32 + sequence + + Event sequence number. The sequence number is + incremented for every subscribed event that takes place. + If sequence numbers are not contiguous it means that + events have been lost. + + + + struct timeval + timestamp + + Event timestamp. + + + __u32 + reserved[9] + + Reserved for future extensions. Drivers must set + the array to zero. + + + +
+ +
+
+ diff --git a/Documentation/DocBook/v4l/vidioc-subscribe-event.xml b/Documentation/DocBook/v4l/vidioc-subscribe-event.xml new file mode 100644 index 000000000000..71ab88cb76b3 --- /dev/null +++ b/Documentation/DocBook/v4l/vidioc-subscribe-event.xml @@ -0,0 +1,104 @@ + + + ioctl VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT + &manvol; + + + + VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT + Subscribe or unsubscribe event + + + + + + int ioctl + int fd + int request + struct v4l2_event_subscription +*argp + + + + + + Arguments + + + + fd + + &fd; + + + + request + + VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT + + + + argp + + + + + + + + + Description + + Subscribe or unsubscribe V4L2 event. Subscribed events are + dequeued by using the &VIDIOC-DQEVENT; ioctl. + + + struct <structname>v4l2_event_subscription</structname> + + &cs-str; + + + __u32 + type + Type of the event. + + + __u32 + reserved[7] + Reserved for future extensions. Drivers and applications + must set the array to zero. + + + +
+ + + Event Types + + &cs-def; + + + V4L2_EVENT_ALL + 0 + All events. V4L2_EVENT_ALL is valid only for + VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once. + + + + V4L2_EVENT_PRIVATE_START + 0x08000000 + Base event number for driver-private events. + + + +
+ +
+
+ -- cgit v1.2.3 From 37089368c1b1bea3c71217163e6d5d3b01ef1f19 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 27 Mar 2010 14:10:37 -0300 Subject: V4L/DVB: v4l spec: document what odd and even fields are Document that odd == top and even == bottom. I can never remember this, so it is probably worth documenting. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Documentation/DocBook/v4l/io.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Documentation/DocBook') diff --git a/Documentation/DocBook/v4l/io.xml b/Documentation/DocBook/v4l/io.xml index e870330cbf77..bb685ed6fe7b 100644 --- a/Documentation/DocBook/v4l/io.xml +++ b/Documentation/DocBook/v4l/io.xml @@ -918,8 +918,8 @@ order. When the driver provides or accepts images field by field rather than interleaved, it is also important applications understand -how the fields combine to frames. We distinguish between top and -bottom fields, the spatial order: The first line +how the fields combine to frames. We distinguish between top (aka odd) and +bottom (aka even) fields, the spatial order: The first line of the top field is the first line of an interlaced frame, the first line of the bottom field is the second line of that frame. @@ -972,12 +972,12 @@ between V4L2_FIELD_TOP and V4L2_FIELD_TOP 2 - Images consist of the top field only. + Images consist of the top (aka odd) field only. V4L2_FIELD_BOTTOM 3 - Images consist of the bottom field only. + Images consist of the bottom (aka even) field only. Applications may wish to prevent a device from capturing interlaced images because they will have "comb" or "feathering" artefacts around moving objects. -- cgit v1.2.3 From 0e1de38db83606d802cf2b3e00cf95fc693b8ca2 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 27 Mar 2010 14:10:57 -0300 Subject: V4L/DVB: v4l spec: document new events Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Documentation/DocBook/media-entities.tmpl | 2 ++ Documentation/DocBook/v4l/vidioc-dqevent.xml | 9 ++++++- .../DocBook/v4l/vidioc-subscribe-event.xml | 29 ++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) (limited to 'Documentation/DocBook') diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl index 770be3c3ba75..5d4d40f429a5 100644 --- a/Documentation/DocBook/media-entities.tmpl +++ b/Documentation/DocBook/media-entities.tmpl @@ -85,6 +85,7 @@ VIDIOC_TRY_ENCODER_CMD"> VIDIOC_TRY_EXT_CTRLS"> VIDIOC_TRY_FMT"> +VIDIOC_UNSUBSCRIBE_EVENT"> v4l2_std_id"> @@ -145,6 +146,7 @@ v4l2_encoder_cmd"> v4l2_event"> v4l2_event_subscription"> +v4l2_event_vsync"> v4l2_ext_control"> v4l2_ext_controls"> v4l2_fmtdesc"> diff --git a/Documentation/DocBook/v4l/vidioc-dqevent.xml b/Documentation/DocBook/v4l/vidioc-dqevent.xml index eb45c1695d8c..4e0a7cc30812 100644 --- a/Documentation/DocBook/v4l/vidioc-dqevent.xml +++ b/Documentation/DocBook/v4l/vidioc-dqevent.xml @@ -72,6 +72,13 @@ + + + &v4l2-event-vsync; + vsync + Event data for event V4L2_EVENT_VSYNC. + + __u8 @@ -97,7 +104,7 @@ - struct timeval + struct timespec timestamp Event timestamp. diff --git a/Documentation/DocBook/v4l/vidioc-subscribe-event.xml b/Documentation/DocBook/v4l/vidioc-subscribe-event.xml index 71ab88cb76b3..8b501791aa68 100644 --- a/Documentation/DocBook/v4l/vidioc-subscribe-event.xml +++ b/Documentation/DocBook/v4l/vidioc-subscribe-event.xml @@ -84,6 +84,21 @@ VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once. + + V4L2_EVENT_VSYNC + 1 + This event is triggered on the vertical sync. + This event has &v4l2-event-vsync; associated with it. + + + + V4L2_EVENT_EOS + 2 + This event is triggered when the end of a stream is reached. + This is typically used with MPEG decoders to report to the application + when the last of the MPEG stream has been decoded. + + V4L2_EVENT_PRIVATE_START 0x08000000 @@ -93,6 +108,20 @@ + + struct <structname>v4l2_event_vsync</structname> + + &cs-str; + + + __u8 + field + The upcoming field. See &v4l2-field;. + + + +
+