Lines Matching +full:0 +full:x7d

24 #define JL2005C_MAX_TRANSFER 0x200
37 int vga; /* 1 if vga cam, 0 if cif cam */
47 .priv = 0},
52 .priv = 0},
60 .priv = 0},
65 .priv = 0},
69 * cam uses endpoint 0x03 to send commands, 0x84 for read commands,
70 * and 0x82 for bulk data transfer.
82 if (retval < 0) in jl2005c_write2()
84 gspca_dev->usb_buf[0], retval); in jl2005c_write2()
88 /* Response to a command is one byte in usb_buf[0], only if requested. */
94 usb_rcvbulkpipe(gspca_dev->dev, 0x84), in jl2005c_read1()
96 if (retval < 0) in jl2005c_read1()
97 pr_err("read command [0x%02x] error %d\n", in jl2005c_read1()
98 gspca_dev->usb_buf[0], retval); in jl2005c_read1()
102 /* Response appears in gspca_dev->usb_buf[0] */
107 static u8 instruction[2] = {0x95, 0x00}; in jl2005c_read_reg()
112 if (retval < 0) in jl2005c_read_reg()
123 int frame_brightness = 0; in jl2005c_start_new_frame()
125 static u8 instruction[2] = {0x7f, 0x01}; in jl2005c_start_new_frame()
128 if (retval < 0) in jl2005c_start_new_frame()
131 i = 0; in jl2005c_start_new_frame()
134 retval = jl2005c_read_reg(gspca_dev, 0x7e); in jl2005c_start_new_frame()
135 if (retval < 0) in jl2005c_start_new_frame()
137 frame_brightness = gspca_dev->usb_buf[0]; in jl2005c_start_new_frame()
138 retval = jl2005c_read_reg(gspca_dev, 0x7d); in jl2005c_start_new_frame()
139 if (retval < 0) in jl2005c_start_new_frame()
143 gspca_dbg(gspca_dev, D_FRAM, "frame_brightness is 0x%02x\n", in jl2005c_start_new_frame()
144 gspca_dev->usb_buf[0]); in jl2005c_start_new_frame()
154 instruction[0] = reg; in jl2005c_write_reg()
158 if (retval < 0) in jl2005c_write_reg()
167 int i = 0; in jl2005c_get_firmware_id()
170 0x57, 0x02, 0x03, 0x5d, 0x5e, 0x5f in jl2005c_get_firmware_id()
175 retval = jl2005c_read_reg(gspca_dev, regs_to_read[0]); in jl2005c_get_firmware_id()
177 gspca_dev->usb_buf[0]); in jl2005c_get_firmware_id()
178 if (retval < 0) in jl2005c_get_firmware_id()
181 for (i = 0; i < 6; i++) { in jl2005c_get_firmware_id()
183 if (retval < 0) in jl2005c_get_firmware_id()
185 sd->firmware_id[i] = gspca_dev->usb_buf[0]; in jl2005c_get_firmware_id()
188 sd->firmware_id[0], in jl2005c_get_firmware_id()
194 return 0; in jl2005c_get_firmware_id()
203 {0x05, 0x00}, in jl2005c_stream_start_vga_lg()
204 {0x7c, 0x00}, in jl2005c_stream_start_vga_lg()
205 {0x7d, 0x18}, in jl2005c_stream_start_vga_lg()
206 {0x02, 0x00}, in jl2005c_stream_start_vga_lg()
207 {0x01, 0x00}, in jl2005c_stream_start_vga_lg()
208 {0x04, 0x52}, in jl2005c_stream_start_vga_lg()
211 for (i = 0; i < ARRAY_SIZE(instruction); i++) { in jl2005c_stream_start_vga_lg()
214 if (retval < 0) in jl2005c_stream_start_vga_lg()
226 {0x06, 0x00}, in jl2005c_stream_start_vga_small()
227 {0x7c, 0x00}, in jl2005c_stream_start_vga_small()
228 {0x7d, 0x1a}, in jl2005c_stream_start_vga_small()
229 {0x02, 0x00}, in jl2005c_stream_start_vga_small()
230 {0x01, 0x00}, in jl2005c_stream_start_vga_small()
231 {0x04, 0x52}, in jl2005c_stream_start_vga_small()
234 for (i = 0; i < ARRAY_SIZE(instruction); i++) { in jl2005c_stream_start_vga_small()
237 if (retval < 0) in jl2005c_stream_start_vga_small()
249 {0x05, 0x00}, in jl2005c_stream_start_cif_lg()
250 {0x7c, 0x00}, in jl2005c_stream_start_cif_lg()
251 {0x7d, 0x30}, in jl2005c_stream_start_cif_lg()
252 {0x02, 0x00}, in jl2005c_stream_start_cif_lg()
253 {0x01, 0x00}, in jl2005c_stream_start_cif_lg()
254 {0x04, 0x42}, in jl2005c_stream_start_cif_lg()
257 for (i = 0; i < ARRAY_SIZE(instruction); i++) { in jl2005c_stream_start_cif_lg()
260 if (retval < 0) in jl2005c_stream_start_cif_lg()
272 {0x06, 0x00}, in jl2005c_stream_start_cif_small()
273 {0x7c, 0x00}, in jl2005c_stream_start_cif_small()
274 {0x7d, 0x32}, in jl2005c_stream_start_cif_small()
275 {0x02, 0x00}, in jl2005c_stream_start_cif_small()
276 {0x01, 0x00}, in jl2005c_stream_start_cif_small()
277 {0x04, 0x42}, in jl2005c_stream_start_cif_small()
280 for (i = 0; i < ARRAY_SIZE(instruction); i++) { in jl2005c_stream_start_cif_small()
283 if (retval < 0) in jl2005c_stream_start_cif_small()
293 return jl2005c_write_reg(gspca_dev, 0x07, 0x00); in jl2005c_stop()
308 int bytes_left = 0; /* bytes remaining in current frame. */ in jl2005c_dostream()
310 int header_read = 0; in jl2005c_dostream()
311 unsigned char header_sig[2] = {0x4a, 0x4c}; in jl2005c_dostream()
333 if (ret < 0) in jl2005c_dostream()
336 usb_rcvbulkpipe(gspca_dev->dev, 0x82), in jl2005c_dostream()
342 if (ret < 0 || act_len < JL2005C_MAX_TRANSFER) in jl2005c_dostream()
345 if (memcmp(header_sig, buffer, 2) != 0) { in jl2005c_dostream()
351 bytes_left = buffer[0x07] * dev->block_size - act_len; in jl2005c_dostream()
352 gspca_dbg(gspca_dev, D_PACK, "bytes_left = 0x%x\n", in jl2005c_dostream()
360 while (bytes_left > 0 && gspca_dev->present) { in jl2005c_dostream()
364 usb_rcvbulkpipe(gspca_dev->dev, 0x82), in jl2005c_dostream()
367 if (ret < 0 || act_len < data_len) in jl2005c_dostream()
373 if (bytes_left == 0) { in jl2005c_dostream()
375 header_read = 0; in jl2005c_dostream()
409 * {0x41, 0x07, 0x04, 0x2c, 0xe8, 0xf2} Sakar KidzCam in sd_config()
410 * {0x45, 0x02, 0x08, 0xb9, 0x00, 0xd2} No-name JL2005B in sd_config()
412 * {0x01, 0x0c, 0x16, 0x10, 0xf8, 0xc8} Argus DC-1512 in sd_config()
413 * {0x12, 0x04, 0x03, 0xc0, 0x00, 0xd8} ICarly in sd_config()
414 * {0x86, 0x08, 0x05, 0x02, 0x00, 0xd4} Jazz in sd_config()
417 * testing byte 0 for 0x4x. in sd_config()
419 if ((sd->firmware_id[0] & 0xf0) == 0x40) { in sd_config()
422 sd->block_size = 0x80; in sd_config()
426 sd->block_size = 0x200; in sd_config()
431 return 0; in sd_config()
437 return 0; in sd_init()
470 return 0; in sd_start()
473 /* called on streamoff with alt==0 and on disconnect */
499 {USB_DEVICE(0x0979, 0x0227)},