diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-09-03 09:38:41 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-09-26 08:49:37 -0400 |
commit | 1c4f3c987f44a6653ac49f93d8cbd3adb539be10 (patch) | |
tree | 0e5579dfed92068bf07b7882e1fa026e4fb2ac55 | |
parent | a5338190efc7cfa8c99a6856342a77d21c9a05cf (diff) |
[media] Rename V4L2_(IN|OUT)_CAP_CUSTOM_TIMINGS
The 'custom' timings are no longer just for custom timings, but also for standard
CEA/VESA timings. So rename to V4L2_IN/OUT_CAP_DV_TIMINGS.
The old define is still kept for backwards compatibility.
This decision was taken during the 2012 Media Workshop.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-enuminput.xml | 2 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-enumoutput.xml | 2 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml | 2 | ||||
-rw-r--r-- | drivers/media/v4l2-core/v4l2-ioctl.c | 8 | ||||
-rw-r--r-- | include/linux/videodev2.h | 6 |
5 files changed, 11 insertions, 9 deletions
diff --git a/Documentation/DocBook/media/v4l/vidioc-enuminput.xml b/Documentation/DocBook/media/v4l/vidioc-enuminput.xml index 46d5a044a537..3c9a81305ad4 100644 --- a/Documentation/DocBook/media/v4l/vidioc-enuminput.xml +++ b/Documentation/DocBook/media/v4l/vidioc-enuminput.xml | |||
@@ -283,7 +283,7 @@ input/output interface to linux-media@vger.kernel.org on 19 Oct 2009. | |||
283 | <entry>This input supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry> | 283 | <entry>This input supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry> |
284 | </row> | 284 | </row> |
285 | <row> | 285 | <row> |
286 | <entry><constant>V4L2_IN_CAP_CUSTOM_TIMINGS</constant></entry> | 286 | <entry><constant>V4L2_IN_CAP_DV_TIMINGS</constant></entry> |
287 | <entry>0x00000002</entry> | 287 | <entry>0x00000002</entry> |
288 | <entry>This input supports setting video timings by using VIDIOC_S_DV_TIMINGS.</entry> | 288 | <entry>This input supports setting video timings by using VIDIOC_S_DV_TIMINGS.</entry> |
289 | </row> | 289 | </row> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml b/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml index 428020000ef0..f4ab0798545d 100644 --- a/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml +++ b/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml | |||
@@ -168,7 +168,7 @@ input/output interface to linux-media@vger.kernel.org on 19 Oct 2009. | |||
168 | <entry>This output supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry> | 168 | <entry>This output supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry> |
169 | </row> | 169 | </row> |
170 | <row> | 170 | <row> |
171 | <entry><constant>V4L2_OUT_CAP_CUSTOM_TIMINGS</constant></entry> | 171 | <entry><constant>V4L2_OUT_CAP_DV_TIMINGS</constant></entry> |
172 | <entry>0x00000002</entry> | 172 | <entry>0x00000002</entry> |
173 | <entry>This output supports setting video timings by using VIDIOC_S_DV_TIMINGS.</entry> | 173 | <entry>This output supports setting video timings by using VIDIOC_S_DV_TIMINGS.</entry> |
174 | </row> | 174 | </row> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml b/Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml index feaa18072e81..72369707bd77 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml | |||
@@ -57,7 +57,7 @@ or the timing values are not correct, the driver returns &EINVAL;.</para> | |||
57 | <para>The <filename>linux/v4l2-dv-timings.h</filename> header can be used to get the | 57 | <para>The <filename>linux/v4l2-dv-timings.h</filename> header can be used to get the |
58 | timings of the formats in the <xref linkend="cea861" /> and <xref linkend="vesadmt" /> | 58 | timings of the formats in the <xref linkend="cea861" /> and <xref linkend="vesadmt" /> |
59 | standards. If the current input or output does not support DV timings (e.g. if | 59 | standards. If the current input or output does not support DV timings (e.g. if |
60 | &VIDIOC-ENUMINPUT; does not set the <constant>V4L2_IN_CAP_CUSTOM_TIMINGS</constant> flag), then | 60 | &VIDIOC-ENUMINPUT; does not set the <constant>V4L2_IN_CAP_DV_TIMINGS</constant> flag), then |
61 | &ENODATA; is returned.</para> | 61 | &ENODATA; is returned.</para> |
62 | </refsect1> | 62 | </refsect1> |
63 | 63 | ||
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index f3ced2513b2f..7336363984c1 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c | |||
@@ -984,7 +984,7 @@ static int v4l_enuminput(const struct v4l2_ioctl_ops *ops, | |||
984 | struct v4l2_input *p = arg; | 984 | struct v4l2_input *p = arg; |
985 | 985 | ||
986 | /* | 986 | /* |
987 | * We set the flags for CAP_PRESETS, CAP_CUSTOM_TIMINGS & | 987 | * We set the flags for CAP_PRESETS, CAP_DV_TIMINGS & |
988 | * CAP_STD here based on ioctl handler provided by the | 988 | * CAP_STD here based on ioctl handler provided by the |
989 | * driver. If the driver doesn't support these | 989 | * driver. If the driver doesn't support these |
990 | * for a specific input, it must override these flags. | 990 | * for a specific input, it must override these flags. |
@@ -994,7 +994,7 @@ static int v4l_enuminput(const struct v4l2_ioctl_ops *ops, | |||
994 | if (ops->vidioc_s_dv_preset) | 994 | if (ops->vidioc_s_dv_preset) |
995 | p->capabilities |= V4L2_IN_CAP_PRESETS; | 995 | p->capabilities |= V4L2_IN_CAP_PRESETS; |
996 | if (ops->vidioc_s_dv_timings) | 996 | if (ops->vidioc_s_dv_timings) |
997 | p->capabilities |= V4L2_IN_CAP_CUSTOM_TIMINGS; | 997 | p->capabilities |= V4L2_IN_CAP_DV_TIMINGS; |
998 | 998 | ||
999 | return ops->vidioc_enum_input(file, fh, p); | 999 | return ops->vidioc_enum_input(file, fh, p); |
1000 | } | 1000 | } |
@@ -1005,7 +1005,7 @@ static int v4l_enumoutput(const struct v4l2_ioctl_ops *ops, | |||
1005 | struct v4l2_output *p = arg; | 1005 | struct v4l2_output *p = arg; |
1006 | 1006 | ||
1007 | /* | 1007 | /* |
1008 | * We set the flags for CAP_PRESETS, CAP_CUSTOM_TIMINGS & | 1008 | * We set the flags for CAP_PRESETS, CAP_DV_TIMINGS & |
1009 | * CAP_STD here based on ioctl handler provided by the | 1009 | * CAP_STD here based on ioctl handler provided by the |
1010 | * driver. If the driver doesn't support these | 1010 | * driver. If the driver doesn't support these |
1011 | * for a specific output, it must override these flags. | 1011 | * for a specific output, it must override these flags. |
@@ -1015,7 +1015,7 @@ static int v4l_enumoutput(const struct v4l2_ioctl_ops *ops, | |||
1015 | if (ops->vidioc_s_dv_preset) | 1015 | if (ops->vidioc_s_dv_preset) |
1016 | p->capabilities |= V4L2_OUT_CAP_PRESETS; | 1016 | p->capabilities |= V4L2_OUT_CAP_PRESETS; |
1017 | if (ops->vidioc_s_dv_timings) | 1017 | if (ops->vidioc_s_dv_timings) |
1018 | p->capabilities |= V4L2_OUT_CAP_CUSTOM_TIMINGS; | 1018 | p->capabilities |= V4L2_OUT_CAP_DV_TIMINGS; |
1019 | 1019 | ||
1020 | return ops->vidioc_enum_output(file, fh, p); | 1020 | return ops->vidioc_enum_output(file, fh, p); |
1021 | } | 1021 | } |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 1ed8f904567d..61395ef85a00 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -1191,7 +1191,8 @@ struct v4l2_input { | |||
1191 | 1191 | ||
1192 | /* capabilities flags */ | 1192 | /* capabilities flags */ |
1193 | #define V4L2_IN_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */ | 1193 | #define V4L2_IN_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */ |
1194 | #define V4L2_IN_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ | 1194 | #define V4L2_IN_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ |
1195 | #define V4L2_IN_CAP_CUSTOM_TIMINGS V4L2_IN_CAP_DV_TIMINGS /* For compatibility */ | ||
1195 | #define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */ | 1196 | #define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */ |
1196 | 1197 | ||
1197 | /* | 1198 | /* |
@@ -1214,7 +1215,8 @@ struct v4l2_output { | |||
1214 | 1215 | ||
1215 | /* capabilities flags */ | 1216 | /* capabilities flags */ |
1216 | #define V4L2_OUT_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */ | 1217 | #define V4L2_OUT_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */ |
1217 | #define V4L2_OUT_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ | 1218 | #define V4L2_OUT_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ |
1219 | #define V4L2_OUT_CAP_CUSTOM_TIMINGS V4L2_OUT_CAP_DV_TIMINGS /* For compatibility */ | ||
1218 | #define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */ | 1220 | #define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */ |
1219 | 1221 | ||
1220 | /* | 1222 | /* |