21 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
23 #define MODULE_NAME "finepix"
32 #define FPIX_TIMEOUT 250
37 #define FPIX_MAX_TRANSFER 0x2000
51 #define NEXT_FRAME_DELAY 35
57 .sizeimage = 320 * 240 * 3 / 8 + 590,
66 static u8 order_values[2][12] = {
67 {0xc6, 0, 0, 0, 0, 0, 0, 0, 0x20, 0, 0, 0},
68 {0xd3, 0, 0, 0, 0, 0, 0, 0x01, 0, 0, 0, 0},
73 usb_sndctrlpipe(gspca_dev->
dev, 0),
91 struct gspca_dev *gspca_dev = &dev->
gspca_dev;
93 u8 *
data = urb->transfer_buffer;
97 PDEBUG(D_STREAM,
"dostream started");
103 if (gspca_dev->frozen)
114 if (gspca_dev->frozen)
133 if (gspca_dev->frozen)
139 (data[len - 2] == 0xff &&
140 data[len - 1] == 0xd9)) {
168 PDEBUG(D_STREAM,
"dostream stopped");
172 static int sd_config(
struct gspca_dev *gspca_dev,
189 static int sd_init(
struct gspca_dev *gspca_dev)
195 static int sd_start(
struct gspca_dev *gspca_dev)
203 pr_err(
"init failed %d\n", ret);
210 gspca_dev->
urb[0]->pipe,
211 gspca_dev->
urb[0]->transfer_buffer,
215 pr_err(
"usb_bulk_msg failed %d\n", ret);
222 pr_err(
"frame request failed %d\n", ret);
238 static void sd_stop0(
struct gspca_dev *gspca_dev)
251 {USB_DEVICE(0x04cb, 0x0104)},
252 {USB_DEVICE(0x04cb, 0x0109)},
253 {USB_DEVICE(0x04cb, 0x010b)},
254 {USB_DEVICE(0x04cb, 0x010f)},
255 {USB_DEVICE(0x04cb, 0x0111)},
256 {USB_DEVICE(0x04cb, 0x0113)},
257 {USB_DEVICE(0x04cb, 0x0115)},
258 {USB_DEVICE(0x04cb, 0x0117)},
259 {USB_DEVICE(0x04cb, 0x0119)},
260 {USB_DEVICE(0x04cb, 0x011b)},
261 {USB_DEVICE(0x04cb, 0x011d)},
262 {USB_DEVICE(0x04cb, 0x0121)},
263 {USB_DEVICE(0x04cb, 0x0123)},
264 {USB_DEVICE(0x04cb, 0x0125)},
265 {USB_DEVICE(0x04cb, 0x0127)},
266 {USB_DEVICE(0x04cb, 0x0129)},
267 {USB_DEVICE(0x04cb, 0x012b)},
268 {USB_DEVICE(0x04cb, 0x012d)},
269 {USB_DEVICE(0x04cb, 0x012f)},
270 {USB_DEVICE(0x04cb, 0x0131)},
271 {USB_DEVICE(0x04cb, 0x013b)},
272 {USB_DEVICE(0x04cb, 0x013d)},
273 {USB_DEVICE(0x04cb, 0x013f)},
298 static struct usb_driver sd_driver = {
300 .id_table = device_table,
304 .suspend = gspca_suspend,
305 .resume = gspca_resume,
306 .reset_resume = gspca_resume,