Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef __LINUX_V4L2_SUBDEV_H |
| 8 | #define __LINUX_V4L2_SUBDEV_H |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 9 | #include <linux/const.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 10 | #include <linux/ioctl.h> |
| 11 | #include <linux/types.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 12 | #include <linux/v4l2-common.h> |
| 13 | #include <linux/v4l2-mediabus.h> |
| 14 | enum v4l2_subdev_format_whence { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 15 | V4L2_SUBDEV_FORMAT_TRY = 0, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 16 | V4L2_SUBDEV_FORMAT_ACTIVE = 1, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 17 | }; |
| 18 | struct v4l2_subdev_format { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 19 | __u32 which; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 20 | __u32 pad; |
| 21 | struct v4l2_mbus_framefmt format; |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 22 | __u32 stream; |
| 23 | __u32 reserved[7]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 24 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 25 | struct v4l2_subdev_crop { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 26 | __u32 which; |
| 27 | __u32 pad; |
| 28 | struct v4l2_rect rect; |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 29 | __u32 stream; |
| 30 | __u32 reserved[7]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | }; |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 32 | #define V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE 0x00000001 |
| 33 | #define V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC 0x00000002 |
| 34 | #define V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC 0x00000004 |
| 35 | #define V4L2_SUBDEV_MBUS_CODE_CSC_HSV_ENC V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC |
| 36 | #define V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION 0x00000008 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 37 | struct v4l2_subdev_mbus_code_enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 38 | __u32 pad; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | __u32 index; |
| 40 | __u32 code; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 41 | __u32 which; |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 42 | __u32 flags; |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 43 | __u32 stream; |
| 44 | __u32 reserved[6]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 45 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 46 | struct v4l2_subdev_frame_size_enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | __u32 index; |
| 48 | __u32 pad; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 49 | __u32 code; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 50 | __u32 min_width; |
| 51 | __u32 max_width; |
| 52 | __u32 min_height; |
| 53 | __u32 max_height; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 54 | __u32 which; |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 55 | __u32 stream; |
| 56 | __u32 reserved[7]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 57 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 58 | struct v4l2_subdev_frame_interval { |
| 59 | __u32 pad; |
| 60 | struct v4l2_fract interval; |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 61 | __u32 stream; |
Christopher Ferris | b830ddf | 2024-03-28 11:48:08 -0700 | [diff] [blame] | 62 | __u32 which; |
| 63 | __u32 reserved[7]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 64 | }; |
| 65 | struct v4l2_subdev_frame_interval_enum { |
| 66 | __u32 index; |
| 67 | __u32 pad; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 68 | __u32 code; |
| 69 | __u32 width; |
| 70 | __u32 height; |
| 71 | struct v4l2_fract interval; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 72 | __u32 which; |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 73 | __u32 stream; |
| 74 | __u32 reserved[7]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 75 | }; |
| 76 | struct v4l2_subdev_selection { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 77 | __u32 which; |
| 78 | __u32 pad; |
| 79 | __u32 target; |
| 80 | __u32 flags; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 81 | struct v4l2_rect r; |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 82 | __u32 stream; |
| 83 | __u32 reserved[7]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 84 | }; |
Christopher Ferris | 8177cdf | 2020-08-03 11:53:55 -0700 | [diff] [blame] | 85 | struct v4l2_subdev_capability { |
| 86 | __u32 version; |
| 87 | __u32 capabilities; |
| 88 | __u32 reserved[14]; |
| 89 | }; |
Christopher Ferris | 05667cd | 2021-02-16 16:01:34 -0800 | [diff] [blame] | 90 | #define V4L2_SUBDEV_CAP_RO_SUBDEV 0x00000001 |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 91 | #define V4L2_SUBDEV_CAP_STREAMS 0x00000002 |
| 92 | #define V4L2_SUBDEV_ROUTE_FL_ACTIVE (1U << 0) |
| 93 | struct v4l2_subdev_route { |
| 94 | __u32 sink_pad; |
| 95 | __u32 sink_stream; |
| 96 | __u32 source_pad; |
| 97 | __u32 source_stream; |
| 98 | __u32 flags; |
| 99 | __u32 reserved[5]; |
| 100 | }; |
| 101 | struct v4l2_subdev_routing { |
| 102 | __u32 which; |
| 103 | __u32 num_routes; |
| 104 | __u64 routes; |
| 105 | __u32 reserved[6]; |
| 106 | }; |
Christopher Ferris | 0f79521 | 2024-01-17 14:17:28 -0800 | [diff] [blame] | 107 | #define V4L2_SUBDEV_CLIENT_CAP_STREAMS (1ULL << 0) |
Christopher Ferris | b830ddf | 2024-03-28 11:48:08 -0700 | [diff] [blame] | 108 | #define V4L2_SUBDEV_CLIENT_CAP_INTERVAL_USES_WHICH (1ULL << 1) |
Christopher Ferris | 37c3f3c | 2023-07-10 10:59:05 -0700 | [diff] [blame] | 109 | struct v4l2_subdev_client_capability { |
| 110 | __u64 capabilities; |
| 111 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 112 | #define v4l2_subdev_edid v4l2_edid |
Christopher Ferris | 8177cdf | 2020-08-03 11:53:55 -0700 | [diff] [blame] | 113 | #define VIDIOC_SUBDEV_QUERYCAP _IOR('V', 0, struct v4l2_subdev_capability) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 114 | #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 115 | #define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 116 | #define VIDIOC_SUBDEV_G_FRAME_INTERVAL _IOWR('V', 21, struct v4l2_subdev_frame_interval) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 117 | #define VIDIOC_SUBDEV_S_FRAME_INTERVAL _IOWR('V', 22, struct v4l2_subdev_frame_interval) |
| 118 | #define VIDIOC_SUBDEV_ENUM_MBUS_CODE _IOWR('V', 2, struct v4l2_subdev_mbus_code_enum) |
| 119 | #define VIDIOC_SUBDEV_ENUM_FRAME_SIZE _IOWR('V', 74, struct v4l2_subdev_frame_size_enum) |
| 120 | #define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 121 | #define VIDIOC_SUBDEV_G_CROP _IOWR('V', 59, struct v4l2_subdev_crop) |
| 122 | #define VIDIOC_SUBDEV_S_CROP _IOWR('V', 60, struct v4l2_subdev_crop) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 123 | #define VIDIOC_SUBDEV_G_SELECTION _IOWR('V', 61, struct v4l2_subdev_selection) |
| 124 | #define VIDIOC_SUBDEV_S_SELECTION _IOWR('V', 62, struct v4l2_subdev_selection) |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 125 | #define VIDIOC_SUBDEV_G_ROUTING _IOWR('V', 38, struct v4l2_subdev_routing) |
| 126 | #define VIDIOC_SUBDEV_S_ROUTING _IOWR('V', 39, struct v4l2_subdev_routing) |
Christopher Ferris | 37c3f3c | 2023-07-10 10:59:05 -0700 | [diff] [blame] | 127 | #define VIDIOC_SUBDEV_G_CLIENT_CAP _IOR('V', 101, struct v4l2_subdev_client_capability) |
| 128 | #define VIDIOC_SUBDEV_S_CLIENT_CAP _IOWR('V', 102, struct v4l2_subdev_client_capability) |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 129 | #define VIDIOC_SUBDEV_G_STD _IOR('V', 23, v4l2_std_id) |
| 130 | #define VIDIOC_SUBDEV_S_STD _IOW('V', 24, v4l2_std_id) |
| 131 | #define VIDIOC_SUBDEV_ENUMSTD _IOWR('V', 25, struct v4l2_standard) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 132 | #define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_edid) |
| 133 | #define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_edid) |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 134 | #define VIDIOC_SUBDEV_QUERYSTD _IOR('V', 63, v4l2_std_id) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 135 | #define VIDIOC_SUBDEV_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) |
| 136 | #define VIDIOC_SUBDEV_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 137 | #define VIDIOC_SUBDEV_ENUM_DV_TIMINGS _IOWR('V', 98, struct v4l2_enum_dv_timings) |
| 138 | #define VIDIOC_SUBDEV_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings) |
| 139 | #define VIDIOC_SUBDEV_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 140 | #endif |