diff options
Diffstat (limited to 'include/uapi/linux/videodev2.h')
| -rw-r--r-- | include/uapi/linux/videodev2.h | 74 |
1 files changed, 54 insertions, 20 deletions
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 6ae7bbe988cc..ea468ee8fe21 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h | |||
| @@ -139,6 +139,7 @@ enum v4l2_buf_type { | |||
| 139 | #endif | 139 | #endif |
| 140 | V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9, | 140 | V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9, |
| 141 | V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, | 141 | V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, |
| 142 | V4L2_BUF_TYPE_SDR_CAPTURE = 11, | ||
| 142 | /* Deprecated, do not use */ | 143 | /* Deprecated, do not use */ |
| 143 | V4L2_BUF_TYPE_PRIVATE = 0x80, | 144 | V4L2_BUF_TYPE_PRIVATE = 0x80, |
| 144 | }; | 145 | }; |
| @@ -159,6 +160,8 @@ enum v4l2_tuner_type { | |||
| 159 | V4L2_TUNER_RADIO = 1, | 160 | V4L2_TUNER_RADIO = 1, |
| 160 | V4L2_TUNER_ANALOG_TV = 2, | 161 | V4L2_TUNER_ANALOG_TV = 2, |
| 161 | V4L2_TUNER_DIGITAL_TV = 3, | 162 | V4L2_TUNER_DIGITAL_TV = 3, |
| 163 | V4L2_TUNER_ADC = 4, | ||
| 164 | V4L2_TUNER_RF = 5, | ||
| 162 | }; | 165 | }; |
| 163 | 166 | ||
| 164 | enum v4l2_memory { | 167 | enum v4l2_memory { |
| @@ -264,6 +267,8 @@ struct v4l2_capability { | |||
| 264 | #define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ | 267 | #define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ |
| 265 | #define V4L2_CAP_MODULATOR 0x00080000 /* has a modulator */ | 268 | #define V4L2_CAP_MODULATOR 0x00080000 /* has a modulator */ |
| 266 | 269 | ||
| 270 | #define V4L2_CAP_SDR_CAPTURE 0x00100000 /* Is a SDR capture device */ | ||
| 271 | |||
| 267 | #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ | 272 | #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ |
| 268 | #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ | 273 | #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ |
| 269 | #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ | 274 | #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ |
| @@ -431,6 +436,10 @@ struct v4l2_pix_format { | |||
| 431 | #define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */ | 436 | #define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */ |
| 432 | #define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5', 'C', 'I') /* S5C73M3 interleaved UYVY/JPEG */ | 437 | #define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5', 'C', 'I') /* S5C73M3 interleaved UYVY/JPEG */ |
| 433 | 438 | ||
| 439 | /* SDR formats - used only for Software Defined Radio devices */ | ||
| 440 | #define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */ | ||
| 441 | #define V4L2_SDR_FMT_CU16LE v4l2_fourcc('C', 'U', '1', '6') /* IQ u16le */ | ||
| 442 | |||
| 434 | /* | 443 | /* |
| 435 | * F O R M A T E N U M E R A T I O N | 444 | * F O R M A T E N U M E R A T I O N |
| 436 | */ | 445 | */ |
| @@ -669,24 +678,36 @@ struct v4l2_buffer { | |||
| 669 | }; | 678 | }; |
| 670 | 679 | ||
| 671 | /* Flags for 'flags' field */ | 680 | /* Flags for 'flags' field */ |
| 672 | #define V4L2_BUF_FLAG_MAPPED 0x0001 /* Buffer is mapped (flag) */ | 681 | /* Buffer is mapped (flag) */ |
| 673 | #define V4L2_BUF_FLAG_QUEUED 0x0002 /* Buffer is queued for processing */ | 682 | #define V4L2_BUF_FLAG_MAPPED 0x00000001 |
| 674 | #define V4L2_BUF_FLAG_DONE 0x0004 /* Buffer is ready */ | 683 | /* Buffer is queued for processing */ |
| 675 | #define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */ | 684 | #define V4L2_BUF_FLAG_QUEUED 0x00000002 |
| 676 | #define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ | 685 | /* Buffer is ready */ |
| 677 | #define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ | 686 | #define V4L2_BUF_FLAG_DONE 0x00000004 |
| 687 | /* Image is a keyframe (I-frame) */ | ||
| 688 | #define V4L2_BUF_FLAG_KEYFRAME 0x00000008 | ||
| 689 | /* Image is a P-frame */ | ||
| 690 | #define V4L2_BUF_FLAG_PFRAME 0x00000010 | ||
| 691 | /* Image is a B-frame */ | ||
| 692 | #define V4L2_BUF_FLAG_BFRAME 0x00000020 | ||
| 678 | /* Buffer is ready, but the data contained within is corrupted. */ | 693 | /* Buffer is ready, but the data contained within is corrupted. */ |
| 679 | #define V4L2_BUF_FLAG_ERROR 0x0040 | 694 | #define V4L2_BUF_FLAG_ERROR 0x00000040 |
| 680 | #define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ | 695 | /* timecode field is valid */ |
| 681 | #define V4L2_BUF_FLAG_PREPARED 0x0400 /* Buffer is prepared for queuing */ | 696 | #define V4L2_BUF_FLAG_TIMECODE 0x00000100 |
| 697 | /* Buffer is prepared for queuing */ | ||
| 698 | #define V4L2_BUF_FLAG_PREPARED 0x00000400 | ||
| 682 | /* Cache handling flags */ | 699 | /* Cache handling flags */ |
| 683 | #define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE 0x0800 | 700 | #define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE 0x00000800 |
| 684 | #define V4L2_BUF_FLAG_NO_CACHE_CLEAN 0x1000 | 701 | #define V4L2_BUF_FLAG_NO_CACHE_CLEAN 0x00001000 |
| 685 | /* Timestamp type */ | 702 | /* Timestamp type */ |
| 686 | #define V4L2_BUF_FLAG_TIMESTAMP_MASK 0xe000 | 703 | #define V4L2_BUF_FLAG_TIMESTAMP_MASK 0x0000e000 |
| 687 | #define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x0000 | 704 | #define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x00000000 |
| 688 | #define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x2000 | 705 | #define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x00002000 |
| 689 | #define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x4000 | 706 | #define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x00004000 |
| 707 | /* Timestamp sources. */ | ||
| 708 | #define V4L2_BUF_FLAG_TSTAMP_SRC_MASK 0x00070000 | ||
| 709 | #define V4L2_BUF_FLAG_TSTAMP_SRC_EOF 0x00000000 | ||
| 710 | #define V4L2_BUF_FLAG_TSTAMP_SRC_SOE 0x00010000 | ||
| 690 | 711 | ||
| 691 | /** | 712 | /** |
| 692 | * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor | 713 | * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor |
| @@ -1059,14 +1080,14 @@ struct v4l2_bt_timings { | |||
| 1059 | 1080 | ||
| 1060 | /* A few useful defines to calculate the total blanking and frame sizes */ | 1081 | /* A few useful defines to calculate the total blanking and frame sizes */ |
| 1061 | #define V4L2_DV_BT_BLANKING_WIDTH(bt) \ | 1082 | #define V4L2_DV_BT_BLANKING_WIDTH(bt) \ |
| 1062 | (bt->hfrontporch + bt->hsync + bt->hbackporch) | 1083 | ((bt)->hfrontporch + (bt)->hsync + (bt)->hbackporch) |
| 1063 | #define V4L2_DV_BT_FRAME_WIDTH(bt) \ | 1084 | #define V4L2_DV_BT_FRAME_WIDTH(bt) \ |
| 1064 | (bt->width + V4L2_DV_BT_BLANKING_WIDTH(bt)) | 1085 | ((bt)->width + V4L2_DV_BT_BLANKING_WIDTH(bt)) |
| 1065 | #define V4L2_DV_BT_BLANKING_HEIGHT(bt) \ | 1086 | #define V4L2_DV_BT_BLANKING_HEIGHT(bt) \ |
| 1066 | (bt->vfrontporch + bt->vsync + bt->vbackporch + \ | 1087 | ((bt)->vfrontporch + (bt)->vsync + (bt)->vbackporch + \ |
| 1067 | bt->il_vfrontporch + bt->il_vsync + bt->il_vbackporch) | 1088 | (bt)->il_vfrontporch + (bt)->il_vsync + (bt)->il_vbackporch) |
| 1068 | #define V4L2_DV_BT_FRAME_HEIGHT(bt) \ | 1089 | #define V4L2_DV_BT_FRAME_HEIGHT(bt) \ |
| 1069 | (bt->height + V4L2_DV_BT_BLANKING_HEIGHT(bt)) | 1090 | ((bt)->height + V4L2_DV_BT_BLANKING_HEIGHT(bt)) |
| 1070 | 1091 | ||
| 1071 | /** struct v4l2_dv_timings - DV timings | 1092 | /** struct v4l2_dv_timings - DV timings |
| 1072 | * @type: the type of the timings | 1093 | * @type: the type of the timings |
| @@ -1339,6 +1360,7 @@ struct v4l2_modulator { | |||
| 1339 | #define V4L2_TUNER_CAP_RDS_CONTROLS 0x0200 | 1360 | #define V4L2_TUNER_CAP_RDS_CONTROLS 0x0200 |
| 1340 | #define V4L2_TUNER_CAP_FREQ_BANDS 0x0400 | 1361 | #define V4L2_TUNER_CAP_FREQ_BANDS 0x0400 |
| 1341 | #define V4L2_TUNER_CAP_HWSEEK_PROG_LIM 0x0800 | 1362 | #define V4L2_TUNER_CAP_HWSEEK_PROG_LIM 0x0800 |
| 1363 | #define V4L2_TUNER_CAP_1HZ 0x1000 | ||
| 1342 | 1364 | ||
| 1343 | /* Flags for the 'rxsubchans' field */ | 1365 | /* Flags for the 'rxsubchans' field */ |
| 1344 | #define V4L2_TUNER_SUB_MONO 0x0001 | 1366 | #define V4L2_TUNER_SUB_MONO 0x0001 |
| @@ -1692,6 +1714,15 @@ struct v4l2_pix_format_mplane { | |||
| 1692 | } __attribute__ ((packed)); | 1714 | } __attribute__ ((packed)); |
| 1693 | 1715 | ||
| 1694 | /** | 1716 | /** |
| 1717 | * struct v4l2_sdr_format - SDR format definition | ||
| 1718 | * @pixelformat: little endian four character code (fourcc) | ||
| 1719 | */ | ||
| 1720 | struct v4l2_sdr_format { | ||
| 1721 | __u32 pixelformat; | ||
| 1722 | __u8 reserved[28]; | ||
| 1723 | } __attribute__ ((packed)); | ||
| 1724 | |||
| 1725 | /** | ||
| 1695 | * struct v4l2_format - stream data format | 1726 | * struct v4l2_format - stream data format |
| 1696 | * @type: enum v4l2_buf_type; type of the data stream | 1727 | * @type: enum v4l2_buf_type; type of the data stream |
| 1697 | * @pix: definition of an image format | 1728 | * @pix: definition of an image format |
| @@ -1709,6 +1740,7 @@ struct v4l2_format { | |||
| 1709 | struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */ | 1740 | struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */ |
| 1710 | struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ | 1741 | struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ |
| 1711 | struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */ | 1742 | struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */ |
| 1743 | struct v4l2_sdr_format sdr; /* V4L2_BUF_TYPE_SDR_CAPTURE */ | ||
| 1712 | __u8 raw_data[200]; /* user-defined */ | 1744 | __u8 raw_data[200]; /* user-defined */ |
| 1713 | } fmt; | 1745 | } fmt; |
| 1714 | }; | 1746 | }; |
| @@ -1885,6 +1917,8 @@ struct v4l2_create_buffers { | |||
| 1885 | #define VIDIOC_QUERYMENU _IOWR('V', 37, struct v4l2_querymenu) | 1917 | #define VIDIOC_QUERYMENU _IOWR('V', 37, struct v4l2_querymenu) |
| 1886 | #define VIDIOC_G_INPUT _IOR('V', 38, int) | 1918 | #define VIDIOC_G_INPUT _IOR('V', 38, int) |
| 1887 | #define VIDIOC_S_INPUT _IOWR('V', 39, int) | 1919 | #define VIDIOC_S_INPUT _IOWR('V', 39, int) |
| 1920 | #define VIDIOC_G_EDID _IOWR('V', 40, struct v4l2_edid) | ||
| 1921 | #define VIDIOC_S_EDID _IOWR('V', 41, struct v4l2_edid) | ||
| 1888 | #define VIDIOC_G_OUTPUT _IOR('V', 46, int) | 1922 | #define VIDIOC_G_OUTPUT _IOR('V', 46, int) |
| 1889 | #define VIDIOC_S_OUTPUT _IOWR('V', 47, int) | 1923 | #define VIDIOC_S_OUTPUT _IOWR('V', 47, int) |
| 1890 | #define VIDIOC_ENUMOUTPUT _IOWR('V', 48, struct v4l2_output) | 1924 | #define VIDIOC_ENUMOUTPUT _IOWR('V', 48, struct v4l2_output) |
