21 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
23 #define MODULE_NAME "sn9c2028"
47 .sizeimage = 640 * 480 * 3 / 4,
56 .sizeimage = 352 * 288 * 3 / 4,
66 PDEBUG(D_USBO,
"sending command %02x%02x%02x%02x%02x%02x", command[0],
67 command[1], command[2], command[3], command[4], command[5]);
71 usb_sndctrlpipe(gspca_dev->
dev, 0),
74 2, 0, gspca_dev->
usb_buf, 6, 500);
76 pr_err(
"command write [%02x] error %d\n",
84 static int sn9c2028_read1(
struct gspca_dev *gspca_dev)
89 usb_rcvctrlpipe(gspca_dev->
dev, 0),
92 1, 0, gspca_dev->
usb_buf, 1, 500);
94 pr_err(
"read1 error %d\n", rc);
95 return (rc < 0) ? rc : -
EIO;
101 static int sn9c2028_read4(
struct gspca_dev *gspca_dev,
u8 *
reading)
105 usb_rcvctrlpipe(gspca_dev->
dev, 0),
108 4, 0, gspca_dev->
usb_buf, 4, 500);
110 pr_err(
"read4 error %d\n", rc);
111 return (rc < 0) ? rc : -
EIO;
114 PDEBUG(D_USBI,
"read4 response %02x%02x%02x%02x", reading[0],
115 reading[1], reading[2], reading[3]);
119 static int sn9c2028_long_command(
struct gspca_dev *gspca_dev,
u8 *command)
124 status = sn9c2028_command(gspca_dev, command);
129 for (i = 0; i < 256 && status < 2; i++)
130 status = sn9c2028_read1(gspca_dev);
132 pr_err(
"long command status read error %d\n", status);
133 return (status < 0) ? status : -
EIO;
137 status = sn9c2028_read4(gspca_dev, reading);
143 status = sn9c2028_read1(gspca_dev);
150 static int sn9c2028_short_command(
struct gspca_dev *gspca_dev,
u8 *command)
154 err_code = sn9c2028_command(gspca_dev, command);
158 err_code = sn9c2028_read1(gspca_dev);
166 static int sd_config(
struct gspca_dev *gspca_dev,
169 struct sd *
sd = (
struct sd *) gspca_dev;
172 PDEBUG(D_PROBE,
"SN9C2028 camera detected (vid/pid 0x%04X:0x%04X)",
175 sd->
model =
id->idProduct;
179 PDEBUG(D_PROBE,
"Genius Smart 300 camera");
182 PDEBUG(D_PROBE,
"DC31VC");
185 PDEBUG(D_PROBE,
"Spy camera");
188 PDEBUG(D_PROBE,
"CIF camera");
191 PDEBUG(D_PROBE,
"Mini-Shotz ms-350 camera");
194 PDEBUG(D_PROBE,
"Vivitar 3350b type camera");
214 static int sd_init(
struct gspca_dev *gspca_dev)
218 sn9c2028_read1(gspca_dev);
219 sn9c2028_read1(gspca_dev);
220 status = sn9c2028_read1(gspca_dev);
222 return (status < 0) ? status : 0;
225 static int run_start_commands(
struct gspca_dev *gspca_dev,
228 int i, err_code = -1;
230 for (i = 0; i <
n; i++) {
231 switch (cam_commands[i].to_read) {
233 err_code = sn9c2028_long_command(gspca_dev,
237 err_code = sn9c2028_short_command(gspca_dev,
241 err_code = sn9c2028_command(gspca_dev,
251 static int start_spy_cam(
struct gspca_dev *gspca_dev)
254 {{0x0c, 0x01, 0x00, 0x00, 0x00, 0x00}, 4},
255 {{0x13, 0x20, 0x01, 0x00, 0x00, 0x00}, 4},
256 {{0x13, 0x21, 0x01, 0x00, 0x00, 0x00}, 4},
257 {{0x13, 0x22, 0x01, 0x04, 0x00, 0x00}, 4},
258 {{0x13, 0x23, 0x01, 0x03, 0x00, 0x00}, 4},
259 {{0x13, 0x24, 0x01, 0x00, 0x00, 0x00}, 4},
260 {{0x13, 0x25, 0x01, 0x16, 0x00, 0x00}, 4},
261 {{0x13, 0x26, 0x01, 0x12, 0x00, 0x00}, 4},
263 {{0x13, 0x27, 0x01, 0x68, 0x00, 0x00}, 4},
264 {{0x13, 0x28, 0x01, 0x09, 0x00, 0x00}, 4},
266 {{0x13, 0x29, 0x01, 0x00, 0x00, 0x00}, 4},
268 {{0x13, 0x2a, 0x01, 0x00, 0x00, 0x00}, 4},
269 {{0x13, 0x2b, 0x01, 0x00, 0x00, 0x00}, 4},
271 {{0x13, 0x2c, 0x01, 0x02, 0x00, 0x00}, 4},
272 {{0x13, 0x2d, 0x01, 0x02, 0x00, 0x00}, 4},
274 {{0x13, 0x2e, 0x01, 0x09, 0x00, 0x00}, 4},
275 {{0x13, 0x2f, 0x01, 0x07, 0x00, 0x00}, 4},
276 {{0x12, 0x34, 0x01, 0x00, 0x00, 0x00}, 4},
277 {{0x13, 0x34, 0x01, 0xa1, 0x00, 0x00}, 4},
278 {{0x13, 0x35, 0x01, 0x00, 0x00, 0x00}, 4},
279 {{0x11, 0x02, 0x06, 0x00, 0x00, 0x00}, 4},
280 {{0x11, 0x03, 0x13, 0x00, 0x00, 0x00}, 4},
282 {{0x11, 0x04, 0x00, 0x00, 0x00, 0x00}, 4},
284 {{0x11, 0x05, 0x00, 0x00, 0x00, 0x00}, 4},
285 {{0x11, 0x06, 0xb1, 0x00, 0x00, 0x00}, 4},
286 {{0x11, 0x07, 0x00, 0x00, 0x00, 0x00}, 4},
288 {{0x11, 0x08, 0x0b, 0x00, 0x00, 0x00}, 4},
289 {{0x11, 0x09, 0x01, 0x00, 0x00, 0x00}, 4},
290 {{0x11, 0x0a, 0x01, 0x00, 0x00, 0x00}, 4},
291 {{0x11, 0x0b, 0x01, 0x00, 0x00, 0x00}, 4},
292 {{0x11, 0x0c, 0x01, 0x00, 0x00, 0x00}, 4},
293 {{0x11, 0x0d, 0x00, 0x00, 0x00, 0x00}, 4},
294 {{0x11, 0x0e, 0x04, 0x00, 0x00, 0x00}, 4},
298 {{0x11, 0x0f, 0x04, 0x00, 0x00, 0x00}, 4},
299 {{0x11, 0x10, 0x06, 0x00, 0x00, 0x00}, 4},
300 {{0x11, 0x11, 0x06, 0x00, 0x00, 0x00}, 4},
301 {{0x11, 0x12, 0x00, 0x00, 0x00, 0x00}, 4},
302 {{0x11, 0x14, 0x02, 0x00, 0x00, 0x00}, 4},
303 {{0x11, 0x13, 0x01, 0x00, 0x00, 0x00}, 4},
305 {{0x1b, 0x02, 0x11, 0x00, 0x00, 0x00}, 1},
307 {{0x1b, 0x13, 0x11, 0x00, 0x00, 0x00}, 1},
308 {{0x20, 0x34, 0xa1, 0x00, 0x00, 0x00}, 1},
312 return run_start_commands(gspca_dev, spy_start_commands,
316 static int start_cif_cam(
struct gspca_dev *gspca_dev)
319 {{0x0c, 0x01, 0x00, 0x00, 0x00, 0x00}, 4},
340 {{0x1b, 0x21, 0x00, 0x00, 0x00, 0x00}, 1},
341 {{0x1b, 0x17, 0x00, 0x00, 0x00, 0x00}, 1},
342 {{0x1b, 0x19, 0x00, 0x00, 0x00, 0x00}, 1},
343 {{0x1b, 0x02, 0x06, 0x00, 0x00, 0x00}, 1},
344 {{0x1b, 0x03, 0x5a, 0x00, 0x00, 0x00}, 1},
345 {{0x1b, 0x04, 0x27, 0x00, 0x00, 0x00}, 1},
346 {{0x1b, 0x05, 0x01, 0x00, 0x00, 0x00}, 1},
347 {{0x1b, 0x12, 0x14, 0x00, 0x00, 0x00}, 1},
348 {{0x1b, 0x13, 0x00, 0x00, 0x00, 0x00}, 1},
349 {{0x1b, 0x14, 0x00, 0x00, 0x00, 0x00}, 1},
350 {{0x1b, 0x15, 0x00, 0x00, 0x00, 0x00}, 1},
351 {{0x1b, 0x16, 0x00, 0x00, 0x00, 0x00}, 1},
352 {{0x1b, 0x77, 0xa2, 0x00, 0x00, 0x00}, 1},
353 {{0x1b, 0x06, 0x0f, 0x00, 0x00, 0x00}, 1},
354 {{0x1b, 0x07, 0x14, 0x00, 0x00, 0x00}, 1},
355 {{0x1b, 0x08, 0x0f, 0x00, 0x00, 0x00}, 1},
356 {{0x1b, 0x09, 0x10, 0x00, 0x00, 0x00}, 1},
357 {{0x1b, 0x0e, 0x00, 0x00, 0x00, 0x00}, 1},
358 {{0x1b, 0x0f, 0x00, 0x00, 0x00, 0x00}, 1},
359 {{0x1b, 0x12, 0x07, 0x00, 0x00, 0x00}, 1},
360 {{0x1b, 0x10, 0x1f, 0x00, 0x00, 0x00}, 1},
361 {{0x1b, 0x11, 0x01, 0x00, 0x00, 0x00}, 1},
362 {{0x13, 0x25, 0x01, 0x16, 0x00, 0x00}, 1},
363 {{0x13, 0x26, 0x01, 0x12, 0x00, 0x00}, 1},
370 {{0x13, 0x2c, 0x01, 0x02, 0x00, 0x00}, 4},
371 {{0x13, 0x2d, 0x01, 0x01, 0x00, 0x00}, 4},
372 {{0x13, 0x2e, 0x01, 0x08, 0x00, 0x00}, 4},
373 {{0x13, 0x2f, 0x01, 0x06, 0x00, 0x00}, 4},
374 {{0x13, 0x28, 0x01, 0x00, 0x00, 0x00}, 4},
375 {{0x1b, 0x04, 0x6d, 0x00, 0x00, 0x00}, 1},
376 {{0x1b, 0x05, 0x03, 0x00, 0x00, 0x00}, 1},
377 {{0x20, 0x36, 0x06, 0x00, 0x00, 0x00}, 1},
378 {{0x1b, 0x0e, 0x01, 0x00, 0x00, 0x00}, 1},
379 {{0x12, 0x27, 0x01, 0x00, 0x00, 0x00}, 4},
380 {{0x1b, 0x0f, 0x00, 0x00, 0x00, 0x00}, 1},
381 {{0x20, 0x36, 0x05, 0x00, 0x00, 0x00}, 1},
382 {{0x1b, 0x10, 0x0f, 0x00, 0x00, 0x00}, 1},
383 {{0x1b, 0x02, 0x06, 0x00, 0x00, 0x00}, 1},
384 {{0x1b, 0x11, 0x01, 0x00, 0x00, 0x00}, 1},
385 {{0x20, 0x34, 0xa1, 0x00, 0x00, 0x00}, 1},
389 return run_start_commands(gspca_dev, cif_start_commands,
393 static int start_ms350_cam(
struct gspca_dev *gspca_dev)
396 {{0x0c, 0x01, 0x00, 0x00, 0x00, 0x00}, 4},
397 {{0x16, 0x01, 0x00, 0x00, 0x00, 0x00}, 4},
398 {{0x13, 0x20, 0x01, 0x00, 0x00, 0x00}, 4},
399 {{0x13, 0x21, 0x01, 0x00, 0x00, 0x00}, 4},
400 {{0x13, 0x22, 0x01, 0x04, 0x00, 0x00}, 4},
401 {{0x13, 0x23, 0x01, 0x03, 0x00, 0x00}, 4},
402 {{0x13, 0x24, 0x01, 0x00, 0x00, 0x00}, 4},
403 {{0x13, 0x25, 0x01, 0x16, 0x00, 0x00}, 4},
404 {{0x13, 0x26, 0x01, 0x12, 0x00, 0x00}, 4},
405 {{0x13, 0x27, 0x01, 0x28, 0x00, 0x00}, 4},
406 {{0x13, 0x28, 0x01, 0x09, 0x00, 0x00}, 4},
407 {{0x13, 0x29, 0x01, 0x00, 0x00, 0x00}, 4},
408 {{0x13, 0x2a, 0x01, 0x00, 0x00, 0x00}, 4},
409 {{0x13, 0x2b, 0x01, 0x00, 0x00, 0x00}, 4},
410 {{0x13, 0x2c, 0x01, 0x02, 0x00, 0x00}, 4},
411 {{0x13, 0x2d, 0x01, 0x03, 0x00, 0x00}, 4},
412 {{0x13, 0x2e, 0x01, 0x0f, 0x00, 0x00}, 4},
413 {{0x13, 0x2f, 0x01, 0x0c, 0x00, 0x00}, 4},
414 {{0x12, 0x34, 0x01, 0x00, 0x00, 0x00}, 4},
415 {{0x13, 0x34, 0x01, 0xa1, 0x00, 0x00}, 4},
416 {{0x13, 0x35, 0x01, 0x00, 0x00, 0x00}, 4},
417 {{0x11, 0x00, 0x01, 0x00, 0x00, 0x00}, 4},
418 {{0x11, 0x01, 0x70, 0x00, 0x00, 0x00}, 4},
419 {{0x11, 0x02, 0x05, 0x00, 0x00, 0x00}, 4},
420 {{0x11, 0x03, 0x5d, 0x00, 0x00, 0x00}, 4},
421 {{0x11, 0x04, 0x07, 0x00, 0x00, 0x00}, 4},
422 {{0x11, 0x05, 0x25, 0x00, 0x00, 0x00}, 4},
423 {{0x11, 0x06, 0x00, 0x00, 0x00, 0x00}, 4},
424 {{0x11, 0x07, 0x09, 0x00, 0x00, 0x00}, 4},
425 {{0x11, 0x08, 0x01, 0x00, 0x00, 0x00}, 4},
426 {{0x11, 0x09, 0x00, 0x00, 0x00, 0x00}, 4},
427 {{0x11, 0x0a, 0x00, 0x00, 0x00, 0x00}, 4},
428 {{0x11, 0x0b, 0x01, 0x00, 0x00, 0x00}, 4},
429 {{0x11, 0x0c, 0x00, 0x00, 0x00, 0x00}, 4},
430 {{0x11, 0x0d, 0x0c, 0x00, 0x00, 0x00}, 4},
431 {{0x11, 0x0e, 0x01, 0x00, 0x00, 0x00}, 4},
432 {{0x11, 0x0f, 0x00, 0x00, 0x00, 0x00}, 4},
433 {{0x11, 0x10, 0x00, 0x00, 0x00, 0x00}, 4},
434 {{0x11, 0x11, 0x00, 0x00, 0x00, 0x00}, 4},
435 {{0x11, 0x12, 0x00, 0x00, 0x00, 0x00}, 4},
436 {{0x11, 0x13, 0x63, 0x00, 0x00, 0x00}, 4},
437 {{0x11, 0x15, 0x70, 0x00, 0x00, 0x00}, 4},
438 {{0x11, 0x18, 0x00, 0x00, 0x00, 0x00}, 4},
439 {{0x11, 0x11, 0x01, 0x00, 0x00, 0x00}, 4},
440 {{0x13, 0x25, 0x01, 0x28, 0x00, 0x00}, 4},
441 {{0x13, 0x26, 0x01, 0x1e, 0x00, 0x00}, 4},
442 {{0x13, 0x28, 0x01, 0x09, 0x00, 0x00}, 4},
443 {{0x13, 0x27, 0x01, 0x28, 0x00, 0x00}, 4},
444 {{0x13, 0x29, 0x01, 0x40, 0x00, 0x00}, 4},
445 {{0x13, 0x2c, 0x01, 0x02, 0x00, 0x00}, 4},
446 {{0x13, 0x2d, 0x01, 0x03, 0x00, 0x00}, 4},
447 {{0x13, 0x2e, 0x01, 0x0f, 0x00, 0x00}, 4},
448 {{0x13, 0x2f, 0x01, 0x0c, 0x00, 0x00}, 4},
449 {{0x1b, 0x02, 0x05, 0x00, 0x00, 0x00}, 1},
450 {{0x1b, 0x11, 0x01, 0x00, 0x00, 0x00}, 1},
451 {{0x20, 0x18, 0x00, 0x00, 0x00, 0x00}, 1},
452 {{0x1b, 0x02, 0x0a, 0x00, 0x00, 0x00}, 1},
453 {{0x1b, 0x11, 0x01, 0x00, 0x00, 0x00}, 0},
457 return run_start_commands(gspca_dev, ms350_start_commands,
461 static int start_genius_cam(
struct gspca_dev *gspca_dev)
464 {{0x0c, 0x01, 0x00, 0x00, 0x00, 0x00}, 4},
465 {{0x16, 0x01, 0x00, 0x00, 0x00, 0x00}, 4},
466 {{0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, 4},
467 {{0x13, 0x25, 0x01, 0x16, 0x00, 0x00}, 4},
468 {{0x13, 0x26, 0x01, 0x12, 0x00, 0x00}, 4},
470 {{0x13, 0x28, 0x01, 0x0e, 0x00, 0x00}, 4},
471 {{0x13, 0x27, 0x01, 0x20, 0x00, 0x00}, 4},
472 {{0x13, 0x29, 0x01, 0x22, 0x00, 0x00}, 4},
473 {{0x13, 0x2c, 0x01, 0x02, 0x00, 0x00}, 4},
474 {{0x13, 0x2d, 0x01, 0x02, 0x00, 0x00}, 4},
475 {{0x13, 0x2e, 0x01, 0x09, 0x00, 0x00}, 4},
476 {{0x13, 0x2f, 0x01, 0x07, 0x00, 0x00}, 4},
477 {{0x11, 0x20, 0x00, 0x00, 0x00, 0x00}, 4},
478 {{0x11, 0x21, 0x2d, 0x00, 0x00, 0x00}, 4},
479 {{0x11, 0x22, 0x00, 0x00, 0x00, 0x00}, 4},
480 {{0x11, 0x23, 0x03, 0x00, 0x00, 0x00}, 4},
481 {{0x11, 0x10, 0x00, 0x00, 0x00, 0x00}, 4},
482 {{0x11, 0x11, 0x64, 0x00, 0x00, 0x00}, 4},
483 {{0x11, 0x12, 0x00, 0x00, 0x00, 0x00}, 4},
484 {{0x11, 0x13, 0x91, 0x00, 0x00, 0x00}, 4},
485 {{0x11, 0x14, 0x01, 0x00, 0x00, 0x00}, 4},
486 {{0x11, 0x15, 0x20, 0x00, 0x00, 0x00}, 4},
487 {{0x11, 0x16, 0x01, 0x00, 0x00, 0x00}, 4},
488 {{0x11, 0x17, 0x60, 0x00, 0x00, 0x00}, 4},
489 {{0x11, 0x20, 0x00, 0x00, 0x00, 0x00}, 4},
490 {{0x11, 0x21, 0x2d, 0x00, 0x00, 0x00}, 4},
491 {{0x11, 0x22, 0x00, 0x00, 0x00, 0x00}, 4},
492 {{0x11, 0x23, 0x03, 0x00, 0x00, 0x00}, 4},
493 {{0x11, 0x25, 0x00, 0x00, 0x00, 0x00}, 4},
494 {{0x11, 0x26, 0x02, 0x00, 0x00, 0x00}, 4},
495 {{0x11, 0x27, 0x88, 0x00, 0x00, 0x00}, 4},
496 {{0x11, 0x30, 0x38, 0x00, 0x00, 0x00}, 4},
497 {{0x11, 0x31, 0x2a, 0x00, 0x00, 0x00}, 4},
498 {{0x11, 0x32, 0x2a, 0x00, 0x00, 0x00}, 4},
499 {{0x11, 0x33, 0x2a, 0x00, 0x00, 0x00}, 4},
500 {{0x11, 0x34, 0x02, 0x00, 0x00, 0x00}, 4},
501 {{0x11, 0x5b, 0x0a, 0x00, 0x00, 0x00}, 4},
502 {{0x13, 0x25, 0x01, 0x28, 0x00, 0x00}, 4},
503 {{0x13, 0x26, 0x01, 0x1e, 0x00, 0x00}, 4},
504 {{0x13, 0x28, 0x01, 0x0e, 0x00, 0x00}, 4},
505 {{0x13, 0x27, 0x01, 0x20, 0x00, 0x00}, 4},
506 {{0x13, 0x29, 0x01, 0x62, 0x00, 0x00}, 4},
507 {{0x13, 0x2c, 0x01, 0x02, 0x00, 0x00}, 4},
508 {{0x13, 0x2d, 0x01, 0x03, 0x00, 0x00}, 4},
509 {{0x13, 0x2e, 0x01, 0x0f, 0x00, 0x00}, 4},
510 {{0x13, 0x2f, 0x01, 0x0c, 0x00, 0x00}, 4},
511 {{0x11, 0x20, 0x00, 0x00, 0x00, 0x00}, 4},
512 {{0x11, 0x21, 0x2a, 0x00, 0x00, 0x00}, 4},
513 {{0x11, 0x22, 0x00, 0x00, 0x00, 0x00}, 4},
514 {{0x11, 0x23, 0x28, 0x00, 0x00, 0x00}, 4},
515 {{0x11, 0x10, 0x00, 0x00, 0x00, 0x00}, 4},
516 {{0x11, 0x11, 0x04, 0x00, 0x00, 0x00}, 4},
517 {{0x11, 0x12, 0x00, 0x00, 0x00, 0x00}, 4},
518 {{0x11, 0x13, 0x03, 0x00, 0x00, 0x00}, 4},
519 {{0x11, 0x14, 0x01, 0x00, 0x00, 0x00}, 4},
520 {{0x11, 0x15, 0xe0, 0x00, 0x00, 0x00}, 4},
521 {{0x11, 0x16, 0x02, 0x00, 0x00, 0x00}, 4},
522 {{0x11, 0x17, 0x80, 0x00, 0x00, 0x00}, 4},
523 {{0x1c, 0x20, 0x00, 0x2a, 0x00, 0x00}, 1},
524 {{0x1c, 0x20, 0x00, 0x2a, 0x00, 0x00}, 1},
525 {{0x20, 0x34, 0xa1, 0x00, 0x00, 0x00}, 0}
529 return run_start_commands(gspca_dev, genius_start_commands,
533 static int start_vivitar_cam(
struct gspca_dev *gspca_dev)
536 {{0x0c, 0x01, 0x00, 0x00, 0x00, 0x00}, 4},
537 {{0x13, 0x20, 0x01, 0x00, 0x00, 0x00}, 4},
538 {{0x13, 0x21, 0x01, 0x00, 0x00, 0x00}, 4},
539 {{0x13, 0x22, 0x01, 0x01, 0x00, 0x00}, 4},
540 {{0x13, 0x23, 0x01, 0x01, 0x00, 0x00}, 4},
541 {{0x13, 0x24, 0x01, 0x00, 0x00, 0x00}, 4},
542 {{0x13, 0x25, 0x01, 0x28, 0x00, 0x00}, 4},
543 {{0x13, 0x26, 0x01, 0x1e, 0x00, 0x00}, 4},
544 {{0x13, 0x27, 0x01, 0x20, 0x00, 0x00}, 4},
545 {{0x13, 0x28, 0x01, 0x0a, 0x00, 0x00}, 4},
550 {{0x13, 0x29, 0x01, 0x20, 0x00, 0x00}, 4},
552 {{0x13, 0x2a, 0x01, 0x00, 0x00, 0x00}, 4},
553 {{0x13, 0x2b, 0x01, 0x00, 0x00, 0x00}, 4},
554 {{0x13, 0x2c, 0x01, 0x02, 0x00, 0x00}, 4},
555 {{0x13, 0x2d, 0x01, 0x03, 0x00, 0x00}, 4},
556 {{0x13, 0x2e, 0x01, 0x0f, 0x00, 0x00}, 4},
557 {{0x13, 0x2f, 0x01, 0x0c, 0x00, 0x00}, 4},
559 {{0x12, 0x34, 0x01, 0x00, 0x00, 0x00}, 4},
560 {{0x13, 0x34, 0x01, 0xa1, 0x00, 0x00}, 4},
561 {{0x13, 0x35, 0x01, 0x00, 0x00, 0x00}, 4},
562 {{0x1b, 0x12, 0x80, 0x00, 0x00, 0x00}, 1},
563 {{0x1b, 0x01, 0x77, 0x00, 0x00, 0x00}, 1},
564 {{0x1b, 0x02, 0x3a, 0x00, 0x00, 0x00}, 1},
565 {{0x1b, 0x12, 0x78, 0x00, 0x00, 0x00}, 1},
566 {{0x1b, 0x13, 0x00, 0x00, 0x00, 0x00}, 1},
567 {{0x1b, 0x14, 0x80, 0x00, 0x00, 0x00}, 1},
568 {{0x1b, 0x15, 0x34, 0x00, 0x00, 0x00}, 1},
569 {{0x1b, 0x1b, 0x04, 0x00, 0x00, 0x00}, 1},
570 {{0x1b, 0x20, 0x44, 0x00, 0x00, 0x00}, 1},
571 {{0x1b, 0x23, 0xee, 0x00, 0x00, 0x00}, 1},
572 {{0x1b, 0x26, 0xa0, 0x00, 0x00, 0x00}, 1},
573 {{0x1b, 0x27, 0x9a, 0x00, 0x00, 0x00}, 1},
574 {{0x1b, 0x28, 0xa0, 0x00, 0x00, 0x00}, 1},
575 {{0x1b, 0x29, 0x30, 0x00, 0x00, 0x00}, 1},
576 {{0x1b, 0x2a, 0x80, 0x00, 0x00, 0x00}, 1},
577 {{0x1b, 0x2b, 0x00, 0x00, 0x00, 0x00}, 1},
578 {{0x1b, 0x2f, 0x3d, 0x00, 0x00, 0x00}, 1},
579 {{0x1b, 0x30, 0x24, 0x00, 0x00, 0x00}, 1},
580 {{0x1b, 0x32, 0x86, 0x00, 0x00, 0x00}, 1},
581 {{0x1b, 0x60, 0xa9, 0x00, 0x00, 0x00}, 1},
582 {{0x1b, 0x61, 0x42, 0x00, 0x00, 0x00}, 1},
583 {{0x1b, 0x65, 0x00, 0x00, 0x00, 0x00}, 1},
584 {{0x1b, 0x69, 0x38, 0x00, 0x00, 0x00}, 1},
585 {{0x1b, 0x6f, 0x88, 0x00, 0x00, 0x00}, 1},
586 {{0x1b, 0x70, 0x0b, 0x00, 0x00, 0x00}, 1},
587 {{0x1b, 0x71, 0x00, 0x00, 0x00, 0x00}, 1},
588 {{0x1b, 0x74, 0x21, 0x00, 0x00, 0x00}, 1},
589 {{0x1b, 0x75, 0x86, 0x00, 0x00, 0x00}, 1},
590 {{0x1b, 0x76, 0x00, 0x00, 0x00, 0x00}, 1},
591 {{0x1b, 0x7d, 0xf3, 0x00, 0x00, 0x00}, 1},
592 {{0x1b, 0x17, 0x1c, 0x00, 0x00, 0x00}, 1},
593 {{0x1b, 0x18, 0xc0, 0x00, 0x00, 0x00}, 1},
594 {{0x1b, 0x19, 0x05, 0x00, 0x00, 0x00}, 1},
595 {{0x1b, 0x1a, 0xf6, 0x00, 0x00, 0x00}, 1},
599 {{0x20, 0x36, 0x06, 0x00, 0x00, 0x00}, 1},
600 {{0x1b, 0x10, 0x26, 0x00, 0x00, 0x00}, 1},
601 {{0x12, 0x27, 0x01, 0x00, 0x00, 0x00}, 4},
602 {{0x1b, 0x76, 0x03, 0x00, 0x00, 0x00}, 1},
603 {{0x20, 0x36, 0x05, 0x00, 0x00, 0x00}, 1},
604 {{0x1b, 0x00, 0x3f, 0x00, 0x00, 0x00}, 1},
606 {{0x12, 0x27, 0x01, 0x00, 0x00, 0x00}, 4},
607 {{0x20, 0x29, 0x30, 0x00, 0x00, 0x00}, 1},
608 {{0x20, 0x34, 0xa1, 0x00, 0x00, 0x00}, 1}
611 return run_start_commands(gspca_dev, vivitar_start_commands,
615 static int sd_start(
struct gspca_dev *gspca_dev)
617 struct sd *sd = (
struct sd *) gspca_dev;
624 err_code = start_genius_cam(gspca_dev);
627 err_code = start_spy_cam(gspca_dev);
630 err_code = start_cif_cam(gspca_dev);
633 err_code = start_ms350_cam(gspca_dev);
636 err_code = start_vivitar_cam(gspca_dev);
639 pr_err(
"Starting unknown camera, please report this\n");
646 static void sd_stopN(
struct gspca_dev *gspca_dev)
651 result = sn9c2028_read1(gspca_dev);
657 result = sn9c2028_command(gspca_dev, data);
665 static void sd_pkt_scan(
struct gspca_dev *gspca_dev,
671 sof = sn9c2028_find_sof(gspca_dev, data, len);
677 if (n >
sizeof sn9c2028_sof_marker)
678 n -=
sizeof sn9c2028_sof_marker;
684 sn9c2028_sof_marker,
sizeof sn9c2028_sof_marker);
698 .pkt_scan = sd_pkt_scan,
703 {USB_DEVICE(0x0458, 0x7005)},
706 {USB_DEVICE(0x0c45, 0x8001)},
707 {USB_DEVICE(0x0c45, 0x8003)},
709 {USB_DEVICE(0x0c45, 0x8008)},
710 {USB_DEVICE(0x0c45, 0x800a)},
723 static struct usb_driver sd_driver = {
725 .id_table = device_table,
729 .suspend = gspca_suspend,
730 .resume = gspca_resume,
731 .reset_resume = gspca_resume,