diff options
Diffstat (limited to 'include/linux/videodev2.h')
| -rw-r--r-- | include/linux/videodev2.h | 58 |
1 files changed, 55 insertions, 3 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 4b752d5ee80e..5e11f8a1f867 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
| @@ -343,6 +343,8 @@ struct v4l2_pix_format { | |||
| 343 | #define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1') /* 12 Y/CrCb 4:2:0 */ | 343 | #define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1') /* 12 Y/CrCb 4:2:0 */ |
| 344 | #define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */ | 344 | #define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */ |
| 345 | #define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */ | 345 | #define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */ |
| 346 | #define V4L2_PIX_FMT_NV24 v4l2_fourcc('N', 'V', '2', '4') /* 24 Y/CbCr 4:4:4 */ | ||
| 347 | #define V4L2_PIX_FMT_NV42 v4l2_fourcc('N', 'V', '4', '2') /* 24 Y/CrCb 4:4:4 */ | ||
| 346 | 348 | ||
| 347 | /* two non contiguous planes - one Y, one Cr + Cb interleaved */ | 349 | /* two non contiguous planes - one Y, one Cr + Cb interleaved */ |
| 348 | #define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */ | 350 | #define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */ |
| @@ -401,6 +403,7 @@ struct v4l2_pix_format { | |||
| 401 | #define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ | 403 | #define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ |
| 402 | #define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ | 404 | #define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ |
| 403 | #define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ | 405 | #define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ |
| 406 | #define V4L2_PIX_FMT_JL2005BCD v4l2_fourcc('J', 'L', '2', '0') /* compressed RGGB bayer */ | ||
| 404 | #define V4L2_PIX_FMT_SN9C2028 v4l2_fourcc('S', 'O', 'N', 'X') /* compressed GBRG bayer */ | 407 | #define V4L2_PIX_FMT_SN9C2028 v4l2_fourcc('S', 'O', 'N', 'X') /* compressed GBRG bayer */ |
| 405 | #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ | 408 | #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ |
| 406 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ | 409 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ |
| @@ -742,6 +745,48 @@ struct v4l2_crop { | |||
| 742 | struct v4l2_rect c; | 745 | struct v4l2_rect c; |
| 743 | }; | 746 | }; |
| 744 | 747 | ||
| 748 | /* Hints for adjustments of selection rectangle */ | ||
| 749 | #define V4L2_SEL_FLAG_GE 0x00000001 | ||
| 750 | #define V4L2_SEL_FLAG_LE 0x00000002 | ||
| 751 | |||
| 752 | /* Selection targets */ | ||
| 753 | |||
| 754 | /* current cropping area */ | ||
| 755 | #define V4L2_SEL_TGT_CROP_ACTIVE 0 | ||
| 756 | /* default cropping area */ | ||
| 757 | #define V4L2_SEL_TGT_CROP_DEFAULT 1 | ||
| 758 | /* cropping bounds */ | ||
| 759 | #define V4L2_SEL_TGT_CROP_BOUNDS 2 | ||
| 760 | /* current composing area */ | ||
| 761 | #define V4L2_SEL_TGT_COMPOSE_ACTIVE 256 | ||
| 762 | /* default composing area */ | ||
| 763 | #define V4L2_SEL_TGT_COMPOSE_DEFAULT 257 | ||
| 764 | /* composing bounds */ | ||
| 765 | #define V4L2_SEL_TGT_COMPOSE_BOUNDS 258 | ||
| 766 | /* current composing area plus all padding pixels */ | ||
| 767 | #define V4L2_SEL_TGT_COMPOSE_PADDED 259 | ||
| 768 | |||
| 769 | /** | ||
| 770 | * struct v4l2_selection - selection info | ||
| 771 | * @type: buffer type (do not use *_MPLANE types) | ||
| 772 | * @target: selection target, used to choose one of possible rectangles | ||
| 773 | * @flags: constraints flags | ||
| 774 | * @r: coordinates of selection window | ||
| 775 | * @reserved: for future use, rounds structure size to 64 bytes, set to zero | ||
| 776 | * | ||
| 777 | * Hardware may use multiple helper window to process a video stream. | ||
| 778 | * The structure is used to exchange this selection areas between | ||
| 779 | * an application and a driver. | ||
| 780 | */ | ||
| 781 | struct v4l2_selection { | ||
| 782 | __u32 type; | ||
| 783 | __u32 target; | ||
| 784 | __u32 flags; | ||
| 785 | struct v4l2_rect r; | ||
| 786 | __u32 reserved[9]; | ||
| 787 | }; | ||
| 788 | |||
| 789 | |||
| 745 | /* | 790 | /* |
| 746 | * A N A L O G V I D E O S T A N D A R D | 791 | * A N A L O G V I D E O S T A N D A R D |
| 747 | */ | 792 | */ |
| @@ -1131,6 +1176,7 @@ struct v4l2_querymenu { | |||
| 1131 | #define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000 | 1176 | #define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000 |
| 1132 | 1177 | ||
| 1133 | /* User-class control IDs defined by V4L2 */ | 1178 | /* User-class control IDs defined by V4L2 */ |
| 1179 | #define V4L2_CID_MAX_CTRLS 1024 | ||
| 1134 | #define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900) | 1180 | #define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900) |
| 1135 | #define V4L2_CID_USER_BASE V4L2_CID_BASE | 1181 | #define V4L2_CID_USER_BASE V4L2_CID_BASE |
| 1136 | /* IDs reserved for driver specific controls */ | 1182 | /* IDs reserved for driver specific controls */ |
| @@ -1204,10 +1250,10 @@ enum v4l2_colorfx { | |||
| 1204 | #define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (V4L2_CID_BASE+39) | 1250 | #define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (V4L2_CID_BASE+39) |
| 1205 | #define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40) | 1251 | #define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40) |
| 1206 | 1252 | ||
| 1207 | /* last CID + 1 */ | 1253 | #define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE+41) |
| 1208 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+41) | ||
| 1209 | 1254 | ||
| 1210 | /* Minimum number of buffer neede by the device */ | 1255 | /* last CID + 1 */ |
| 1256 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+42) | ||
| 1211 | 1257 | ||
| 1212 | /* MPEG-class control IDs defined by V4L2 */ | 1258 | /* MPEG-class control IDs defined by V4L2 */ |
| 1213 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | 1259 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) |
| @@ -1682,6 +1728,8 @@ enum v4l2_flash_strobe_source { | |||
| 1682 | #define V4L2_FLASH_FAULT_TIMEOUT (1 << 1) | 1728 | #define V4L2_FLASH_FAULT_TIMEOUT (1 << 1) |
| 1683 | #define V4L2_FLASH_FAULT_OVER_TEMPERATURE (1 << 2) | 1729 | #define V4L2_FLASH_FAULT_OVER_TEMPERATURE (1 << 2) |
| 1684 | #define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3) | 1730 | #define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3) |
| 1731 | #define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4) | ||
| 1732 | #define V4L2_FLASH_FAULT_INDICATOR (1 << 5) | ||
| 1685 | 1733 | ||
| 1686 | #define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11) | 1734 | #define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11) |
| 1687 | #define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12) | 1735 | #define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12) |
| @@ -2255,6 +2303,10 @@ struct v4l2_create_buffers { | |||
| 2255 | #define VIDIOC_CREATE_BUFS _IOWR('V', 92, struct v4l2_create_buffers) | 2303 | #define VIDIOC_CREATE_BUFS _IOWR('V', 92, struct v4l2_create_buffers) |
| 2256 | #define VIDIOC_PREPARE_BUF _IOWR('V', 93, struct v4l2_buffer) | 2304 | #define VIDIOC_PREPARE_BUF _IOWR('V', 93, struct v4l2_buffer) |
| 2257 | 2305 | ||
| 2306 | /* Experimental selection API */ | ||
| 2307 | #define VIDIOC_G_SELECTION _IOWR('V', 94, struct v4l2_selection) | ||
| 2308 | #define VIDIOC_S_SELECTION _IOWR('V', 95, struct v4l2_selection) | ||
| 2309 | |||
| 2258 | /* Reminder: when adding new ioctls please add support for them to | 2310 | /* Reminder: when adding new ioctls please add support for them to |
| 2259 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ | 2311 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ |
| 2260 | 2312 | ||
