diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-05-23 19:52:55 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-05-23 19:52:55 -0400 |
commit | 1f782fee18b39b9ad438ebbd82c2915a16c879ee (patch) | |
tree | f292930065e6c860714c134790ab8882680ac739 /include/media/v4l2-subdev.h | |
parent | 8eda2f21ed9c936a54fd7bc16cbfa5ee656635c2 (diff) | |
parent | f4b87dee923342505e1ddba8d34ce9de33e75050 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/media/v4l2-subdev.h')
-rw-r--r-- | include/media/v4l2-subdev.h | 70 |
1 files changed, 44 insertions, 26 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 2bcdca0a57fc..a88889355ae0 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
@@ -184,28 +184,6 @@ struct v4l2_subdev_audio_ops { | |||
184 | }; | 184 | }; |
185 | 185 | ||
186 | /* | 186 | /* |
187 | decode_vbi_line: video decoders that support sliced VBI need to implement | ||
188 | this ioctl. Field p of the v4l2_sliced_vbi_line struct is set to the | ||
189 | start of the VBI data that was generated by the decoder. The driver | ||
190 | then parses the sliced VBI data and sets the other fields in the | ||
191 | struct accordingly. The pointer p is updated to point to the start of | ||
192 | the payload which can be copied verbatim into the data field of the | ||
193 | v4l2_sliced_vbi_data struct. If no valid VBI data was found, then the | ||
194 | type field is set to 0 on return. | ||
195 | |||
196 | s_vbi_data: used to generate VBI signals on a video signal. | ||
197 | v4l2_sliced_vbi_data is filled with the data packets that should be | ||
198 | output. Note that if you set the line field to 0, then that VBI signal | ||
199 | is disabled. If no valid VBI data was found, then the type field is | ||
200 | set to 0 on return. | ||
201 | |||
202 | g_vbi_data: used to obtain the sliced VBI packet from a readback register. | ||
203 | Not all video decoders support this. If no data is available because | ||
204 | the readback register contains invalid or erroneous data -EIO is | ||
205 | returned. Note that you must fill in the 'id' member and the 'field' | ||
206 | member (to determine whether CC data from the first or second field | ||
207 | should be obtained). | ||
208 | |||
209 | s_std_output: set v4l2_std_id for video OUTPUT devices. This is ignored by | 187 | s_std_output: set v4l2_std_id for video OUTPUT devices. This is ignored by |
210 | video input devices. | 188 | video input devices. |
211 | 189 | ||
@@ -243,10 +221,6 @@ struct v4l2_subdev_audio_ops { | |||
243 | struct v4l2_subdev_video_ops { | 221 | struct v4l2_subdev_video_ops { |
244 | int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config); | 222 | int (*s_routing)(struct v4l2_subdev *sd, u32 input, u32 output, u32 config); |
245 | int (*s_crystal_freq)(struct v4l2_subdev *sd, u32 freq, u32 flags); | 223 | int (*s_crystal_freq)(struct v4l2_subdev *sd, u32 freq, u32 flags); |
246 | int (*decode_vbi_line)(struct v4l2_subdev *sd, struct v4l2_decode_vbi_line *vbi_line); | ||
247 | int (*s_vbi_data)(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *vbi_data); | ||
248 | int (*g_vbi_data)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_data *vbi_data); | ||
249 | int (*g_sliced_vbi_cap)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_cap *cap); | ||
250 | int (*s_std_output)(struct v4l2_subdev *sd, v4l2_std_id std); | 224 | int (*s_std_output)(struct v4l2_subdev *sd, v4l2_std_id std); |
251 | int (*querystd)(struct v4l2_subdev *sd, v4l2_std_id *std); | 225 | int (*querystd)(struct v4l2_subdev *sd, v4l2_std_id *std); |
252 | int (*g_input_status)(struct v4l2_subdev *sd, u32 *status); | 226 | int (*g_input_status)(struct v4l2_subdev *sd, u32 *status); |
@@ -262,6 +236,8 @@ struct v4l2_subdev_video_ops { | |||
262 | int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); | 236 | int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); |
263 | int (*enum_framesizes)(struct v4l2_subdev *sd, struct v4l2_frmsizeenum *fsize); | 237 | int (*enum_framesizes)(struct v4l2_subdev *sd, struct v4l2_frmsizeenum *fsize); |
264 | int (*enum_frameintervals)(struct v4l2_subdev *sd, struct v4l2_frmivalenum *fival); | 238 | int (*enum_frameintervals)(struct v4l2_subdev *sd, struct v4l2_frmivalenum *fival); |
239 | int (*enum_dv_presets) (struct v4l2_subdev *sd, | ||
240 | struct v4l2_dv_enum_preset *preset); | ||
265 | int (*s_dv_preset)(struct v4l2_subdev *sd, | 241 | int (*s_dv_preset)(struct v4l2_subdev *sd, |
266 | struct v4l2_dv_preset *preset); | 242 | struct v4l2_dv_preset *preset); |
267 | int (*query_dv_preset)(struct v4l2_subdev *sd, | 243 | int (*query_dv_preset)(struct v4l2_subdev *sd, |
@@ -280,6 +256,45 @@ struct v4l2_subdev_video_ops { | |||
280 | struct v4l2_mbus_framefmt *fmt); | 256 | struct v4l2_mbus_framefmt *fmt); |
281 | }; | 257 | }; |
282 | 258 | ||
259 | /* | ||
260 | decode_vbi_line: video decoders that support sliced VBI need to implement | ||
261 | this ioctl. Field p of the v4l2_sliced_vbi_line struct is set to the | ||
262 | start of the VBI data that was generated by the decoder. The driver | ||
263 | then parses the sliced VBI data and sets the other fields in the | ||
264 | struct accordingly. The pointer p is updated to point to the start of | ||
265 | the payload which can be copied verbatim into the data field of the | ||
266 | v4l2_sliced_vbi_data struct. If no valid VBI data was found, then the | ||
267 | type field is set to 0 on return. | ||
268 | |||
269 | s_vbi_data: used to generate VBI signals on a video signal. | ||
270 | v4l2_sliced_vbi_data is filled with the data packets that should be | ||
271 | output. Note that if you set the line field to 0, then that VBI signal | ||
272 | is disabled. If no valid VBI data was found, then the type field is | ||
273 | set to 0 on return. | ||
274 | |||
275 | g_vbi_data: used to obtain the sliced VBI packet from a readback register. | ||
276 | Not all video decoders support this. If no data is available because | ||
277 | the readback register contains invalid or erroneous data -EIO is | ||
278 | returned. Note that you must fill in the 'id' member and the 'field' | ||
279 | member (to determine whether CC data from the first or second field | ||
280 | should be obtained). | ||
281 | |||
282 | s_raw_fmt: setup the video encoder/decoder for raw VBI. | ||
283 | |||
284 | g_sliced_fmt: retrieve the current sliced VBI settings. | ||
285 | |||
286 | s_sliced_fmt: setup the sliced VBI settings. | ||
287 | */ | ||
288 | struct v4l2_subdev_vbi_ops { | ||
289 | int (*decode_vbi_line)(struct v4l2_subdev *sd, struct v4l2_decode_vbi_line *vbi_line); | ||
290 | int (*s_vbi_data)(struct v4l2_subdev *sd, const struct v4l2_sliced_vbi_data *vbi_data); | ||
291 | int (*g_vbi_data)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_data *vbi_data); | ||
292 | int (*g_sliced_vbi_cap)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_cap *cap); | ||
293 | int (*s_raw_fmt)(struct v4l2_subdev *sd, struct v4l2_vbi_format *fmt); | ||
294 | int (*g_sliced_fmt)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt); | ||
295 | int (*s_sliced_fmt)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_format *fmt); | ||
296 | }; | ||
297 | |||
283 | /** | 298 | /** |
284 | * struct v4l2_subdev_sensor_ops - v4l2-subdev sensor operations | 299 | * struct v4l2_subdev_sensor_ops - v4l2-subdev sensor operations |
285 | * @g_skip_top_lines: number of lines at the top of the image to be skipped. | 300 | * @g_skip_top_lines: number of lines at the top of the image to be skipped. |
@@ -379,6 +394,7 @@ struct v4l2_subdev_ops { | |||
379 | const struct v4l2_subdev_tuner_ops *tuner; | 394 | const struct v4l2_subdev_tuner_ops *tuner; |
380 | const struct v4l2_subdev_audio_ops *audio; | 395 | const struct v4l2_subdev_audio_ops *audio; |
381 | const struct v4l2_subdev_video_ops *video; | 396 | const struct v4l2_subdev_video_ops *video; |
397 | const struct v4l2_subdev_vbi_ops *vbi; | ||
382 | const struct v4l2_subdev_ir_ops *ir; | 398 | const struct v4l2_subdev_ir_ops *ir; |
383 | const struct v4l2_subdev_sensor_ops *sensor; | 399 | const struct v4l2_subdev_sensor_ops *sensor; |
384 | }; | 400 | }; |
@@ -387,6 +403,8 @@ struct v4l2_subdev_ops { | |||
387 | 403 | ||
388 | /* Set this flag if this subdev is a i2c device. */ | 404 | /* Set this flag if this subdev is a i2c device. */ |
389 | #define V4L2_SUBDEV_FL_IS_I2C (1U << 0) | 405 | #define V4L2_SUBDEV_FL_IS_I2C (1U << 0) |
406 | /* Set this flag if this subdev is a spi device. */ | ||
407 | #define V4L2_SUBDEV_FL_IS_SPI (1U << 1) | ||
390 | 408 | ||
391 | /* Each instance of a subdev driver should create this struct, either | 409 | /* Each instance of a subdev driver should create this struct, either |
392 | stand-alone or embedded in a larger struct. | 410 | stand-alone or embedded in a larger struct. |