diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-01 20:25:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-01 20:25:23 -0500 |
commit | 100b425480d3a4c7dff4f99bead457d91ad19caf (patch) | |
tree | 309bc7612dcbc4c3ddb1385421b84dc8065e5b77 /include | |
parent | d701d8a3bc1c0f56fa2759f631f86a320b66f13e (diff) | |
parent | f3502b8a1995aceb2242389aa6dbea1a6756f78b (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
V4L/DVB (5305): Mark VIDIOC_DBG_S/G_REGISTER as experimental
V4L/DVB (5271): Add VIDIOC_TRY_ENCODER_CMD and VIDIOC_ENCODER_CMD ioctls.
V4L/DVB (5270): Add VIDIOC_G_ENC_INDEX ioctl
V4L/DVB (5276): Cxusb: fix firmware patch for big endian systems
V4L/DVB (5258): Cafe_ccic: fix compiler warning
V4L/DVB (5295): Digitv: open nxt6000 i2c_gate for TDED4 tuner handling
V4L/DVB (5304): Improve chip matching in v4l2_register
V4L/DVB (5255): Fix cx25840 firmware loading.
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/videodev2.h | 71 | ||||
-rw-r--r-- | include/media/v4l2-common.h | 8 | ||||
-rw-r--r-- | include/media/v4l2-dev.h | 6 |
3 files changed, 80 insertions, 5 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 65a165f918c9..441b877bf150 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -1193,6 +1193,55 @@ struct v4l2_audioout | |||
1193 | }; | 1193 | }; |
1194 | 1194 | ||
1195 | /* | 1195 | /* |
1196 | * M P E G S E R V I C E S | ||
1197 | * | ||
1198 | * NOTE: EXPERIMENTAL API | ||
1199 | */ | ||
1200 | #if 1 | ||
1201 | #define V4L2_ENC_IDX_FRAME_I (0) | ||
1202 | #define V4L2_ENC_IDX_FRAME_P (1) | ||
1203 | #define V4L2_ENC_IDX_FRAME_B (2) | ||
1204 | #define V4L2_ENC_IDX_FRAME_MASK (0xf) | ||
1205 | |||
1206 | struct v4l2_enc_idx_entry { | ||
1207 | __u64 offset; | ||
1208 | __u64 pts; | ||
1209 | __u32 length; | ||
1210 | __u32 flags; | ||
1211 | __u32 reserved[2]; | ||
1212 | }; | ||
1213 | |||
1214 | #define V4L2_ENC_IDX_ENTRIES (64) | ||
1215 | struct v4l2_enc_idx { | ||
1216 | __u32 entries; | ||
1217 | __u32 entries_cap; | ||
1218 | __u32 reserved[4]; | ||
1219 | struct v4l2_enc_idx_entry entry[V4L2_ENC_IDX_ENTRIES]; | ||
1220 | }; | ||
1221 | |||
1222 | |||
1223 | #define V4L2_ENC_CMD_START (0) | ||
1224 | #define V4L2_ENC_CMD_STOP (1) | ||
1225 | #define V4L2_ENC_CMD_PAUSE (2) | ||
1226 | #define V4L2_ENC_CMD_RESUME (3) | ||
1227 | |||
1228 | /* Flags for V4L2_ENC_CMD_STOP */ | ||
1229 | #define V4L2_ENC_CMD_STOP_AT_GOP_END (1 << 0) | ||
1230 | |||
1231 | struct v4l2_encoder_cmd { | ||
1232 | __u32 cmd; | ||
1233 | __u32 flags; | ||
1234 | union { | ||
1235 | struct { | ||
1236 | __u32 data[8]; | ||
1237 | } raw; | ||
1238 | }; | ||
1239 | }; | ||
1240 | |||
1241 | #endif | ||
1242 | |||
1243 | |||
1244 | /* | ||
1196 | * D A T A S E R V I C E S ( V B I ) | 1245 | * D A T A S E R V I C E S ( V B I ) |
1197 | * | 1246 | * |
1198 | * Data services API by Michael Schimek | 1247 | * Data services API by Michael Schimek |
@@ -1303,13 +1352,21 @@ struct v4l2_streamparm | |||
1303 | 1352 | ||
1304 | /* | 1353 | /* |
1305 | * A D V A N C E D D E B U G G I N G | 1354 | * A D V A N C E D D E B U G G I N G |
1355 | * | ||
1356 | * NOTE: EXPERIMENTAL API | ||
1306 | */ | 1357 | */ |
1307 | 1358 | ||
1308 | /* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */ | 1359 | /* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */ |
1360 | |||
1361 | #define V4L2_CHIP_MATCH_HOST 0 /* Match against chip ID on host (0 for the host) */ | ||
1362 | #define V4L2_CHIP_MATCH_I2C_DRIVER 1 /* Match against I2C driver ID */ | ||
1363 | #define V4L2_CHIP_MATCH_I2C_ADDR 2 /* Match against I2C 7-bit address */ | ||
1364 | |||
1309 | struct v4l2_register { | 1365 | struct v4l2_register { |
1366 | __u32 match_type; /* Match type */ | ||
1367 | __u32 match_chip; /* Match this chip, meaning determined by match_type */ | ||
1310 | __u64 reg; | 1368 | __u64 reg; |
1311 | __u32 i2c_id; /* I2C driver ID of the I2C chip, or 0 for the host */ | 1369 | __u64 val; |
1312 | __u32 val; | ||
1313 | }; | 1370 | }; |
1314 | 1371 | ||
1315 | /* | 1372 | /* |
@@ -1378,10 +1435,14 @@ struct v4l2_register { | |||
1378 | #if 1 | 1435 | #if 1 |
1379 | #define VIDIOC_ENUM_FRAMESIZES _IOWR ('V', 74, struct v4l2_frmsizeenum) | 1436 | #define VIDIOC_ENUM_FRAMESIZES _IOWR ('V', 74, struct v4l2_frmsizeenum) |
1380 | #define VIDIOC_ENUM_FRAMEINTERVALS _IOWR ('V', 75, struct v4l2_frmivalenum) | 1437 | #define VIDIOC_ENUM_FRAMEINTERVALS _IOWR ('V', 75, struct v4l2_frmivalenum) |
1438 | #define VIDIOC_G_ENC_INDEX _IOR ('V', 76, struct v4l2_enc_idx) | ||
1439 | #define VIDIOC_ENCODER_CMD _IOWR ('V', 77, struct v4l2_encoder_cmd) | ||
1440 | #define VIDIOC_TRY_ENCODER_CMD _IOWR ('V', 78, struct v4l2_encoder_cmd) | ||
1441 | |||
1442 | /* Experimental, only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ | ||
1443 | #define VIDIOC_DBG_S_REGISTER _IOW ('V', 79, struct v4l2_register) | ||
1444 | #define VIDIOC_DBG_G_REGISTER _IOWR ('V', 80, struct v4l2_register) | ||
1381 | #endif | 1445 | #endif |
1382 | /* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ | ||
1383 | #define VIDIOC_DBG_S_REGISTER _IOW ('d', 100, struct v4l2_register) | ||
1384 | #define VIDIOC_DBG_G_REGISTER _IOWR('d', 101, struct v4l2_register) | ||
1385 | 1446 | ||
1386 | #ifdef __OLD_VIDIOC_ | 1447 | #ifdef __OLD_VIDIOC_ |
1387 | /* for compatibility, will go away some day */ | 1448 | /* for compatibility, will go away some day */ |
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 244e440edb53..6eaeec98ed89 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
@@ -94,6 +94,14 @@ u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id); | |||
94 | 94 | ||
95 | /* ------------------------------------------------------------------------- */ | 95 | /* ------------------------------------------------------------------------- */ |
96 | 96 | ||
97 | /* Register/chip ident helper function */ | ||
98 | |||
99 | struct i2c_client; /* forward reference */ | ||
100 | int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 id_type, u32 chip_id); | ||
101 | int v4l2_chip_match_host(u32 id_type, u32 chip_id); | ||
102 | |||
103 | /* ------------------------------------------------------------------------- */ | ||
104 | |||
97 | /* Internal ioctls */ | 105 | /* Internal ioctls */ |
98 | 106 | ||
99 | /* VIDIOC_INT_DECODE_VBI_LINE */ | 107 | /* VIDIOC_INT_DECODE_VBI_LINE */ |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index aeec56992ef5..1dd3d3239ecf 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -271,6 +271,12 @@ struct video_device | |||
271 | struct v4l2_jpegcompression *a); | 271 | struct v4l2_jpegcompression *a); |
272 | int (*vidioc_s_jpegcomp) (struct file *file, void *fh, | 272 | int (*vidioc_s_jpegcomp) (struct file *file, void *fh, |
273 | struct v4l2_jpegcompression *a); | 273 | struct v4l2_jpegcompression *a); |
274 | int (*vidioc_g_enc_index) (struct file *file, void *fh, | ||
275 | struct v4l2_enc_idx *a); | ||
276 | int (*vidioc_encoder_cmd) (struct file *file, void *fh, | ||
277 | struct v4l2_encoder_cmd *a); | ||
278 | int (*vidioc_try_encoder_cmd) (struct file *file, void *fh, | ||
279 | struct v4l2_encoder_cmd *a); | ||
274 | 280 | ||
275 | /* Stream type-dependent parameter ioctls */ | 281 | /* Stream type-dependent parameter ioctls */ |
276 | int (*vidioc_g_parm) (struct file *file, void *fh, | 282 | int (*vidioc_g_parm) (struct file *file, void *fh, |