diff options
author | Sakari Ailus <sakari.ailus@nokia.com> | 2007-08-30 08:20:39 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:14:39 -0400 |
commit | 08256ea0da18db20f2edc2e8c935cf74c33ad564 (patch) | |
tree | 1a0f499b99b8168ceda7f13e94b7d4312f905fa7 /include/media/v4l2-int-device.h | |
parent | 098c645e39e10dc580763b5ea4bd4fb390013474 (diff) |
V4L/DVB (6217): V4L: Int if: Add BT.656 interface support
This patch adds BT.656 interface settings for [gs]_ifparm.
Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include/media/v4l2-int-device.h')
-rw-r--r-- | include/media/v4l2-int-device.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h index 861978deb3bf..4e07707bd5ea 100644 --- a/include/media/v4l2-int-device.h +++ b/include/media/v4l2-int-device.h | |||
@@ -99,11 +99,61 @@ int v4l2_int_ioctl_1(struct v4l2_int_device *d, int cmd, void *arg); | |||
99 | 99 | ||
100 | /* Slave interface type. */ | 100 | /* Slave interface type. */ |
101 | enum v4l2_if_type { | 101 | enum v4l2_if_type { |
102 | /* | ||
103 | * Parallel 8-, 10- or 12-bit interface, used by for example | ||
104 | * on certain image sensors. | ||
105 | */ | ||
106 | V4L2_IF_TYPE_BT656, | ||
107 | }; | ||
108 | |||
109 | enum v4l2_if_type_bt656_mode { | ||
110 | /* | ||
111 | * Modes without Bt synchronisation codes. Separate | ||
112 | * synchronisation signal lines are used. | ||
113 | */ | ||
114 | V4L2_IF_TYPE_BT656_MODE_NOBT_8BIT, | ||
115 | V4L2_IF_TYPE_BT656_MODE_NOBT_10BIT, | ||
116 | V4L2_IF_TYPE_BT656_MODE_NOBT_12BIT, | ||
117 | /* | ||
118 | * Use Bt synchronisation codes. The vertical and horizontal | ||
119 | * synchronisation is done based on synchronisation codes. | ||
120 | */ | ||
121 | V4L2_IF_TYPE_BT656_MODE_BT_8BIT, | ||
122 | V4L2_IF_TYPE_BT656_MODE_BT_10BIT, | ||
123 | }; | ||
124 | |||
125 | struct v4l2_if_type_bt656 { | ||
126 | /* | ||
127 | * 0: Frame begins when vsync is high. | ||
128 | * 1: Frame begins when vsync changes from low to high. | ||
129 | */ | ||
130 | unsigned frame_start_on_rising_vs:1; | ||
131 | /* Use Bt synchronisation codes for sync correction. */ | ||
132 | unsigned bt_sync_correct:1; | ||
133 | /* Swap every two adjacent image data elements. */ | ||
134 | unsigned swap:1; | ||
135 | /* Inverted latch clock polarity from slave. */ | ||
136 | unsigned latch_clk_inv:1; | ||
137 | /* Hs polarity. 0 is active high, 1 active low. */ | ||
138 | unsigned nobt_hs_inv:1; | ||
139 | /* Vs polarity. 0 is active high, 1 active low. */ | ||
140 | unsigned nobt_vs_inv:1; | ||
141 | enum v4l2_if_type_bt656_mode mode; | ||
142 | /* Minimum accepted bus clock for slave (in Hz). */ | ||
143 | u32 clock_min; | ||
144 | /* Maximum accepted bus clock for slave. */ | ||
145 | u32 clock_max; | ||
146 | /* | ||
147 | * Current wish of the slave. May only change in response to | ||
148 | * ioctls that affect image capture. | ||
149 | */ | ||
150 | u32 clock_curr; | ||
102 | }; | 151 | }; |
103 | 152 | ||
104 | struct v4l2_ifparm { | 153 | struct v4l2_ifparm { |
105 | enum v4l2_if_type if_type; | 154 | enum v4l2_if_type if_type; |
106 | union { | 155 | union { |
156 | struct v4l2_if_type_bt656 bt656; | ||
107 | } u; | 157 | } u; |
108 | }; | 158 | }; |
109 | 159 | ||