0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #ifndef __LINUX_V4L2_SUBDEV_H
0025 #define __LINUX_V4L2_SUBDEV_H
0026
0027 #include <linux/ioctl.h>
0028 #include <linux/types.h>
0029 #include <linux/v4l2-common.h>
0030 #include <linux/v4l2-mediabus.h>
0031
0032
0033
0034
0035
0036
0037 enum v4l2_subdev_format_whence {
0038 V4L2_SUBDEV_FORMAT_TRY = 0,
0039 V4L2_SUBDEV_FORMAT_ACTIVE = 1,
0040 };
0041
0042
0043
0044
0045
0046
0047
0048
0049 struct v4l2_subdev_format {
0050 __u32 which;
0051 __u32 pad;
0052 struct v4l2_mbus_framefmt format;
0053 __u32 reserved[8];
0054 };
0055
0056
0057
0058
0059
0060
0061
0062
0063 struct v4l2_subdev_crop {
0064 __u32 which;
0065 __u32 pad;
0066 struct v4l2_rect rect;
0067 __u32 reserved[8];
0068 };
0069
0070 #define V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE 0x00000001
0071 #define V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC 0x00000002
0072 #define V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC 0x00000004
0073 #define V4L2_SUBDEV_MBUS_CODE_CSC_HSV_ENC V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC
0074 #define V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION 0x00000008
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085 struct v4l2_subdev_mbus_code_enum {
0086 __u32 pad;
0087 __u32 index;
0088 __u32 code;
0089 __u32 which;
0090 __u32 flags;
0091 __u32 reserved[7];
0092 };
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106 struct v4l2_subdev_frame_size_enum {
0107 __u32 index;
0108 __u32 pad;
0109 __u32 code;
0110 __u32 min_width;
0111 __u32 max_width;
0112 __u32 min_height;
0113 __u32 max_height;
0114 __u32 which;
0115 __u32 reserved[8];
0116 };
0117
0118
0119
0120
0121
0122
0123
0124 struct v4l2_subdev_frame_interval {
0125 __u32 pad;
0126 struct v4l2_fract interval;
0127 __u32 reserved[9];
0128 };
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141 struct v4l2_subdev_frame_interval_enum {
0142 __u32 index;
0143 __u32 pad;
0144 __u32 code;
0145 __u32 width;
0146 __u32 height;
0147 struct v4l2_fract interval;
0148 __u32 which;
0149 __u32 reserved[8];
0150 };
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167 struct v4l2_subdev_selection {
0168 __u32 which;
0169 __u32 pad;
0170 __u32 target;
0171 __u32 flags;
0172 struct v4l2_rect r;
0173 __u32 reserved[8];
0174 };
0175
0176
0177
0178
0179
0180
0181
0182 struct v4l2_subdev_capability {
0183 __u32 version;
0184 __u32 capabilities;
0185 __u32 reserved[14];
0186 };
0187
0188
0189 #define V4L2_SUBDEV_CAP_RO_SUBDEV 0x00000001
0190
0191
0192 #define v4l2_subdev_edid v4l2_edid
0193
0194 #define VIDIOC_SUBDEV_QUERYCAP _IOR('V', 0, struct v4l2_subdev_capability)
0195 #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format)
0196 #define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format)
0197 #define VIDIOC_SUBDEV_G_FRAME_INTERVAL _IOWR('V', 21, struct v4l2_subdev_frame_interval)
0198 #define VIDIOC_SUBDEV_S_FRAME_INTERVAL _IOWR('V', 22, struct v4l2_subdev_frame_interval)
0199 #define VIDIOC_SUBDEV_ENUM_MBUS_CODE _IOWR('V', 2, struct v4l2_subdev_mbus_code_enum)
0200 #define VIDIOC_SUBDEV_ENUM_FRAME_SIZE _IOWR('V', 74, struct v4l2_subdev_frame_size_enum)
0201 #define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum)
0202 #define VIDIOC_SUBDEV_G_CROP _IOWR('V', 59, struct v4l2_subdev_crop)
0203 #define VIDIOC_SUBDEV_S_CROP _IOWR('V', 60, struct v4l2_subdev_crop)
0204 #define VIDIOC_SUBDEV_G_SELECTION _IOWR('V', 61, struct v4l2_subdev_selection)
0205 #define VIDIOC_SUBDEV_S_SELECTION _IOWR('V', 62, struct v4l2_subdev_selection)
0206
0207 #define VIDIOC_SUBDEV_G_STD _IOR('V', 23, v4l2_std_id)
0208 #define VIDIOC_SUBDEV_S_STD _IOW('V', 24, v4l2_std_id)
0209 #define VIDIOC_SUBDEV_ENUMSTD _IOWR('V', 25, struct v4l2_standard)
0210 #define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_edid)
0211 #define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_edid)
0212 #define VIDIOC_SUBDEV_QUERYSTD _IOR('V', 63, v4l2_std_id)
0213 #define VIDIOC_SUBDEV_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings)
0214 #define VIDIOC_SUBDEV_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings)
0215 #define VIDIOC_SUBDEV_ENUM_DV_TIMINGS _IOWR('V', 98, struct v4l2_enum_dv_timings)
0216 #define VIDIOC_SUBDEV_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings)
0217 #define VIDIOC_SUBDEV_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap)
0218
0219 #endif