diff options
Diffstat (limited to 'include/linux/videodev2.h')
| -rw-r--r-- | include/linux/videodev2.h | 123 |
1 files changed, 120 insertions, 3 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 32b92298fd79..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 | /* |
| @@ -732,6 +737,99 @@ struct v4l2_standard { | |||
| 732 | }; | 737 | }; |
| 733 | 738 | ||
| 734 | /* | 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 | /* | ||
| 735 | * V I D E O I N P U T S | 833 | * V I D E O I N P U T S |
| 736 | */ | 834 | */ |
| 737 | struct v4l2_input { | 835 | struct v4l2_input { |
| @@ -742,7 +840,8 @@ struct v4l2_input { | |||
| 742 | __u32 tuner; /* Associated tuner */ | 840 | __u32 tuner; /* Associated tuner */ |
| 743 | v4l2_std_id std; | 841 | v4l2_std_id std; |
| 744 | __u32 status; | 842 | __u32 status; |
| 745 | __u32 reserved[4]; | 843 | __u32 capabilities; |
| 844 | __u32 reserved[3]; | ||
| 746 | }; | 845 | }; |
| 747 | 846 | ||
| 748 | /* Values for the 'type' field */ | 847 | /* Values for the 'type' field */ |
| @@ -773,6 +872,11 @@ struct v4l2_input { | |||
| 773 | #define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */ | 872 | #define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */ |
| 774 | #define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ | 873 | #define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ |
| 775 | 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 | |||
| 776 | /* | 880 | /* |
| 777 | * 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 |
| 778 | */ | 882 | */ |
| @@ -783,13 +887,19 @@ struct v4l2_output { | |||
| 783 | __u32 audioset; /* Associated audios (bitfield) */ | 887 | __u32 audioset; /* Associated audios (bitfield) */ |
| 784 | __u32 modulator; /* Associated modulator */ | 888 | __u32 modulator; /* Associated modulator */ |
| 785 | v4l2_std_id std; | 889 | v4l2_std_id std; |
| 786 | __u32 reserved[4]; | 890 | __u32 capabilities; |
| 891 | __u32 reserved[3]; | ||
| 787 | }; | 892 | }; |
| 788 | /* Values for the 'type' field */ | 893 | /* Values for the 'type' field */ |
| 789 | #define V4L2_OUTPUT_TYPE_MODULATOR 1 | 894 | #define V4L2_OUTPUT_TYPE_MODULATOR 1 |
| 790 | #define V4L2_OUTPUT_TYPE_ANALOG 2 | 895 | #define V4L2_OUTPUT_TYPE_ANALOG 2 |
| 791 | #define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 | 896 | #define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 |
| 792 | 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 | |||
| 793 | /* | 903 | /* |
| 794 | * C O N T R O L S | 904 | * C O N T R O L S |
| 795 | */ | 905 | */ |
| @@ -1624,6 +1734,13 @@ struct v4l2_dbg_chip_ident { | |||
| 1624 | #endif | 1734 | #endif |
| 1625 | 1735 | ||
| 1626 | #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 | |||
| 1627 | /* Reminder: when adding new ioctls please add support for them to | 1744 | /* Reminder: when adding new ioctls please add support for them to |
| 1628 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ | 1745 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ |
| 1629 | 1746 | ||
