diff options
Diffstat (limited to 'include/linux/videodev2.h')
| -rw-r--r-- | include/linux/videodev2.h | 85 |
1 files changed, 47 insertions, 38 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 370d11106c11..7a147c8299ab 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
| @@ -64,6 +64,7 @@ | |||
| 64 | #include <linux/compiler.h> | 64 | #include <linux/compiler.h> |
| 65 | #include <linux/ioctl.h> | 65 | #include <linux/ioctl.h> |
| 66 | #include <linux/types.h> | 66 | #include <linux/types.h> |
| 67 | #include <linux/v4l2-common.h> | ||
| 67 | 68 | ||
| 68 | /* | 69 | /* |
| 69 | * Common stuff for both V4L1 and V4L2 | 70 | * Common stuff for both V4L1 and V4L2 |
| @@ -273,6 +274,10 @@ struct v4l2_capability { | |||
| 273 | #define V4L2_CAP_VIDEO_CAPTURE_MPLANE 0x00001000 | 274 | #define V4L2_CAP_VIDEO_CAPTURE_MPLANE 0x00001000 |
| 274 | /* Is a video output device that supports multiplanar formats */ | 275 | /* Is a video output device that supports multiplanar formats */ |
| 275 | #define V4L2_CAP_VIDEO_OUTPUT_MPLANE 0x00002000 | 276 | #define V4L2_CAP_VIDEO_OUTPUT_MPLANE 0x00002000 |
| 277 | /* Is a video mem-to-mem device that supports multiplanar formats */ | ||
| 278 | #define V4L2_CAP_VIDEO_M2M_MPLANE 0x00004000 | ||
| 279 | /* Is a video mem-to-mem device */ | ||
| 280 | #define V4L2_CAP_VIDEO_M2M 0x00008000 | ||
| 276 | 281 | ||
| 277 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ | 282 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ |
| 278 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ | 283 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ |
| @@ -657,7 +662,7 @@ struct v4l2_buffer { | |||
| 657 | struct v4l2_plane *planes; | 662 | struct v4l2_plane *planes; |
| 658 | } m; | 663 | } m; |
| 659 | __u32 length; | 664 | __u32 length; |
| 660 | __u32 input; | 665 | __u32 reserved2; |
| 661 | __u32 reserved; | 666 | __u32 reserved; |
| 662 | }; | 667 | }; |
| 663 | 668 | ||
| @@ -671,7 +676,6 @@ struct v4l2_buffer { | |||
| 671 | /* Buffer is ready, but the data contained within is corrupted. */ | 676 | /* Buffer is ready, but the data contained within is corrupted. */ |
| 672 | #define V4L2_BUF_FLAG_ERROR 0x0040 | 677 | #define V4L2_BUF_FLAG_ERROR 0x0040 |
| 673 | #define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ | 678 | #define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ |
| 674 | #define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */ | ||
| 675 | #define V4L2_BUF_FLAG_PREPARED 0x0400 /* Buffer is prepared for queuing */ | 679 | #define V4L2_BUF_FLAG_PREPARED 0x0400 /* Buffer is prepared for queuing */ |
| 676 | /* Cache handling flags */ | 680 | /* Cache handling flags */ |
| 677 | #define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE 0x0800 | 681 | #define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE 0x0800 |
| @@ -761,32 +765,12 @@ struct v4l2_crop { | |||
| 761 | struct v4l2_rect c; | 765 | struct v4l2_rect c; |
| 762 | }; | 766 | }; |
| 763 | 767 | ||
| 764 | /* Hints for adjustments of selection rectangle */ | ||
| 765 | #define V4L2_SEL_FLAG_GE 0x00000001 | ||
| 766 | #define V4L2_SEL_FLAG_LE 0x00000002 | ||
| 767 | |||
| 768 | /* Selection targets */ | ||
| 769 | |||
| 770 | /* Current cropping area */ | ||
| 771 | #define V4L2_SEL_TGT_CROP_ACTIVE 0x0000 | ||
| 772 | /* Default cropping area */ | ||
| 773 | #define V4L2_SEL_TGT_CROP_DEFAULT 0x0001 | ||
| 774 | /* Cropping bounds */ | ||
| 775 | #define V4L2_SEL_TGT_CROP_BOUNDS 0x0002 | ||
| 776 | /* Current composing area */ | ||
| 777 | #define V4L2_SEL_TGT_COMPOSE_ACTIVE 0x0100 | ||
| 778 | /* Default composing area */ | ||
| 779 | #define V4L2_SEL_TGT_COMPOSE_DEFAULT 0x0101 | ||
| 780 | /* Composing bounds */ | ||
| 781 | #define V4L2_SEL_TGT_COMPOSE_BOUNDS 0x0102 | ||
| 782 | /* Current composing area plus all padding pixels */ | ||
| 783 | #define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103 | ||
| 784 | |||
| 785 | /** | 768 | /** |
| 786 | * struct v4l2_selection - selection info | 769 | * struct v4l2_selection - selection info |
| 787 | * @type: buffer type (do not use *_MPLANE types) | 770 | * @type: buffer type (do not use *_MPLANE types) |
| 788 | * @target: selection target, used to choose one of possible rectangles | 771 | * @target: Selection target, used to choose one of possible rectangles; |
| 789 | * @flags: constraints flags | 772 | * defined in v4l2-common.h; V4L2_SEL_TGT_* . |
| 773 | * @flags: constraints flags, defined in v4l2-common.h; V4L2_SEL_FLAG_*. | ||
| 790 | * @r: coordinates of selection window | 774 | * @r: coordinates of selection window |
| 791 | * @reserved: for future use, rounds structure size to 64 bytes, set to zero | 775 | * @reserved: for future use, rounds structure size to 64 bytes, set to zero |
| 792 | * | 776 | * |
| @@ -2039,6 +2023,8 @@ struct v4l2_modulator { | |||
| 2039 | /* Flags for the 'capability' field */ | 2023 | /* Flags for the 'capability' field */ |
| 2040 | #define V4L2_TUNER_CAP_LOW 0x0001 | 2024 | #define V4L2_TUNER_CAP_LOW 0x0001 |
| 2041 | #define V4L2_TUNER_CAP_NORM 0x0002 | 2025 | #define V4L2_TUNER_CAP_NORM 0x0002 |
| 2026 | #define V4L2_TUNER_CAP_HWSEEK_BOUNDED 0x0004 | ||
| 2027 | #define V4L2_TUNER_CAP_HWSEEK_WRAP 0x0008 | ||
| 2042 | #define V4L2_TUNER_CAP_STEREO 0x0010 | 2028 | #define V4L2_TUNER_CAP_STEREO 0x0010 |
| 2043 | #define V4L2_TUNER_CAP_LANG2 0x0020 | 2029 | #define V4L2_TUNER_CAP_LANG2 0x0020 |
| 2044 | #define V4L2_TUNER_CAP_SAP 0x0020 | 2030 | #define V4L2_TUNER_CAP_SAP 0x0020 |
| @@ -2046,6 +2032,8 @@ struct v4l2_modulator { | |||
| 2046 | #define V4L2_TUNER_CAP_RDS 0x0080 | 2032 | #define V4L2_TUNER_CAP_RDS 0x0080 |
| 2047 | #define V4L2_TUNER_CAP_RDS_BLOCK_IO 0x0100 | 2033 | #define V4L2_TUNER_CAP_RDS_BLOCK_IO 0x0100 |
| 2048 | #define V4L2_TUNER_CAP_RDS_CONTROLS 0x0200 | 2034 | #define V4L2_TUNER_CAP_RDS_CONTROLS 0x0200 |
| 2035 | #define V4L2_TUNER_CAP_FREQ_BANDS 0x0400 | ||
| 2036 | #define V4L2_TUNER_CAP_HWSEEK_PROG_LIM 0x0800 | ||
| 2049 | 2037 | ||
| 2050 | /* Flags for the 'rxsubchans' field */ | 2038 | /* Flags for the 'rxsubchans' field */ |
| 2051 | #define V4L2_TUNER_SUB_MONO 0x0001 | 2039 | #define V4L2_TUNER_SUB_MONO 0x0001 |
| @@ -2064,19 +2052,36 @@ struct v4l2_modulator { | |||
| 2064 | #define V4L2_TUNER_MODE_LANG1_LANG2 0x0004 | 2052 | #define V4L2_TUNER_MODE_LANG1_LANG2 0x0004 |
| 2065 | 2053 | ||
| 2066 | struct v4l2_frequency { | 2054 | struct v4l2_frequency { |
| 2067 | __u32 tuner; | 2055 | __u32 tuner; |
| 2068 | __u32 type; /* enum v4l2_tuner_type */ | 2056 | __u32 type; /* enum v4l2_tuner_type */ |
| 2069 | __u32 frequency; | 2057 | __u32 frequency; |
| 2070 | __u32 reserved[8]; | 2058 | __u32 reserved[8]; |
| 2059 | }; | ||
| 2060 | |||
| 2061 | #define V4L2_BAND_MODULATION_VSB (1 << 1) | ||
| 2062 | #define V4L2_BAND_MODULATION_FM (1 << 2) | ||
| 2063 | #define V4L2_BAND_MODULATION_AM (1 << 3) | ||
| 2064 | |||
| 2065 | struct v4l2_frequency_band { | ||
| 2066 | __u32 tuner; | ||
| 2067 | __u32 type; /* enum v4l2_tuner_type */ | ||
| 2068 | __u32 index; | ||
| 2069 | __u32 capability; | ||
| 2070 | __u32 rangelow; | ||
| 2071 | __u32 rangehigh; | ||
| 2072 | __u32 modulation; | ||
| 2073 | __u32 reserved[9]; | ||
| 2071 | }; | 2074 | }; |
| 2072 | 2075 | ||
| 2073 | struct v4l2_hw_freq_seek { | 2076 | struct v4l2_hw_freq_seek { |
| 2074 | __u32 tuner; | 2077 | __u32 tuner; |
| 2075 | __u32 type; /* enum v4l2_tuner_type */ | 2078 | __u32 type; /* enum v4l2_tuner_type */ |
| 2076 | __u32 seek_upward; | 2079 | __u32 seek_upward; |
| 2077 | __u32 wrap_around; | 2080 | __u32 wrap_around; |
| 2078 | __u32 spacing; | 2081 | __u32 spacing; |
| 2079 | __u32 reserved[7]; | 2082 | __u32 rangelow; |
| 2083 | __u32 rangehigh; | ||
| 2084 | __u32 reserved[5]; | ||
| 2080 | }; | 2085 | }; |
| 2081 | 2086 | ||
| 2082 | /* | 2087 | /* |
| @@ -2640,9 +2645,13 @@ struct v4l2_create_buffers { | |||
| 2640 | 2645 | ||
| 2641 | /* Experimental, these three ioctls may change over the next couple of kernel | 2646 | /* Experimental, these three ioctls may change over the next couple of kernel |
| 2642 | versions. */ | 2647 | versions. */ |
| 2643 | #define VIDIOC_ENUM_DV_TIMINGS _IOWR('V', 96, struct v4l2_enum_dv_timings) | 2648 | #define VIDIOC_ENUM_DV_TIMINGS _IOWR('V', 98, struct v4l2_enum_dv_timings) |
| 2644 | #define VIDIOC_QUERY_DV_TIMINGS _IOR('V', 97, struct v4l2_dv_timings) | 2649 | #define VIDIOC_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings) |
| 2645 | #define VIDIOC_DV_TIMINGS_CAP _IOWR('V', 98, struct v4l2_dv_timings_cap) | 2650 | #define VIDIOC_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap) |
| 2651 | |||
| 2652 | /* Experimental, this ioctl may change over the next couple of kernel | ||
| 2653 | versions. */ | ||
| 2654 | #define VIDIOC_ENUM_FREQ_BANDS _IOWR('V', 101, struct v4l2_frequency_band) | ||
| 2646 | 2655 | ||
| 2647 | /* Reminder: when adding new ioctls please add support for them to | 2656 | /* Reminder: when adding new ioctls please add support for them to |
| 2648 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ | 2657 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ |
