Lines Matching +full:0 +full:x240

34 #define SQ905C_MAX_TRANSFER 0x8000
36 #define FRAME_HEADER_LEN 0x50
39 #define SQ905C_CLEAR 0xa0 /* clear everything */
40 #define SQ905C_GET_ID 0x14f4 /* Read version number */
41 #define SQ905C_CAPTURE_LOW 0xa040 /* Starts capture at 160x120 */
42 #define SQ905C_CAPTURE_MED 0x1440 /* Starts capture at 320x240 */
43 #define SQ905C_CAPTURE_HI 0x2840 /* Starts capture at 320x240 */
46 #define SQ905C_CAPTURE_INDEX 0x110f
58 * Most of these cameras will do 640x480 and 320x240. 160x120 works
60 * The 0x2770:0x9050 cameras have max resolution of 320x240.
67 .priv = 0},
72 .priv = 0}
81 usb_sndctrlpipe(gspca_dev->dev, 0), in sq905c_command()
84 command, index, NULL, 0, in sq905c_command()
86 if (ret < 0) { in sq905c_command()
91 return 0; in sq905c_command()
100 usb_rcvctrlpipe(gspca_dev->dev, 0), in sq905c_read()
105 if (ret < 0) { in sq905c_read()
110 return 0; in sq905c_read()
145 usb_rcvbulkpipe(gspca_dev->dev, 0x81), in sq905c_dostream()
151 if (ret < 0 || act_len < FRAME_HEADER_LEN) in sq905c_dostream()
153 /* size is read from 4 bytes starting 0x40, little endian */ in sq905c_dostream()
154 bytes_left = buffer[0x40]|(buffer[0x41]<<8)|(buffer[0x42]<<16) in sq905c_dostream()
155 |(buffer[0x43]<<24); in sq905c_dostream()
156 gspca_dbg(gspca_dev, D_STREAM, "bytes_left = 0x%x\n", in sq905c_dostream()
162 while (bytes_left > 0 && gspca_dev->present) { in sq905c_dostream()
166 usb_rcvbulkpipe(gspca_dev->dev, 0x81), in sq905c_dostream()
169 if (ret < 0 || act_len < data_len) in sq905c_dostream()
175 if (bytes_left == 0) in sq905c_dostream()
186 sq905c_command(gspca_dev, SQ905C_CLEAR, 0); in sq905c_dostream()
201 "SQ9050 camera detected (vid/pid 0x%04X:0x%04X)\n", in sd_config()
204 ret = sq905c_command(gspca_dev, SQ905C_GET_ID, 0); in sd_config()
205 if (ret < 0) { in sd_config()
210 ret = sq905c_read(gspca_dev, 0xf5, 0, 20); in sd_config()
211 if (ret < 0) { in sd_config()
222 if (gspca_dev->usb_buf[15] == 0) in sd_config()
228 return 0; in sd_config()
231 /* called on streamoff with alt==0 and on disconnect */
249 return sq905c_command(gspca_dev, SQ905C_CLEAR, 0); in sd_init()
273 if (ret < 0) { in sd_start()
284 return 0; in sd_start()
289 {USB_DEVICE(0x2770, 0x905c)},
290 {USB_DEVICE(0x2770, 0x9050)},
291 {USB_DEVICE(0x2770, 0x9051)},
292 {USB_DEVICE(0x2770, 0x9052)},
293 {USB_DEVICE(0x2770, 0x913d)},