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