diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-12-30 05:14:19 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-02 14:11:52 -0500 |
commit | aecde8b53b8ee1330a5a8206200f0d6b8845a6e0 (patch) | |
tree | 53a1aef6597a9d829864c054230b312010abc3a7 /include/linux/videodev2.h | |
parent | da1b5c95e49bb564ae8c61ed135d34ed09acbb66 (diff) |
V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID.
Since the i2c driver ID will be removed in the near future we have to
modify the v4l2 debugging API to use the driver name instead of driver ID.
Note that this API is not used in applications other than v4l2-dbg.cpp
as it is for debugging and testing only.
Should anyone use the old VIDIOC_G_CHIP_IDENT, then this will be logged
with a warning that it is deprecated and will be removed in 2.6.30.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/linux/videodev2.h')
-rw-r--r-- | include/linux/videodev2.h | 51 |
1 files changed, 38 insertions, 13 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 1f126e30766c..5571dbe1c0ad 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -1370,25 +1370,41 @@ struct v4l2_streamparm { | |||
1370 | /* | 1370 | /* |
1371 | * A D V A N C E D D E B U G G I N G | 1371 | * A D V A N C E D D E B U G G I N G |
1372 | * | 1372 | * |
1373 | * NOTE: EXPERIMENTAL API | 1373 | * NOTE: EXPERIMENTAL API, NEVER RELY ON THIS IN APPLICATIONS! |
1374 | * FOR DEBUGGING, TESTING AND INTERNAL USE ONLY! | ||
1374 | */ | 1375 | */ |
1375 | 1376 | ||
1376 | /* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */ | 1377 | /* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */ |
1377 | 1378 | ||
1378 | #define V4L2_CHIP_MATCH_HOST 0 /* Match against chip ID on host (0 for the host) */ | 1379 | #define V4L2_CHIP_MATCH_HOST 0 /* Match against chip ID on host (0 for the host) */ |
1379 | #define V4L2_CHIP_MATCH_I2C_DRIVER 1 /* Match against I2C driver ID */ | 1380 | #define V4L2_CHIP_MATCH_I2C_DRIVER 1 /* Match against I2C driver name */ |
1380 | #define V4L2_CHIP_MATCH_I2C_ADDR 2 /* Match against I2C 7-bit address */ | 1381 | #define V4L2_CHIP_MATCH_I2C_ADDR 2 /* Match against I2C 7-bit address */ |
1381 | #define V4L2_CHIP_MATCH_AC97 3 /* Match against anciliary AC97 chip */ | 1382 | #define V4L2_CHIP_MATCH_AC97 3 /* Match against anciliary AC97 chip */ |
1382 | 1383 | ||
1383 | struct v4l2_register { | 1384 | struct v4l2_dbg_match { |
1384 | __u32 match_type; /* Match type */ | 1385 | __u32 type; /* Match type */ |
1385 | __u32 match_chip; /* Match this chip, meaning determined by match_type */ | 1386 | union { /* Match this chip, meaning determined by type */ |
1387 | __u32 addr; | ||
1388 | char name[32]; | ||
1389 | }; | ||
1390 | } __attribute__ ((packed)); | ||
1391 | |||
1392 | struct v4l2_dbg_register { | ||
1393 | struct v4l2_dbg_match match; | ||
1394 | __u32 size; /* register size in bytes */ | ||
1386 | __u64 reg; | 1395 | __u64 reg; |
1387 | __u64 val; | 1396 | __u64 val; |
1388 | }; | 1397 | } __attribute__ ((packed)); |
1398 | |||
1399 | /* VIDIOC_DBG_G_CHIP_IDENT */ | ||
1400 | struct v4l2_dbg_chip_ident { | ||
1401 | struct v4l2_dbg_match match; | ||
1402 | __u32 ident; /* chip identifier as specified in <media/v4l2-chip-ident.h> */ | ||
1403 | __u32 revision; /* chip revision, chip specific */ | ||
1404 | } __attribute__ ((packed)); | ||
1389 | 1405 | ||
1390 | /* VIDIOC_G_CHIP_IDENT */ | 1406 | /* VIDIOC_G_CHIP_IDENT_OLD: Deprecated, do not use */ |
1391 | struct v4l2_chip_ident { | 1407 | struct v4l2_chip_ident_old { |
1392 | __u32 match_type; /* Match type */ | 1408 | __u32 match_type; /* Match type */ |
1393 | __u32 match_chip; /* Match this chip, meaning determined by match_type */ | 1409 | __u32 match_chip; /* Match this chip, meaning determined by match_type */ |
1394 | __u32 ident; /* chip identifier as specified in <media/v4l2-chip-ident.h> */ | 1410 | __u32 ident; /* chip identifier as specified in <media/v4l2-chip-ident.h> */ |
@@ -1460,13 +1476,22 @@ struct v4l2_chip_ident { | |||
1460 | #define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct v4l2_enc_idx) | 1476 | #define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct v4l2_enc_idx) |
1461 | #define VIDIOC_ENCODER_CMD _IOWR('V', 77, struct v4l2_encoder_cmd) | 1477 | #define VIDIOC_ENCODER_CMD _IOWR('V', 77, struct v4l2_encoder_cmd) |
1462 | #define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct v4l2_encoder_cmd) | 1478 | #define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct v4l2_encoder_cmd) |
1479 | #endif | ||
1463 | 1480 | ||
1464 | /* Experimental, only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ | 1481 | #if 1 |
1465 | #define VIDIOC_DBG_S_REGISTER _IOW('V', 79, struct v4l2_register) | 1482 | /* Experimental, meant for debugging, testing and internal use. |
1466 | #define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_register) | 1483 | Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined. |
1467 | 1484 | You must be root to use these ioctls. Never use these in applications! */ | |
1468 | #define VIDIOC_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_chip_ident) | 1485 | #define VIDIOC_DBG_S_REGISTER _IOW('V', 79, struct v4l2_dbg_register) |
1486 | #define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_dbg_register) | ||
1487 | |||
1488 | /* Experimental, meant for debugging, testing and internal use. | ||
1489 | Never use this ioctl in applications! */ | ||
1490 | #define VIDIOC_DBG_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_dbg_chip_ident) | ||
1491 | /* This is deprecated and will go away in 2.6.30 */ | ||
1492 | #define VIDIOC_G_CHIP_IDENT_OLD _IOWR('V', 81, struct v4l2_chip_ident_old) | ||
1469 | #endif | 1493 | #endif |
1494 | |||
1470 | #define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek) | 1495 | #define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek) |
1471 | /* Reminder: when adding new ioctls please add support for them to | 1496 | /* Reminder: when adding new ioctls please add support for them to |
1472 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ | 1497 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ |