~ubuntu-branches/ubuntu/lucid/linux-rt/lucid

« back to all changes in this revision

Viewing changes to drivers/media/video/gspca/stv06xx/stv06xx_pb0100.h

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2009-08-05 23:00:52 UTC
  • Revision ID: james.westby@ubuntu.com-20090805230052-7xedvqcyk9dnnxb2
Tags: 2.6.31-1.1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
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);
117
118
 
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,
138
139
        .i2c_len = 2,
139
140
 
140
 
        .nctrls = 7,
141
 
        .ctrls = {
142
 
#define GAIN_IDX 0
143
 
        {
144
 
                {
145
 
                        .id             = V4L2_CID_GAIN,
146
 
                        .type           = V4L2_CTRL_TYPE_INTEGER,
147
 
                        .name           = "Gain",
148
 
                        .minimum        = 0,
149
 
                        .maximum        = 255,
150
 
                        .step           = 1,
151
 
                        .default_value  = 128
152
 
                },
153
 
                .set = pb0100_set_gain,
154
 
                .get = pb0100_get_gain
155
 
        },
156
 
#define RED_BALANCE_IDX 1
157
 
        {
158
 
                {
159
 
                        .id             = V4L2_CID_RED_BALANCE,
160
 
                        .type           = V4L2_CTRL_TYPE_INTEGER,
161
 
                        .name           = "Red Balance",
162
 
                        .minimum        = -255,
163
 
                        .maximum        = 255,
164
 
                        .step           = 1,
165
 
                        .default_value  = 0
166
 
                },
167
 
                .set = pb0100_set_red_balance,
168
 
                .get = pb0100_get_red_balance
169
 
        },
170
 
#define BLUE_BALANCE_IDX 2
171
 
        {
172
 
                {
173
 
                        .id             = V4L2_CID_BLUE_BALANCE,
174
 
                        .type           = V4L2_CTRL_TYPE_INTEGER,
175
 
                        .name           = "Blue Balance",
176
 
                        .minimum        = -255,
177
 
                        .maximum        = 255,
178
 
                        .step           = 1,
179
 
                        .default_value  = 0
180
 
                },
181
 
                .set = pb0100_set_blue_balance,
182
 
                .get = pb0100_get_blue_balance
183
 
        },
184
 
#define EXPOSURE_IDX 3
185
 
        {
186
 
                {
187
 
                        .id             = V4L2_CID_EXPOSURE,
188
 
                        .type           = V4L2_CTRL_TYPE_INTEGER,
189
 
                        .name           = "Exposure",
190
 
                        .minimum        = 0,
191
 
                        .maximum        = 511,
192
 
                        .step           = 1,
193
 
                        .default_value  = 12
194
 
                },
195
 
                .set = pb0100_set_exposure,
196
 
                .get = pb0100_get_exposure
197
 
        },
198
 
#define AUTOGAIN_IDX 4
199
 
        {
200
 
                {
201
 
                        .id             = V4L2_CID_AUTOGAIN,
202
 
                        .type           = V4L2_CTRL_TYPE_BOOLEAN,
203
 
                        .name           = "Automatic Gain and Exposure",
204
 
                        .minimum        = 0,
205
 
                        .maximum        = 1,
206
 
                        .step           = 1,
207
 
                        .default_value  = 1
208
 
                },
209
 
                .set = pb0100_set_autogain,
210
 
                .get = pb0100_get_autogain
211
 
        },
212
 
#define AUTOGAIN_TARGET_IDX 5
213
 
        {
214
 
                {
215
 
                        .id             = V4L2_CTRL_CLASS_USER + 0x1000,
216
 
                        .type           = V4L2_CTRL_TYPE_INTEGER,
217
 
                        .name           = "Automatic Gain Target",
218
 
                        .minimum        = 0,
219
 
                        .maximum        = 255,
220
 
                        .step           = 1,
221
 
                        .default_value  = 128
222
 
                },
223
 
                .set = pb0100_set_autogain_target,
224
 
                .get = pb0100_get_autogain_target
225
 
        },
226
 
#define NATURAL_IDX 6
227
 
        {
228
 
                {
229
 
                        .id             = V4L2_CTRL_CLASS_USER + 0x1001,
230
 
                        .type           = V4L2_CTRL_TYPE_BOOLEAN,
231
 
                        .name           = "Natural Light Source",
232
 
                        .minimum        = 0,
233
 
                        .maximum        = 1,
234
 
                        .step           = 1,
235
 
                        .default_value  = 1
236
 
                },
237
 
                .set = pb0100_set_natural,
238
 
                .get = pb0100_get_natural
239
 
        },
240
 
        },
241
 
 
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,
247
 
 
248
 
        .nmodes = 2,
249
 
        .modes = {
250
 
/* low res / subsample modes disabled as they are only half res horizontal,
251
 
   halving the vertical resolution does not seem to work */
252
 
        {
253
 
                320,
254
 
                240,
255
 
                V4L2_PIX_FMT_SGRBG8,
256
 
                V4L2_FIELD_NONE,
257
 
                .sizeimage = 320 * 240,
258
 
                .bytesperline = 320,
259
 
                .colorspace = V4L2_COLORSPACE_SRGB,
260
 
                .priv = PB0100_CROP_TO_VGA
261
 
        },
262
 
        {
263
 
                352,
264
 
                288,
265
 
                V4L2_PIX_FMT_SGRBG8,
266
 
                V4L2_FIELD_NONE,
267
 
                .sizeimage = 352 * 288,
268
 
                .bytesperline = 352,
269
 
                .colorspace = V4L2_COLORSPACE_SRGB,
270
 
                .priv = 0
271
 
        },
272
 
        }
 
146
        .disconnect = pb0100_disconnect,
273
147
};
274
148
 
275
149
#endif