diff options
Diffstat (limited to 'include/linux/videodev2.h')
-rw-r--r-- | include/linux/videodev2.h | 134 |
1 files changed, 129 insertions, 5 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index b59e78c57161..3793d168b44d 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -294,6 +294,7 @@ struct v4l2_pix_format { | |||
294 | 294 | ||
295 | /* Grey formats */ | 295 | /* Grey formats */ |
296 | #define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ | 296 | #define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ |
297 | #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ | ||
297 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ | 298 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ |
298 | 299 | ||
299 | /* Palette formats */ | 300 | /* Palette formats */ |
@@ -329,7 +330,11 @@ struct v4l2_pix_format { | |||
329 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ | 330 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ |
330 | #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ | 331 | #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ |
331 | #define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */ | 332 | #define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */ |
332 | #define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10bit raw bayer */ | 333 | #define V4L2_PIX_FMT_SRGGB8 v4l2_fourcc('R', 'G', 'G', 'B') /* 8 RGRG.. GBGB.. */ |
334 | #define V4L2_PIX_FMT_SBGGR10 v4l2_fourcc('B', 'G', '1', '0') /* 10 BGBG.. GRGR.. */ | ||
335 | #define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */ | ||
336 | #define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */ | ||
337 | #define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */ | ||
333 | /* 10bit raw bayer DPCM compressed to 8 bits */ | 338 | /* 10bit raw bayer DPCM compressed to 8 bits */ |
334 | #define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0') | 339 | #define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0') |
335 | /* | 340 | /* |
@@ -345,6 +350,7 @@ struct v4l2_pix_format { | |||
345 | #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */ | 350 | #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */ |
346 | 351 | ||
347 | /* Vendor-specific formats */ | 352 | /* Vendor-specific formats */ |
353 | #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ | ||
348 | #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ | 354 | #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ |
349 | #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ | 355 | #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ |
350 | #define V4L2_PIX_FMT_SN9C20X_I420 v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */ | 356 | #define V4L2_PIX_FMT_SN9C20X_I420 v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */ |
@@ -357,10 +363,12 @@ struct v4l2_pix_format { | |||
357 | #define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ | 363 | #define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ |
358 | #define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ | 364 | #define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ |
359 | #define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ | 365 | #define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ |
366 | #define V4L2_PIX_FMT_SN9C2028 v4l2_fourcc('S', 'O', 'N', 'X') /* compressed GBRG bayer */ | ||
360 | #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ | 367 | #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ |
361 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ | 368 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ |
362 | #define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ | 369 | #define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ |
363 | #define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ | 370 | #define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ |
371 | #define V4L2_PIX_FMT_STV0680 v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */ | ||
364 | 372 | ||
365 | /* | 373 | /* |
366 | * F O R M A T E N U M E R A T I O N | 374 | * F O R M A T E N U M E R A T I O N |
@@ -490,7 +498,7 @@ struct v4l2_jpegcompression { | |||
490 | * you do, leave them untouched. | 498 | * you do, leave them untouched. |
491 | * Inluding less markers will make the | 499 | * Inluding less markers will make the |
492 | * resulting code smaller, but there will | 500 | * resulting code smaller, but there will |
493 | * be fewer aplications which can read it. | 501 | * be fewer applications which can read it. |
494 | * The presence of the APP and COM marker | 502 | * The presence of the APP and COM marker |
495 | * is influenced by APP_len and COM_len | 503 | * is influenced by APP_len and COM_len |
496 | * ONLY, not by this property! */ | 504 | * ONLY, not by this property! */ |
@@ -563,6 +571,7 @@ struct v4l2_framebuffer { | |||
563 | #define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010 | 571 | #define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010 |
564 | #define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020 | 572 | #define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020 |
565 | #define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040 | 573 | #define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040 |
574 | #define V4L2_FBUF_CAP_SRC_CHROMAKEY 0x0080 | ||
566 | /* Flags for the 'flags' field. */ | 575 | /* Flags for the 'flags' field. */ |
567 | #define V4L2_FBUF_FLAG_PRIMARY 0x0001 | 576 | #define V4L2_FBUF_FLAG_PRIMARY 0x0001 |
568 | #define V4L2_FBUF_FLAG_OVERLAY 0x0002 | 577 | #define V4L2_FBUF_FLAG_OVERLAY 0x0002 |
@@ -570,6 +579,7 @@ struct v4l2_framebuffer { | |||
570 | #define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008 | 579 | #define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008 |
571 | #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 | 580 | #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 |
572 | #define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 | 581 | #define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 |
582 | #define V4L2_FBUF_FLAG_SRC_CHROMAKEY 0x0040 | ||
573 | 583 | ||
574 | struct v4l2_clip { | 584 | struct v4l2_clip { |
575 | struct v4l2_rect c; | 585 | struct v4l2_rect c; |
@@ -729,6 +739,99 @@ struct v4l2_standard { | |||
729 | }; | 739 | }; |
730 | 740 | ||
731 | /* | 741 | /* |
742 | * V I D E O T I M I N G S D V P R E S E T | ||
743 | */ | ||
744 | struct v4l2_dv_preset { | ||
745 | __u32 preset; | ||
746 | __u32 reserved[4]; | ||
747 | }; | ||
748 | |||
749 | /* | ||
750 | * D V P R E S E T S E N U M E R A T I O N | ||
751 | */ | ||
752 | struct v4l2_dv_enum_preset { | ||
753 | __u32 index; | ||
754 | __u32 preset; | ||
755 | __u8 name[32]; /* Name of the preset timing */ | ||
756 | __u32 width; | ||
757 | __u32 height; | ||
758 | __u32 reserved[4]; | ||
759 | }; | ||
760 | |||
761 | /* | ||
762 | * D V P R E S E T V A L U E S | ||
763 | */ | ||
764 | #define V4L2_DV_INVALID 0 | ||
765 | #define V4L2_DV_480P59_94 1 /* BT.1362 */ | ||
766 | #define V4L2_DV_576P50 2 /* BT.1362 */ | ||
767 | #define V4L2_DV_720P24 3 /* SMPTE 296M */ | ||
768 | #define V4L2_DV_720P25 4 /* SMPTE 296M */ | ||
769 | #define V4L2_DV_720P30 5 /* SMPTE 296M */ | ||
770 | #define V4L2_DV_720P50 6 /* SMPTE 296M */ | ||
771 | #define V4L2_DV_720P59_94 7 /* SMPTE 274M */ | ||
772 | #define V4L2_DV_720P60 8 /* SMPTE 274M/296M */ | ||
773 | #define V4L2_DV_1080I29_97 9 /* BT.1120/ SMPTE 274M */ | ||
774 | #define V4L2_DV_1080I30 10 /* BT.1120/ SMPTE 274M */ | ||
775 | #define V4L2_DV_1080I25 11 /* BT.1120 */ | ||
776 | #define V4L2_DV_1080I50 12 /* SMPTE 296M */ | ||
777 | #define V4L2_DV_1080I60 13 /* SMPTE 296M */ | ||
778 | #define V4L2_DV_1080P24 14 /* SMPTE 296M */ | ||
779 | #define V4L2_DV_1080P25 15 /* SMPTE 296M */ | ||
780 | #define V4L2_DV_1080P30 16 /* SMPTE 296M */ | ||
781 | #define V4L2_DV_1080P50 17 /* BT.1120 */ | ||
782 | #define V4L2_DV_1080P60 18 /* BT.1120 */ | ||
783 | |||
784 | /* | ||
785 | * D V B T T I M I N G S | ||
786 | */ | ||
787 | |||
788 | /* BT.656/BT.1120 timing data */ | ||
789 | struct v4l2_bt_timings { | ||
790 | __u32 width; /* width in pixels */ | ||
791 | __u32 height; /* height in lines */ | ||
792 | __u32 interlaced; /* Interlaced or progressive */ | ||
793 | __u32 polarities; /* Positive or negative polarity */ | ||
794 | __u64 pixelclock; /* Pixel clock in HZ. Ex. 74.25MHz->74250000 */ | ||
795 | __u32 hfrontporch; /* Horizpontal front porch in pixels */ | ||
796 | __u32 hsync; /* Horizontal Sync length in pixels */ | ||
797 | __u32 hbackporch; /* Horizontal back porch in pixels */ | ||
798 | __u32 vfrontporch; /* Vertical front porch in pixels */ | ||
799 | __u32 vsync; /* Vertical Sync length in lines */ | ||
800 | __u32 vbackporch; /* Vertical back porch in lines */ | ||
801 | __u32 il_vfrontporch; /* Vertical front porch for bottom field of | ||
802 | * interlaced field formats | ||
803 | */ | ||
804 | __u32 il_vsync; /* Vertical sync length for bottom field of | ||
805 | * interlaced field formats | ||
806 | */ | ||
807 | __u32 il_vbackporch; /* Vertical back porch for bottom field of | ||
808 | * interlaced field formats | ||
809 | */ | ||
810 | __u32 reserved[16]; | ||
811 | } __attribute__ ((packed)); | ||
812 | |||
813 | /* Interlaced or progressive format */ | ||
814 | #define V4L2_DV_PROGRESSIVE 0 | ||
815 | #define V4L2_DV_INTERLACED 1 | ||
816 | |||
817 | /* Polarities. If bit is not set, it is assumed to be negative polarity */ | ||
818 | #define V4L2_DV_VSYNC_POS_POL 0x00000001 | ||
819 | #define V4L2_DV_HSYNC_POS_POL 0x00000002 | ||
820 | |||
821 | |||
822 | /* DV timings */ | ||
823 | struct v4l2_dv_timings { | ||
824 | __u32 type; | ||
825 | union { | ||
826 | struct v4l2_bt_timings bt; | ||
827 | __u32 reserved[32]; | ||
828 | }; | ||
829 | } __attribute__ ((packed)); | ||
830 | |||
831 | /* Values for the type field */ | ||
832 | #define V4L2_DV_BT_656_1120 0 /* BT.656/1120 timing type */ | ||
833 | |||
834 | /* | ||
732 | * V I D E O I N P U T S | 835 | * V I D E O I N P U T S |
733 | */ | 836 | */ |
734 | struct v4l2_input { | 837 | struct v4l2_input { |
@@ -739,7 +842,8 @@ struct v4l2_input { | |||
739 | __u32 tuner; /* Associated tuner */ | 842 | __u32 tuner; /* Associated tuner */ |
740 | v4l2_std_id std; | 843 | v4l2_std_id std; |
741 | __u32 status; | 844 | __u32 status; |
742 | __u32 reserved[4]; | 845 | __u32 capabilities; |
846 | __u32 reserved[3]; | ||
743 | }; | 847 | }; |
744 | 848 | ||
745 | /* Values for the 'type' field */ | 849 | /* Values for the 'type' field */ |
@@ -770,6 +874,11 @@ struct v4l2_input { | |||
770 | #define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */ | 874 | #define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */ |
771 | #define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ | 875 | #define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ |
772 | 876 | ||
877 | /* capabilities flags */ | ||
878 | #define V4L2_IN_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */ | ||
879 | #define V4L2_IN_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ | ||
880 | #define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */ | ||
881 | |||
773 | /* | 882 | /* |
774 | * V I D E O O U T P U T S | 883 | * V I D E O O U T P U T S |
775 | */ | 884 | */ |
@@ -780,13 +889,19 @@ struct v4l2_output { | |||
780 | __u32 audioset; /* Associated audios (bitfield) */ | 889 | __u32 audioset; /* Associated audios (bitfield) */ |
781 | __u32 modulator; /* Associated modulator */ | 890 | __u32 modulator; /* Associated modulator */ |
782 | v4l2_std_id std; | 891 | v4l2_std_id std; |
783 | __u32 reserved[4]; | 892 | __u32 capabilities; |
893 | __u32 reserved[3]; | ||
784 | }; | 894 | }; |
785 | /* Values for the 'type' field */ | 895 | /* Values for the 'type' field */ |
786 | #define V4L2_OUTPUT_TYPE_MODULATOR 1 | 896 | #define V4L2_OUTPUT_TYPE_MODULATOR 1 |
787 | #define V4L2_OUTPUT_TYPE_ANALOG 2 | 897 | #define V4L2_OUTPUT_TYPE_ANALOG 2 |
788 | #define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 | 898 | #define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 |
789 | 899 | ||
900 | /* capabilities flags */ | ||
901 | #define V4L2_OUT_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */ | ||
902 | #define V4L2_OUT_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ | ||
903 | #define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */ | ||
904 | |||
790 | /* | 905 | /* |
791 | * C O N T R O L S | 906 | * C O N T R O L S |
792 | */ | 907 | */ |
@@ -912,8 +1027,10 @@ enum v4l2_colorfx { | |||
912 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) | 1027 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) |
913 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) | 1028 | #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) |
914 | 1029 | ||
1030 | #define V4L2_CID_ROTATE (V4L2_CID_BASE+34) | ||
1031 | #define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) | ||
915 | /* last CID + 1 */ | 1032 | /* last CID + 1 */ |
916 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+34) | 1033 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+36) |
917 | 1034 | ||
918 | /* MPEG-class control IDs defined by V4L2 */ | 1035 | /* MPEG-class control IDs defined by V4L2 */ |
919 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | 1036 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) |
@@ -1619,6 +1736,13 @@ struct v4l2_dbg_chip_ident { | |||
1619 | #endif | 1736 | #endif |
1620 | 1737 | ||
1621 | #define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek) | 1738 | #define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek) |
1739 | #define VIDIOC_ENUM_DV_PRESETS _IOWR('V', 83, struct v4l2_dv_enum_preset) | ||
1740 | #define VIDIOC_S_DV_PRESET _IOWR('V', 84, struct v4l2_dv_preset) | ||
1741 | #define VIDIOC_G_DV_PRESET _IOWR('V', 85, struct v4l2_dv_preset) | ||
1742 | #define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct v4l2_dv_preset) | ||
1743 | #define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) | ||
1744 | #define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings) | ||
1745 | |||
1622 | /* Reminder: when adding new ioctls please add support for them to | 1746 | /* Reminder: when adding new ioctls please add support for them to |
1623 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ | 1747 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ |
1624 | 1748 | ||