mr97310a.c (0337966d121ebebf73a1c346123e8112796e684e) mr97310a.c (52173c5f3f6476eb9100691ec47b10d6740eed4a)
1/*
2 * Mars MR97310A library
3 *
4 * The original mr97310a driver, which supported the Aiptek Pencam VGA+, is
5 * Copyright (C) 2009 Kyle Guinn <elyk03@gmail.com>
6 *
7 * Support for the MR97310A cameras in addition to the Aiptek Pencam VGA+
8 * and for the routines for detecting and classifying these various cameras,

--- 270 unchanged lines hidden (view full) ---

279 while (status != 0x0a && tries < 256) {
280 err_code = cam_get_response16(gspca_dev, 0x21, 0);
281 status = data[0];
282 tries++;
283 if (err_code < 0)
284 return err_code;
285 }
286 if (status != 0x0a)
1/*
2 * Mars MR97310A library
3 *
4 * The original mr97310a driver, which supported the Aiptek Pencam VGA+, is
5 * Copyright (C) 2009 Kyle Guinn <elyk03@gmail.com>
6 *
7 * Support for the MR97310A cameras in addition to the Aiptek Pencam VGA+
8 * and for the routines for detecting and classifying these various cameras,

--- 270 unchanged lines hidden (view full) ---

279 while (status != 0x0a && tries < 256) {
280 err_code = cam_get_response16(gspca_dev, 0x21, 0);
281 status = data[0];
282 tries++;
283 if (err_code < 0)
284 return err_code;
285 }
286 if (status != 0x0a)
287 PERR("status is %02x", status);
287 gspca_err(gspca_dev, "status is %02x\n", status);
288
289 tries = 0;
290 while (tries < 4) {
291 data[0] = 0x19;
292 data[1] = 0x00;
293 err_code = mr_write(gspca_dev, 2);
294 if (err_code < 0)
295 return err_code;

--- 24 unchanged lines hidden (view full) ---

320 return mr_write(gspca_dev, 2);
321}
322
323static void stream_stop(struct gspca_dev *gspca_dev)
324{
325 gspca_dev->usb_buf[0] = 0x01;
326 gspca_dev->usb_buf[1] = 0x00;
327 if (mr_write(gspca_dev, 2) < 0)
288
289 tries = 0;
290 while (tries < 4) {
291 data[0] = 0x19;
292 data[1] = 0x00;
293 err_code = mr_write(gspca_dev, 2);
294 if (err_code < 0)
295 return err_code;

--- 24 unchanged lines hidden (view full) ---

320 return mr_write(gspca_dev, 2);
321}
322
323static void stream_stop(struct gspca_dev *gspca_dev)
324{
325 gspca_dev->usb_buf[0] = 0x01;
326 gspca_dev->usb_buf[1] = 0x00;
327 if (mr_write(gspca_dev, 2) < 0)
328 PERR("Stream Stop failed");
328 gspca_err(gspca_dev, "Stream Stop failed\n");
329}
330
331static void lcd_stop(struct gspca_dev *gspca_dev)
332{
333 gspca_dev->usb_buf[0] = 0x19;
334 gspca_dev->usb_buf[1] = 0x54;
335 if (mr_write(gspca_dev, 2) < 0)
329}
330
331static void lcd_stop(struct gspca_dev *gspca_dev)
332{
333 gspca_dev->usb_buf[0] = 0x19;
334 gspca_dev->usb_buf[1] = 0x54;
335 if (mr_write(gspca_dev, 2) < 0)
336 PERR("LCD Stop failed");
336 gspca_err(gspca_dev, "LCD Stop failed\n");
337}
338
339static int isoc_enable(struct gspca_dev *gspca_dev)
340{
341 gspca_dev->usb_buf[0] = 0x00;
342 gspca_dev->usb_buf[1] = 0x4d; /* ISOC transferring enable... */
343 return mr_write(gspca_dev, 2);
344}

--- 742 unchanged lines hidden ---
337}
338
339static int isoc_enable(struct gspca_dev *gspca_dev)
340{
341 gspca_dev->usb_buf[0] = 0x00;
342 gspca_dev->usb_buf[1] = 0x4d; /* ISOC transferring enable... */
343 return mr_write(gspca_dev, 2);
344}

--- 742 unchanged lines hidden ---