31 #include <linux/module.h>
35 #include <linux/slab.h>
48 #define DRIVER_VERSION "0.7.4"
49 #define DRIVER_AUTHOR "Antoine Jacquet, http://royale.zerezo.com/"
50 #define DRIVER_DESC "Zoran 364xx"
55 #define MAX_FRAME_SIZE 200000
56 #define BUFFER_SIZE 0x1000
57 #define CTRL_TIMEOUT 500
59 #define ZR364XX_DEF_BUFS 4
60 #define ZR364XX_READ_IDLE 0
61 #define ZR364XX_READ_FRAME 1
64 #define DBG(fmt, args...) \
67 printk(KERN_INFO KBUILD_MODNAME " " fmt, ##args); \
75 #define _DBG(fmt, args...)
101 {USB_DEVICE(0x08ca, 0x0109), .driver_info =
METHOD0 },
102 {USB_DEVICE(0x041e, 0x4024), .driver_info =
METHOD0 },
103 {USB_DEVICE(0x0d64, 0x0108), .driver_info =
METHOD0 },
104 {USB_DEVICE(0x0546, 0x3187), .driver_info =
METHOD0 },
105 {USB_DEVICE(0x0d64, 0x3108), .driver_info =
METHOD0 },
106 {USB_DEVICE(0x0595, 0x4343), .driver_info =
METHOD0 },
107 {USB_DEVICE(0x0bb0, 0x500d), .driver_info =
METHOD0 },
108 {USB_DEVICE(0x0feb, 0x2004), .driver_info =
METHOD0 },
109 {USB_DEVICE(0x055f, 0xb500), .driver_info =
METHOD0 },
110 {USB_DEVICE(0x08ca, 0x2062), .driver_info =
METHOD2 },
111 {USB_DEVICE(0x052b, 0x1a18), .driver_info =
METHOD1 },
112 {USB_DEVICE(0x04c8, 0x0729), .driver_info =
METHOD0 },
113 {USB_DEVICE(0x04f2, 0xa208), .driver_info =
METHOD0 },
114 {USB_DEVICE(0x0784, 0x0040), .driver_info =
METHOD1 },
115 {USB_DEVICE(0x06d6, 0x0034), .driver_info =
METHOD0 },
116 {USB_DEVICE(0x0a17, 0x0062), .driver_info =
METHOD2 },
117 {USB_DEVICE(0x06d6, 0x003b), .driver_info =
METHOD0 },
118 {USB_DEVICE(0x0a17, 0x004e), .driver_info =
METHOD2 },
119 {USB_DEVICE(0x041e, 0x405d), .driver_info =
METHOD2 },
120 {USB_DEVICE(0x08ca, 0x2102), .driver_info =
METHOD3 },
121 {USB_DEVICE(0x06d6, 0x003d), .driver_info =
METHOD0 },
216 if (!transfer_buffer) {
217 dev_err(&udev->dev,
"kmalloc(%d) failed\n", size);
221 memcpy(transfer_buffer, cp, size);
224 usb_sndctrlpipe(udev, 0),
230 kfree(transfer_buffer);
244 static unsigned char m0d1[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
245 static unsigned char m0d2[] = { 0, 0, 0, 0, 0, 0 };
246 static unsigned char m0d3[] = { 0, 0 };
250 {0x3370,
sizeof(m0d1), m0d1},
253 {0x2610,
sizeof(m0d2), m0d2},
258 {0x9a01,
sizeof(m0d3), m0d3},
263 static unsigned char m1d1[] = { 0xff, 0xff };
264 static unsigned char m1d2[] = { 0x00, 0x00 };
273 {0x2502,
sizeof(m1d1), m1d1},
278 {0x9a01,
sizeof(m1d2), m1d2},
283 static unsigned char m2d1[] = { 0xff, 0xff };
291 {0x2502,
sizeof(m2d1), m2d1},
301 static unsigned char header1[] = {
307 0xFF, 0xDB, 0x00, 0x84
309 static unsigned char header2[] = {
310 0xFF, 0xC4, 0x00, 0x1F, 0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01,
311 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
312 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
313 0xFF, 0xC4, 0x00, 0xB5, 0x10, 0x00, 0x02, 0x01, 0x03, 0x03, 0x02,
314 0x04, 0x03, 0x05, 0x05, 0x04, 0x04, 0x00, 0x00, 0x01, 0x7D, 0x01,
315 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06,
316 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xA1,
317 0x08, 0x23, 0x42, 0xB1, 0xC1, 0x15, 0x52, 0xD1, 0xF0, 0x24, 0x33,
318 0x62, 0x72, 0x82, 0x09, 0x0A, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x25,
319 0x26, 0x27, 0x28, 0x29, 0x2A, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
320 0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54,
321 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67,
322 0x68, 0x69, 0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A,
323 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94,
324 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
325 0xA7, 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8,
326 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA,
327 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE1, 0xE2,
328 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF1, 0xF2, 0xF3,
329 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFF, 0xC4, 0x00, 0x1F,
330 0x01, 0x00, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
331 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04,
332 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xFF, 0xC4, 0x00, 0xB5,
333 0x11, 0x00, 0x02, 0x01, 0x02, 0x04, 0x04, 0x03, 0x04, 0x07, 0x05,
334 0x04, 0x04, 0x00, 0x01, 0x02, 0x77, 0x00, 0x01, 0x02, 0x03, 0x11,
335 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
336 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xA1, 0xB1, 0xC1,
337 0x09, 0x23, 0x33, 0x52, 0xF0, 0x15, 0x62, 0x72, 0xD1, 0x0A, 0x16,
338 0x24, 0x34, 0xE1, 0x25, 0xF1, 0x17, 0x18, 0x19, 0x1A, 0x26, 0x27,
339 0x28, 0x29, 0x2A, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x43, 0x44,
340 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54, 0x55, 0x56, 0x57,
341 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A,
342 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x82, 0x83, 0x84,
343 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96,
344 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8,
345 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA,
346 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3,
347 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE2, 0xE3, 0xE4, 0xE5,
348 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
349 0xF8, 0xF9, 0xFA, 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00, 0xF0, 0x01,
350 0x40, 0x03, 0x01, 0x21, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01,
351 0xFF, 0xDA, 0x00, 0x0C, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11,
354 static unsigned char header3;
378 _DBG(
"%s\n", __func__);
395 DBG(
"%s, field=%d, fmt name = %s\n", __func__, field, cam->
fmt !=
NULL ?
396 cam->
fmt->name :
"");
402 if (buf->
vb.baddr != 0 && buf->
vb.bsize < buf->
vb.size) {
403 DBG(
"invalid buffer prepare\n");
431 _DBG(
"%s\n", __func__);
443 _DBG(
"%s\n", __func__);
448 .buf_setup = buffer_setup,
449 .buf_prepare = buffer_prepare,
450 .buf_queue = buffer_queue,
451 .buf_release = buffer_release,
457 static int zr364xx_vidioc_streamon(
struct file *
file,
void *
priv,
460 static ssize_t zr364xx_read(
struct file *
file,
char __user *buf,
size_t count,
466 _DBG(
"%s\n", __func__);
480 DBG(
"%s: reading %d bytes at pos %d.\n", __func__,
481 (
int) count, (
int) *ppos);
507 unsigned long last_frame;
513 if (last_frame != -1) {
514 tmpbuf = (
const char *)cam->
buffer.frame[last_frame].lpvbits;
515 switch (buf->
fmt->fourcc) {
517 buf->
vb.size = jpgsize;
528 DBG(
"%s: Buffer 0x%08lx size= %d\n", __func__,
529 (
unsigned long)vbuf, pos);
538 static int zr364xx_got_frame(
struct zr364xx_camera *cam,
int jpgsize)
542 unsigned long flags = 0;
545 DBG(
"wakeup: %p\n", &dma_q);
548 if (list_empty(&dma_q->
active)) {
549 DBG(
"No active queue to serve\n");
556 if (!waitqueue_active(&buf->
vb.done)) {
563 DBG(
"[%p/%d] wakeup\n", buf, buf->
vb.i);
564 zr364xx_fillbuff(cam, buf, jpgsize);
566 DBG(
"wakeup [buf/i] [%p/%d]\n", buf, buf->
vb.i);
568 spin_unlock_irqrestore(&cam->
slock, flags);
577 static int zr364xx_read_video_callback(
struct zr364xx_camera *cam,
581 unsigned char *pdest;
588 _DBG(
"buffer to user\n");
595 for (i = 0; i < purb->actual_length/2; i++)
613 _DBG(
"jpeg header, ");
614 memcpy(ptr, header1,
sizeof(header1));
615 ptr +=
sizeof(header1);
624 memcpy(ptr, psrc + 64, 64);
626 memcpy(ptr, header2,
sizeof(header2));
627 ptr +=
sizeof(header2);
629 purb->actual_length - 128);
630 ptr += purb->actual_length - 128;
631 _DBG(
"header : %d %d %d %d %d %d %d %d %d\n",
632 psrc[0], psrc[1], psrc[2],
633 psrc[3], psrc[4], psrc[5],
634 psrc[6], psrc[7], psrc[8]);
639 "%s: buffer (%d bytes) too small to hold "
640 "frame data. Discarding frame data.\n",
644 memcpy(pdest, psrc, purb->actual_length);
645 frm->
cur_size += purb->actual_length;
652 _DBG(
"****************Buffer[%d]full*************\n", idx);
663 while (ptr > pdest) {
664 if (*ptr == 0xFF && *(ptr + 1) == 0xD9
665 && *(ptr + 2) == 0xFF)
670 DBG(
"No EOI marker\n");
674 while (ptr > pdest) {
675 if (*ptr == 0xFF && *(ptr + 1) == 0xFF
676 && *(ptr + 2) == 0xFF)
681 DBG(
"Bogus frame ? %d\n", ++(cam->
nb));
687 _DBG(
"jpeg(%lu): %d %d %d %d %d %d %d %d\n",
689 pdest[0], pdest[1], pdest[2], pdest[3],
690 pdest[4], pdest[5], pdest[6], pdest[7]);
692 zr364xx_got_frame(cam, frm->
cur_size);
703 static int zr364xx_vidioc_querycap(
struct file *file,
void *
priv,
720 static int zr364xx_vidioc_enum_input(
struct file *file,
void *priv,
730 static int zr364xx_vidioc_g_input(
struct file *file,
void *priv,
737 static int zr364xx_vidioc_s_input(
struct file *file,
void *priv,
755 temp = (0x60 << 8) + 127 - ctrl->
val;
765 static int zr364xx_vidioc_enum_fmt_vid_cap(
struct file *file,
778 buf[0] = pixelformat & 0xff;
779 buf[1] = (pixelformat >> 8) & 0xff;
780 buf[2] = (pixelformat >> 16) & 0xff;
781 buf[3] = (pixelformat >> 24) & 0xff;
786 static int zr364xx_vidioc_try_fmt_vid_cap(
struct file *file,
void *priv,
790 char pixelformat_name[5];
796 DBG(
"%s: unsupported pixelformat V4L2_PIX_FMT_%s\n", __func__,
797 decode_fourcc(f->
fmt.
pix.pixelformat, pixelformat_name));
801 if (!(f->
fmt.
pix.width == 160 && f->
fmt.
pix.height == 120) &&
802 !(f->
fmt.
pix.width == 640 && f->
fmt.
pix.height == 480)) {
812 DBG(
"%s: V4L2_PIX_FMT_%s (%d) ok!\n", __func__,
813 decode_fourcc(f->
fmt.
pix.pixelformat, pixelformat_name),
818 static int zr364xx_vidioc_g_fmt_vid_cap(
struct file *file,
void *priv,
825 cam = video_drvdata(file);
838 static int zr364xx_vidioc_s_fmt_vid_cap(
struct file *file,
void *priv,
843 char pixelformat_name[5];
844 int ret = zr364xx_vidioc_try_fmt_vid_cap(file, cam, f);
853 DBG(
"%s queue busy\n", __func__);
859 DBG(
"%s can't change format after started\n", __func__);
866 DBG(
"%s: %dx%d mode selected\n", __func__,
874 if (f->
fmt.
pix.width == 160 && f->
fmt.
pix.height == 120)
876 else if (f->
fmt.
pix.width == 640 && f->
fmt.
pix.height == 480)
889 m2[1].
value = 0xf000 + 4;
892 m2[1].
value = 0xf000 + 0;
895 m2[1].
value = 0xf000 + 1;
900 header2[437] = cam->
height / 256;
901 header2[438] = cam->
height % 256;
902 header2[439] = cam->
width / 256;
903 header2[440] = cam->
width % 256;
905 for (i = 0; init[cam->
method][
i].
size != -1; i++) {
912 "error during resolution change sequence: %d\n", i);
927 DBG(
"%s: V4L2_PIX_FMT_%s (%d) ok!\n", __func__,
928 decode_fourcc(f->
fmt.
pix.pixelformat, pixelformat_name),
933 static int zr364xx_vidioc_reqbufs(
struct file *file,
void *priv,
943 static int zr364xx_vidioc_querybuf(
struct file *file,
953 static int zr364xx_vidioc_qbuf(
struct file *file,
959 _DBG(
"%s\n", __func__);
966 static int zr364xx_vidioc_dqbuf(
struct file *file,
972 _DBG(
"%s\n", __func__);
979 static void read_pipe_completion(
struct urb *purb)
985 pipe_info = purb->context;
986 _DBG(
"%s %p, status %d\n", __func__, purb, purb->status);
987 if (pipe_info ==
NULL) {
992 cam = pipe_info->
cam;
1000 DBG(
"%s, err shutdown\n", __func__);
1005 if (pipe_info->
state == 0) {
1006 DBG(
"exiting USB pipe\n");
1010 if (purb->actual_length < 0 ||
1012 dev_err(&cam->
udev->dev,
"wrong number of bytes\n");
1016 if (purb->status == 0)
1017 zr364xx_read_video_callback(cam, pipe_info, purb);
1020 DBG(
"%s: failed URB %d\n", __func__, purb->status);
1030 read_pipe_completion, pipe_info);
1032 if (pipe_info->
state != 0) {
1038 "error submitting urb (error=%i)\n",
1041 DBG(
"read pipe complete state 0\n");
1052 pipe_info->
state = 1;
1056 dev_err(&cam->
udev->dev,
"ReadStream: Unable to alloc URB\n");
1064 read_pipe_completion, pipe_info);
1084 DBG(
"stop read pipe\n");
1085 pipe_info = cam->
pipe;
1087 if (pipe_info->
state != 0)
1088 pipe_info->
state = 0;
1105 DBG(
"start acquire\n");
1109 for (j = 0; j <
FRAMES; j++) {
1111 cam->
buffer.frame[
j].cur_size = 0;
1117 static inline int zr364xx_stop_acquire(
struct zr364xx_camera *cam)
1128 for (i = 0; init[cam->
method][
i].
size != -1; i++) {
1134 "error during open sequence: %d\n", i);
1143 for (j = 0; j <
FRAMES; j++) {
1145 cam->
buffer.frame[
j].cur_size = 0;
1151 static int zr364xx_vidioc_streamon(
struct file *file,
void *priv,
1157 DBG(
"%s\n", __func__);
1165 res = zr364xx_prepare(cam);
1170 zr364xx_start_acquire(cam);
1176 static int zr364xx_vidioc_streamoff(
struct file *file,
void *priv,
1181 DBG(
"%s\n", __func__);
1186 zr364xx_stop_acquire(cam);
1192 static int zr364xx_open(
struct file *file)
1197 DBG(
"%s\n", __func__);
1214 DBG(
"%s: %d\n", __func__, err);
1229 for (i = 0; i <
FRAMES; i++) {
1230 if (cam->
buffer.frame[i].lpvbits) {
1231 DBG(
"vfree %p\n", cam->
buffer.frame[i].lpvbits);
1244 static int zr364xx_close(
struct file *file)
1247 struct usb_device *
udev;
1250 DBG(
"%s\n", __func__);
1251 cam = video_drvdata(file);
1259 zr364xx_stop_acquire(cam);
1262 for (i = 0; i < 2; i++) {
1279 static int zr364xx_mmap(
struct file *file,
struct vm_area_struct *vma)
1285 DBG(
"%s: cam == NULL\n", __func__);
1288 DBG(
"mmap called, vma=0x%08lx\n", (
unsigned long)vma);
1292 DBG(
"vma start=0x%08lx, size=%ld, ret=%d\n",
1298 static unsigned int zr364xx_poll(
struct file *file,
1305 _DBG(
"%s\n", __func__);
1311 .s_ctrl = zr364xx_s_ctrl,
1316 .open = zr364xx_open,
1317 .release = zr364xx_close,
1318 .read = zr364xx_read,
1319 .mmap = zr364xx_mmap,
1321 .poll = zr364xx_poll,
1325 .vidioc_querycap = zr364xx_vidioc_querycap,
1326 .vidioc_enum_fmt_vid_cap = zr364xx_vidioc_enum_fmt_vid_cap,
1327 .vidioc_try_fmt_vid_cap = zr364xx_vidioc_try_fmt_vid_cap,
1328 .vidioc_s_fmt_vid_cap = zr364xx_vidioc_s_fmt_vid_cap,
1329 .vidioc_g_fmt_vid_cap = zr364xx_vidioc_g_fmt_vid_cap,
1330 .vidioc_enum_input = zr364xx_vidioc_enum_input,
1331 .vidioc_g_input = zr364xx_vidioc_g_input,
1332 .vidioc_s_input = zr364xx_vidioc_s_input,
1333 .vidioc_streamon = zr364xx_vidioc_streamon,
1334 .vidioc_streamoff = zr364xx_vidioc_streamoff,
1335 .vidioc_reqbufs = zr364xx_vidioc_reqbufs,
1336 .vidioc_querybuf = zr364xx_vidioc_querybuf,
1337 .vidioc_qbuf = zr364xx_vidioc_qbuf,
1338 .vidioc_dqbuf = zr364xx_vidioc_dqbuf,
1346 .fops = &zr364xx_fops,
1347 .ioctl_ops = &zr364xx_ioctl_ops,
1361 DBG(
"board init: %p\n", cam);
1362 memset(pipe, 0,
sizeof(*pipe));
1369 DBG(
"out of memory!\n");
1377 for (i = 0; i <
FRAMES; i++) {
1381 DBG(
"valloc %p, idx %lu, pdata %p\n",
1382 &cam->
buffer.frame[i], i,
1383 cam->
buffer.frame[i].lpvbits);
1386 "Using less frames\n");
1400 for (i = 0; i <
FRAMES; i++) {
1402 cam->
buffer.frame[
i].cur_size = 0;
1410 zr364xx_start_readpipe(cam);
1411 DBG(
": board initialized\n");
1418 struct usb_device *udev = interface_to_usbdev(intf);
1420 struct usb_host_interface *iface_desc;
1426 DBG(
"probing...\n");
1429 dev_info(&intf->dev,
"model %04x:%04x detected\n",
1435 dev_err(&udev->dev,
"cam: out of memory !\n");
1439 cam->
v4l2_dev.release = zr364xx_release;
1442 dev_err(&udev->dev,
"couldn't register v4l2_device\n");
1452 dev_err(&udev->dev,
"couldn't register control\n");
1456 cam->
method =
id->driver_info;
1458 cam->
vdev = zr364xx_template;
1463 video_set_drvdata(&cam->
vdev, cam);
1471 dev_info(&udev->dev,
"160x120 mode selected\n");
1476 dev_info(&udev->dev,
"640x480 mode selected\n");
1481 dev_info(&udev->dev,
"320x240 mode selected\n");
1495 m2[1].
value = 0xf000 + 4;
1498 m2[1].
value = 0xf000 + 0;
1501 m2[1].
value = 0xf000 + 1;
1506 header2[437] = cam->
height / 256;
1507 header2[438] = cam->
height % 256;
1508 header2[439] = cam->
width / 256;
1509 header2[440] = cam->
width % 256;
1513 DBG(
"dev: %p, udev %p interface %p\n", cam, cam->
udev, intf);
1516 iface_desc = intf->cur_altsetting;
1517 DBG(
"num endpoints %d\n", iface_desc->desc.bNumEndpoints);
1518 for (i = 0; i < iface_desc->desc.bNumEndpoints; ++
i) {
1519 endpoint = &iface_desc->endpoint[
i].desc;
1520 if (!cam->
read_endpoint && usb_endpoint_is_bulk_in(endpoint)) {
1528 dev_err(&intf->dev,
"Could not find bulk-in endpoint\n");
1533 INIT_LIST_HEAD(&cam->
vidq.active);
1534 cam->
vidq.cam = cam;
1536 usb_set_intfdata(intf, cam);
1539 err = zr364xx_board_init(cam);
1557 dev_err(&udev->dev,
"video_register_device failed\n");
1562 video_device_node_name(&cam->
vdev));
1578 usb_set_intfdata(intf,
NULL);
1585 zr364xx_stop_acquire(cam);
1587 zr364xx_stop_readpipe(cam);
1601 zr364xx_stop_acquire(cam);
1602 zr364xx_stop_readpipe(cam);
1614 zr364xx_start_readpipe(cam);
1615 res = zr364xx_prepare(cam);
1617 zr364xx_start_acquire(cam);
1626 static struct usb_driver zr364xx_driver = {
1628 .probe = zr364xx_probe,
1629 .disconnect = zr364xx_disconnect,
1631 .suspend = zr364xx_suspend,
1632 .resume = zr364xx_resume,
1633 .reset_resume = zr364xx_resume,
1635 .id_table = device_table