diff options
author | Muralidharan Karicheri <m-karicheri2@ti.com> | 2009-11-19 10:00:31 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-15 21:18:03 -0500 |
commit | b6456c0cfe9d94e6d2bf684e6e6c031fc0b10031 (patch) | |
tree | e5742dc96ec8b2a74708787e6cb4ceefcc3e2bac /include/media/v4l2-subdev.h | |
parent | 20d15a200d34cfb7141fb4558895d7d5233db84b (diff) |
V4L/DVB (13571): v4l: Adding Digital Video Timings APIs
This adds the above APIs to the v4l2 core. This is based on version v1.2
of the RFC titled "V4L - Support for video timings at the input/output interface"
Following new ioctls are added:-
- VIDIOC_ENUM_DV_PRESETS
- VIDIOC_S_DV_PRESET
- VIDIOC_G_DV_PRESET
- VIDIOC_QUERY_DV_PRESET
- VIDIOC_S_DV_TIMINGS
- VIDIOC_G_DV_TIMINGS
Please refer to the RFC for the details. This code was tested using vpfe
capture driver on TI's DM365. Following is the test configuration used :-
Blu-Ray HD DVD source -> TVP7002 -> DM365 (VPFE) ->DDR
A draft version of the TVP7002 driver (currently being reviewed in the mailing
list) was used that supports V4L2_DV_1080I60 & V4L2_DV_720P60 presets.
A loopback video capture application was used for testing these APIs. This calls
following IOCTLS :-
- verify the new v4l2_input capabilities flag added
- Enumerate available presets using VIDIOC_ENUM_DV_PRESETS
- Set one of the supported preset using VIDIOC_S_DV_PRESET
- Get current preset using VIDIOC_G_DV_PRESET
- Detect current preset using VIDIOC_QUERY_DV_PRESET
- Using stub functions in tvp7002, verify VIDIOC_S_DV_TIMINGS
and VIDIOC_G_DV_TIMINGS ioctls are received at the sub device.
- Tested on 64bit platform by Hans Verkuil
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/v4l2-subdev.h')
-rw-r--r-- | include/media/v4l2-subdev.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 00bf17608453..7a3408f9d0f2 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
@@ -217,6 +217,19 @@ struct v4l2_subdev_audio_ops { | |||
217 | 217 | ||
218 | s_routing: see s_routing in audio_ops, except this version is for video | 218 | s_routing: see s_routing in audio_ops, except this version is for video |
219 | devices. | 219 | devices. |
220 | |||
221 | s_dv_preset: set dv (Digital Video) preset in the sub device. Similar to | ||
222 | s_std() | ||
223 | |||
224 | query_dv_preset: query dv preset in the sub device. This is similar to | ||
225 | querystd() | ||
226 | |||
227 | s_dv_timings(): Set custom dv timings in the sub device. This is used | ||
228 | when sub device is capable of setting detailed timing information | ||
229 | in the hardware to generate/detect the video signal. | ||
230 | |||
231 | g_dv_timings(): Get custom dv timings in the sub device. | ||
232 | |||
220 | */ | 233 | */ |
221 | struct v4l2_subdev_video_ops { | 234 | struct v4l2_subdev_video_ops { |
222 | int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config); | 235 | int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config); |
@@ -240,6 +253,14 @@ struct v4l2_subdev_video_ops { | |||
240 | int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); | 253 | int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); |
241 | int (*enum_framesizes)(struct v4l2_subdev *sd, struct v4l2_frmsizeenum *fsize); | 254 | int (*enum_framesizes)(struct v4l2_subdev *sd, struct v4l2_frmsizeenum *fsize); |
242 | int (*enum_frameintervals)(struct v4l2_subdev *sd, struct v4l2_frmivalenum *fival); | 255 | int (*enum_frameintervals)(struct v4l2_subdev *sd, struct v4l2_frmivalenum *fival); |
256 | int (*s_dv_preset)(struct v4l2_subdev *sd, | ||
257 | struct v4l2_dv_preset *preset); | ||
258 | int (*query_dv_preset)(struct v4l2_subdev *sd, | ||
259 | struct v4l2_dv_preset *preset); | ||
260 | int (*s_dv_timings)(struct v4l2_subdev *sd, | ||
261 | struct v4l2_dv_timings *timings); | ||
262 | int (*g_dv_timings)(struct v4l2_subdev *sd, | ||
263 | struct v4l2_dv_timings *timings); | ||
243 | }; | 264 | }; |
244 | 265 | ||
245 | /* | 266 | /* |