Lines Matching +full:0 +full:xdc

16  * Register page 0:
19 * 0x01 Red balance control
20 * 0x02 Green balance control
21 * 0x03 Blue balance control
23 * the settable values (0-200) on register values:
24 * min=0x20, default=0x40, max=0x80
25 * 0x0f-0x20 Color and saturation control
26 * 0xa2-0xab Brightness, contrast and gamma control
27 * 0xb6 Sharpness control (bits 0-4)
32 * 0x78 Global control, bit 6 controls the LED (inverted)
33 * 0x80 Compression balance, 2 interesting settings:
34 * 0x0f Default
35 * 0x50 Values >= this switch the camera to a lower compression,
45 * 0x02 Clock divider 3-63, fps = 90 / val. Must be a multiple of 3 on
47 * 0x03 Variable framerate ctrl reg2==3: 0 -> ~30 fps, 255 -> ~22fps
48 * 0x04 Another var framerate ctrl reg2==3, reg3==0: 0 -> ~30 fps,
50 * 0x05 Another var framerate ctrl reg2==3, reg3==0, reg4==0xc0:
52 * 0x0e Exposure bits 0-7, 0-448, 0 = use full frame time
53 * 0x0f Exposure bit 8, 0-448, 448 = no exposure at all
54 * 0x10 Gain 0-31
55 * 0x12 Another gain 0-31, unlike 0x10 this one seems to start with an
56 * amplification value of 1 rather then 0 at its lowest setting
57 * 0x21 Bitfield: 0-1 unused, 2-3 vflip/hflip, 4-5 unknown, 6-7 unused
58 * 0x80 Another framerate control, best left at 1, moving it from 1 to
67 * 0 | 0x01 | setredbalance()
68 * 0 | 0x03 | setbluebalance()
69 * 0 | 0x0f..0x20 | setcolors()
70 * 0 | 0xa2..0xab | setbrightcont()
71 * 0 | 0xb6 | setsharpness()
72 * 0 | 0xc6 | setwhitebalance()
73 * 0 | 0xdc | setbrightcont(), setcolors()
74 * 3 | 0x02 | setexposure()
75 * 3 | 0x10, 0x12 | setgain()
76 * 3 | 0x11 | setcolors(), setgain(), setexposure(), sethvflip()
77 * 3 | 0x21 | sethvflip()
87 #define PAC7302_RGB_BALANCE_MIN 0
116 #define FL_HFLIP 0x01 /* mirrored by default */
117 #define FL_VFLIP 0x02 /* vertical flipped by default */
134 #define END_OF_SEQUENCE 0
138 0xff, 0x01, /* page 1 */
139 0x78, 0x00, /* deactivate */
140 0xff, 0x01,
141 0x78, 0x40, /* led off */
145 0xff, 1, 0x00, /* page 0 */
146 0x00, 12, 0x01, 0x40, 0x40, 0x40, 0x01, 0xe0, 0x02, 0x80,
147 0x00, 0x00, 0x00, 0x00,
148 0x0d, 24, 0x03, 0x01, 0x00, 0xb5, 0x07, 0xcb, 0x00, 0x00,
149 0x07, 0xc8, 0x00, 0xea, 0x07, 0xcf, 0x07, 0xf7,
150 0x07, 0x7e, 0x01, 0x0b, 0x00, 0x00, 0x00, 0x11,
151 0x26, 2, 0xaa, 0xaa,
152 0x2e, 1, 0x31,
153 0x38, 1, 0x01,
154 0x3a, 3, 0x14, 0xff, 0x5a,
155 0x43, 11, 0x00, 0x0a, 0x18, 0x11, 0x01, 0x2c, 0x88, 0x11,
156 0x00, 0x54, 0x11,
157 0x55, 1, 0x00,
158 0x62, 4, 0x10, 0x1e, 0x1e, 0x18,
159 0x6b, 1, 0x00,
160 0x6e, 3, 0x08, 0x06, 0x00,
161 0x72, 3, 0x00, 0xff, 0x00,
162 0x7d, 23, 0x01, 0x01, 0x58, 0x46, 0x50, 0x3c, 0x50, 0x3c,
163 0x54, 0x46, 0x54, 0x56, 0x52, 0x50, 0x52, 0x50,
164 0x56, 0x64, 0xa4, 0x00, 0xda, 0x00, 0x00,
165 0xa2, 10, 0x22, 0x2c, 0x3c, 0x54, 0x69, 0x7c, 0x9c, 0xb9,
166 0xd2, 0xeb,
167 0xaf, 1, 0x02,
168 0xb5, 2, 0x08, 0x08,
169 0xb8, 2, 0x08, 0x88,
170 0xc4, 4, 0xae, 0x01, 0x04, 0x01,
171 0xcc, 1, 0x00,
172 0xd1, 11, 0x01, 0x30, 0x49, 0x5e, 0x6f, 0x7f, 0x8e, 0xa9,
173 0xc1, 0xd7, 0xec,
174 0xdc, 1, 0x01,
175 0xff, 1, 0x01, /* page 1 */
176 0x12, 3, 0x02, 0x00, 0x01,
177 0x3e, 2, 0x00, 0x00,
178 0x76, 5, 0x01, 0x20, 0x40, 0x00, 0xf2,
179 0x7c, 1, 0x00,
180 0x7f, 10, 0x4b, 0x0f, 0x01, 0x2c, 0x02, 0x58, 0x03, 0x20,
181 0x02, 0x00,
182 0x96, 5, 0x01, 0x10, 0x04, 0x01, 0x04,
183 0xc8, 14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00,
184 0x07, 0x00, 0x01, 0x07, 0x04, 0x01,
185 0xd8, 1, 0x01,
186 0xdb, 2, 0x00, 0x01,
187 0xde, 7, 0x00, 0x01, 0x04, 0x04, 0x00, 0x00, 0x00,
188 0xe6, 4, 0x00, 0x00, 0x00, 0x01,
189 0xeb, 1, 0x00,
190 0xff, 1, 0x02, /* page 2 */
191 0x22, 1, 0x00,
192 0xff, 1, 0x03, /* page 3 */
193 0, LOAD_PAGE3, /* load the page 3 */
194 0x11, 1, 0x01,
195 0xff, 1, 0x02, /* page 2 */
196 0x13, 1, 0x00,
197 0x22, 4, 0x1f, 0xa4, 0xf0, 0x96,
198 0x27, 2, 0x14, 0x0c,
199 0x2a, 5, 0xc8, 0x00, 0x18, 0x12, 0x22,
200 0x64, 8, 0x00, 0x00, 0xf0, 0x01, 0x14, 0x44, 0x44, 0x44,
201 0x6e, 1, 0x08,
202 0xff, 1, 0x01, /* page 1 */
203 0x78, 1, 0x00,
204 0, END_OF_SEQUENCE /* end of sequence */
207 #define SKIP 0xaa
210 0x90, 0x40, 0x03, 0x00, 0xc0, 0x01, 0x14, 0x16,
211 0x14, 0x12, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00,
212 0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
213 0x00, 0x00, 0x00, 0x47, 0x01, 0xb3, 0x01, 0x00,
214 0x00, 0x08, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x21,
215 0x00, 0x00, 0x00, 0x54, 0xf4, 0x02, 0x52, 0x54,
216 0xa4, 0xb8, 0xe0, 0x2a, 0xf6, 0x00, 0x00, 0x00,
217 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
218 0x00, 0xfc, 0x00, 0xf2, 0x1f, 0x04, 0x00, 0x00,
219 SKIP, 0x00, 0x00, 0xc0, 0xc0, 0x10, 0x00, 0x00,
220 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
221 0x00, 0x40, 0xff, 0x03, 0x19, 0x00, 0x00, 0x00,
222 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
223 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xc8, 0xc8,
224 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50,
225 0x08, 0x10, 0x24, 0x40, 0x00, 0x00, 0x00, 0x00,
226 0x01, 0x00, 0x02, 0x47, 0x00, 0x00, 0x00, 0x00,
227 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
228 0x00, 0x02, 0xfa, 0x00, 0x64, 0x5a, 0x28, 0x00,
229 0x00
238 if (gspca_dev->usb_err < 0) in reg_w_buf()
242 usb_sndctrlpipe(gspca_dev->dev, 0), in reg_w_buf()
243 0, /* request */ in reg_w_buf()
245 0, /* value */ in reg_w_buf()
248 if (ret < 0) { in reg_w_buf()
262 if (gspca_dev->usb_err < 0) in reg_w()
264 gspca_dev->usb_buf[0] = value; in reg_w()
266 usb_sndctrlpipe(gspca_dev->dev, 0), in reg_w()
267 0, /* request */ in reg_w()
269 0, index, gspca_dev->usb_buf, 1, in reg_w()
271 if (ret < 0) { in reg_w()
281 while (--len >= 0) { in reg_w_seq()
282 reg_w(gspca_dev, seq[0], seq[1]); in reg_w_seq()
292 int ret = 0; in reg_w_page()
294 if (gspca_dev->usb_err < 0) in reg_w_page()
296 for (index = 0; index < len; index++) { in reg_w_page()
299 gspca_dev->usb_buf[0] = page[index]; in reg_w_page()
301 usb_sndctrlpipe(gspca_dev->dev, 0), in reg_w_page()
302 0, /* request */ in reg_w_page()
304 0, index, gspca_dev->usb_buf, 1, in reg_w_page()
306 if (ret < 0) { in reg_w_page()
336 while (len > 0) { in reg_w_var()
366 return 0; in sd_config()
374 {0x29, 0x33, 0x42, 0x5a, 0x6e, 0x80, 0x9f, 0xbb, in setbrightcont()
375 0xd4, 0xec}; in setbrightcont()
377 {0x35, 0x33, 0x33, 0x2f, 0x2a, 0x25, 0x1e, 0x17, in setbrightcont()
378 0x11, 0x0b}; in setbrightcont()
380 reg_w(gspca_dev, 0xff, 0x00); /* page 0 */ in setbrightcont()
381 for (i = 0; i < 10; i++) { in setbrightcont()
386 if (v < 0) in setbrightcont()
387 v = 0; in setbrightcont()
388 else if (v > 0xff) in setbrightcont()
389 v = 0xff; in setbrightcont()
390 reg_w(gspca_dev, 0xa2 + i, v); in setbrightcont()
392 reg_w(gspca_dev, 0xdc, 0x01); in setbrightcont()
400 {217, -212, 0, -101, 170, -67, -38, -315, 355}; in setcolors()
402 {19, 106, 0, 19, 106, 1, 19, 106, 1}; in setcolors()
404 reg_w(gspca_dev, 0xff, 0x03); /* page 3 */ in setcolors()
405 reg_w(gspca_dev, 0x11, 0x01); in setcolors()
406 reg_w(gspca_dev, 0xff, 0x00); /* page 0 */ in setcolors()
407 for (i = 0; i < 9; i++) { in setcolors()
410 reg_w(gspca_dev, 0x0f + 2 * i, (v >> 8) & 0x07); in setcolors()
411 reg_w(gspca_dev, 0x0f + 2 * i + 1, v); in setcolors()
413 reg_w(gspca_dev, 0xdc, 0x01); in setcolors()
420 reg_w(gspca_dev, 0xff, 0x00); /* page 0 */ in setwhitebalance()
421 reg_w(gspca_dev, 0xc6, sd->white_balance->val); in setwhitebalance()
423 reg_w(gspca_dev, 0xdc, 0x01); in setwhitebalance()
431 /* Normed value [0...k] */ in rgbbalance_ctrl_to_reg_value()
437 * => register values 0x20-0x80; Windows driver uses these limits */ in rgbbalance_ctrl_to_reg_value()
439 /* NOTE: for full value range (0x00-0xff) use in rgbbalance_ctrl_to_reg_value()
448 reg_w(gspca_dev, 0xff, 0x00); /* page 0 */ in setredbalance()
449 reg_w(gspca_dev, 0x01, in setredbalance()
452 reg_w(gspca_dev, 0xdc, 0x01); in setredbalance()
459 reg_w(gspca_dev, 0xff, 0x00); /* page 0 */ in setbluebalance()
460 reg_w(gspca_dev, 0x03, in setbluebalance()
463 reg_w(gspca_dev, 0xdc, 0x01); in setbluebalance()
472 reg12 = 0; in setgain()
478 reg_w(gspca_dev, 0xff, 0x03); /* page 3 */ in setgain()
479 reg_w(gspca_dev, 0x10, reg10); in setgain()
480 reg_w(gspca_dev, 0x12, reg12); in setgain()
482 /* load registers to sensor (Bit 0, auto clear) */ in setgain()
483 reg_w(gspca_dev, 0x11, 0x01); in setgain()
522 /* 0 = use full frametime, 448 = no exposure, reverse it */ in setexposure()
525 reg_w(gspca_dev, 0xff, 0x03); /* page 3 */ in setexposure()
526 reg_w(gspca_dev, 0x02, clockdiv); in setexposure()
527 reg_w(gspca_dev, 0x0e, exposure & 0xff); in setexposure()
528 reg_w(gspca_dev, 0x0f, exposure >> 8); in setexposure()
530 /* load registers to sensor (Bit 0, auto clear) */ in setexposure()
531 reg_w(gspca_dev, 0x11, 0x01); in setexposure()
546 reg_w(gspca_dev, 0xff, 0x03); /* page 3 */ in sethvflip()
547 data = (hflip ? 0x08 : 0x00) | (vflip ? 0x04 : 0x00); in sethvflip()
548 reg_w(gspca_dev, 0x21, data); in sethvflip()
550 /* load registers to sensor (Bit 0, auto clear) */ in sethvflip()
551 reg_w(gspca_dev, 0x11, 0x01); in sethvflip()
558 reg_w(gspca_dev, 0xff, 0x00); /* page 0 */ in setsharpness()
559 reg_w(gspca_dev, 0xb6, sd->sharpness->val); in setsharpness()
561 reg_w(gspca_dev, 0xdc, 0x01); in setsharpness()
577 gspca_dev->usb_err = 0; in sd_s_ctrl()
590 return 0; in sd_s_ctrl()
640 V4L2_CID_BRIGHTNESS, 0, 32, 1, 16); in sd_init_controls()
642 V4L2_CID_CONTRAST, 0, 255, 1, 127); in sd_init_controls()
645 V4L2_CID_SATURATION, 0, 255, 1, 127); in sd_init_controls()
648 0, 255, 1, 55); in sd_init_controls()
661 V4L2_CID_AUTOGAIN, 0, 1, 1, 1); in sd_init_controls()
663 V4L2_CID_EXPOSURE, 0, 1023, 1, in sd_init_controls()
666 V4L2_CID_GAIN, 0, 62, 1, in sd_init_controls()
670 V4L2_CID_HFLIP, 0, 1, 1, 0); in sd_init_controls()
672 V4L2_CID_VFLIP, 0, 1, 1, 0); in sd_init_controls()
675 V4L2_CID_SHARPNESS, 0, 15, 1, 8); in sd_init_controls()
683 v4l2_ctrl_auto_cluster(3, &gspca_dev->autogain, 0, false); in sd_init_controls()
685 return 0; in sd_init_controls()
696 sd->sof_read = 0; in sd_start()
697 sd->autogain_ignore_frames = 0; in sd_start()
701 reg_w(gspca_dev, 0xff, 0x01); in sd_start()
702 reg_w(gspca_dev, 0x78, 0x01); in sd_start()
711 reg_w(gspca_dev, 0xff, 0x01); in sd_stopN()
712 reg_w(gspca_dev, 0x78, 0x00); in sd_stopN()
715 /* called on streamoff with alt 0 and on disconnect for pac7302 */
720 reg_w(gspca_dev, 0xff, 0x01); in sd_stop0()
721 reg_w(gspca_dev, 0x78, 0x40); in sd_stop0()
731 if (sd->autogain_ignore_frames < 0) in do_autogain()
734 if (sd->autogain_ignore_frames > 0) { in do_autogain()
749 0xff, 0xd8, /* SOI: Start of Image */
751 0xff, 0xc0, /* SOF0: Start of Frame (Baseline DCT) */
752 0x00, 0x11, /* length = 17 bytes (including this length field) */
753 0x08, /* Precision: 8 */
754 0x02, 0x80, /* height = 640 (image rotated) */
755 0x01, 0xe0, /* width = 480 */
756 0x03, /* Number of image components: 3 */
757 0x01, 0x21, 0x00, /* ID=1, Subsampling 1x1, Quantization table: 0 */
758 0x02, 0x11, 0x01, /* ID=2, Subsampling 2x1, Quantization table: 1 */
759 0x03, 0x11, 0x01, /* ID=3, Subsampling 2x1, Quantization table: 1 */
761 0xff, 0xda, /* SOS: Start Of Scan */
762 0x00, 0x0c, /* length = 12 bytes (including this length field) */
763 0x03, /* number of components: 3 */
764 0x01, 0x00, /* selector 1, table 0x00 */
765 0x02, 0x11, /* selector 2, table 0x11 */
766 0x03, 0x11, /* selector 3, table 0x11 */
767 0x00, 0x3f, /* Spectral selection: 0 .. 63 */
768 0x00 /* Successive approximation: 0 */
795 if (n < 0) { in sd_pkt_scan()
803 && image[gspca_dev->image_len - 2] == 0xff in sd_pkt_scan()
804 && image[gspca_dev->image_len - 1] == 0xd9) in sd_pkt_scan()
805 gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); in sd_pkt_scan()
836 if (reg->match.addr == 0 && in sd_dbg_s_register()
837 (reg->reg < 0x000000ff) && in sd_dbg_s_register()
838 (reg->val <= 0x000000ff) in sd_dbg_s_register()
840 /* Currently writing to page 0 is only supported. */ in sd_dbg_s_register()
850 reg_w(gspca_dev, 0xff, 0x00); /* page 0 */ in sd_dbg_s_register()
853 reg_w(gspca_dev, 0xdc, 0x01); in sd_dbg_s_register()
868 data0 = data[0]; in sd_int_pkt_scan()
870 if ((data0 == 0x00 && data1 == 0x11) || in sd_int_pkt_scan()
871 (data0 == 0x22 && data1 == 0x33) || in sd_int_pkt_scan()
872 (data0 == 0x44 && data1 == 0x55) || in sd_int_pkt_scan()
873 (data0 == 0x66 && data1 == 0x77) || in sd_int_pkt_scan()
874 (data0 == 0x88 && data1 == 0x99) || in sd_int_pkt_scan()
875 (data0 == 0xaa && data1 == 0xbb) || in sd_int_pkt_scan()
876 (data0 == 0xcc && data1 == 0xdd) || in sd_int_pkt_scan()
877 (data0 == 0xee && data1 == 0xff)) { in sd_int_pkt_scan()
880 input_report_key(gspca_dev->input_dev, KEY_CAMERA, 0); in sd_int_pkt_scan()
882 ret = 0; in sd_int_pkt_scan()
911 {USB_DEVICE(0x06f8, 0x3009)},
912 {USB_DEVICE(0x06f8, 0x301b)},
913 {USB_DEVICE(0x093a, 0x2620)},
914 {USB_DEVICE(0x093a, 0x2621)},
915 {USB_DEVICE(0x093a, 0x2622), .driver_info = FL_VFLIP},
916 {USB_DEVICE(0x093a, 0x2623), .driver_info = FL_VFLIP},
917 {USB_DEVICE(0x093a, 0x2624), .driver_info = FL_VFLIP},
918 {USB_DEVICE(0x093a, 0x2625)},
919 {USB_DEVICE(0x093a, 0x2626)},
920 {USB_DEVICE(0x093a, 0x2627), .driver_info = FL_VFLIP},
921 {USB_DEVICE(0x093a, 0x2628)},
922 {USB_DEVICE(0x093a, 0x2629), .driver_info = FL_VFLIP},
923 {USB_DEVICE(0x093a, 0x262a)},
924 {USB_DEVICE(0x093a, 0x262c)},
925 {USB_DEVICE(0x145f, 0x013c)},
926 {USB_DEVICE(0x1ae7, 0x2001)}, /* SpeedLink Snappy Mic SL-6825-SBK */