114
114
static int pb0100_init(struct sd *sd);
115
115
static int pb0100_stop(struct sd *sd);
116
116
static int pb0100_dump(struct sd *sd);
117
static void pb0100_disconnect(struct sd *sd);
118
119
/* V4L2 controls supported by the driver */
119
120
static int pb0100_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
137
138
.i2c_addr = 0xba,
146
.type = V4L2_CTRL_TYPE_INTEGER,
153
.set = pb0100_set_gain,
154
.get = pb0100_get_gain
156
#define RED_BALANCE_IDX 1
159
.id = V4L2_CID_RED_BALANCE,
160
.type = V4L2_CTRL_TYPE_INTEGER,
161
.name = "Red Balance",
167
.set = pb0100_set_red_balance,
168
.get = pb0100_get_red_balance
170
#define BLUE_BALANCE_IDX 2
173
.id = V4L2_CID_BLUE_BALANCE,
174
.type = V4L2_CTRL_TYPE_INTEGER,
175
.name = "Blue Balance",
181
.set = pb0100_set_blue_balance,
182
.get = pb0100_get_blue_balance
184
#define EXPOSURE_IDX 3
187
.id = V4L2_CID_EXPOSURE,
188
.type = V4L2_CTRL_TYPE_INTEGER,
195
.set = pb0100_set_exposure,
196
.get = pb0100_get_exposure
198
#define AUTOGAIN_IDX 4
201
.id = V4L2_CID_AUTOGAIN,
202
.type = V4L2_CTRL_TYPE_BOOLEAN,
203
.name = "Automatic Gain and Exposure",
209
.set = pb0100_set_autogain,
210
.get = pb0100_get_autogain
212
#define AUTOGAIN_TARGET_IDX 5
215
.id = V4L2_CTRL_CLASS_USER + 0x1000,
216
.type = V4L2_CTRL_TYPE_INTEGER,
217
.name = "Automatic Gain Target",
223
.set = pb0100_set_autogain_target,
224
.get = pb0100_get_autogain_target
226
#define NATURAL_IDX 6
229
.id = V4L2_CTRL_CLASS_USER + 0x1001,
230
.type = V4L2_CTRL_TYPE_BOOLEAN,
231
.name = "Natural Light Source",
237
.set = pb0100_set_natural,
238
.get = pb0100_get_natural
242
141
.init = pb0100_init,
243
142
.probe = pb0100_probe,
244
143
.start = pb0100_start,
245
144
.stop = pb0100_stop,
246
145
.dump = pb0100_dump,
250
/* low res / subsample modes disabled as they are only half res horizontal,
251
halving the vertical resolution does not seem to work */
257
.sizeimage = 320 * 240,
259
.colorspace = V4L2_COLORSPACE_SRGB,
260
.priv = PB0100_CROP_TO_VGA
267
.sizeimage = 352 * 288,
269
.colorspace = V4L2_COLORSPACE_SRGB,
146
.disconnect = pb0100_disconnect,