aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pwc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pwc')
-rw-r--r--drivers/media/video/pwc/Makefile2
-rw-r--r--drivers/media/video/pwc/philips.txt66
-rw-r--r--drivers/media/video/pwc/pwc-ctrl.c374
-rw-r--r--drivers/media/video/pwc/pwc-if.c302
-rw-r--r--drivers/media/video/pwc/pwc-ioctl.h40
-rw-r--r--drivers/media/video/pwc/pwc-kiara.c288
-rw-r--r--drivers/media/video/pwc/pwc-misc.c26
-rw-r--r--drivers/media/video/pwc/pwc-nala.h2
-rw-r--r--drivers/media/video/pwc/pwc-timon.c288
-rw-r--r--drivers/media/video/pwc/pwc-uncompress.c6
-rw-r--r--drivers/media/video/pwc/pwc-uncompress.h2
-rw-r--r--drivers/media/video/pwc/pwc.h4
12 files changed, 700 insertions, 700 deletions
diff --git a/drivers/media/video/pwc/Makefile b/drivers/media/video/pwc/Makefile
index 2d93a775011a..8326684f49f3 100644
--- a/drivers/media/video/pwc/Makefile
+++ b/drivers/media/video/pwc/Makefile
@@ -15,6 +15,6 @@ default:
15endif 15endif
16 16
17clean: 17clean:
18 rm -f *.[oas] .*.flags *.ko .*.cmd .*.d .*.tmp *.mod.c 18 rm -f *.[oas] .*.flags *.ko .*.cmd .*.d .*.tmp *.mod.c
19 rm -rf .tmp_versions 19 rm -rf .tmp_versions
20 20
diff --git a/drivers/media/video/pwc/philips.txt b/drivers/media/video/pwc/philips.txt
index 04a640d723ed..11f751a6bda5 100644
--- a/drivers/media/video/pwc/philips.txt
+++ b/drivers/media/video/pwc/philips.txt
@@ -47,17 +47,17 @@ don't know how to set it properly in the driver. The options are:
47size 47size
48 Can be one of 'sqcif', 'qsif', 'qcif', 'sif', 'cif' or 48 Can be one of 'sqcif', 'qsif', 'qcif', 'sif', 'cif' or
49 'vga', for an image size of resp. 128x96, 160x120, 176x144, 49 'vga', for an image size of resp. 128x96, 160x120, 176x144,
50 320x240, 352x288 and 640x480 (of course, only for those cameras that 50 320x240, 352x288 and 640x480 (of course, only for those cameras that
51 support these resolutions). 51 support these resolutions).
52 52
53fps 53fps
54 Specifies the desired framerate. Is an integer in the range of 4-30. 54 Specifies the desired framerate. Is an integer in the range of 4-30.
55 55
56fbufs 56fbufs
57 This paramter specifies the number of internal buffers to use for storing 57 This paramter specifies the number of internal buffers to use for storing
58 frames from the cam. This will help if the process that reads images from 58 frames from the cam. This will help if the process that reads images from
59 the cam is a bit slow or momentarely busy. However, on slow machines it 59 the cam is a bit slow or momentarely busy. However, on slow machines it
60 only introduces lag, so choose carefully. The default is 3, which is 60 only introduces lag, so choose carefully. The default is 3, which is
61 reasonable. You can set it between 2 and 5. 61 reasonable. You can set it between 2 and 5.
62 62
63mbufs 63mbufs
@@ -65,9 +65,9 @@ mbufs
65 buffers to reserve for mmap(), VIDIOCCGMBUF, VIDIOCMCAPTURE and friends. 65 buffers to reserve for mmap(), VIDIOCCGMBUF, VIDIOCMCAPTURE and friends.
66 The default is 2, which is adequate for most applications (double 66 The default is 2, which is adequate for most applications (double
67 buffering). 67 buffering).
68 68
69 Should you experience a lot of 'Dumping frame...' messages during 69 Should you experience a lot of 'Dumping frame...' messages during
70 grabbing with a tool that uses mmap(), you might want to increase if. 70 grabbing with a tool that uses mmap(), you might want to increase if.
71 However, it doesn't really buffer images, it just gives you a bit more 71 However, it doesn't really buffer images, it just gives you a bit more
72 slack when your program is behind. But you need a multi-threaded or 72 slack when your program is behind. But you need a multi-threaded or
73 forked program to really take advantage of these buffers. 73 forked program to really take advantage of these buffers.
@@ -88,15 +88,15 @@ power_save
88 88
89compression (only useful with the plugin) 89compression (only useful with the plugin)
90 With this option you can control the compression factor that the camera 90 With this option you can control the compression factor that the camera
91 uses to squeeze the image through the USB bus. You can set the 91 uses to squeeze the image through the USB bus. You can set the
92 parameter between 0 and 3: 92 parameter between 0 and 3:
93 0 = prefer uncompressed images; if the requested mode is not available 93 0 = prefer uncompressed images; if the requested mode is not available
94 in an uncompressed format, the driver will silently switch to low 94 in an uncompressed format, the driver will silently switch to low
95 compression. 95 compression.
96 1 = low compression. 96 1 = low compression.
97 2 = medium compression. 97 2 = medium compression.
98 3 = high compression. 98 3 = high compression.
99 99
100 High compression takes less bandwidth of course, but it could also 100 High compression takes less bandwidth of course, but it could also
101 introduce some unwanted artefacts. The default is 2, medium compression. 101 introduce some unwanted artefacts. The default is 2, medium compression.
102 See the FAQ on the website for an overview of which modes require 102 See the FAQ on the website for an overview of which modes require
@@ -112,7 +112,7 @@ leds
112 this is let the LED blink while the camera is in use. This: 112 this is let the LED blink while the camera is in use. This:
113 113
114 leds=500,500 114 leds=500,500
115 115
116 will blink the LED once every second. But with: 116 will blink the LED once every second. But with:
117 117
118 leds=0,0 118 leds=0,0
@@ -123,7 +123,7 @@ leds
123 when the camera is not used anymore. 123 when the camera is not used anymore.
124 124
125 This parameter works only with the ToUCam range of cameras (720, 730, 740, 125 This parameter works only with the ToUCam range of cameras (720, 730, 740,
126 750) and OEMs. For other cameras this command is silently ignored, and 126 750) and OEMs. For other cameras this command is silently ignored, and
127 the LED cannot be controlled. 127 the LED cannot be controlled.
128 128
129 Finally: this parameters does not take effect UNTIL the first time you 129 Finally: this parameters does not take effect UNTIL the first time you
@@ -144,35 +144,35 @@ dev_hint
144 format: 144 format:
145 145
146 [type[.serialnumber]:]node 146 [type[.serialnumber]:]node
147 147
148 The square brackets mean that both the type and the serialnumber are 148 The square brackets mean that both the type and the serialnumber are
149 optional, but a serialnumber cannot be specified without a type (which 149 optional, but a serialnumber cannot be specified without a type (which
150 would be rather pointless). The serialnumber is separated from the type 150 would be rather pointless). The serialnumber is separated from the type
151 by a '.'; the node number by a ':'. 151 by a '.'; the node number by a ':'.
152 152
153 This somewhat cryptic syntax is best explained by a few examples: 153 This somewhat cryptic syntax is best explained by a few examples:
154 154
155 dev_hint=3,5 The first detected cam gets assigned 155 dev_hint=3,5 The first detected cam gets assigned
156 /dev/video3, the second /dev/video5. Any 156 /dev/video3, the second /dev/video5. Any
157 other cameras will get the first free 157 other cameras will get the first free
158 available slot (see below). 158 available slot (see below).
159 159
160 dev_hint=645:1,680:2 The PCA645 camera will get /dev/video1, 160 dev_hint=645:1,680:2 The PCA645 camera will get /dev/video1,
161 and a PCVC680 /dev/video2. 161 and a PCVC680 /dev/video2.
162 162
163 dev_hint=645.0123:3,645.4567:0 The PCA645 camera with serialnumber 163 dev_hint=645.0123:3,645.4567:0 The PCA645 camera with serialnumber
164 0123 goes to /dev/video3, the same 164 0123 goes to /dev/video3, the same
165 camera model with the 4567 serial 165 camera model with the 4567 serial
166 gets /dev/video0. 166 gets /dev/video0.
167 167
168 dev_hint=750:1,4,5,6 The PCVC750 camera will get /dev/video1, the 168 dev_hint=750:1,4,5,6 The PCVC750 camera will get /dev/video1, the
169 next 3 Philips cams will use /dev/video4 169 next 3 Philips cams will use /dev/video4
170 through /dev/video6. 170 through /dev/video6.
171 171
172 Some points worth knowing: 172 Some points worth knowing:
173 - Serialnumbers are case sensitive and must be written full, including 173 - Serialnumbers are case sensitive and must be written full, including
174 leading zeroes (it's treated as a string). 174 leading zeroes (it's treated as a string).
175 - If a device node is already occupied, registration will fail and 175 - If a device node is already occupied, registration will fail and
176 the webcam is not available. 176 the webcam is not available.
177 - You can have up to 64 video devices; be sure to make enough device 177 - You can have up to 64 video devices; be sure to make enough device
178 nodes in /dev if you want to spread the numbers (this does not apply 178 nodes in /dev if you want to spread the numbers (this does not apply
@@ -186,13 +186,13 @@ trace
186 kernel log at debug level. 186 kernel log at debug level.
187 187
188 The trace variable is a bitmask; each bit represents a certain feature. 188 The trace variable is a bitmask; each bit represents a certain feature.
189 If you want to trace something, look up the bit value(s) in the table 189 If you want to trace something, look up the bit value(s) in the table
190 below, add the values together and supply that to the trace variable. 190 below, add the values together and supply that to the trace variable.
191 191
192 Value Value Description Default 192 Value Value Description Default
193 (dec) (hex) 193 (dec) (hex)
194 1 0x1 Module initialization; this will log messages On 194 1 0x1 Module initialization; this will log messages On
195 while loading and unloading the module 195 while loading and unloading the module
196 196
197 2 0x2 probe() and disconnect() traces On 197 2 0x2 probe() and disconnect() traces On
198 198
@@ -203,7 +203,7 @@ trace
203 16 0x10 Memory allocation of buffers, etc. Off 203 16 0x10 Memory allocation of buffers, etc. Off
204 204
205 32 0x20 Showing underflow, overflow and Dumping frame On 205 32 0x20 Showing underflow, overflow and Dumping frame On
206 messages 206 messages
207 207
208 64 0x40 Show viewport and image sizes Off 208 64 0x40 Show viewport and image sizes Off
209 209
@@ -217,7 +217,7 @@ trace
217 217
218 218
219Example: 219Example:
220 220
221 # modprobe pwc size=cif fps=15 power_save=1 221 # modprobe pwc size=cif fps=15 power_save=1
222 222
223The fbufs, mbufs and trace parameters are global and apply to all connected 223The fbufs, mbufs and trace parameters are global and apply to all connected
diff --git a/drivers/media/video/pwc/pwc-ctrl.c b/drivers/media/video/pwc/pwc-ctrl.c
index 0398b812e0ce..4ba549bfa0e0 100644
--- a/drivers/media/video/pwc/pwc-ctrl.c
+++ b/drivers/media/video/pwc/pwc-ctrl.c
@@ -31,17 +31,17 @@
31 31
32/* 32/*
33 Changes 33 Changes
34 2001/08/03 Alvarado Added methods for changing white balance and 34 2001/08/03 Alvarado Added methods for changing white balance and
35 red/green gains 35 red/green gains
36 */ 36 */
37 37
38/* Control functions for the cam; brightness, contrast, video mode, etc. */ 38/* Control functions for the cam; brightness, contrast, video mode, etc. */
39 39
40#ifdef __KERNEL__ 40#ifdef __KERNEL__
41#include <asm/uaccess.h> 41#include <asm/uaccess.h>
42#endif 42#endif
43#include <asm/errno.h> 43#include <asm/errno.h>
44 44
45#include "pwc.h" 45#include "pwc.h"
46#include "pwc-ioctl.h" 46#include "pwc-ioctl.h"
47#include "pwc-uncompress.h" 47#include "pwc-uncompress.h"
@@ -116,13 +116,13 @@ static const char *size2name[PSZ_MAX] =
116 "SIF", 116 "SIF",
117 "CIF", 117 "CIF",
118 "VGA", 118 "VGA",
119}; 119};
120 120
121/********/ 121/********/
122 122
123/* Entries for the Nala (645/646) camera; the Nala doesn't have compression 123/* Entries for the Nala (645/646) camera; the Nala doesn't have compression
124 preferences, so you either get compressed or non-compressed streams. 124 preferences, so you either get compressed or non-compressed streams.
125 125
126 An alternate value of 0 means this mode is not available at all. 126 An alternate value of 0 means this mode is not available at all.
127 */ 127 */
128 128
@@ -205,13 +205,13 @@ static inline int set_video_mode_Nala(struct pwc_device *pdev, int size, int fra
205 { /* closest match of framerate */ 205 { /* closest match of framerate */
206 0, 0, 0, 0, 4, /* 0-4 */ 206 0, 0, 0, 0, 4, /* 0-4 */
207 5, 5, 7, 7, 10, /* 5-9 */ 207 5, 5, 7, 7, 10, /* 5-9 */
208 10, 10, 12, 12, 15, /* 10-14 */ 208 10, 10, 12, 12, 15, /* 10-14 */
209 15, 15, 15, 20, 20, /* 15-19 */ 209 15, 15, 15, 20, 20, /* 15-19 */
210 20, 20, 20, 24, 24, /* 20-24 */ 210 20, 20, 20, 24, 24, /* 20-24 */
211 24, 24, 24, 24, 24, /* 25-29 */ 211 24, 24, 24, 24, 24, /* 25-29 */
212 24 /* 30 */ 212 24 /* 30 */
213 }; 213 };
214 int frames2table[31] = 214 int frames2table[31] =
215 { 0, 0, 0, 0, 0, /* 0-4 */ 215 { 0, 0, 0, 0, 0, /* 0-4 */
216 1, 1, 1, 2, 2, /* 5-9 */ 216 1, 1, 1, 2, 2, /* 5-9 */
217 3, 3, 4, 4, 4, /* 10-14 */ 217 3, 3, 4, 4, 4, /* 10-14 */
@@ -220,7 +220,7 @@ static inline int set_video_mode_Nala(struct pwc_device *pdev, int size, int fra
220 7, 7, 7, 7, 7, /* 25-29 */ 220 7, 7, 7, 7, 7, /* 25-29 */
221 7 /* 30 */ 221 7 /* 30 */
222 }; 222 };
223 223
224 if (size < 0 || size > PSZ_CIF || frames < 4 || frames > 25) 224 if (size < 0 || size > PSZ_CIF || frames < 4 || frames > 25)
225 return -EINVAL; 225 return -EINVAL;
226 frames = frames2frames[frames]; 226 frames = frames2frames[frames];
@@ -232,7 +232,7 @@ static inline int set_video_mode_Nala(struct pwc_device *pdev, int size, int fra
232 if (pEntry->compressed) 232 if (pEntry->compressed)
233 return -ENOENT; /* Not supported. */ 233 return -ENOENT; /* Not supported. */
234 234
235 memcpy(buf, pEntry->mode, 3); 235 memcpy(buf, pEntry->mode, 3);
236 ret = send_video_command(pdev->udev, pdev->vendpoint, buf, 3); 236 ret = send_video_command(pdev->udev, pdev->vendpoint, buf, 3);
237 if (ret < 0) { 237 if (ret < 0) {
238 Debug("Failed to send video command... %d\n", ret); 238 Debug("Failed to send video command... %d\n", ret);
@@ -257,7 +257,7 @@ static inline int set_video_mode_Nala(struct pwc_device *pdev, int size, int fra
257 break; 257 break;
258 } 258 }
259 } 259 }
260 260
261 pdev->cmd_len = 3; 261 pdev->cmd_len = 3;
262 memcpy(pdev->cmd_buf, buf, 3); 262 memcpy(pdev->cmd_buf, buf, 3);
263 263
@@ -352,13 +352,13 @@ static inline int set_video_mode_Kiara(struct pwc_device *pdev, int size, int fr
352 /* special case: VGA @ 5 fps and snapshot is raw bayer mode */ 352 /* special case: VGA @ 5 fps and snapshot is raw bayer mode */
353 if (size == PSZ_VGA && frames == 5 && snapshot) 353 if (size == PSZ_VGA && frames == 5 && snapshot)
354 { 354 {
355 /* Only available in case the raw palette is selected or 355 /* Only available in case the raw palette is selected or
356 we have the decompressor available. This mode is 356 we have the decompressor available. This mode is
357 only available in compressed form 357 only available in compressed form
358 */ 358 */
359 if (pdev->vpalette == VIDEO_PALETTE_RAW) 359 if (pdev->vpalette == VIDEO_PALETTE_RAW)
360 { 360 {
361 Info("Choosing VGA/5 BAYER mode (%d).\n", pdev->vpalette); 361 Info("Choosing VGA/5 BAYER mode (%d).\n", pdev->vpalette);
362 pChoose = &RawEntry; 362 pChoose = &RawEntry;
363 } 363 }
364 else 364 else
@@ -368,9 +368,9 @@ static inline int set_video_mode_Kiara(struct pwc_device *pdev, int size, int fr
368 } 368 }
369 else 369 else
370 { 370 {
371 /* Find a supported framerate with progressively higher compression ratios 371 /* Find a supported framerate with progressively higher compression ratios
372 if the preferred ratio is not available. 372 if the preferred ratio is not available.
373 Skip this step when using RAW modes. 373 Skip this step when using RAW modes.
374 */ 374 */
375 while (compression <= 3) { 375 while (compression <= 3) {
376 pChoose = &Kiara_table[size][fps][compression]; 376 pChoose = &Kiara_table[size][fps][compression];
@@ -383,7 +383,7 @@ static inline int set_video_mode_Kiara(struct pwc_device *pdev, int size, int fr
383 return -ENOENT; /* Not supported. */ 383 return -ENOENT; /* Not supported. */
384 384
385 Debug("Using alternate setting %d.\n", pChoose->alternate); 385 Debug("Using alternate setting %d.\n", pChoose->alternate);
386 386
387 /* usb_control_msg won't take staticly allocated arrays as argument?? */ 387 /* usb_control_msg won't take staticly allocated arrays as argument?? */
388 memcpy(buf, pChoose->mode, 12); 388 memcpy(buf, pChoose->mode, 12);
389 if (snapshot) 389 if (snapshot)
@@ -463,9 +463,9 @@ static void pwc_set_image_buffer_size(struct pwc_device *pdev)
463 */ 463 */
464int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frames, int compression, int snapshot) 464int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frames, int compression, int snapshot)
465{ 465{
466 int ret, size; 466 int ret, size;
467 467
468 Trace(TRACE_FLOW, "set_video_mode(%dx%d @ %d, palette %d).\n", width, height, frames, pdev->vpalette); 468 Trace(TRACE_FLOW, "set_video_mode(%dx%d @ %d, palette %d).\n", width, height, frames, pdev->vpalette);
469 size = pwc_decode_size(pdev, width, height); 469 size = pwc_decode_size(pdev, width, height);
470 if (size < 0) { 470 if (size < 0) {
471 Debug("Could not find suitable size.\n"); 471 Debug("Could not find suitable size.\n");
@@ -473,7 +473,7 @@ int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frame
473 } 473 }
474 Debug("decode_size = %d.\n", size); 474 Debug("decode_size = %d.\n", size);
475 475
476 ret = -EINVAL; 476 ret = -EINVAL;
477 switch(pdev->type) { 477 switch(pdev->type) {
478 case 645: 478 case 645:
479 case 646: 479 case 646:
@@ -485,7 +485,7 @@ int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frame
485 case 690: 485 case 690:
486 ret = set_video_mode_Timon(pdev, size, frames, compression, snapshot); 486 ret = set_video_mode_Timon(pdev, size, frames, compression, snapshot);
487 break; 487 break;
488 488
489 case 720: 489 case 720:
490 case 730: 490 case 730:
491 case 740: 491 case 740:
@@ -517,7 +517,7 @@ int pwc_get_brightness(struct pwc_device *pdev)
517 char buf; 517 char buf;
518 int ret; 518 int ret;
519 519
520 ret = RecvControlMsg(GET_LUM_CTL, BRIGHTNESS_FORMATTER, 1); 520 ret = RecvControlMsg(GET_LUM_CTL, BRIGHTNESS_FORMATTER, 1);
521 if (ret < 0) 521 if (ret < 0)
522 return ret; 522 return ret;
523 return buf << 9; 523 return buf << 9;
@@ -566,7 +566,7 @@ int pwc_get_gamma(struct pwc_device *pdev)
566{ 566{
567 char buf; 567 char buf;
568 int ret; 568 int ret;
569 569
570 ret = RecvControlMsg(GET_LUM_CTL, GAMMA_FORMATTER, 1); 570 ret = RecvControlMsg(GET_LUM_CTL, GAMMA_FORMATTER, 1);
571 if (ret < 0) 571 if (ret < 0)
572 return ret; 572 return ret;
@@ -622,14 +622,14 @@ static inline int pwc_set_agc(struct pwc_device *pdev, int mode, int value)
622{ 622{
623 char buf; 623 char buf;
624 int ret; 624 int ret;
625 625
626 if (mode) 626 if (mode)
627 buf = 0x0; /* auto */ 627 buf = 0x0; /* auto */
628 else 628 else
629 buf = 0xff; /* fixed */ 629 buf = 0xff; /* fixed */
630 630
631 ret = SendControlMsg(SET_LUM_CTL, AGC_MODE_FORMATTER, 1); 631 ret = SendControlMsg(SET_LUM_CTL, AGC_MODE_FORMATTER, 1);
632 632
633 if (!mode && ret >= 0) { 633 if (!mode && ret >= 0) {
634 if (value < 0) 634 if (value < 0)
635 value = 0; 635 value = 0;
@@ -647,7 +647,7 @@ static inline int pwc_get_agc(struct pwc_device *pdev, int *value)
647{ 647{
648 unsigned char buf; 648 unsigned char buf;
649 int ret; 649 int ret;
650 650
651 ret = RecvControlMsg(GET_LUM_CTL, AGC_MODE_FORMATTER, 1); 651 ret = RecvControlMsg(GET_LUM_CTL, AGC_MODE_FORMATTER, 1);
652 if (ret < 0) 652 if (ret < 0)
653 return ret; 653 return ret;
@@ -658,7 +658,7 @@ static inline int pwc_get_agc(struct pwc_device *pdev, int *value)
658 return ret; 658 return ret;
659 if (buf > 0x3F) 659 if (buf > 0x3F)
660 buf = 0x3F; 660 buf = 0x3F;
661 *value = (buf << 10); 661 *value = (buf << 10);
662 } 662 }
663 else { /* auto */ 663 else { /* auto */
664 ret = RecvControlMsg(GET_STATUS_CTL, READ_AGC_FORMATTER, 1); 664 ret = RecvControlMsg(GET_STATUS_CTL, READ_AGC_FORMATTER, 1);
@@ -683,7 +683,7 @@ static inline int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int v
683 buf[0] = 0x0; /* auto */ 683 buf[0] = 0x0; /* auto */
684 else 684 else
685 buf[0] = 0xff; /* fixed */ 685 buf[0] = 0xff; /* fixed */
686 686
687 ret = SendControlMsg(SET_LUM_CTL, SHUTTER_MODE_FORMATTER, 1); 687 ret = SendControlMsg(SET_LUM_CTL, SHUTTER_MODE_FORMATTER, 1);
688 688
689 if (!mode && ret >= 0) { 689 if (!mode && ret >= 0) {
@@ -713,7 +713,7 @@ static inline int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int v
713 ret = SendControlMsg(SET_LUM_CTL, PRESET_SHUTTER_FORMATTER, 2); 713 ret = SendControlMsg(SET_LUM_CTL, PRESET_SHUTTER_FORMATTER, 2);
714 } 714 }
715 return ret; 715 return ret;
716} 716}
717 717
718 718
719/* POWER */ 719/* POWER */
@@ -765,22 +765,22 @@ static inline int pwc_restore_factory(struct pwc_device *pdev)
765 * 02: fluorescent lighting 765 * 02: fluorescent lighting
766 * 03: manual 766 * 03: manual
767 * 04: auto 767 * 04: auto
768 */ 768 */
769static inline int pwc_set_awb(struct pwc_device *pdev, int mode) 769static inline int pwc_set_awb(struct pwc_device *pdev, int mode)
770{ 770{
771 char buf; 771 char buf;
772 int ret; 772 int ret;
773 773
774 if (mode < 0) 774 if (mode < 0)
775 mode = 0; 775 mode = 0;
776 776
777 if (mode > 4) 777 if (mode > 4)
778 mode = 4; 778 mode = 4;
779 779
780 buf = mode & 0x07; /* just the lowest three bits */ 780 buf = mode & 0x07; /* just the lowest three bits */
781 781
782 ret = SendControlMsg(SET_CHROM_CTL, WB_MODE_FORMATTER, 1); 782 ret = SendControlMsg(SET_CHROM_CTL, WB_MODE_FORMATTER, 1);
783 783
784 if (ret < 0) 784 if (ret < 0)
785 return ret; 785 return ret;
786 return 0; 786 return 0;
@@ -790,17 +790,17 @@ static inline int pwc_get_awb(struct pwc_device *pdev)
790{ 790{
791 unsigned char buf; 791 unsigned char buf;
792 int ret; 792 int ret;
793 793
794 ret = RecvControlMsg(GET_CHROM_CTL, WB_MODE_FORMATTER, 1); 794 ret = RecvControlMsg(GET_CHROM_CTL, WB_MODE_FORMATTER, 1);
795 795
796 if (ret < 0) 796 if (ret < 0)
797 return ret; 797 return ret;
798 return buf; 798 return buf;
799} 799}
800 800
801static inline int pwc_set_red_gain(struct pwc_device *pdev, int value) 801static inline int pwc_set_red_gain(struct pwc_device *pdev, int value)
802{ 802{
803 unsigned char buf; 803 unsigned char buf;
804 804
805 if (value < 0) 805 if (value < 0)
806 value = 0; 806 value = 0;
@@ -815,7 +815,7 @@ static inline int pwc_get_red_gain(struct pwc_device *pdev, int *value)
815{ 815{
816 unsigned char buf; 816 unsigned char buf;
817 int ret; 817 int ret;
818 818
819 ret = RecvControlMsg(GET_CHROM_CTL, PRESET_MANUAL_RED_GAIN_FORMATTER, 1); 819 ret = RecvControlMsg(GET_CHROM_CTL, PRESET_MANUAL_RED_GAIN_FORMATTER, 1);
820 if (ret < 0) 820 if (ret < 0)
821 return ret; 821 return ret;
@@ -841,7 +841,7 @@ static inline int pwc_get_blue_gain(struct pwc_device *pdev, int *value)
841{ 841{
842 unsigned char buf; 842 unsigned char buf;
843 int ret; 843 int ret;
844 844
845 ret = RecvControlMsg(GET_CHROM_CTL, PRESET_MANUAL_BLUE_GAIN_FORMATTER, 1); 845 ret = RecvControlMsg(GET_CHROM_CTL, PRESET_MANUAL_BLUE_GAIN_FORMATTER, 1);
846 if (ret < 0) 846 if (ret < 0)
847 return ret; 847 return ret;
@@ -851,14 +851,14 @@ static inline int pwc_get_blue_gain(struct pwc_device *pdev, int *value)
851 851
852 852
853/* The following two functions are different, since they only read the 853/* The following two functions are different, since they only read the
854 internal red/blue gains, which may be different from the manual 854 internal red/blue gains, which may be different from the manual
855 gains set or read above. 855 gains set or read above.
856 */ 856 */
857static inline int pwc_read_red_gain(struct pwc_device *pdev, int *value) 857static inline int pwc_read_red_gain(struct pwc_device *pdev, int *value)
858{ 858{
859 unsigned char buf; 859 unsigned char buf;
860 int ret; 860 int ret;
861 861
862 ret = RecvControlMsg(GET_STATUS_CTL, READ_RED_GAIN_FORMATTER, 1); 862 ret = RecvControlMsg(GET_STATUS_CTL, READ_RED_GAIN_FORMATTER, 1);
863 if (ret < 0) 863 if (ret < 0)
864 return ret; 864 return ret;
@@ -870,7 +870,7 @@ static inline int pwc_read_blue_gain(struct pwc_device *pdev, int *value)
870{ 870{
871 unsigned char buf; 871 unsigned char buf;
872 int ret; 872 int ret;
873 873
874 ret = RecvControlMsg(GET_STATUS_CTL, READ_BLUE_GAIN_FORMATTER, 1); 874 ret = RecvControlMsg(GET_STATUS_CTL, READ_BLUE_GAIN_FORMATTER, 1);
875 if (ret < 0) 875 if (ret < 0)
876 return ret; 876 return ret;
@@ -882,7 +882,7 @@ static inline int pwc_read_blue_gain(struct pwc_device *pdev, int *value)
882static inline int pwc_set_wb_speed(struct pwc_device *pdev, int speed) 882static inline int pwc_set_wb_speed(struct pwc_device *pdev, int speed)
883{ 883{
884 unsigned char buf; 884 unsigned char buf;
885 885
886 /* useful range is 0x01..0x20 */ 886 /* useful range is 0x01..0x20 */
887 buf = speed / 0x7f0; 887 buf = speed / 0x7f0;
888 return SendControlMsg(SET_CHROM_CTL, AWB_CONTROL_SPEED_FORMATTER, 1); 888 return SendControlMsg(SET_CHROM_CTL, AWB_CONTROL_SPEED_FORMATTER, 1);
@@ -892,7 +892,7 @@ static inline int pwc_get_wb_speed(struct pwc_device *pdev, int *value)
892{ 892{
893 unsigned char buf; 893 unsigned char buf;
894 int ret; 894 int ret;
895 895
896 ret = RecvControlMsg(GET_CHROM_CTL, AWB_CONTROL_SPEED_FORMATTER, 1); 896 ret = RecvControlMsg(GET_CHROM_CTL, AWB_CONTROL_SPEED_FORMATTER, 1);
897 if (ret < 0) 897 if (ret < 0)
898 return ret; 898 return ret;
@@ -904,7 +904,7 @@ static inline int pwc_get_wb_speed(struct pwc_device *pdev, int *value)
904static inline int pwc_set_wb_delay(struct pwc_device *pdev, int delay) 904static inline int pwc_set_wb_delay(struct pwc_device *pdev, int delay)
905{ 905{
906 unsigned char buf; 906 unsigned char buf;
907 907
908 /* useful range is 0x01..0x3F */ 908 /* useful range is 0x01..0x3F */
909 buf = (delay >> 10); 909 buf = (delay >> 10);
910 return SendControlMsg(SET_CHROM_CTL, AWB_CONTROL_DELAY_FORMATTER, 1); 910 return SendControlMsg(SET_CHROM_CTL, AWB_CONTROL_DELAY_FORMATTER, 1);
@@ -914,7 +914,7 @@ static inline int pwc_get_wb_delay(struct pwc_device *pdev, int *value)
914{ 914{
915 unsigned char buf; 915 unsigned char buf;
916 int ret; 916 int ret;
917 917
918 ret = RecvControlMsg(GET_CHROM_CTL, AWB_CONTROL_DELAY_FORMATTER, 1); 918 ret = RecvControlMsg(GET_CHROM_CTL, AWB_CONTROL_DELAY_FORMATTER, 1);
919 if (ret < 0) 919 if (ret < 0)
920 return ret; 920 return ret;
@@ -950,7 +950,7 @@ static int pwc_get_leds(struct pwc_device *pdev, int *on_value, int *off_value)
950{ 950{
951 unsigned char buf[2]; 951 unsigned char buf[2];
952 int ret; 952 int ret;
953 953
954 if (pdev->type < 730) { 954 if (pdev->type < 730) {
955 *on_value = -1; 955 *on_value = -1;
956 *off_value = -1; 956 *off_value = -1;
@@ -969,7 +969,7 @@ static inline int pwc_set_contour(struct pwc_device *pdev, int contour)
969{ 969{
970 unsigned char buf; 970 unsigned char buf;
971 int ret; 971 int ret;
972 972
973 if (contour < 0) 973 if (contour < 0)
974 buf = 0xff; /* auto contour on */ 974 buf = 0xff; /* auto contour on */
975 else 975 else
@@ -977,16 +977,16 @@ static inline int pwc_set_contour(struct pwc_device *pdev, int contour)
977 ret = SendControlMsg(SET_LUM_CTL, AUTO_CONTOUR_FORMATTER, 1); 977 ret = SendControlMsg(SET_LUM_CTL, AUTO_CONTOUR_FORMATTER, 1);
978 if (ret < 0) 978 if (ret < 0)
979 return ret; 979 return ret;
980 980
981 if (contour < 0) 981 if (contour < 0)
982 return 0; 982 return 0;
983 if (contour > 0xffff) 983 if (contour > 0xffff)
984 contour = 0xffff; 984 contour = 0xffff;
985 985
986 buf = (contour >> 10); /* contour preset is [0..3f] */ 986 buf = (contour >> 10); /* contour preset is [0..3f] */
987 ret = SendControlMsg(SET_LUM_CTL, PRESET_CONTOUR_FORMATTER, 1); 987 ret = SendControlMsg(SET_LUM_CTL, PRESET_CONTOUR_FORMATTER, 1);
988 if (ret < 0) 988 if (ret < 0)
989 return ret; 989 return ret;
990 return 0; 990 return 0;
991} 991}
992 992
@@ -994,7 +994,7 @@ static inline int pwc_get_contour(struct pwc_device *pdev, int *contour)
994{ 994{
995 unsigned char buf; 995 unsigned char buf;
996 int ret; 996 int ret;
997 997
998 ret = RecvControlMsg(GET_LUM_CTL, AUTO_CONTOUR_FORMATTER, 1); 998 ret = RecvControlMsg(GET_LUM_CTL, AUTO_CONTOUR_FORMATTER, 1);
999 if (ret < 0) 999 if (ret < 0)
1000 return ret; 1000 return ret;
@@ -1002,7 +1002,7 @@ static inline int pwc_get_contour(struct pwc_device *pdev, int *contour)
1002 if (buf == 0) { 1002 if (buf == 0) {
1003 /* auto mode off, query current preset value */ 1003 /* auto mode off, query current preset value */
1004 ret = RecvControlMsg(GET_LUM_CTL, PRESET_CONTOUR_FORMATTER, 1); 1004 ret = RecvControlMsg(GET_LUM_CTL, PRESET_CONTOUR_FORMATTER, 1);
1005 if (ret < 0) 1005 if (ret < 0)
1006 return ret; 1006 return ret;
1007 *contour = buf << 10; 1007 *contour = buf << 10;
1008 } 1008 }
@@ -1015,7 +1015,7 @@ static inline int pwc_get_contour(struct pwc_device *pdev, int *contour)
1015static inline int pwc_set_backlight(struct pwc_device *pdev, int backlight) 1015static inline int pwc_set_backlight(struct pwc_device *pdev, int backlight)
1016{ 1016{
1017 unsigned char buf; 1017 unsigned char buf;
1018 1018
1019 if (backlight) 1019 if (backlight)
1020 buf = 0xff; 1020 buf = 0xff;
1021 else 1021 else
@@ -1027,7 +1027,7 @@ static inline int pwc_get_backlight(struct pwc_device *pdev, int *backlight)
1027{ 1027{
1028 int ret; 1028 int ret;
1029 unsigned char buf; 1029 unsigned char buf;
1030 1030
1031 ret = RecvControlMsg(GET_LUM_CTL, BACK_LIGHT_COMPENSATION_FORMATTER, 1); 1031 ret = RecvControlMsg(GET_LUM_CTL, BACK_LIGHT_COMPENSATION_FORMATTER, 1);
1032 if (ret < 0) 1032 if (ret < 0)
1033 return ret; 1033 return ret;
@@ -1039,7 +1039,7 @@ static inline int pwc_get_backlight(struct pwc_device *pdev, int *backlight)
1039static inline int pwc_set_flicker(struct pwc_device *pdev, int flicker) 1039static inline int pwc_set_flicker(struct pwc_device *pdev, int flicker)
1040{ 1040{
1041 unsigned char buf; 1041 unsigned char buf;
1042 1042
1043 if (flicker) 1043 if (flicker)
1044 buf = 0xff; 1044 buf = 0xff;
1045 else 1045 else
@@ -1051,7 +1051,7 @@ static inline int pwc_get_flicker(struct pwc_device *pdev, int *flicker)
1051{ 1051{
1052 int ret; 1052 int ret;
1053 unsigned char buf; 1053 unsigned char buf;
1054 1054
1055 ret = RecvControlMsg(GET_LUM_CTL, FLICKERLESS_MODE_FORMATTER, 1); 1055 ret = RecvControlMsg(GET_LUM_CTL, FLICKERLESS_MODE_FORMATTER, 1);
1056 if (ret < 0) 1056 if (ret < 0)
1057 return ret; 1057 return ret;
@@ -1076,7 +1076,7 @@ static inline int pwc_get_dynamic_noise(struct pwc_device *pdev, int *noise)
1076{ 1076{
1077 int ret; 1077 int ret;
1078 unsigned char buf; 1078 unsigned char buf;
1079 1079
1080 ret = RecvControlMsg(GET_LUM_CTL, DYNAMIC_NOISE_CONTROL_FORMATTER, 1); 1080 ret = RecvControlMsg(GET_LUM_CTL, DYNAMIC_NOISE_CONTROL_FORMATTER, 1);
1081 if (ret < 0) 1081 if (ret < 0)
1082 return ret; 1082 return ret;
@@ -1087,7 +1087,7 @@ static inline int pwc_get_dynamic_noise(struct pwc_device *pdev, int *noise)
1087static int pwc_mpt_reset(struct pwc_device *pdev, int flags) 1087static int pwc_mpt_reset(struct pwc_device *pdev, int flags)
1088{ 1088{
1089 unsigned char buf; 1089 unsigned char buf;
1090 1090
1091 buf = flags & 0x03; // only lower two bits are currently used 1091 buf = flags & 0x03; // only lower two bits are currently used
1092 return SendControlMsg(SET_MPT_CTL, PT_RESET_CONTROL_FORMATTER, 1); 1092 return SendControlMsg(SET_MPT_CTL, PT_RESET_CONTROL_FORMATTER, 1);
1093} 1093}
@@ -1095,7 +1095,7 @@ static int pwc_mpt_reset(struct pwc_device *pdev, int flags)
1095static inline int pwc_mpt_set_angle(struct pwc_device *pdev, int pan, int tilt) 1095static inline int pwc_mpt_set_angle(struct pwc_device *pdev, int pan, int tilt)
1096{ 1096{
1097 unsigned char buf[4]; 1097 unsigned char buf[4];
1098 1098
1099 /* set new relative angle; angles are expressed in degrees * 100, 1099 /* set new relative angle; angles are expressed in degrees * 100,
1100 but cam as .5 degree resolution, hence divide by 200. Also 1100 but cam as .5 degree resolution, hence divide by 200. Also
1101 the angle must be multiplied by 64 before it's send to 1101 the angle must be multiplied by 64 before it's send to
@@ -1114,7 +1114,7 @@ static inline int pwc_mpt_get_status(struct pwc_device *pdev, struct pwc_mpt_sta
1114{ 1114{
1115 int ret; 1115 int ret;
1116 unsigned char buf[5]; 1116 unsigned char buf[5];
1117 1117
1118 ret = RecvControlMsg(GET_MPT_CTL, PT_STATUS_FORMATTER, 5); 1118 ret = RecvControlMsg(GET_MPT_CTL, PT_STATUS_FORMATTER, 5);
1119 if (ret < 0) 1119 if (ret < 0)
1120 return ret; 1120 return ret;
@@ -1129,14 +1129,14 @@ int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor)
1129{ 1129{
1130 unsigned char buf; 1130 unsigned char buf;
1131 int ret = -1, request; 1131 int ret = -1, request;
1132 1132
1133 if (pdev->type < 675) 1133 if (pdev->type < 675)
1134 request = SENSOR_TYPE_FORMATTER1; 1134 request = SENSOR_TYPE_FORMATTER1;
1135 else if (pdev->type < 730) 1135 else if (pdev->type < 730)
1136 return -1; /* The Vesta series doesn't have this call */ 1136 return -1; /* The Vesta series doesn't have this call */
1137 else 1137 else
1138 request = SENSOR_TYPE_FORMATTER2; 1138 request = SENSOR_TYPE_FORMATTER2;
1139 1139
1140 ret = RecvControlMsg(GET_STATUS_CTL, request, 1); 1140 ret = RecvControlMsg(GET_STATUS_CTL, request, 1);
1141 if (ret < 0) 1141 if (ret < 0)
1142 return ret; 1142 return ret;
@@ -1163,23 +1163,23 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
1163 ret = -EINVAL; 1163 ret = -EINVAL;
1164 break; 1164 break;
1165 } 1165 }
1166 1166
1167 case VIDIOCPWCSUSER: 1167 case VIDIOCPWCSUSER:
1168 { 1168 {
1169 if (pwc_save_user(pdev)) 1169 if (pwc_save_user(pdev))
1170 ret = -EINVAL; 1170 ret = -EINVAL;
1171 break; 1171 break;
1172 } 1172 }
1173 1173
1174 case VIDIOCPWCFACTORY: 1174 case VIDIOCPWCFACTORY:
1175 { 1175 {
1176 if (pwc_restore_factory(pdev)) 1176 if (pwc_restore_factory(pdev))
1177 ret = -EINVAL; 1177 ret = -EINVAL;
1178 break; 1178 break;
1179 } 1179 }
1180 1180
1181 case VIDIOCPWCSCQUAL: 1181 case VIDIOCPWCSCQUAL:
1182 { 1182 {
1183 int *qual = arg; 1183 int *qual = arg;
1184 1184
1185 if (*qual < 0 || *qual > 3) 1185 if (*qual < 0 || *qual > 3)
@@ -1190,14 +1190,14 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
1190 pdev->vcompression = *qual; 1190 pdev->vcompression = *qual;
1191 break; 1191 break;
1192 } 1192 }
1193 1193
1194 case VIDIOCPWCGCQUAL: 1194 case VIDIOCPWCGCQUAL:
1195 { 1195 {
1196 int *qual = arg; 1196 int *qual = arg;
1197 *qual = pdev->vcompression; 1197 *qual = pdev->vcompression;
1198 break; 1198 break;
1199 } 1199 }
1200 1200
1201 case VIDIOCPWCPROBE: 1201 case VIDIOCPWCPROBE:
1202 { 1202 {
1203 struct pwc_probe *probe = arg; 1203 struct pwc_probe *probe = arg;
@@ -1220,27 +1220,27 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
1220 ret = -EINVAL; 1220 ret = -EINVAL;
1221 break; 1221 break;
1222 } 1222 }
1223 1223
1224 case VIDIOCPWCGAGC: 1224 case VIDIOCPWCGAGC:
1225 { 1225 {
1226 int *agc = arg; 1226 int *agc = arg;
1227 1227
1228 if (pwc_get_agc(pdev, agc)) 1228 if (pwc_get_agc(pdev, agc))
1229 ret = -EINVAL; 1229 ret = -EINVAL;
1230 break; 1230 break;
1231 } 1231 }
1232 1232
1233 case VIDIOCPWCSSHUTTER: 1233 case VIDIOCPWCSSHUTTER:
1234 { 1234 {
1235 int *shutter_speed = arg; 1235 int *shutter_speed = arg;
1236 ret = pwc_set_shutter_speed(pdev, *shutter_speed < 0 ? 1 : 0, *shutter_speed); 1236 ret = pwc_set_shutter_speed(pdev, *shutter_speed < 0 ? 1 : 0, *shutter_speed);
1237 break; 1237 break;
1238 } 1238 }
1239 1239
1240 case VIDIOCPWCSAWB: 1240 case VIDIOCPWCSAWB:
1241 { 1241 {
1242 struct pwc_whitebalance *wb = arg; 1242 struct pwc_whitebalance *wb = arg;
1243 1243
1244 ret = pwc_set_awb(pdev, wb->mode); 1244 ret = pwc_set_awb(pdev, wb->mode);
1245 if (ret >= 0 && wb->mode == PWC_WB_MANUAL) { 1245 if (ret >= 0 && wb->mode == PWC_WB_MANUAL) {
1246 pwc_set_red_gain(pdev, wb->manual_red); 1246 pwc_set_red_gain(pdev, wb->manual_red);
@@ -1270,18 +1270,18 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
1270 ret = pwc_read_red_gain(pdev, &wb->read_red); 1270 ret = pwc_read_red_gain(pdev, &wb->read_red);
1271 if (ret < 0) 1271 if (ret < 0)
1272 break; 1272 break;
1273 ret = pwc_read_blue_gain(pdev, &wb->read_blue); 1273 ret = pwc_read_blue_gain(pdev, &wb->read_blue);
1274 if (ret < 0) 1274 if (ret < 0)
1275 break; 1275 break;
1276 } 1276 }
1277 } 1277 }
1278 break; 1278 break;
1279 } 1279 }
1280 1280
1281 case VIDIOCPWCSAWBSPEED: 1281 case VIDIOCPWCSAWBSPEED:
1282 { 1282 {
1283 struct pwc_wb_speed *wbs = arg; 1283 struct pwc_wb_speed *wbs = arg;
1284 1284
1285 if (wbs->control_speed > 0) { 1285 if (wbs->control_speed > 0) {
1286 ret = pwc_set_wb_speed(pdev, wbs->control_speed); 1286 ret = pwc_set_wb_speed(pdev, wbs->control_speed);
1287 } 1287 }
@@ -1290,11 +1290,11 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
1290 } 1290 }
1291 break; 1291 break;
1292 } 1292 }
1293 1293
1294 case VIDIOCPWCGAWBSPEED: 1294 case VIDIOCPWCGAWBSPEED:
1295 { 1295 {
1296 struct pwc_wb_speed *wbs = arg; 1296 struct pwc_wb_speed *wbs = arg;
1297 1297
1298 ret = pwc_get_wb_speed(pdev, &wbs->control_speed); 1298 ret = pwc_get_wb_speed(pdev, &wbs->control_speed);
1299 if (ret < 0) 1299 if (ret < 0)
1300 break; 1300 break;
@@ -1304,7 +1304,7 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
1304 break; 1304 break;
1305 } 1305 }
1306 1306
1307 case VIDIOCPWCSLED: 1307 case VIDIOCPWCSLED:
1308 { 1308 {
1309 struct pwc_leds *leds = arg; 1309 struct pwc_leds *leds = arg;
1310 ret = pwc_set_leds(pdev, leds->led_on, leds->led_off); 1310 ret = pwc_set_leds(pdev, leds->led_on, leds->led_off);
@@ -1325,14 +1325,14 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
1325 ret = pwc_set_contour(pdev, *contour); 1325 ret = pwc_set_contour(pdev, *contour);
1326 break; 1326 break;
1327 } 1327 }
1328 1328
1329 case VIDIOCPWCGCONTOUR: 1329 case VIDIOCPWCGCONTOUR:
1330 { 1330 {
1331 int *contour = arg; 1331 int *contour = arg;
1332 ret = pwc_get_contour(pdev, contour); 1332 ret = pwc_get_contour(pdev, contour);
1333 break; 1333 break;
1334 } 1334 }
1335 1335
1336 case VIDIOCPWCSBACKLIGHT: 1336 case VIDIOCPWCSBACKLIGHT:
1337 { 1337 {
1338 int *backlight = arg; 1338 int *backlight = arg;
@@ -1346,7 +1346,7 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
1346 ret = pwc_get_backlight(pdev, backlight); 1346 ret = pwc_get_backlight(pdev, backlight);
1347 break; 1347 break;
1348 } 1348 }
1349 1349
1350 case VIDIOCPWCSFLICKER: 1350 case VIDIOCPWCSFLICKER:
1351 { 1351 {
1352 int *flicker = arg; 1352 int *flicker = arg;
@@ -1360,14 +1360,14 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
1360 ret = pwc_get_flicker(pdev, flicker); 1360 ret = pwc_get_flicker(pdev, flicker);
1361 break; 1361 break;
1362 } 1362 }
1363 1363
1364 case VIDIOCPWCSDYNNOISE: 1364 case VIDIOCPWCSDYNNOISE:
1365 { 1365 {
1366 int *dynnoise = arg; 1366 int *dynnoise = arg;
1367 ret = pwc_set_dynamic_noise(pdev, *dynnoise); 1367 ret = pwc_set_dynamic_noise(pdev, *dynnoise);
1368 break; 1368 break;
1369 } 1369 }
1370 1370
1371 case VIDIOCPWCGDYNNOISE: 1371 case VIDIOCPWCGDYNNOISE:
1372 { 1372 {
1373 int *dynnoise = arg; 1373 int *dynnoise = arg;
@@ -1381,61 +1381,61 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
1381 size->width = pdev->image.x; 1381 size->width = pdev->image.x;
1382 size->height = pdev->image.y; 1382 size->height = pdev->image.y;
1383 break; 1383 break;
1384 } 1384 }
1385 1385
1386 case VIDIOCPWCMPTRESET: 1386 case VIDIOCPWCMPTRESET:
1387 { 1387 {
1388 if (pdev->features & FEATURE_MOTOR_PANTILT) 1388 if (pdev->features & FEATURE_MOTOR_PANTILT)
1389 { 1389 {
1390 int *flags = arg; 1390 int *flags = arg;
1391 1391
1392 ret = pwc_mpt_reset(pdev, *flags); 1392 ret = pwc_mpt_reset(pdev, *flags);
1393 if (ret >= 0) 1393 if (ret >= 0)
1394 { 1394 {
1395 pdev->pan_angle = 0; 1395 pdev->pan_angle = 0;
1396 pdev->tilt_angle = 0; 1396 pdev->tilt_angle = 0;
1397 } 1397 }
1398 } 1398 }
1399 else 1399 else
1400 { 1400 {
1401 ret = -ENXIO; 1401 ret = -ENXIO;
1402 } 1402 }
1403 break; 1403 break;
1404 } 1404 }
1405 1405
1406 case VIDIOCPWCMPTGRANGE: 1406 case VIDIOCPWCMPTGRANGE:
1407 { 1407 {
1408 if (pdev->features & FEATURE_MOTOR_PANTILT) 1408 if (pdev->features & FEATURE_MOTOR_PANTILT)
1409 { 1409 {
1410 struct pwc_mpt_range *range = arg; 1410 struct pwc_mpt_range *range = arg;
1411 *range = pdev->angle_range; 1411 *range = pdev->angle_range;
1412 } 1412 }
1413 else 1413 else
1414 { 1414 {
1415 ret = -ENXIO; 1415 ret = -ENXIO;
1416 } 1416 }
1417 break; 1417 break;
1418 } 1418 }
1419 1419
1420 case VIDIOCPWCMPTSANGLE: 1420 case VIDIOCPWCMPTSANGLE:
1421 { 1421 {
1422 int new_pan, new_tilt; 1422 int new_pan, new_tilt;
1423 1423
1424 if (pdev->features & FEATURE_MOTOR_PANTILT) 1424 if (pdev->features & FEATURE_MOTOR_PANTILT)
1425 { 1425 {
1426 struct pwc_mpt_angles *angles = arg; 1426 struct pwc_mpt_angles *angles = arg;
1427 /* The camera can only set relative angles, so 1427 /* The camera can only set relative angles, so
1428 do some calculations when getting an absolute angle . 1428 do some calculations when getting an absolute angle .
1429 */ 1429 */
1430 if (angles->absolute) 1430 if (angles->absolute)
1431 { 1431 {
1432 new_pan = angles->pan; 1432 new_pan = angles->pan;
1433 new_tilt = angles->tilt; 1433 new_tilt = angles->tilt;
1434 } 1434 }
1435 else 1435 else
1436 { 1436 {
1437 new_pan = pdev->pan_angle + angles->pan; 1437 new_pan = pdev->pan_angle + angles->pan;
1438 new_tilt = pdev->tilt_angle + angles->tilt; 1438 new_tilt = pdev->tilt_angle + angles->tilt;
1439 } 1439 }
1440 /* check absolute ranges */ 1440 /* check absolute ranges */
1441 if (new_pan < pdev->angle_range.pan_min || 1441 if (new_pan < pdev->angle_range.pan_min ||
@@ -1463,53 +1463,53 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
1463 pdev->tilt_angle += new_tilt; 1463 pdev->tilt_angle += new_tilt;
1464 } 1464 }
1465 if (ret == -EPIPE) /* stall -> out of range */ 1465 if (ret == -EPIPE) /* stall -> out of range */
1466 ret = -ERANGE; 1466 ret = -ERANGE;
1467 } 1467 }
1468 } 1468 }
1469 else 1469 else
1470 { 1470 {
1471 ret = -ENXIO; 1471 ret = -ENXIO;
1472 } 1472 }
1473 break; 1473 break;
1474 } 1474 }
1475 1475
1476 case VIDIOCPWCMPTGANGLE: 1476 case VIDIOCPWCMPTGANGLE:
1477 { 1477 {
1478 1478
1479 if (pdev->features & FEATURE_MOTOR_PANTILT) 1479 if (pdev->features & FEATURE_MOTOR_PANTILT)
1480 { 1480 {
1481 struct pwc_mpt_angles *angles = arg; 1481 struct pwc_mpt_angles *angles = arg;
1482 1482
1483 angles->absolute = 1; 1483 angles->absolute = 1;
1484 angles->pan = pdev->pan_angle; 1484 angles->pan = pdev->pan_angle;
1485 angles->tilt = pdev->tilt_angle; 1485 angles->tilt = pdev->tilt_angle;
1486 } 1486 }
1487 else 1487 else
1488 { 1488 {
1489 ret = -ENXIO; 1489 ret = -ENXIO;
1490 } 1490 }
1491 break; 1491 break;
1492 } 1492 }
1493 1493
1494 case VIDIOCPWCMPTSTATUS: 1494 case VIDIOCPWCMPTSTATUS:
1495 { 1495 {
1496 if (pdev->features & FEATURE_MOTOR_PANTILT) 1496 if (pdev->features & FEATURE_MOTOR_PANTILT)
1497 { 1497 {
1498 struct pwc_mpt_status *status = arg; 1498 struct pwc_mpt_status *status = arg;
1499 ret = pwc_mpt_get_status(pdev, status); 1499 ret = pwc_mpt_get_status(pdev, status);
1500 } 1500 }
1501 else 1501 else
1502 { 1502 {
1503 ret = -ENXIO; 1503 ret = -ENXIO;
1504 } 1504 }
1505 break; 1505 break;
1506 } 1506 }
1507 1507
1508 case VIDIOCPWCGVIDCMD: 1508 case VIDIOCPWCGVIDCMD:
1509 { 1509 {
1510 struct pwc_video_command *cmd = arg; 1510 struct pwc_video_command *cmd = arg;
1511 1511
1512 cmd->type = pdev->type; 1512 cmd->type = pdev->type;
1513 cmd->release = pdev->release; 1513 cmd->release = pdev->release;
1514 cmd->command_len = pdev->cmd_len; 1514 cmd->command_len = pdev->cmd_len;
1515 memcpy(&cmd->command_buf, pdev->cmd_buf, pdev->cmd_len); 1515 memcpy(&cmd->command_buf, pdev->cmd_buf, pdev->cmd_len);
@@ -1531,7 +1531,7 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
1531 ret = -ENOIOCTLCMD; 1531 ret = -ENOIOCTLCMD;
1532 break; 1532 break;
1533 } 1533 }
1534 1534
1535 if (ret > 0) 1535 if (ret > 0)
1536 return 0; 1536 return 0;
1537 return ret; 1537 return ret;
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 90eb26042817..41418294a32b 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -25,18 +25,18 @@
25 25
26*/ 26*/
27 27
28/* 28/*
29 This code forms the interface between the USB layers and the Philips 29 This code forms the interface between the USB layers and the Philips
30 specific stuff. Some adanved stuff of the driver falls under an 30 specific stuff. Some adanved stuff of the driver falls under an
31 NDA, signed between me and Philips B.V., Eindhoven, the Netherlands, and 31 NDA, signed between me and Philips B.V., Eindhoven, the Netherlands, and
32 is thus not distributed in source form. The binary pwcx.o module 32 is thus not distributed in source form. The binary pwcx.o module
33 contains the code that falls under the NDA. 33 contains the code that falls under the NDA.
34 34
35 In case you're wondering: 'pwc' stands for "Philips WebCam", but 35 In case you're wondering: 'pwc' stands for "Philips WebCam", but
36 I really didn't want to type 'philips_web_cam' every time (I'm lazy as 36 I really didn't want to type 'philips_web_cam' every time (I'm lazy as
37 any Linux kernel hacker, but I don't like uncomprehensible abbreviations 37 any Linux kernel hacker, but I don't like uncomprehensible abbreviations
38 without explanation). 38 without explanation).
39 39
40 Oh yes, convention: to disctinguish between all the various pointers to 40 Oh yes, convention: to disctinguish between all the various pointers to
41 device-structures, I use these names for the pointer variables: 41 device-structures, I use these names for the pointer variables:
42 udev: struct usb_device * 42 udev: struct usb_device *
@@ -170,14 +170,14 @@ static struct video_device pwc_template = {
170 170
171/* Okay, this is some magic that I worked out and the reasoning behind it... 171/* Okay, this is some magic that I worked out and the reasoning behind it...
172 172
173 The biggest problem with any USB device is of course: "what to do 173 The biggest problem with any USB device is of course: "what to do
174 when the user unplugs the device while it is in use by an application?" 174 when the user unplugs the device while it is in use by an application?"
175 We have several options: 175 We have several options:
176 1) Curse them with the 7 plagues when they do (requires divine intervention) 176 1) Curse them with the 7 plagues when they do (requires divine intervention)
177 2) Tell them not to (won't work: they'll do it anyway) 177 2) Tell them not to (won't work: they'll do it anyway)
178 3) Oops the kernel (this will have a negative effect on a user's uptime) 178 3) Oops the kernel (this will have a negative effect on a user's uptime)
179 4) Do something sensible. 179 4) Do something sensible.
180 180
181 Of course, we go for option 4. 181 Of course, we go for option 4.
182 182
183 It happens that this device will be linked to two times, once from 183 It happens that this device will be linked to two times, once from
@@ -185,15 +185,15 @@ static struct video_device pwc_template = {
185 pointers. This is done when the device is probed() and all initialization 185 pointers. This is done when the device is probed() and all initialization
186 succeeded. The pwc_device struct links back to both structures. 186 succeeded. The pwc_device struct links back to both structures.
187 187
188 When a device is unplugged while in use it will be removed from the 188 When a device is unplugged while in use it will be removed from the
189 list of known USB devices; I also de-register it as a V4L device, but 189 list of known USB devices; I also de-register it as a V4L device, but
190 unfortunately I can't free the memory since the struct is still in use 190 unfortunately I can't free the memory since the struct is still in use
191 by the file descriptor. This free-ing is then deferend until the first 191 by the file descriptor. This free-ing is then deferend until the first
192 opportunity. Crude, but it works. 192 opportunity. Crude, but it works.
193 193
194 A small 'advantage' is that if a user unplugs the cam and plugs it back 194 A small 'advantage' is that if a user unplugs the cam and plugs it back
195 in, it should get assigned the same video device minor, but unfortunately 195 in, it should get assigned the same video device minor, but unfortunately
196 it's non-trivial to re-link the cam back to the video device... (that 196 it's non-trivial to re-link the cam back to the video device... (that
197 would surely be magic! :)) 197 would surely be magic! :))
198*/ 198*/
199 199
@@ -203,14 +203,14 @@ static struct video_device pwc_template = {
203/* Here we want the physical address of the memory. 203/* Here we want the physical address of the memory.
204 * This is used when initializing the contents of the area. 204 * This is used when initializing the contents of the area.
205 */ 205 */
206static inline unsigned long kvirt_to_pa(unsigned long adr) 206static inline unsigned long kvirt_to_pa(unsigned long adr)
207{ 207{
208 unsigned long kva, ret; 208 unsigned long kva, ret;
209 209
210 kva = (unsigned long) page_address(vmalloc_to_page((void *)adr)); 210 kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
211 kva |= adr & (PAGE_SIZE-1); /* restore the offset */ 211 kva |= adr & (PAGE_SIZE-1); /* restore the offset */
212 ret = __pa(kva); 212 ret = __pa(kva);
213 return ret; 213 return ret;
214} 214}
215 215
216static void * rvmalloc(unsigned long size) 216static void * rvmalloc(unsigned long size)
@@ -219,13 +219,13 @@ static void * rvmalloc(unsigned long size)
219 unsigned long adr; 219 unsigned long adr;
220 220
221 size=PAGE_ALIGN(size); 221 size=PAGE_ALIGN(size);
222 mem=vmalloc_32(size); 222 mem=vmalloc_32(size);
223 if (mem) 223 if (mem)
224 { 224 {
225 memset(mem, 0, size); /* Clear the ram out, no junk to the user */ 225 memset(mem, 0, size); /* Clear the ram out, no junk to the user */
226 adr=(unsigned long) mem; 226 adr=(unsigned long) mem;
227 while (size > 0) 227 while (size > 0)
228 { 228 {
229 SetPageReserved(vmalloc_to_page((void *)adr)); 229 SetPageReserved(vmalloc_to_page((void *)adr));
230 adr+=PAGE_SIZE; 230 adr+=PAGE_SIZE;
231 size-=PAGE_SIZE; 231 size-=PAGE_SIZE;
@@ -236,13 +236,13 @@ static void * rvmalloc(unsigned long size)
236 236
237static void rvfree(void * mem, unsigned long size) 237static void rvfree(void * mem, unsigned long size)
238{ 238{
239 unsigned long adr; 239 unsigned long adr;
240 240
241 if (mem) 241 if (mem)
242 { 242 {
243 adr=(unsigned long) mem; 243 adr=(unsigned long) mem;
244 while ((long) size > 0) 244 while ((long) size > 0)
245 { 245 {
246 ClearPageReserved(vmalloc_to_page((void *)adr)); 246 ClearPageReserved(vmalloc_to_page((void *)adr));
247 adr+=PAGE_SIZE; 247 adr+=PAGE_SIZE;
248 size-=PAGE_SIZE; 248 size-=PAGE_SIZE;
@@ -263,13 +263,13 @@ static int pwc_allocate_buffers(struct pwc_device *pdev)
263 263
264 if (pdev == NULL) 264 if (pdev == NULL)
265 return -ENXIO; 265 return -ENXIO;
266 266
267#ifdef PWC_MAGIC 267#ifdef PWC_MAGIC
268 if (pdev->magic != PWC_MAGIC) { 268 if (pdev->magic != PWC_MAGIC) {
269 Err("allocate_buffers(): magic failed.\n"); 269 Err("allocate_buffers(): magic failed.\n");
270 return -ENXIO; 270 return -ENXIO;
271 } 271 }
272#endif 272#endif
273 /* Allocate Isochronous pipe buffers */ 273 /* Allocate Isochronous pipe buffers */
274 for (i = 0; i < MAX_ISO_BUFS; i++) { 274 for (i = 0; i < MAX_ISO_BUFS; i++) {
275 if (pdev->sbuf[i].data == NULL) { 275 if (pdev->sbuf[i].data == NULL) {
@@ -308,7 +308,7 @@ static int pwc_allocate_buffers(struct pwc_device *pdev)
308 memset(kbuf, 128, PWC_FRAME_SIZE); 308 memset(kbuf, 128, PWC_FRAME_SIZE);
309 } 309 }
310 } 310 }
311 311
312 /* Allocate decompressor table space */ 312 /* Allocate decompressor table space */
313 kbuf = NULL; 313 kbuf = NULL;
314 switch (pdev->type) 314 switch (pdev->type)
@@ -320,7 +320,7 @@ static int pwc_allocate_buffers(struct pwc_device *pdev)
320 case 730: 320 case 730:
321 case 740: 321 case 740:
322 case 750: 322 case 750:
323#if 0 323#if 0
324 Trace(TRACE_MEMORY,"private_data(%zu)\n",sizeof(struct pwc_dec23_private)); 324 Trace(TRACE_MEMORY,"private_data(%zu)\n",sizeof(struct pwc_dec23_private));
325 kbuf = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL); /* Timon & Kiara */ 325 kbuf = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL); /* Timon & Kiara */
326 break; 326 break;
@@ -329,11 +329,11 @@ static int pwc_allocate_buffers(struct pwc_device *pdev)
329 /* TODO & FIXME */ 329 /* TODO & FIXME */
330 kbuf = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL); 330 kbuf = kmalloc(sizeof(struct pwc_dec23_private), GFP_KERNEL);
331 break; 331 break;
332#endif 332#endif
333 ; 333 ;
334 } 334 }
335 pdev->decompress_data = kbuf; 335 pdev->decompress_data = kbuf;
336 336
337 /* Allocate image buffer; double buffer for mmap() */ 337 /* Allocate image buffer; double buffer for mmap() */
338 kbuf = rvmalloc(default_mbufs * pdev->len_per_image); 338 kbuf = rvmalloc(default_mbufs * pdev->len_per_image);
339 if (kbuf == NULL) { 339 if (kbuf == NULL) {
@@ -348,7 +348,7 @@ static int pwc_allocate_buffers(struct pwc_device *pdev)
348 pdev->image_ptr[i] = NULL; 348 pdev->image_ptr[i] = NULL;
349 349
350 kbuf = NULL; 350 kbuf = NULL;
351 351
352 Trace(TRACE_MEMORY, "<< pwc_allocate_buffers()\n"); 352 Trace(TRACE_MEMORY, "<< pwc_allocate_buffers()\n");
353 return 0; 353 return 0;
354} 354}
@@ -366,7 +366,7 @@ static void pwc_free_buffers(struct pwc_device *pdev)
366 Err("free_buffers(): magic failed.\n"); 366 Err("free_buffers(): magic failed.\n");
367 return; 367 return;
368 } 368 }
369#endif 369#endif
370 370
371 /* Release Iso-pipe buffers */ 371 /* Release Iso-pipe buffers */
372 for (i = 0; i < MAX_ISO_BUFS; i++) 372 for (i = 0; i < MAX_ISO_BUFS; i++)
@@ -403,17 +403,17 @@ static void pwc_free_buffers(struct pwc_device *pdev)
403 rvfree(pdev->image_data, default_mbufs * pdev->len_per_image); 403 rvfree(pdev->image_data, default_mbufs * pdev->len_per_image);
404 } 404 }
405 pdev->image_data = NULL; 405 pdev->image_data = NULL;
406 406
407 Trace(TRACE_MEMORY, "Leaving free_buffers().\n"); 407 Trace(TRACE_MEMORY, "Leaving free_buffers().\n");
408} 408}
409 409
410/* The frame & image buffer mess. 410/* The frame & image buffer mess.
411 411
412 Yes, this is a mess. Well, it used to be simple, but alas... In this 412 Yes, this is a mess. Well, it used to be simple, but alas... In this
413 module, 3 buffers schemes are used to get the data from the USB bus to 413 module, 3 buffers schemes are used to get the data from the USB bus to
414 the user program. The first scheme involves the ISO buffers (called thus 414 the user program. The first scheme involves the ISO buffers (called thus
415 since they transport ISO data from the USB controller), and not really 415 since they transport ISO data from the USB controller), and not really
416 interesting. Suffices to say the data from this buffer is quickly 416 interesting. Suffices to say the data from this buffer is quickly
417 gathered in an interrupt handler (pwc_isoc_handler) and placed into the 417 gathered in an interrupt handler (pwc_isoc_handler) and placed into the
418 frame buffer. 418 frame buffer.
419 419
@@ -443,8 +443,8 @@ static void pwc_free_buffers(struct pwc_device *pdev)
443 and a 'full' frame list: 443 and a 'full' frame list:
444 * Initially, all frame buffers but one are on the 'empty' list; the one 444 * Initially, all frame buffers but one are on the 'empty' list; the one
445 remaining buffer is our initial fill frame. 445 remaining buffer is our initial fill frame.
446 * If a frame is needed for filling, we try to take it from the 'empty' 446 * If a frame is needed for filling, we try to take it from the 'empty'
447 list, unless that list is empty, in which case we take the buffer at 447 list, unless that list is empty, in which case we take the buffer at
448 the head of the 'full' list. 448 the head of the 'full' list.
449 * When our fill buffer has been filled, it is appended to the 'full' 449 * When our fill buffer has been filled, it is appended to the 'full'
450 list. 450 list.
@@ -646,7 +646,7 @@ static void pwc_isoc_handler(struct urb *urb, struct pt_regs *regs)
646 case -ETIMEDOUT: errmsg = "NAK (device does not respond)"; break; 646 case -ETIMEDOUT: errmsg = "NAK (device does not respond)"; break;
647 } 647 }
648 Trace(TRACE_FLOW, "pwc_isoc_handler() called with status %d [%s].\n", urb->status, errmsg); 648 Trace(TRACE_FLOW, "pwc_isoc_handler() called with status %d [%s].\n", urb->status, errmsg);
649 /* Give up after a number of contiguous errors on the USB bus. 649 /* Give up after a number of contiguous errors on the USB bus.
650 Appearantly something is wrong so we simulate an unplug event. 650 Appearantly something is wrong so we simulate an unplug event.
651 */ 651 */
652 if (++pdev->visoc_errors > MAX_ISOC_ERRORS) 652 if (++pdev->visoc_errors > MAX_ISOC_ERRORS)
@@ -673,8 +673,8 @@ static void pwc_isoc_handler(struct urb *urb, struct pt_regs *regs)
673 pdev->visoc_errors = 0; 673 pdev->visoc_errors = 0;
674 674
675 /* vsync: 0 = don't copy data 675 /* vsync: 0 = don't copy data
676 1 = sync-hunt 676 1 = sync-hunt
677 2 = synched 677 2 = synched
678 */ 678 */
679 /* Compact data */ 679 /* Compact data */
680 for (i = 0; i < urb->number_of_packets; i++) { 680 for (i = 0; i < urb->number_of_packets; i++) {
@@ -701,18 +701,18 @@ static void pwc_isoc_handler(struct urb *urb, struct pt_regs *regs)
701 } /* ..flen > 0 */ 701 } /* ..flen > 0 */
702 702
703 if (flen < pdev->vlast_packet_size) { 703 if (flen < pdev->vlast_packet_size) {
704 /* Shorter packet... We probably have the end of an image-frame; 704 /* Shorter packet... We probably have the end of an image-frame;
705 wake up read() process and let select()/poll() do something. 705 wake up read() process and let select()/poll() do something.
706 Decompression is done in user time over there. 706 Decompression is done in user time over there.
707 */ 707 */
708 if (pdev->vsync == 2) { 708 if (pdev->vsync == 2) {
709 /* The ToUCam Fun CMOS sensor causes the firmware to send 2 or 3 bogus 709 /* The ToUCam Fun CMOS sensor causes the firmware to send 2 or 3 bogus
710 frames on the USB wire after an exposure change. This conditition is 710 frames on the USB wire after an exposure change. This conditition is
711 however detected in the cam and a bit is set in the header. 711 however detected in the cam and a bit is set in the header.
712 */ 712 */
713 if (pdev->type == 730) { 713 if (pdev->type == 730) {
714 unsigned char *ptr = (unsigned char *)fbuf->data; 714 unsigned char *ptr = (unsigned char *)fbuf->data;
715 715
716 if (ptr[1] == 1 && ptr[0] & 0x10) { 716 if (ptr[1] == 1 && ptr[0] & 0x10) {
717#if PWC_DEBUG 717#if PWC_DEBUG
718 Debug("Hyundai CMOS sensor bug. Dropping frame %d.\n", fbuf->sequence); 718 Debug("Hyundai CMOS sensor bug. Dropping frame %d.\n", fbuf->sequence);
@@ -733,13 +733,13 @@ static void pwc_isoc_handler(struct urb *urb, struct pt_regs *regs)
733 Info("Image is normal.\n"); 733 Info("Image is normal.\n");
734 } 734 }
735 pdev->vmirror = ptr[0] & 0x03; 735 pdev->vmirror = ptr[0] & 0x03;
736 /* Sometimes the trailer of the 730 is still sent as a 4 byte packet 736 /* Sometimes the trailer of the 730 is still sent as a 4 byte packet
737 after a short frame; this condition is filtered out specifically. A 4 byte 737 after a short frame; this condition is filtered out specifically. A 4 byte
738 frame doesn't make sense anyway. 738 frame doesn't make sense anyway.
739 So we get either this sequence: 739 So we get either this sequence:
740 drop_bit set -> 4 byte frame -> short frame -> good frame 740 drop_bit set -> 4 byte frame -> short frame -> good frame
741 Or this one: 741 Or this one:
742 drop_bit set -> short frame -> good frame 742 drop_bit set -> short frame -> good frame
743 So we drop either 3 or 2 frames in all! 743 So we drop either 3 or 2 frames in all!
744 */ 744 */
745 if (fbuf->filled == 4) 745 if (fbuf->filled == 4)
@@ -830,7 +830,7 @@ static int pwc_isoc_init(struct pwc_device *pdev)
830 intf = usb_ifnum_to_if(udev, 0); 830 intf = usb_ifnum_to_if(udev, 0);
831 if (intf) 831 if (intf)
832 idesc = usb_altnum_to_altsetting(intf, pdev->valternate); 832 idesc = usb_altnum_to_altsetting(intf, pdev->valternate);
833 833
834 if (!idesc) 834 if (!idesc)
835 return -EFAULT; 835 return -EFAULT;
836 836
@@ -841,7 +841,7 @@ static int pwc_isoc_init(struct pwc_device *pdev)
841 pdev->vmax_packet_size = le16_to_cpu(idesc->endpoint[i].desc.wMaxPacketSize); 841 pdev->vmax_packet_size = le16_to_cpu(idesc->endpoint[i].desc.wMaxPacketSize);
842 break; 842 break;
843 } 843 }
844 844
845 if (pdev->vmax_packet_size < 0 || pdev->vmax_packet_size > ISO_MAX_FRAME_SIZE) { 845 if (pdev->vmax_packet_size < 0 || pdev->vmax_packet_size > ISO_MAX_FRAME_SIZE) {
846 Err("Failed to find packet size for video endpoint in current alternate setting.\n"); 846 Err("Failed to find packet size for video endpoint in current alternate setting.\n");
847 return -ENFILE; /* Odd error, that should be noticeable */ 847 return -ENFILE; /* Odd error, that should be noticeable */
@@ -875,18 +875,18 @@ static int pwc_isoc_init(struct pwc_device *pdev)
875 return ret; 875 return ret;
876 } 876 }
877 877
878 /* init URB structure */ 878 /* init URB structure */
879 for (i = 0; i < MAX_ISO_BUFS; i++) { 879 for (i = 0; i < MAX_ISO_BUFS; i++) {
880 urb = pdev->sbuf[i].urb; 880 urb = pdev->sbuf[i].urb;
881 881
882 urb->interval = 1; // devik 882 urb->interval = 1; // devik
883 urb->dev = udev; 883 urb->dev = udev;
884 urb->pipe = usb_rcvisocpipe(udev, pdev->vendpoint); 884 urb->pipe = usb_rcvisocpipe(udev, pdev->vendpoint);
885 urb->transfer_flags = URB_ISO_ASAP; 885 urb->transfer_flags = URB_ISO_ASAP;
886 urb->transfer_buffer = pdev->sbuf[i].data; 886 urb->transfer_buffer = pdev->sbuf[i].data;
887 urb->transfer_buffer_length = ISO_BUFFER_SIZE; 887 urb->transfer_buffer_length = ISO_BUFFER_SIZE;
888 urb->complete = pwc_isoc_handler; 888 urb->complete = pwc_isoc_handler;
889 urb->context = pdev; 889 urb->context = pdev;
890 urb->start_frame = 0; 890 urb->start_frame = 0;
891 urb->number_of_packets = ISO_FRAMES_PER_DESC; 891 urb->number_of_packets = ISO_FRAMES_PER_DESC;
892 for (j = 0; j < ISO_FRAMES_PER_DESC; j++) { 892 for (j = 0; j < ISO_FRAMES_PER_DESC; j++) {
@@ -935,7 +935,7 @@ static void pwc_isoc_cleanup(struct pwc_device *pdev)
935 } 935 }
936 936
937 /* Stop camera, but only if we are sure the camera is still there (unplug 937 /* Stop camera, but only if we are sure the camera is still there (unplug
938 is signalled by EPIPE) 938 is signalled by EPIPE)
939 */ 939 */
940 if (pdev->error_status && pdev->error_status != EPIPE) { 940 if (pdev->error_status && pdev->error_status != EPIPE) {
941 Trace(TRACE_OPEN, "Setting alternate interface 0.\n"); 941 Trace(TRACE_OPEN, "Setting alternate interface 0.\n");
@@ -956,12 +956,12 @@ int pwc_try_video_mode(struct pwc_device *pdev, int width, int height, int new_f
956 pwc_reset_buffers(pdev); 956 pwc_reset_buffers(pdev);
957 /* Try to set video mode... */ 957 /* Try to set video mode... */
958 start = ret = pwc_set_video_mode(pdev, width, height, new_fps, new_compression, new_snapshot); 958 start = ret = pwc_set_video_mode(pdev, width, height, new_fps, new_compression, new_snapshot);
959 if (ret) { 959 if (ret) {
960 Trace(TRACE_FLOW, "pwc_set_video_mode attempt 1 failed.\n"); 960 Trace(TRACE_FLOW, "pwc_set_video_mode attempt 1 failed.\n");
961 /* That failed... restore old mode (we know that worked) */ 961 /* That failed... restore old mode (we know that worked) */
962 start = pwc_set_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, pdev->vcompression, pdev->vsnapshot); 962 start = pwc_set_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, pdev->vcompression, pdev->vsnapshot);
963 if (start) { 963 if (start) {
964 Trace(TRACE_FLOW, "pwc_set_video_mode attempt 2 failed.\n"); 964 Trace(TRACE_FLOW, "pwc_set_video_mode attempt 2 failed.\n");
965 } 965 }
966 } 966 }
967 if (start == 0) 967 if (start == 0)
@@ -987,18 +987,18 @@ static int pwc_video_open(struct inode *inode, struct file *file)
987 struct pwc_device *pdev; 987 struct pwc_device *pdev;
988 988
989 Trace(TRACE_OPEN, ">> video_open called(vdev = 0x%p).\n", vdev); 989 Trace(TRACE_OPEN, ">> video_open called(vdev = 0x%p).\n", vdev);
990 990
991 pdev = (struct pwc_device *)vdev->priv; 991 pdev = (struct pwc_device *)vdev->priv;
992 if (pdev == NULL) 992 if (pdev == NULL)
993 BUG(); 993 BUG();
994 if (pdev->vopen) 994 if (pdev->vopen)
995 return -EBUSY; 995 return -EBUSY;
996 996
997 down(&pdev->modlock); 997 down(&pdev->modlock);
998 if (!pdev->usb_init) { 998 if (!pdev->usb_init) {
999 Trace(TRACE_OPEN, "Doing first time initialization.\n"); 999 Trace(TRACE_OPEN, "Doing first time initialization.\n");
1000 pdev->usb_init = 1; 1000 pdev->usb_init = 1;
1001 1001
1002 if (pwc_trace & TRACE_OPEN) 1002 if (pwc_trace & TRACE_OPEN)
1003 { 1003 {
1004 /* Query sensor type */ 1004 /* Query sensor type */
@@ -1036,7 +1036,7 @@ static int pwc_video_open(struct inode *inode, struct file *file)
1036 /* Set LED on/off time */ 1036 /* Set LED on/off time */
1037 if (pwc_set_leds(pdev, led_on, led_off) < 0) 1037 if (pwc_set_leds(pdev, led_on, led_off) < 0)
1038 Info("Failed to set LED on/off time.\n"); 1038 Info("Failed to set LED on/off time.\n");
1039 1039
1040 pwc_construct(pdev); /* set min/max sizes correct */ 1040 pwc_construct(pdev); /* set min/max sizes correct */
1041 1041
1042 /* So far, so good. Allocate memory. */ 1042 /* So far, so good. Allocate memory. */
@@ -1046,7 +1046,7 @@ static int pwc_video_open(struct inode *inode, struct file *file)
1046 up(&pdev->modlock); 1046 up(&pdev->modlock);
1047 return i; 1047 return i;
1048 } 1048 }
1049 1049
1050 /* Reset buffers & parameters */ 1050 /* Reset buffers & parameters */
1051 pwc_reset_buffers(pdev); 1051 pwc_reset_buffers(pdev);
1052 for (i = 0; i < default_mbufs; i++) 1052 for (i = 0; i < default_mbufs; i++)
@@ -1081,7 +1081,7 @@ static int pwc_video_open(struct inode *inode, struct file *file)
1081 up(&pdev->modlock); 1081 up(&pdev->modlock);
1082 return i; 1082 return i;
1083 } 1083 }
1084 1084
1085 i = pwc_isoc_init(pdev); 1085 i = pwc_isoc_init(pdev);
1086 if (i) { 1086 if (i) {
1087 Trace(TRACE_OPEN, "Failed to init ISOC stuff = %d.\n", i); 1087 Trace(TRACE_OPEN, "Failed to init ISOC stuff = %d.\n", i);
@@ -1155,13 +1155,13 @@ static int pwc_video_close(struct inode *inode, struct file *file)
1155/* 1155/*
1156 * FIXME: what about two parallel reads ???? 1156 * FIXME: what about two parallel reads ????
1157 * ANSWER: Not supported. You can't open the device more than once, 1157 * ANSWER: Not supported. You can't open the device more than once,
1158 despite what the V4L1 interface says. First, I don't see 1158 despite what the V4L1 interface says. First, I don't see
1159 the need, second there's no mechanism of alerting the 1159 the need, second there's no mechanism of alerting the
1160 2nd/3rd/... process of events like changing image size. 1160 2nd/3rd/... process of events like changing image size.
1161 And I don't see the point of blocking that for the 1161 And I don't see the point of blocking that for the
1162 2nd/3rd/... process. 1162 2nd/3rd/... process.
1163 In multi-threaded environments reading parallel from any 1163 In multi-threaded environments reading parallel from any
1164 device is tricky anyhow. 1164 device is tricky anyhow.
1165 */ 1165 */
1166 1166
1167static ssize_t pwc_video_read(struct file *file, char __user * buf, 1167static ssize_t pwc_video_read(struct file *file, char __user * buf,
@@ -1171,7 +1171,7 @@ static ssize_t pwc_video_read(struct file *file, char __user * buf,
1171 struct pwc_device *pdev; 1171 struct pwc_device *pdev;
1172 int noblock = file->f_flags & O_NONBLOCK; 1172 int noblock = file->f_flags & O_NONBLOCK;
1173 DECLARE_WAITQUEUE(wait, current); 1173 DECLARE_WAITQUEUE(wait, current);
1174 int bytes_to_read; 1174 int bytes_to_read;
1175 1175
1176 Trace(TRACE_READ, "video_read(0x%p, %p, %zu) called.\n", vdev, buf, count); 1176 Trace(TRACE_READ, "video_read(0x%p, %p, %zu) called.\n", vdev, buf, count);
1177 if (vdev == NULL) 1177 if (vdev == NULL)
@@ -1193,22 +1193,22 @@ static ssize_t pwc_video_read(struct file *file, char __user * buf,
1193 set_current_state(TASK_RUNNING); 1193 set_current_state(TASK_RUNNING);
1194 return -pdev->error_status ; 1194 return -pdev->error_status ;
1195 } 1195 }
1196 if (noblock) { 1196 if (noblock) {
1197 remove_wait_queue(&pdev->frameq, &wait); 1197 remove_wait_queue(&pdev->frameq, &wait);
1198 set_current_state(TASK_RUNNING); 1198 set_current_state(TASK_RUNNING);
1199 return -EWOULDBLOCK; 1199 return -EWOULDBLOCK;
1200 } 1200 }
1201 if (signal_pending(current)) { 1201 if (signal_pending(current)) {
1202 remove_wait_queue(&pdev->frameq, &wait); 1202 remove_wait_queue(&pdev->frameq, &wait);
1203 set_current_state(TASK_RUNNING); 1203 set_current_state(TASK_RUNNING);
1204 return -ERESTARTSYS; 1204 return -ERESTARTSYS;
1205 } 1205 }
1206 schedule(); 1206 schedule();
1207 set_current_state(TASK_INTERRUPTIBLE); 1207 set_current_state(TASK_INTERRUPTIBLE);
1208 } 1208 }
1209 remove_wait_queue(&pdev->frameq, &wait); 1209 remove_wait_queue(&pdev->frameq, &wait);
1210 set_current_state(TASK_RUNNING); 1210 set_current_state(TASK_RUNNING);
1211 1211
1212 /* Decompress and release frame */ 1212 /* Decompress and release frame */
1213 if (pwc_handle_frame(pdev)) 1213 if (pwc_handle_frame(pdev))
1214 return -EFAULT; 1214 return -EFAULT;
@@ -1218,7 +1218,7 @@ static ssize_t pwc_video_read(struct file *file, char __user * buf,
1218 if (pdev->vpalette == VIDEO_PALETTE_RAW) 1218 if (pdev->vpalette == VIDEO_PALETTE_RAW)
1219 bytes_to_read = pdev->frame_size; 1219 bytes_to_read = pdev->frame_size;
1220 else 1220 else
1221 bytes_to_read = pdev->view.size; 1221 bytes_to_read = pdev->view.size;
1222 1222
1223 /* copy bytes to user space; we allow for partial reads */ 1223 /* copy bytes to user space; we allow for partial reads */
1224 if (count + pdev->image_read_pos > bytes_to_read) 1224 if (count + pdev->image_read_pos > bytes_to_read)
@@ -1348,11 +1348,11 @@ static int pwc_video_do_ioctl(struct inode *inode, struct file *file,
1348 struct video_picture *p = arg; 1348 struct video_picture *p = arg;
1349 /* 1349 /*
1350 * FIXME: Suppose we are mid read 1350 * FIXME: Suppose we are mid read
1351 ANSWER: No problem: the firmware of the camera 1351 ANSWER: No problem: the firmware of the camera
1352 can handle brightness/contrast/etc 1352 can handle brightness/contrast/etc
1353 changes at _any_ time, and the palette 1353 changes at _any_ time, and the palette
1354 is used exactly once in the uncompress 1354 is used exactly once in the uncompress
1355 routine. 1355 routine.
1356 */ 1356 */
1357 pwc_set_brightness(pdev, p->brightness); 1357 pwc_set_brightness(pdev, p->brightness);
1358 pwc_set_contrast(pdev, p->contrast); 1358 pwc_set_contrast(pdev, p->contrast);
@@ -1373,21 +1373,21 @@ static int pwc_video_do_ioctl(struct inode *inode, struct file *file,
1373 break; 1373 break;
1374 } 1374 }
1375 1375
1376 /* Window/size parameters */ 1376 /* Window/size parameters */
1377 case VIDIOCGWIN: 1377 case VIDIOCGWIN:
1378 { 1378 {
1379 struct video_window *vw = arg; 1379 struct video_window *vw = arg;
1380 1380
1381 vw->x = 0; 1381 vw->x = 0;
1382 vw->y = 0; 1382 vw->y = 0;
1383 vw->width = pdev->view.x; 1383 vw->width = pdev->view.x;
1384 vw->height = pdev->view.y; 1384 vw->height = pdev->view.y;
1385 vw->chromakey = 0; 1385 vw->chromakey = 0;
1386 vw->flags = (pdev->vframes << PWC_FPS_SHIFT) | 1386 vw->flags = (pdev->vframes << PWC_FPS_SHIFT) |
1387 (pdev->vsnapshot ? PWC_FPS_SNAPSHOT : 0); 1387 (pdev->vsnapshot ? PWC_FPS_SNAPSHOT : 0);
1388 break; 1388 break;
1389 } 1389 }
1390 1390
1391 case VIDIOCSWIN: 1391 case VIDIOCSWIN:
1392 { 1392 {
1393 struct video_window *vw = arg; 1393 struct video_window *vw = arg;
@@ -1402,9 +1402,9 @@ static int pwc_video_do_ioctl(struct inode *inode, struct file *file,
1402 ret = pwc_try_video_mode(pdev, vw->width, vw->height, fps, pdev->vcompression, snapshot); 1402 ret = pwc_try_video_mode(pdev, vw->width, vw->height, fps, pdev->vcompression, snapshot);
1403 if (ret) 1403 if (ret)
1404 return ret; 1404 return ret;
1405 break; 1405 break;
1406 } 1406 }
1407 1407
1408 /* We don't have overlay support (yet) */ 1408 /* We don't have overlay support (yet) */
1409 case VIDIOCGFBUF: 1409 case VIDIOCGFBUF:
1410 { 1410 {
@@ -1471,8 +1471,8 @@ static int pwc_video_do_ioctl(struct inode *inode, struct file *file,
1471 return -EBUSY; /* buffer wasn't available. Bummer */ 1471 return -EBUSY; /* buffer wasn't available. Bummer */
1472 pdev->image_used[vm->frame] = 1; 1472 pdev->image_used[vm->frame] = 1;
1473 1473
1474 /* Okay, we're done here. In the SYNC call we wait until a 1474 /* Okay, we're done here. In the SYNC call we wait until a
1475 frame comes available, then expand image into the given 1475 frame comes available, then expand image into the given
1476 buffer. 1476 buffer.
1477 In contrast to the CPiA cam the Philips cams deliver a 1477 In contrast to the CPiA cam the Philips cams deliver a
1478 constant stream, almost like a grabber card. Also, 1478 constant stream, almost like a grabber card. Also,
@@ -1487,16 +1487,16 @@ static int pwc_video_do_ioctl(struct inode *inode, struct file *file,
1487 { 1487 {
1488 /* The doc says: "Whenever a buffer is used it should 1488 /* The doc says: "Whenever a buffer is used it should
1489 call VIDIOCSYNC to free this frame up and continue." 1489 call VIDIOCSYNC to free this frame up and continue."
1490 1490
1491 The only odd thing about this whole procedure is 1491 The only odd thing about this whole procedure is
1492 that MCAPTURE flags the buffer as "in use", and 1492 that MCAPTURE flags the buffer as "in use", and
1493 SYNC immediately unmarks it, while it isn't 1493 SYNC immediately unmarks it, while it isn't
1494 after SYNC that you know that the buffer actually 1494 after SYNC that you know that the buffer actually
1495 got filled! So you better not start a CAPTURE in 1495 got filled! So you better not start a CAPTURE in
1496 the same frame immediately (use double buffering). 1496 the same frame immediately (use double buffering).
1497 This is not a problem for this cam, since it has 1497 This is not a problem for this cam, since it has
1498 extra intermediate buffers, but a hardware 1498 extra intermediate buffers, but a hardware
1499 grabber card will then overwrite the buffer 1499 grabber card will then overwrite the buffer
1500 you're working on. 1500 you're working on.
1501 */ 1501 */
1502 int *mbuf = arg; 1502 int *mbuf = arg;
@@ -1512,10 +1512,10 @@ static int pwc_video_do_ioctl(struct inode *inode, struct file *file,
1512 return -EINVAL; 1512 return -EINVAL;
1513 1513
1514 /* Add ourselves to the frame wait-queue. 1514 /* Add ourselves to the frame wait-queue.
1515 1515
1516 FIXME: needs auditing for safety. 1516 FIXME: needs auditing for safety.
1517 QUESTION: In what respect? I think that using the 1517 QUESTION: In what respect? I think that using the
1518 frameq is safe now. 1518 frameq is safe now.
1519 */ 1519 */
1520 add_wait_queue(&pdev->frameq, &wait); 1520 add_wait_queue(&pdev->frameq, &wait);
1521 while (pdev->full_frames == NULL) { 1521 while (pdev->full_frames == NULL) {
@@ -1524,21 +1524,21 @@ static int pwc_video_do_ioctl(struct inode *inode, struct file *file,
1524 set_current_state(TASK_RUNNING); 1524 set_current_state(TASK_RUNNING);
1525 return -pdev->error_status; 1525 return -pdev->error_status;
1526 } 1526 }
1527 1527
1528 if (signal_pending(current)) { 1528 if (signal_pending(current)) {
1529 remove_wait_queue(&pdev->frameq, &wait); 1529 remove_wait_queue(&pdev->frameq, &wait);
1530 set_current_state(TASK_RUNNING); 1530 set_current_state(TASK_RUNNING);
1531 return -ERESTARTSYS; 1531 return -ERESTARTSYS;
1532 } 1532 }
1533 schedule(); 1533 schedule();
1534 set_current_state(TASK_INTERRUPTIBLE); 1534 set_current_state(TASK_INTERRUPTIBLE);
1535 } 1535 }
1536 remove_wait_queue(&pdev->frameq, &wait); 1536 remove_wait_queue(&pdev->frameq, &wait);
1537 set_current_state(TASK_RUNNING); 1537 set_current_state(TASK_RUNNING);
1538 1538
1539 /* The frame is ready. Expand in the image buffer 1539 /* The frame is ready. Expand in the image buffer
1540 requested by the user. I don't care if you 1540 requested by the user. I don't care if you
1541 mmap() 5 buffers and request data in this order: 1541 mmap() 5 buffers and request data in this order:
1542 buffer 4 2 3 0 1 2 3 0 4 3 1 . . . 1542 buffer 4 2 3 0 1 2 3 0 4 3 1 . . .
1543 Grabber hardware may not be so forgiving. 1543 Grabber hardware may not be so forgiving.
1544 */ 1544 */
@@ -1551,11 +1551,11 @@ static int pwc_video_do_ioctl(struct inode *inode, struct file *file,
1551 return -EFAULT; 1551 return -EFAULT;
1552 break; 1552 break;
1553 } 1553 }
1554 1554
1555 case VIDIOCGAUDIO: 1555 case VIDIOCGAUDIO:
1556 { 1556 {
1557 struct video_audio *v = arg; 1557 struct video_audio *v = arg;
1558 1558
1559 strcpy(v->name, "Microphone"); 1559 strcpy(v->name, "Microphone");
1560 v->audio = -1; /* unknown audio minor */ 1560 v->audio = -1; /* unknown audio minor */
1561 v->flags = 0; 1561 v->flags = 0;
@@ -1565,19 +1565,19 @@ static int pwc_video_do_ioctl(struct inode *inode, struct file *file,
1565 v->treble = 0; 1565 v->treble = 0;
1566 v->balance = 0x8000; 1566 v->balance = 0x8000;
1567 v->step = 1; 1567 v->step = 1;
1568 break; 1568 break;
1569 } 1569 }
1570 1570
1571 case VIDIOCSAUDIO: 1571 case VIDIOCSAUDIO:
1572 { 1572 {
1573 /* Dummy: nothing can be set */ 1573 /* Dummy: nothing can be set */
1574 break; 1574 break;
1575 } 1575 }
1576 1576
1577 case VIDIOCGUNIT: 1577 case VIDIOCGUNIT:
1578 { 1578 {
1579 struct video_unit *vu = arg; 1579 struct video_unit *vu = arg;
1580 1580
1581 vu->video = pdev->vdev->minor & 0x3F; 1581 vu->video = pdev->vdev->minor & 0x3F;
1582 vu->audio = -1; /* not known yet */ 1582 vu->audio = -1; /* not known yet */
1583 vu->vbi = -1; 1583 vu->vbi = -1;
@@ -1589,7 +1589,7 @@ static int pwc_video_do_ioctl(struct inode *inode, struct file *file,
1589 return pwc_ioctl(pdev, cmd, arg); 1589 return pwc_ioctl(pdev, cmd, arg);
1590 } /* ..switch */ 1590 } /* ..switch */
1591 return 0; 1591 return 0;
1592} 1592}
1593 1593
1594static int pwc_video_ioctl(struct inode *inode, struct file *file, 1594static int pwc_video_ioctl(struct inode *inode, struct file *file,
1595 unsigned int cmd, unsigned long arg) 1595 unsigned int cmd, unsigned long arg)
@@ -1605,10 +1605,10 @@ static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma)
1605 unsigned long start = vma->vm_start; 1605 unsigned long start = vma->vm_start;
1606 unsigned long size = vma->vm_end-vma->vm_start; 1606 unsigned long size = vma->vm_end-vma->vm_start;
1607 unsigned long page, pos; 1607 unsigned long page, pos;
1608 1608
1609 Trace(TRACE_MEMORY, "mmap(0x%p, 0x%lx, %lu) called.\n", vdev, start, size); 1609 Trace(TRACE_MEMORY, "mmap(0x%p, 0x%lx, %lu) called.\n", vdev, start, size);
1610 pdev = vdev->priv; 1610 pdev = vdev->priv;
1611 1611
1612 vma->vm_flags |= VM_IO; 1612 vma->vm_flags |= VM_IO;
1613 1613
1614 pos = (unsigned long)pdev->image_data; 1614 pos = (unsigned long)pdev->image_data;
@@ -1646,7 +1646,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
1646 char serial_number[30], *name; 1646 char serial_number[30], *name;
1647 1647
1648 /* Check if we can handle this device */ 1648 /* Check if we can handle this device */
1649 Trace(TRACE_PROBE, "probe() called [%04X %04X], if %d\n", 1649 Trace(TRACE_PROBE, "probe() called [%04X %04X], if %d\n",
1650 le16_to_cpu(udev->descriptor.idVendor), 1650 le16_to_cpu(udev->descriptor.idVendor),
1651 le16_to_cpu(udev->descriptor.idProduct), 1651 le16_to_cpu(udev->descriptor.idProduct),
1652 intf->altsetting->desc.bInterfaceNumber); 1652 intf->altsetting->desc.bInterfaceNumber);
@@ -1770,11 +1770,11 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
1770 name = "Logitech QuickCam (res.)"; 1770 name = "Logitech QuickCam (res.)";
1771 type_id = 730; /* Assuming CMOS */ 1771 type_id = 730; /* Assuming CMOS */
1772 break; 1772 break;
1773 default: 1773 default:
1774 return -ENODEV; 1774 return -ENODEV;
1775 break; 1775 break;
1776 } 1776 }
1777 } 1777 }
1778 else if (vendor_id == 0x055d) { 1778 else if (vendor_id == 0x055d) {
1779 /* I don't know the difference between the C10 and the C30; 1779 /* I don't know the difference between the C10 and the C30;
1780 I suppose the difference is the sensor, but both cameras 1780 I suppose the difference is the sensor, but both cameras
@@ -1837,7 +1837,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
1837 return -ENODEV; 1837 return -ENODEV;
1838 break; 1838 break;
1839 } 1839 }
1840 1840
1841 } 1841 }
1842 else if (vendor_id == 0x0d81) { 1842 else if (vendor_id == 0x0d81) {
1843 switch(product_id) { 1843 switch(product_id) {
@@ -1856,7 +1856,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
1856 break; 1856 break;
1857 } 1857 }
1858 } 1858 }
1859 else 1859 else
1860 return -ENODEV; /* Not any of the know types; but the list keeps growing. */ 1860 return -ENODEV; /* Not any of the know types; but the list keeps growing. */
1861 1861
1862 memset(serial_number, 0, 30); 1862 memset(serial_number, 0, 30);
@@ -1880,9 +1880,9 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
1880 if (vendor_id == 0x046D && product_id == 0x08B5) 1880 if (vendor_id == 0x046D && product_id == 0x08B5)
1881 { 1881 {
1882 /* Logitech QuickCam Orbit 1882 /* Logitech QuickCam Orbit
1883 The ranges have been determined experimentally; they may differ from cam to cam. 1883 The ranges have been determined experimentally; they may differ from cam to cam.
1884 Also, the exact ranges left-right and up-down are different for my cam 1884 Also, the exact ranges left-right and up-down are different for my cam
1885 */ 1885 */
1886 pdev->angle_range.pan_min = -7000; 1886 pdev->angle_range.pan_min = -7000;
1887 pdev->angle_range.pan_max = 7000; 1887 pdev->angle_range.pan_max = 7000;
1888 pdev->angle_range.tilt_min = -3000; 1888 pdev->angle_range.tilt_min = -3000;
@@ -1939,7 +1939,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
1939 } 1939 }
1940 1940
1941 /* occupy slot */ 1941 /* occupy slot */
1942 if (hint < MAX_DEV_HINTS) 1942 if (hint < MAX_DEV_HINTS)
1943 device_hint[hint].pdev = pdev; 1943 device_hint[hint].pdev = pdev;
1944 1944
1945 Trace(TRACE_PROBE, "probe() function returning struct at 0x%p.\n", pdev); 1945 Trace(TRACE_PROBE, "probe() function returning struct at 0x%p.\n", pdev);
@@ -1968,13 +1968,13 @@ static void usb_pwc_disconnect(struct usb_interface *intf)
1968 Err("pwc_disconnect() Woops: pointer mismatch udev/pdev.\n"); 1968 Err("pwc_disconnect() Woops: pointer mismatch udev/pdev.\n");
1969 goto disconnect_out; 1969 goto disconnect_out;
1970 } 1970 }
1971#ifdef PWC_MAGIC 1971#ifdef PWC_MAGIC
1972 if (pdev->magic != PWC_MAGIC) { 1972 if (pdev->magic != PWC_MAGIC) {
1973 Err("pwc_disconnect() Magic number failed. Consult your scrolls and try again.\n"); 1973 Err("pwc_disconnect() Magic number failed. Consult your scrolls and try again.\n");
1974 goto disconnect_out; 1974 goto disconnect_out;
1975 } 1975 }
1976#endif 1976#endif
1977 1977
1978 /* We got unplugged; this is signalled by an EPIPE error code */ 1978 /* We got unplugged; this is signalled by an EPIPE error code */
1979 if (pdev->vopen) { 1979 if (pdev->vopen) {
1980 Info("Disconnected while webcam is in use!\n"); 1980 Info("Disconnected while webcam is in use!\n");
@@ -2017,8 +2017,8 @@ static int pwc_atoi(const char *s)
2017} 2017}
2018 2018
2019 2019
2020/* 2020/*
2021 * Initialization code & module stuff 2021 * Initialization code & module stuff
2022 */ 2022 */
2023 2023
2024static char size[10]; 2024static char size[10];
@@ -2168,7 +2168,7 @@ static int __init usb_pwc_init(void)
2168 if (*dot != '\0') { 2168 if (*dot != '\0') {
2169 /* There's a serial number as well */ 2169 /* There's a serial number as well */
2170 int k; 2170 int k;
2171 2171
2172 dot++; 2172 dot++;
2173 k = 0; 2173 k = 0;
2174 while (*dot != ':' && k < 29) { 2174 while (*dot != ':' && k < 29) {
@@ -2178,18 +2178,18 @@ static int __init usb_pwc_init(void)
2178 device_hint[i].serial_number[k] = '\0'; 2178 device_hint[i].serial_number[k] = '\0';
2179 } 2179 }
2180 } 2180 }
2181#if PWC_DEBUG 2181#if PWC_DEBUG
2182 Debug("device_hint[%d]:\n", i); 2182 Debug("device_hint[%d]:\n", i);
2183 Debug(" type : %d\n", device_hint[i].type); 2183 Debug(" type : %d\n", device_hint[i].type);
2184 Debug(" serial# : %s\n", device_hint[i].serial_number); 2184 Debug(" serial# : %s\n", device_hint[i].serial_number);
2185 Debug(" node : %d\n", device_hint[i].device_node); 2185 Debug(" node : %d\n", device_hint[i].device_node);
2186#endif 2186#endif
2187 } 2187 }
2188 else 2188 else
2189 device_hint[i].type = 0; /* not filled */ 2189 device_hint[i].type = 0; /* not filled */
2190 } /* ..for MAX_DEV_HINTS */ 2190 } /* ..for MAX_DEV_HINTS */
2191 2191
2192 Trace(TRACE_PROBE, "Registering driver at address 0x%p.\n", &pwc_driver); 2192 Trace(TRACE_PROBE, "Registering driver at address 0x%p.\n", &pwc_driver);
2193 return usb_register(&pwc_driver); 2193 return usb_register(&pwc_driver);
2194} 2194}
2195 2195
diff --git a/drivers/media/video/pwc/pwc-ioctl.h b/drivers/media/video/pwc/pwc-ioctl.h
index 5f9cb08bc02e..784bc72521fa 100644
--- a/drivers/media/video/pwc/pwc-ioctl.h
+++ b/drivers/media/video/pwc/pwc-ioctl.h
@@ -33,10 +33,10 @@
33/* 33/*
34 Changes 34 Changes
35 2001/08/03 Alvarado Added ioctl constants to access methods for 35 2001/08/03 Alvarado Added ioctl constants to access methods for
36 changing white balance and red/blue gains 36 changing white balance and red/blue gains
37 2002/12/15 G. H. Fernandez-Toribio VIDIOCGREALSIZE 37 2002/12/15 G. H. Fernandez-Toribio VIDIOCGREALSIZE
38 2003/12/13 Nemosft Unv. Some modifications to make interfacing to 38 2003/12/13 Nemosft Unv. Some modifications to make interfacing to
39 PWCX easier 39 PWCX easier
40 */ 40 */
41 41
42/* These are private ioctl() commands, specific for the Philips webcams. 42/* These are private ioctl() commands, specific for the Philips webcams.
@@ -45,10 +45,10 @@
45 45
46 The #define names are built up like follows: 46 The #define names are built up like follows:
47 VIDIOC VIDeo IOCtl prefix 47 VIDIOC VIDeo IOCtl prefix
48 PWC Philps WebCam 48 PWC Philps WebCam
49 G optional: Get 49 G optional: Get
50 S optional: Set 50 S optional: Set
51 ... the function 51 ... the function
52 */ 52 */
53 53
54 54
@@ -94,7 +94,7 @@ struct pwc_serial
94{ 94{
95 char serial[30]; /* String with serial number. Contains terminating 0 */ 95 char serial[30]; /* String with serial number. Contains terminating 0 */
96}; 96};
97 97
98/* pwc_whitebalance.mode values */ 98/* pwc_whitebalance.mode values */
99#define PWC_WB_INDOOR 0 99#define PWC_WB_INDOOR 0
100#define PWC_WB_OUTDOOR 1 100#define PWC_WB_OUTDOOR 1
@@ -102,14 +102,14 @@ struct pwc_serial
102#define PWC_WB_MANUAL 3 102#define PWC_WB_MANUAL 3
103#define PWC_WB_AUTO 4 103#define PWC_WB_AUTO 4
104 104
105/* Used with VIDIOCPWC[SG]AWB (Auto White Balance). 105/* Used with VIDIOCPWC[SG]AWB (Auto White Balance).
106 Set mode to one of the PWC_WB_* values above. 106 Set mode to one of the PWC_WB_* values above.
107 *red and *blue are the respective gains of these colour components inside 107 *red and *blue are the respective gains of these colour components inside
108 the camera; range 0..65535 108 the camera; range 0..65535
109 When 'mode' == PWC_WB_MANUAL, 'manual_red' and 'manual_blue' are set or read; 109 When 'mode' == PWC_WB_MANUAL, 'manual_red' and 'manual_blue' are set or read;
110 otherwise undefined. 110 otherwise undefined.
111 'read_red' and 'read_blue' are read-only. 111 'read_red' and 'read_blue' are read-only.
112*/ 112*/
113struct pwc_whitebalance 113struct pwc_whitebalance
114{ 114{
115 int mode; 115 int mode;
@@ -117,9 +117,9 @@ struct pwc_whitebalance
117 int read_red, read_blue; /* R/O */ 117 int read_red, read_blue; /* R/O */
118}; 118};
119 119
120/* 120/*
121 'control_speed' and 'control_delay' are used in automatic whitebalance mode, 121 'control_speed' and 'control_delay' are used in automatic whitebalance mode,
122 and tell the camera how fast it should react to changes in lighting, and 122 and tell the camera how fast it should react to changes in lighting, and
123 with how much delay. Valid values are 0..65535. 123 with how much delay. Valid values are 0..65535.
124*/ 124*/
125struct pwc_wb_speed 125struct pwc_wb_speed
@@ -148,11 +148,11 @@ struct pwc_imagesize
148#define PWC_MPT_TILT 0x02 148#define PWC_MPT_TILT 0x02
149#define PWC_MPT_TIMEOUT 0x04 /* for status */ 149#define PWC_MPT_TIMEOUT 0x04 /* for status */
150 150
151/* Set angles; when absolute != 0, the angle is absolute and the 151/* Set angles; when absolute != 0, the angle is absolute and the
152 driver calculates the relative offset for you. This can only 152 driver calculates the relative offset for you. This can only
153 be used with VIDIOCPWCSANGLE; VIDIOCPWCGANGLE always returns 153 be used with VIDIOCPWCSANGLE; VIDIOCPWCGANGLE always returns
154 absolute angles. 154 absolute angles.
155 */ 155 */
156struct pwc_mpt_angles 156struct pwc_mpt_angles
157{ 157{
158 int absolute; /* write-only */ 158 int absolute; /* write-only */
@@ -179,14 +179,14 @@ struct pwc_mpt_status
179/* This is used for out-of-kernel decompression. With it, you can get 179/* This is used for out-of-kernel decompression. With it, you can get
180 all the necessary information to initialize and use the decompressor 180 all the necessary information to initialize and use the decompressor
181 routines in standalone applications. 181 routines in standalone applications.
182 */ 182 */
183struct pwc_video_command 183struct pwc_video_command
184{ 184{
185 int type; /* camera type (645, 675, 730, etc.) */ 185 int type; /* camera type (645, 675, 730, etc.) */
186 int release; /* release number */ 186 int release; /* release number */
187 187
188 int size; /* one of PSZ_* */ 188 int size; /* one of PSZ_* */
189 int alternate; 189 int alternate;
190 int command_len; /* length of USB video command */ 190 int command_len; /* length of USB video command */
191 unsigned char command_buf[13]; /* Actual USB video command */ 191 unsigned char command_buf[13]; /* Actual USB video command */
192 int bandlength; /* >0 = compressed */ 192 int bandlength; /* >0 = compressed */
@@ -264,7 +264,7 @@ struct pwc_video_command
264 264
265 /* Flickerless mode; = 0 off, otherwise on */ 265 /* Flickerless mode; = 0 off, otherwise on */
266#define VIDIOCPWCSFLICKER _IOW('v', 208, int) 266#define VIDIOCPWCSFLICKER _IOW('v', 208, int)
267#define VIDIOCPWCGFLICKER _IOR('v', 208, int) 267#define VIDIOCPWCGFLICKER _IOR('v', 208, int)
268 268
269 /* Dynamic noise reduction; 0 off, 3 = high noise reduction */ 269 /* Dynamic noise reduction; 0 off, 3 = high noise reduction */
270#define VIDIOCPWCSDYNNOISE _IOW('v', 209, int) 270#define VIDIOCPWCSDYNNOISE _IOW('v', 209, int)
@@ -273,7 +273,7 @@ struct pwc_video_command
273 /* Real image size as used by the camera; tells you whether or not there's a gray border around the image */ 273 /* Real image size as used by the camera; tells you whether or not there's a gray border around the image */
274#define VIDIOCPWCGREALSIZE _IOR('v', 210, struct pwc_imagesize) 274#define VIDIOCPWCGREALSIZE _IOR('v', 210, struct pwc_imagesize)
275 275
276 /* Motorized pan & tilt functions */ 276 /* Motorized pan & tilt functions */
277#define VIDIOCPWCMPTRESET _IOW('v', 211, int) 277#define VIDIOCPWCMPTRESET _IOW('v', 211, int)
278#define VIDIOCPWCMPTGRANGE _IOR('v', 211, struct pwc_mpt_range) 278#define VIDIOCPWCMPTGRANGE _IOR('v', 211, struct pwc_mpt_range)
279#define VIDIOCPWCMPTSANGLE _IOW('v', 212, struct pwc_mpt_angles) 279#define VIDIOCPWCMPTSANGLE _IOW('v', 212, struct pwc_mpt_angles)
diff --git a/drivers/media/video/pwc/pwc-kiara.c b/drivers/media/video/pwc/pwc-kiara.c
index c498c68bace1..4c96037f7be5 100644
--- a/drivers/media/video/pwc/pwc-kiara.c
+++ b/drivers/media/video/pwc/pwc-kiara.c
@@ -48,270 +48,270 @@ const struct Kiara_table_entry Kiara_table[PSZ_MAX][6][4] =
48 { 48 {
49 /* 5 fps */ 49 /* 5 fps */
50 { 50 {
51 {0, }, 51 {0, },
52 {0, }, 52 {0, },
53 {0, }, 53 {0, },
54 {0, }, 54 {0, },
55 }, 55 },
56 /* 10 fps */ 56 /* 10 fps */
57 { 57 {
58 {0, }, 58 {0, },
59 {0, }, 59 {0, },
60 {0, }, 60 {0, },
61 {0, }, 61 {0, },
62 }, 62 },
63 /* 15 fps */ 63 /* 15 fps */
64 { 64 {
65 {0, }, 65 {0, },
66 {0, }, 66 {0, },
67 {0, }, 67 {0, },
68 {0, }, 68 {0, },
69 }, 69 },
70 /* 20 fps */ 70 /* 20 fps */
71 { 71 {
72 {0, }, 72 {0, },
73 {0, }, 73 {0, },
74 {0, }, 74 {0, },
75 {0, }, 75 {0, },
76 }, 76 },
77 /* 25 fps */ 77 /* 25 fps */
78 { 78 {
79 {0, }, 79 {0, },
80 {0, }, 80 {0, },
81 {0, }, 81 {0, },
82 {0, }, 82 {0, },
83 }, 83 },
84 /* 30 fps */ 84 /* 30 fps */
85 { 85 {
86 {0, }, 86 {0, },
87 {0, }, 87 {0, },
88 {0, }, 88 {0, },
89 {0, }, 89 {0, },
90 }, 90 },
91 }, 91 },
92 /* QSIF */ 92 /* QSIF */
93 { 93 {
94 /* 5 fps */ 94 /* 5 fps */
95 { 95 {
96 {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}}, 96 {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}},
97 {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}}, 97 {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}},
98 {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}}, 98 {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}},
99 {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}}, 99 {1, 146, 0, {0x1D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0x00, 0x80}},
100 }, 100 },
101 /* 10 fps */ 101 /* 10 fps */
102 { 102 {
103 {2, 291, 0, {0x1C, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x23, 0x01, 0x80}}, 103 {2, 291, 0, {0x1C, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x23, 0x01, 0x80}},
104 {1, 192, 630, {0x14, 0xF4, 0x30, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xC0, 0x00, 0x80}}, 104 {1, 192, 630, {0x14, 0xF4, 0x30, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xC0, 0x00, 0x80}},
105 {1, 192, 630, {0x14, 0xF4, 0x30, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xC0, 0x00, 0x80}}, 105 {1, 192, 630, {0x14, 0xF4, 0x30, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xC0, 0x00, 0x80}},
106 {1, 192, 630, {0x14, 0xF4, 0x30, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xC0, 0x00, 0x80}}, 106 {1, 192, 630, {0x14, 0xF4, 0x30, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xC0, 0x00, 0x80}},
107 }, 107 },
108 /* 15 fps */ 108 /* 15 fps */
109 { 109 {
110 {3, 437, 0, {0x1B, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xB5, 0x01, 0x80}}, 110 {3, 437, 0, {0x1B, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xB5, 0x01, 0x80}},
111 {2, 292, 640, {0x13, 0xF4, 0x30, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x20, 0x24, 0x01, 0x80}}, 111 {2, 292, 640, {0x13, 0xF4, 0x30, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x20, 0x24, 0x01, 0x80}},
112 {2, 292, 640, {0x13, 0xF4, 0x30, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x20, 0x24, 0x01, 0x80}}, 112 {2, 292, 640, {0x13, 0xF4, 0x30, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x20, 0x24, 0x01, 0x80}},
113 {1, 192, 420, {0x13, 0xF4, 0x30, 0x0D, 0x1B, 0x0C, 0x53, 0x1E, 0x18, 0xC0, 0x00, 0x80}}, 113 {1, 192, 420, {0x13, 0xF4, 0x30, 0x0D, 0x1B, 0x0C, 0x53, 0x1E, 0x18, 0xC0, 0x00, 0x80}},
114 }, 114 },
115 /* 20 fps */ 115 /* 20 fps */
116 { 116 {
117 {4, 589, 0, {0x1A, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x4D, 0x02, 0x80}}, 117 {4, 589, 0, {0x1A, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x4D, 0x02, 0x80}},
118 {3, 448, 730, {0x12, 0xF4, 0x30, 0x16, 0xC9, 0x16, 0x01, 0x0E, 0x18, 0xC0, 0x01, 0x80}}, 118 {3, 448, 730, {0x12, 0xF4, 0x30, 0x16, 0xC9, 0x16, 0x01, 0x0E, 0x18, 0xC0, 0x01, 0x80}},
119 {2, 292, 476, {0x12, 0xF4, 0x30, 0x0E, 0xD8, 0x0E, 0x10, 0x19, 0x18, 0x24, 0x01, 0x80}}, 119 {2, 292, 476, {0x12, 0xF4, 0x30, 0x0E, 0xD8, 0x0E, 0x10, 0x19, 0x18, 0x24, 0x01, 0x80}},
120 {1, 192, 312, {0x12, 0xF4, 0x50, 0x09, 0xB3, 0x08, 0xEB, 0x1E, 0x18, 0xC0, 0x00, 0x80}}, 120 {1, 192, 312, {0x12, 0xF4, 0x50, 0x09, 0xB3, 0x08, 0xEB, 0x1E, 0x18, 0xC0, 0x00, 0x80}},
121 }, 121 },
122 /* 25 fps */ 122 /* 25 fps */
123 { 123 {
124 {5, 703, 0, {0x19, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xBF, 0x02, 0x80}}, 124 {5, 703, 0, {0x19, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xBF, 0x02, 0x80}},
125 {3, 447, 610, {0x11, 0xF4, 0x30, 0x13, 0x0B, 0x12, 0x43, 0x14, 0x28, 0xBF, 0x01, 0x80}}, 125 {3, 447, 610, {0x11, 0xF4, 0x30, 0x13, 0x0B, 0x12, 0x43, 0x14, 0x28, 0xBF, 0x01, 0x80}},
126 {2, 292, 398, {0x11, 0xF4, 0x50, 0x0C, 0x6C, 0x0B, 0xA4, 0x1E, 0x28, 0x24, 0x01, 0x80}}, 126 {2, 292, 398, {0x11, 0xF4, 0x50, 0x0C, 0x6C, 0x0B, 0xA4, 0x1E, 0x28, 0x24, 0x01, 0x80}},
127 {1, 193, 262, {0x11, 0xF4, 0x50, 0x08, 0x23, 0x07, 0x5B, 0x1E, 0x28, 0xC1, 0x00, 0x80}}, 127 {1, 193, 262, {0x11, 0xF4, 0x50, 0x08, 0x23, 0x07, 0x5B, 0x1E, 0x28, 0xC1, 0x00, 0x80}},
128 }, 128 },
129 /* 30 fps */ 129 /* 30 fps */
130 { 130 {
131 {8, 874, 0, {0x18, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x6A, 0x03, 0x80}}, 131 {8, 874, 0, {0x18, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x6A, 0x03, 0x80}},
132 {5, 704, 730, {0x10, 0xF4, 0x30, 0x16, 0xC9, 0x16, 0x01, 0x0E, 0x28, 0xC0, 0x02, 0x80}}, 132 {5, 704, 730, {0x10, 0xF4, 0x30, 0x16, 0xC9, 0x16, 0x01, 0x0E, 0x28, 0xC0, 0x02, 0x80}},
133 {3, 448, 492, {0x10, 0xF4, 0x30, 0x0F, 0x5D, 0x0E, 0x95, 0x15, 0x28, 0xC0, 0x01, 0x80}}, 133 {3, 448, 492, {0x10, 0xF4, 0x30, 0x0F, 0x5D, 0x0E, 0x95, 0x15, 0x28, 0xC0, 0x01, 0x80}},
134 {2, 292, 320, {0x10, 0xF4, 0x50, 0x09, 0xFB, 0x09, 0x33, 0x1E, 0x28, 0x24, 0x01, 0x80}}, 134 {2, 292, 320, {0x10, 0xF4, 0x50, 0x09, 0xFB, 0x09, 0x33, 0x1E, 0x28, 0x24, 0x01, 0x80}},
135 }, 135 },
136 }, 136 },
137 /* QCIF */ 137 /* QCIF */
138 { 138 {
139 /* 5 fps */ 139 /* 5 fps */
140 { 140 {
141 {0, }, 141 {0, },
142 {0, }, 142 {0, },
143 {0, }, 143 {0, },
144 {0, }, 144 {0, },
145 }, 145 },
146 /* 10 fps */ 146 /* 10 fps */
147 { 147 {
148 {0, }, 148 {0, },
149 {0, }, 149 {0, },
150 {0, }, 150 {0, },
151 {0, }, 151 {0, },
152 }, 152 },
153 /* 15 fps */ 153 /* 15 fps */
154 { 154 {
155 {0, }, 155 {0, },
156 {0, }, 156 {0, },
157 {0, }, 157 {0, },
158 {0, }, 158 {0, },
159 }, 159 },
160 /* 20 fps */ 160 /* 20 fps */
161 { 161 {
162 {0, }, 162 {0, },
163 {0, }, 163 {0, },
164 {0, }, 164 {0, },
165 {0, }, 165 {0, },
166 }, 166 },
167 /* 25 fps */ 167 /* 25 fps */
168 { 168 {
169 {0, }, 169 {0, },
170 {0, }, 170 {0, },
171 {0, }, 171 {0, },
172 {0, }, 172 {0, },
173 }, 173 },
174 /* 30 fps */ 174 /* 30 fps */
175 { 175 {
176 {0, }, 176 {0, },
177 {0, }, 177 {0, },
178 {0, }, 178 {0, },
179 {0, }, 179 {0, },
180 }, 180 },
181 }, 181 },
182 /* SIF */ 182 /* SIF */
183 { 183 {
184 /* 5 fps */ 184 /* 5 fps */
185 { 185 {
186 {4, 582, 0, {0x0D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x46, 0x02, 0x80}}, 186 {4, 582, 0, {0x0D, 0xF4, 0x30, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x46, 0x02, 0x80}},
187 {3, 387, 1276, {0x05, 0xF4, 0x30, 0x27, 0xD8, 0x26, 0x48, 0x03, 0x10, 0x83, 0x01, 0x80}}, 187 {3, 387, 1276, {0x05, 0xF4, 0x30, 0x27, 0xD8, 0x26, 0x48, 0x03, 0x10, 0x83, 0x01, 0x80}},
188 {2, 291, 960, {0x05, 0xF4, 0x30, 0x1D, 0xF2, 0x1C, 0x62, 0x04, 0x10, 0x23, 0x01, 0x80}}, 188 {2, 291, 960, {0x05, 0xF4, 0x30, 0x1D, 0xF2, 0x1C, 0x62, 0x04, 0x10, 0x23, 0x01, 0x80}},
189 {1, 191, 630, {0x05, 0xF4, 0x50, 0x13, 0xA9, 0x12, 0x19, 0x05, 0x18, 0xBF, 0x00, 0x80}}, 189 {1, 191, 630, {0x05, 0xF4, 0x50, 0x13, 0xA9, 0x12, 0x19, 0x05, 0x18, 0xBF, 0x00, 0x80}},
190 }, 190 },
191 /* 10 fps */ 191 /* 10 fps */
192 { 192 {
193 {0, }, 193 {0, },
194 {6, 775, 1278, {0x04, 0xF4, 0x30, 0x27, 0xE8, 0x26, 0x58, 0x05, 0x30, 0x07, 0x03, 0x80}}, 194 {6, 775, 1278, {0x04, 0xF4, 0x30, 0x27, 0xE8, 0x26, 0x58, 0x05, 0x30, 0x07, 0x03, 0x80}},
195 {3, 447, 736, {0x04, 0xF4, 0x30, 0x16, 0xFB, 0x15, 0x6B, 0x05, 0x28, 0xBF, 0x01, 0x80}}, 195 {3, 447, 736, {0x04, 0xF4, 0x30, 0x16, 0xFB, 0x15, 0x6B, 0x05, 0x28, 0xBF, 0x01, 0x80}},
196 {2, 292, 480, {0x04, 0xF4, 0x70, 0x0E, 0xF9, 0x0D, 0x69, 0x09, 0x28, 0x24, 0x01, 0x80}}, 196 {2, 292, 480, {0x04, 0xF4, 0x70, 0x0E, 0xF9, 0x0D, 0x69, 0x09, 0x28, 0x24, 0x01, 0x80}},
197 }, 197 },
198 /* 15 fps */ 198 /* 15 fps */
199 { 199 {
200 {0, }, 200 {0, },
201 {9, 955, 1050, {0x03, 0xF4, 0x30, 0x20, 0xCF, 0x1F, 0x3F, 0x06, 0x48, 0xBB, 0x03, 0x80}}, 201 {9, 955, 1050, {0x03, 0xF4, 0x30, 0x20, 0xCF, 0x1F, 0x3F, 0x06, 0x48, 0xBB, 0x03, 0x80}},
202 {4, 592, 650, {0x03, 0xF4, 0x30, 0x14, 0x44, 0x12, 0xB4, 0x08, 0x30, 0x50, 0x02, 0x80}}, 202 {4, 592, 650, {0x03, 0xF4, 0x30, 0x14, 0x44, 0x12, 0xB4, 0x08, 0x30, 0x50, 0x02, 0x80}},
203 {3, 448, 492, {0x03, 0xF4, 0x50, 0x0F, 0x52, 0x0D, 0xC2, 0x09, 0x38, 0xC0, 0x01, 0x80}}, 203 {3, 448, 492, {0x03, 0xF4, 0x50, 0x0F, 0x52, 0x0D, 0xC2, 0x09, 0x38, 0xC0, 0x01, 0x80}},
204 }, 204 },
205 /* 20 fps */ 205 /* 20 fps */
206 { 206 {
207 {0, }, 207 {0, },
208 {9, 958, 782, {0x02, 0xF4, 0x30, 0x18, 0x6A, 0x16, 0xDA, 0x0B, 0x58, 0xBE, 0x03, 0x80}}, 208 {9, 958, 782, {0x02, 0xF4, 0x30, 0x18, 0x6A, 0x16, 0xDA, 0x0B, 0x58, 0xBE, 0x03, 0x80}},
209 {5, 703, 574, {0x02, 0xF4, 0x50, 0x11, 0xE7, 0x10, 0x57, 0x0B, 0x40, 0xBF, 0x02, 0x80}}, 209 {5, 703, 574, {0x02, 0xF4, 0x50, 0x11, 0xE7, 0x10, 0x57, 0x0B, 0x40, 0xBF, 0x02, 0x80}},
210 {3, 446, 364, {0x02, 0xF4, 0x90, 0x0B, 0x5C, 0x09, 0xCC, 0x0E, 0x38, 0xBE, 0x01, 0x80}}, 210 {3, 446, 364, {0x02, 0xF4, 0x90, 0x0B, 0x5C, 0x09, 0xCC, 0x0E, 0x38, 0xBE, 0x01, 0x80}},
211 }, 211 },
212 /* 25 fps */ 212 /* 25 fps */
213 { 213 {
214 {0, }, 214 {0, },
215 {9, 958, 654, {0x01, 0xF4, 0x30, 0x14, 0x66, 0x12, 0xD6, 0x0B, 0x50, 0xBE, 0x03, 0x80}}, 215 {9, 958, 654, {0x01, 0xF4, 0x30, 0x14, 0x66, 0x12, 0xD6, 0x0B, 0x50, 0xBE, 0x03, 0x80}},
216 {6, 776, 530, {0x01, 0xF4, 0x50, 0x10, 0x8C, 0x0E, 0xFC, 0x0C, 0x48, 0x08, 0x03, 0x80}}, 216 {6, 776, 530, {0x01, 0xF4, 0x50, 0x10, 0x8C, 0x0E, 0xFC, 0x0C, 0x48, 0x08, 0x03, 0x80}},
217 {4, 592, 404, {0x01, 0xF4, 0x70, 0x0C, 0x96, 0x0B, 0x06, 0x0B, 0x48, 0x50, 0x02, 0x80}}, 217 {4, 592, 404, {0x01, 0xF4, 0x70, 0x0C, 0x96, 0x0B, 0x06, 0x0B, 0x48, 0x50, 0x02, 0x80}},
218 }, 218 },
219 /* 30 fps */ 219 /* 30 fps */
220 { 220 {
221 {0, }, 221 {0, },
222 {9, 957, 526, {0x00, 0xF4, 0x50, 0x10, 0x68, 0x0E, 0xD8, 0x0D, 0x58, 0xBD, 0x03, 0x80}}, 222 {9, 957, 526, {0x00, 0xF4, 0x50, 0x10, 0x68, 0x0E, 0xD8, 0x0D, 0x58, 0xBD, 0x03, 0x80}},
223 {6, 775, 426, {0x00, 0xF4, 0x70, 0x0D, 0x48, 0x0B, 0xB8, 0x0F, 0x50, 0x07, 0x03, 0x80}}, 223 {6, 775, 426, {0x00, 0xF4, 0x70, 0x0D, 0x48, 0x0B, 0xB8, 0x0F, 0x50, 0x07, 0x03, 0x80}},
224 {4, 590, 324, {0x00, 0x7A, 0x88, 0x0A, 0x1C, 0x08, 0xB4, 0x0E, 0x50, 0x4E, 0x02, 0x80}}, 224 {4, 590, 324, {0x00, 0x7A, 0x88, 0x0A, 0x1C, 0x08, 0xB4, 0x0E, 0x50, 0x4E, 0x02, 0x80}},
225 }, 225 },
226 }, 226 },
227 /* CIF */ 227 /* CIF */
228 { 228 {
229 /* 5 fps */ 229 /* 5 fps */
230 { 230 {
231 {0, }, 231 {0, },
232 {0, }, 232 {0, },
233 {0, }, 233 {0, },
234 {0, }, 234 {0, },
235 }, 235 },
236 /* 10 fps */ 236 /* 10 fps */
237 { 237 {
238 {0, }, 238 {0, },
239 {0, }, 239 {0, },
240 {0, }, 240 {0, },
241 {0, }, 241 {0, },
242 }, 242 },
243 /* 15 fps */ 243 /* 15 fps */
244 { 244 {
245 {0, }, 245 {0, },
246 {0, }, 246 {0, },
247 {0, }, 247 {0, },
248 {0, }, 248 {0, },
249 }, 249 },
250 /* 20 fps */ 250 /* 20 fps */
251 { 251 {
252 {0, }, 252 {0, },
253 {0, }, 253 {0, },
254 {0, }, 254 {0, },
255 {0, }, 255 {0, },
256 }, 256 },
257 /* 25 fps */ 257 /* 25 fps */
258 { 258 {
259 {0, }, 259 {0, },
260 {0, }, 260 {0, },
261 {0, }, 261 {0, },
262 {0, }, 262 {0, },
263 }, 263 },
264 /* 30 fps */ 264 /* 30 fps */
265 { 265 {
266 {0, }, 266 {0, },
267 {0, }, 267 {0, },
268 {0, }, 268 {0, },
269 {0, }, 269 {0, },
270 }, 270 },
271 }, 271 },
272 /* VGA */ 272 /* VGA */
273 { 273 {
274 /* 5 fps */ 274 /* 5 fps */
275 { 275 {
276 {0, }, 276 {0, },
277 {6, 773, 1272, {0x25, 0xF4, 0x30, 0x27, 0xB6, 0x24, 0x96, 0x02, 0x30, 0x05, 0x03, 0x80}}, 277 {6, 773, 1272, {0x25, 0xF4, 0x30, 0x27, 0xB6, 0x24, 0x96, 0x02, 0x30, 0x05, 0x03, 0x80}},
278 {4, 592, 976, {0x25, 0xF4, 0x50, 0x1E, 0x78, 0x1B, 0x58, 0x03, 0x30, 0x50, 0x02, 0x80}}, 278 {4, 592, 976, {0x25, 0xF4, 0x50, 0x1E, 0x78, 0x1B, 0x58, 0x03, 0x30, 0x50, 0x02, 0x80}},
279 {3, 448, 738, {0x25, 0xF4, 0x90, 0x17, 0x0C, 0x13, 0xEC, 0x04, 0x30, 0xC0, 0x01, 0x80}}, 279 {3, 448, 738, {0x25, 0xF4, 0x90, 0x17, 0x0C, 0x13, 0xEC, 0x04, 0x30, 0xC0, 0x01, 0x80}},
280 }, 280 },
281 /* 10 fps */ 281 /* 10 fps */
282 { 282 {
283 {0, }, 283 {0, },
284 {9, 956, 788, {0x24, 0xF4, 0x70, 0x18, 0x9C, 0x15, 0x7C, 0x03, 0x48, 0xBC, 0x03, 0x80}}, 284 {9, 956, 788, {0x24, 0xF4, 0x70, 0x18, 0x9C, 0x15, 0x7C, 0x03, 0x48, 0xBC, 0x03, 0x80}},
285 {6, 776, 640, {0x24, 0xF4, 0xB0, 0x13, 0xFC, 0x11, 0x2C, 0x04, 0x48, 0x08, 0x03, 0x80}}, 285 {6, 776, 640, {0x24, 0xF4, 0xB0, 0x13, 0xFC, 0x11, 0x2C, 0x04, 0x48, 0x08, 0x03, 0x80}},
286 {4, 592, 488, {0x24, 0x7A, 0xE8, 0x0F, 0x3C, 0x0C, 0x6C, 0x06, 0x48, 0x50, 0x02, 0x80}}, 286 {4, 592, 488, {0x24, 0x7A, 0xE8, 0x0F, 0x3C, 0x0C, 0x6C, 0x06, 0x48, 0x50, 0x02, 0x80}},
287 }, 287 },
288 /* 15 fps */ 288 /* 15 fps */
289 { 289 {
290 {0, }, 290 {0, },
291 {9, 957, 526, {0x23, 0x7A, 0xE8, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x03, 0x80}}, 291 {9, 957, 526, {0x23, 0x7A, 0xE8, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x03, 0x80}},
292 {9, 957, 526, {0x23, 0x7A, 0xE8, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x03, 0x80}}, 292 {9, 957, 526, {0x23, 0x7A, 0xE8, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x03, 0x80}},
293 {8, 895, 492, {0x23, 0x7A, 0xE8, 0x0F, 0x5D, 0x0C, 0x8D, 0x06, 0x58, 0x7F, 0x03, 0x80}}, 293 {8, 895, 492, {0x23, 0x7A, 0xE8, 0x0F, 0x5D, 0x0C, 0x8D, 0x06, 0x58, 0x7F, 0x03, 0x80}},
294 }, 294 },
295 /* 20 fps */ 295 /* 20 fps */
296 { 296 {
297 {0, }, 297 {0, },
298 {0, }, 298 {0, },
299 {0, }, 299 {0, },
300 {0, }, 300 {0, },
301 }, 301 },
302 /* 25 fps */ 302 /* 25 fps */
303 { 303 {
304 {0, }, 304 {0, },
305 {0, }, 305 {0, },
306 {0, }, 306 {0, },
307 {0, }, 307 {0, },
308 }, 308 },
309 /* 30 fps */ 309 /* 30 fps */
310 { 310 {
311 {0, }, 311 {0, },
312 {0, }, 312 {0, },
313 {0, }, 313 {0, },
314 {0, }, 314 {0, },
315 }, 315 },
316 }, 316 },
317}; 317};
diff --git a/drivers/media/video/pwc/pwc-misc.c b/drivers/media/video/pwc/pwc-misc.c
index b7a4bd3524c7..58fe79747992 100644
--- a/drivers/media/video/pwc/pwc-misc.c
+++ b/drivers/media/video/pwc/pwc-misc.c
@@ -1,4 +1,4 @@
1/* Linux driver for Philips webcam 1/* Linux driver for Philips webcam
2 Various miscellaneous functions and tables. 2 Various miscellaneous functions and tables.
3 (C) 1999-2003 Nemosoft Unv. 3 (C) 1999-2003 Nemosoft Unv.
4 (C) 2004 Luc Saillard (luc@saillard.org) 4 (C) 2004 Luc Saillard (luc@saillard.org)
@@ -44,17 +44,17 @@ int pwc_decode_size(struct pwc_device *pdev, int width, int height)
44 int i, find; 44 int i, find;
45 45
46 /* Make sure we don't go beyond our max size. 46 /* Make sure we don't go beyond our max size.
47 NB: we have different limits for RAW and normal modes. In case 47 NB: we have different limits for RAW and normal modes. In case
48 you don't have the decompressor loaded or use RAW mode, 48 you don't have the decompressor loaded or use RAW mode,
49 the maximum viewable size is smaller. 49 the maximum viewable size is smaller.
50 */ 50 */
51 if (pdev->vpalette == VIDEO_PALETTE_RAW) 51 if (pdev->vpalette == VIDEO_PALETTE_RAW)
52 { 52 {
53 if (width > pdev->abs_max.x || height > pdev->abs_max.y) 53 if (width > pdev->abs_max.x || height > pdev->abs_max.y)
54 { 54 {
55 Debug("VIDEO_PALETTE_RAW: going beyond abs_max.\n"); 55 Debug("VIDEO_PALETTE_RAW: going beyond abs_max.\n");
56 return -1; 56 return -1;
57 } 57 }
58 } 58 }
59 else 59 else
60 { 60 {
@@ -88,8 +88,8 @@ void pwc_construct(struct pwc_device *pdev)
88 pdev->view_min.y = 96; 88 pdev->view_min.y = 96;
89 pdev->view_max.x = 352; 89 pdev->view_max.x = 352;
90 pdev->view_max.y = 288; 90 pdev->view_max.y = 288;
91 pdev->abs_max.x = 352; 91 pdev->abs_max.x = 352;
92 pdev->abs_max.y = 288; 92 pdev->abs_max.y = 288;
93 pdev->image_mask = 1 << PSZ_SQCIF | 1 << PSZ_QCIF | 1 << PSZ_CIF; 93 pdev->image_mask = 1 << PSZ_SQCIF | 1 << PSZ_QCIF | 1 << PSZ_CIF;
94 pdev->vcinterface = 2; 94 pdev->vcinterface = 2;
95 pdev->vendpoint = 4; 95 pdev->vendpoint = 4;
@@ -105,8 +105,8 @@ void pwc_construct(struct pwc_device *pdev)
105 pdev->view_max.x = 640; 105 pdev->view_max.x = 640;
106 pdev->view_max.y = 480; 106 pdev->view_max.y = 480;
107 pdev->image_mask = 1 << PSZ_SQCIF | 1 << PSZ_QSIF | 1 << PSZ_QCIF | 1 << PSZ_SIF | 1 << PSZ_CIF | 1 << PSZ_VGA; 107 pdev->image_mask = 1 << PSZ_SQCIF | 1 << PSZ_QSIF | 1 << PSZ_QCIF | 1 << PSZ_SIF | 1 << PSZ_CIF | 1 << PSZ_VGA;
108 pdev->abs_max.x = 640; 108 pdev->abs_max.x = 640;
109 pdev->abs_max.y = 480; 109 pdev->abs_max.y = 480;
110 pdev->vcinterface = 3; 110 pdev->vcinterface = 3;
111 pdev->vendpoint = 4; 111 pdev->vendpoint = 4;
112 pdev->frame_header_size = 0; 112 pdev->frame_header_size = 0;
@@ -121,8 +121,8 @@ void pwc_construct(struct pwc_device *pdev)
121 pdev->view_max.x = 640; 121 pdev->view_max.x = 640;
122 pdev->view_max.y = 480; 122 pdev->view_max.y = 480;
123 pdev->image_mask = 1 << PSZ_QSIF | 1 << PSZ_SIF | 1 << PSZ_VGA; 123 pdev->image_mask = 1 << PSZ_QSIF | 1 << PSZ_SIF | 1 << PSZ_VGA;
124 pdev->abs_max.x = 640; 124 pdev->abs_max.x = 640;
125 pdev->abs_max.y = 480; 125 pdev->abs_max.y = 480;
126 pdev->vcinterface = 3; 126 pdev->vcinterface = 3;
127 pdev->vendpoint = 5; 127 pdev->vendpoint = 5;
128 pdev->frame_header_size = TOUCAM_HEADER_SIZE; 128 pdev->frame_header_size = TOUCAM_HEADER_SIZE;
diff --git a/drivers/media/video/pwc/pwc-nala.h b/drivers/media/video/pwc/pwc-nala.h
index e6c5cb69d03b..168c73ef75d8 100644
--- a/drivers/media/video/pwc/pwc-nala.h
+++ b/drivers/media/video/pwc/pwc-nala.h
@@ -54,7 +54,7 @@
54 {0}, 54 {0},
55 }, 55 },
56 /* VGA */ 56 /* VGA */
57 { 57 {
58 {0}, 58 {0},
59 {0}, 59 {0},
60 {0}, 60 {0},
diff --git a/drivers/media/video/pwc/pwc-timon.c b/drivers/media/video/pwc/pwc-timon.c
index dee967173d6c..175250d089cf 100644
--- a/drivers/media/video/pwc/pwc-timon.c
+++ b/drivers/media/video/pwc/pwc-timon.c
@@ -46,270 +46,270 @@ const struct Timon_table_entry Timon_table[PSZ_MAX][6][4] =
46 { 46 {
47 /* 5 fps */ 47 /* 5 fps */
48 { 48 {
49 {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}}, 49 {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}},
50 {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}}, 50 {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}},
51 {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}}, 51 {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}},
52 {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}}, 52 {1, 140, 0, {0x05, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x8C, 0xFC, 0x80, 0x02}},
53 }, 53 },
54 /* 10 fps */ 54 /* 10 fps */
55 { 55 {
56 {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}}, 56 {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}},
57 {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}}, 57 {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}},
58 {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}}, 58 {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}},
59 {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}}, 59 {2, 280, 0, {0x04, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x18, 0xA9, 0x80, 0x02}},
60 }, 60 },
61 /* 15 fps */ 61 /* 15 fps */
62 { 62 {
63 {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}}, 63 {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}},
64 {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}}, 64 {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}},
65 {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}}, 65 {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}},
66 {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}}, 66 {3, 410, 0, {0x03, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x9A, 0x71, 0x80, 0x02}},
67 }, 67 },
68 /* 20 fps */ 68 /* 20 fps */
69 { 69 {
70 {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}}, 70 {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}},
71 {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}}, 71 {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}},
72 {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}}, 72 {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}},
73 {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}}, 73 {4, 559, 0, {0x02, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x2F, 0x56, 0x80, 0x02}},
74 }, 74 },
75 /* 25 fps */ 75 /* 25 fps */
76 { 76 {
77 {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}}, 77 {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}},
78 {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}}, 78 {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}},
79 {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}}, 79 {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}},
80 {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}}, 80 {5, 659, 0, {0x01, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x93, 0x46, 0x80, 0x02}},
81 }, 81 },
82 /* 30 fps */ 82 /* 30 fps */
83 { 83 {
84 {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}}, 84 {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}},
85 {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}}, 85 {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}},
86 {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}}, 86 {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}},
87 {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}}, 87 {7, 838, 0, {0x00, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x46, 0x3B, 0x80, 0x02}},
88 }, 88 },
89 }, 89 },
90 /* QSIF */ 90 /* QSIF */
91 { 91 {
92 /* 5 fps */ 92 /* 5 fps */
93 { 93 {
94 {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}}, 94 {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}},
95 {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}}, 95 {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}},
96 {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}}, 96 {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}},
97 {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}}, 97 {1, 146, 0, {0x2D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x92, 0xFC, 0xC0, 0x02}},
98 }, 98 },
99 /* 10 fps */ 99 /* 10 fps */
100 { 100 {
101 {2, 291, 0, {0x2C, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x23, 0xA1, 0xC0, 0x02}}, 101 {2, 291, 0, {0x2C, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x23, 0xA1, 0xC0, 0x02}},
102 {1, 191, 630, {0x2C, 0xF4, 0x05, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xBF, 0xF4, 0xC0, 0x02}}, 102 {1, 191, 630, {0x2C, 0xF4, 0x05, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xBF, 0xF4, 0xC0, 0x02}},
103 {1, 191, 630, {0x2C, 0xF4, 0x05, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xBF, 0xF4, 0xC0, 0x02}}, 103 {1, 191, 630, {0x2C, 0xF4, 0x05, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xBF, 0xF4, 0xC0, 0x02}},
104 {1, 191, 630, {0x2C, 0xF4, 0x05, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xBF, 0xF4, 0xC0, 0x02}}, 104 {1, 191, 630, {0x2C, 0xF4, 0x05, 0x13, 0xA9, 0x12, 0xE1, 0x17, 0x08, 0xBF, 0xF4, 0xC0, 0x02}},
105 }, 105 },
106 /* 15 fps */ 106 /* 15 fps */
107 { 107 {
108 {3, 437, 0, {0x2B, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xB5, 0x6D, 0xC0, 0x02}}, 108 {3, 437, 0, {0x2B, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xB5, 0x6D, 0xC0, 0x02}},
109 {2, 291, 640, {0x2B, 0xF4, 0x05, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x08, 0x23, 0xA1, 0xC0, 0x02}}, 109 {2, 291, 640, {0x2B, 0xF4, 0x05, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x08, 0x23, 0xA1, 0xC0, 0x02}},
110 {2, 291, 640, {0x2B, 0xF4, 0x05, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x08, 0x23, 0xA1, 0xC0, 0x02}}, 110 {2, 291, 640, {0x2B, 0xF4, 0x05, 0x13, 0xF7, 0x13, 0x2F, 0x13, 0x08, 0x23, 0xA1, 0xC0, 0x02}},
111 {1, 191, 420, {0x2B, 0xF4, 0x0D, 0x0D, 0x1B, 0x0C, 0x53, 0x1E, 0x08, 0xBF, 0xF4, 0xC0, 0x02}}, 111 {1, 191, 420, {0x2B, 0xF4, 0x0D, 0x0D, 0x1B, 0x0C, 0x53, 0x1E, 0x08, 0xBF, 0xF4, 0xC0, 0x02}},
112 }, 112 },
113 /* 20 fps */ 113 /* 20 fps */
114 { 114 {
115 {4, 588, 0, {0x2A, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x4C, 0x52, 0xC0, 0x02}}, 115 {4, 588, 0, {0x2A, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x4C, 0x52, 0xC0, 0x02}},
116 {3, 447, 730, {0x2A, 0xF4, 0x05, 0x16, 0xC9, 0x16, 0x01, 0x0E, 0x18, 0xBF, 0x69, 0xC0, 0x02}}, 116 {3, 447, 730, {0x2A, 0xF4, 0x05, 0x16, 0xC9, 0x16, 0x01, 0x0E, 0x18, 0xBF, 0x69, 0xC0, 0x02}},
117 {2, 292, 476, {0x2A, 0xF4, 0x0D, 0x0E, 0xD8, 0x0E, 0x10, 0x19, 0x18, 0x24, 0xA1, 0xC0, 0x02}}, 117 {2, 292, 476, {0x2A, 0xF4, 0x0D, 0x0E, 0xD8, 0x0E, 0x10, 0x19, 0x18, 0x24, 0xA1, 0xC0, 0x02}},
118 {1, 192, 312, {0x2A, 0xF4, 0x1D, 0x09, 0xB3, 0x08, 0xEB, 0x1E, 0x18, 0xC0, 0xF4, 0xC0, 0x02}}, 118 {1, 192, 312, {0x2A, 0xF4, 0x1D, 0x09, 0xB3, 0x08, 0xEB, 0x1E, 0x18, 0xC0, 0xF4, 0xC0, 0x02}},
119 }, 119 },
120 /* 25 fps */ 120 /* 25 fps */
121 { 121 {
122 {5, 703, 0, {0x29, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xBF, 0x42, 0xC0, 0x02}}, 122 {5, 703, 0, {0x29, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xBF, 0x42, 0xC0, 0x02}},
123 {3, 447, 610, {0x29, 0xF4, 0x05, 0x13, 0x0B, 0x12, 0x43, 0x14, 0x18, 0xBF, 0x69, 0xC0, 0x02}}, 123 {3, 447, 610, {0x29, 0xF4, 0x05, 0x13, 0x0B, 0x12, 0x43, 0x14, 0x18, 0xBF, 0x69, 0xC0, 0x02}},
124 {2, 292, 398, {0x29, 0xF4, 0x0D, 0x0C, 0x6C, 0x0B, 0xA4, 0x1E, 0x18, 0x24, 0xA1, 0xC0, 0x02}}, 124 {2, 292, 398, {0x29, 0xF4, 0x0D, 0x0C, 0x6C, 0x0B, 0xA4, 0x1E, 0x18, 0x24, 0xA1, 0xC0, 0x02}},
125 {1, 192, 262, {0x29, 0xF4, 0x25, 0x08, 0x23, 0x07, 0x5B, 0x1E, 0x18, 0xC0, 0xF4, 0xC0, 0x02}}, 125 {1, 192, 262, {0x29, 0xF4, 0x25, 0x08, 0x23, 0x07, 0x5B, 0x1E, 0x18, 0xC0, 0xF4, 0xC0, 0x02}},
126 }, 126 },
127 /* 30 fps */ 127 /* 30 fps */
128 { 128 {
129 {8, 873, 0, {0x28, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x69, 0x37, 0xC0, 0x02}}, 129 {8, 873, 0, {0x28, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x69, 0x37, 0xC0, 0x02}},
130 {5, 704, 774, {0x28, 0xF4, 0x05, 0x18, 0x21, 0x17, 0x59, 0x0F, 0x18, 0xC0, 0x42, 0xC0, 0x02}}, 130 {5, 704, 774, {0x28, 0xF4, 0x05, 0x18, 0x21, 0x17, 0x59, 0x0F, 0x18, 0xC0, 0x42, 0xC0, 0x02}},
131 {3, 448, 492, {0x28, 0xF4, 0x05, 0x0F, 0x5D, 0x0E, 0x95, 0x15, 0x18, 0xC0, 0x69, 0xC0, 0x02}}, 131 {3, 448, 492, {0x28, 0xF4, 0x05, 0x0F, 0x5D, 0x0E, 0x95, 0x15, 0x18, 0xC0, 0x69, 0xC0, 0x02}},
132 {2, 291, 320, {0x28, 0xF4, 0x1D, 0x09, 0xFB, 0x09, 0x33, 0x1E, 0x18, 0x23, 0xA1, 0xC0, 0x02}}, 132 {2, 291, 320, {0x28, 0xF4, 0x1D, 0x09, 0xFB, 0x09, 0x33, 0x1E, 0x18, 0x23, 0xA1, 0xC0, 0x02}},
133 }, 133 },
134 }, 134 },
135 /* QCIF */ 135 /* QCIF */
136 { 136 {
137 /* 5 fps */ 137 /* 5 fps */
138 { 138 {
139 {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}}, 139 {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}},
140 {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}}, 140 {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}},
141 {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}}, 141 {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}},
142 {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}}, 142 {1, 193, 0, {0x0D, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xC1, 0xF4, 0xC0, 0x02}},
143 }, 143 },
144 /* 10 fps */ 144 /* 10 fps */
145 { 145 {
146 {3, 385, 0, {0x0C, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x81, 0x79, 0xC0, 0x02}}, 146 {3, 385, 0, {0x0C, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x81, 0x79, 0xC0, 0x02}},
147 {2, 291, 800, {0x0C, 0xF4, 0x05, 0x18, 0xF4, 0x18, 0x18, 0x11, 0x08, 0x23, 0xA1, 0xC0, 0x02}}, 147 {2, 291, 800, {0x0C, 0xF4, 0x05, 0x18, 0xF4, 0x18, 0x18, 0x11, 0x08, 0x23, 0xA1, 0xC0, 0x02}},
148 {2, 291, 800, {0x0C, 0xF4, 0x05, 0x18, 0xF4, 0x18, 0x18, 0x11, 0x08, 0x23, 0xA1, 0xC0, 0x02}}, 148 {2, 291, 800, {0x0C, 0xF4, 0x05, 0x18, 0xF4, 0x18, 0x18, 0x11, 0x08, 0x23, 0xA1, 0xC0, 0x02}},
149 {1, 194, 532, {0x0C, 0xF4, 0x05, 0x10, 0x9A, 0x0F, 0xBE, 0x1B, 0x08, 0xC2, 0xF0, 0xC0, 0x02}}, 149 {1, 194, 532, {0x0C, 0xF4, 0x05, 0x10, 0x9A, 0x0F, 0xBE, 0x1B, 0x08, 0xC2, 0xF0, 0xC0, 0x02}},
150 }, 150 },
151 /* 15 fps */ 151 /* 15 fps */
152 { 152 {
153 {4, 577, 0, {0x0B, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x41, 0x52, 0xC0, 0x02}}, 153 {4, 577, 0, {0x0B, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x41, 0x52, 0xC0, 0x02}},
154 {3, 447, 818, {0x0B, 0xF4, 0x05, 0x19, 0x89, 0x18, 0xAD, 0x0F, 0x10, 0xBF, 0x69, 0xC0, 0x02}}, 154 {3, 447, 818, {0x0B, 0xF4, 0x05, 0x19, 0x89, 0x18, 0xAD, 0x0F, 0x10, 0xBF, 0x69, 0xC0, 0x02}},
155 {2, 292, 534, {0x0B, 0xF4, 0x05, 0x10, 0xA3, 0x0F, 0xC7, 0x19, 0x10, 0x24, 0xA1, 0xC0, 0x02}}, 155 {2, 292, 534, {0x0B, 0xF4, 0x05, 0x10, 0xA3, 0x0F, 0xC7, 0x19, 0x10, 0x24, 0xA1, 0xC0, 0x02}},
156 {1, 195, 356, {0x0B, 0xF4, 0x15, 0x0B, 0x11, 0x0A, 0x35, 0x1E, 0x10, 0xC3, 0xF0, 0xC0, 0x02}}, 156 {1, 195, 356, {0x0B, 0xF4, 0x15, 0x0B, 0x11, 0x0A, 0x35, 0x1E, 0x10, 0xC3, 0xF0, 0xC0, 0x02}},
157 }, 157 },
158 /* 20 fps */ 158 /* 20 fps */
159 { 159 {
160 {6, 776, 0, {0x0A, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x08, 0x3F, 0xC0, 0x02}}, 160 {6, 776, 0, {0x0A, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x08, 0x3F, 0xC0, 0x02}},
161 {4, 591, 804, {0x0A, 0xF4, 0x05, 0x19, 0x1E, 0x18, 0x42, 0x0F, 0x18, 0x4F, 0x4E, 0xC0, 0x02}}, 161 {4, 591, 804, {0x0A, 0xF4, 0x05, 0x19, 0x1E, 0x18, 0x42, 0x0F, 0x18, 0x4F, 0x4E, 0xC0, 0x02}},
162 {3, 447, 608, {0x0A, 0xF4, 0x05, 0x12, 0xFD, 0x12, 0x21, 0x15, 0x18, 0xBF, 0x69, 0xC0, 0x02}}, 162 {3, 447, 608, {0x0A, 0xF4, 0x05, 0x12, 0xFD, 0x12, 0x21, 0x15, 0x18, 0xBF, 0x69, 0xC0, 0x02}},
163 {2, 291, 396, {0x0A, 0xF4, 0x15, 0x0C, 0x5E, 0x0B, 0x82, 0x1E, 0x18, 0x23, 0xA1, 0xC0, 0x02}}, 163 {2, 291, 396, {0x0A, 0xF4, 0x15, 0x0C, 0x5E, 0x0B, 0x82, 0x1E, 0x18, 0x23, 0xA1, 0xC0, 0x02}},
164 }, 164 },
165 /* 25 fps */ 165 /* 25 fps */
166 { 166 {
167 {9, 928, 0, {0x09, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xA0, 0x33, 0xC0, 0x02}}, 167 {9, 928, 0, {0x09, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0xA0, 0x33, 0xC0, 0x02}},
168 {5, 703, 800, {0x09, 0xF4, 0x05, 0x18, 0xF4, 0x18, 0x18, 0x10, 0x18, 0xBF, 0x42, 0xC0, 0x02}}, 168 {5, 703, 800, {0x09, 0xF4, 0x05, 0x18, 0xF4, 0x18, 0x18, 0x10, 0x18, 0xBF, 0x42, 0xC0, 0x02}},
169 {3, 447, 508, {0x09, 0xF4, 0x0D, 0x0F, 0xD2, 0x0E, 0xF6, 0x1B, 0x18, 0xBF, 0x69, 0xC0, 0x02}}, 169 {3, 447, 508, {0x09, 0xF4, 0x0D, 0x0F, 0xD2, 0x0E, 0xF6, 0x1B, 0x18, 0xBF, 0x69, 0xC0, 0x02}},
170 {2, 292, 332, {0x09, 0xF4, 0x1D, 0x0A, 0x5A, 0x09, 0x7E, 0x1E, 0x18, 0x24, 0xA1, 0xC0, 0x02}}, 170 {2, 292, 332, {0x09, 0xF4, 0x1D, 0x0A, 0x5A, 0x09, 0x7E, 0x1E, 0x18, 0x24, 0xA1, 0xC0, 0x02}},
171 }, 171 },
172 /* 30 fps */ 172 /* 30 fps */
173 { 173 {
174 {0, }, 174 {0, },
175 {9, 956, 876, {0x08, 0xF4, 0x05, 0x1B, 0x58, 0x1A, 0x7C, 0x0E, 0x20, 0xBC, 0x33, 0x10, 0x02}}, 175 {9, 956, 876, {0x08, 0xF4, 0x05, 0x1B, 0x58, 0x1A, 0x7C, 0x0E, 0x20, 0xBC, 0x33, 0x10, 0x02}},
176 {4, 592, 542, {0x08, 0xF4, 0x05, 0x10, 0xE4, 0x10, 0x08, 0x17, 0x20, 0x50, 0x4E, 0x10, 0x02}}, 176 {4, 592, 542, {0x08, 0xF4, 0x05, 0x10, 0xE4, 0x10, 0x08, 0x17, 0x20, 0x50, 0x4E, 0x10, 0x02}},
177 {2, 291, 266, {0x08, 0xF4, 0x25, 0x08, 0x48, 0x07, 0x6C, 0x1E, 0x20, 0x23, 0xA1, 0x10, 0x02}}, 177 {2, 291, 266, {0x08, 0xF4, 0x25, 0x08, 0x48, 0x07, 0x6C, 0x1E, 0x20, 0x23, 0xA1, 0x10, 0x02}},
178 }, 178 },
179 }, 179 },
180 /* SIF */ 180 /* SIF */
181 { 181 {
182 /* 5 fps */ 182 /* 5 fps */
183 { 183 {
184 {4, 582, 0, {0x35, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x46, 0x52, 0x60, 0x02}}, 184 {4, 582, 0, {0x35, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x46, 0x52, 0x60, 0x02}},
185 {3, 387, 1276, {0x35, 0xF4, 0x05, 0x27, 0xD8, 0x26, 0x48, 0x03, 0x10, 0x83, 0x79, 0x60, 0x02}}, 185 {3, 387, 1276, {0x35, 0xF4, 0x05, 0x27, 0xD8, 0x26, 0x48, 0x03, 0x10, 0x83, 0x79, 0x60, 0x02}},
186 {2, 291, 960, {0x35, 0xF4, 0x0D, 0x1D, 0xF2, 0x1C, 0x62, 0x04, 0x10, 0x23, 0xA1, 0x60, 0x02}}, 186 {2, 291, 960, {0x35, 0xF4, 0x0D, 0x1D, 0xF2, 0x1C, 0x62, 0x04, 0x10, 0x23, 0xA1, 0x60, 0x02}},
187 {1, 191, 630, {0x35, 0xF4, 0x1D, 0x13, 0xA9, 0x12, 0x19, 0x05, 0x08, 0xBF, 0xF4, 0x60, 0x02}}, 187 {1, 191, 630, {0x35, 0xF4, 0x1D, 0x13, 0xA9, 0x12, 0x19, 0x05, 0x08, 0xBF, 0xF4, 0x60, 0x02}},
188 }, 188 },
189 /* 10 fps */ 189 /* 10 fps */
190 { 190 {
191 {0, }, 191 {0, },
192 {6, 775, 1278, {0x34, 0xF4, 0x05, 0x27, 0xE8, 0x26, 0x58, 0x05, 0x30, 0x07, 0x3F, 0x10, 0x02}}, 192 {6, 775, 1278, {0x34, 0xF4, 0x05, 0x27, 0xE8, 0x26, 0x58, 0x05, 0x30, 0x07, 0x3F, 0x10, 0x02}},
193 {3, 447, 736, {0x34, 0xF4, 0x15, 0x16, 0xFB, 0x15, 0x6B, 0x05, 0x18, 0xBF, 0x69, 0x10, 0x02}}, 193 {3, 447, 736, {0x34, 0xF4, 0x15, 0x16, 0xFB, 0x15, 0x6B, 0x05, 0x18, 0xBF, 0x69, 0x10, 0x02}},
194 {2, 291, 480, {0x34, 0xF4, 0x2D, 0x0E, 0xF9, 0x0D, 0x69, 0x09, 0x18, 0x23, 0xA1, 0x10, 0x02}}, 194 {2, 291, 480, {0x34, 0xF4, 0x2D, 0x0E, 0xF9, 0x0D, 0x69, 0x09, 0x18, 0x23, 0xA1, 0x10, 0x02}},
195 }, 195 },
196 /* 15 fps */ 196 /* 15 fps */
197 { 197 {
198 {0, }, 198 {0, },
199 {9, 955, 1050, {0x33, 0xF4, 0x05, 0x20, 0xCF, 0x1F, 0x3F, 0x06, 0x48, 0xBB, 0x33, 0x10, 0x02}}, 199 {9, 955, 1050, {0x33, 0xF4, 0x05, 0x20, 0xCF, 0x1F, 0x3F, 0x06, 0x48, 0xBB, 0x33, 0x10, 0x02}},
200 {4, 591, 650, {0x33, 0xF4, 0x15, 0x14, 0x44, 0x12, 0xB4, 0x08, 0x30, 0x4F, 0x4E, 0x10, 0x02}}, 200 {4, 591, 650, {0x33, 0xF4, 0x15, 0x14, 0x44, 0x12, 0xB4, 0x08, 0x30, 0x4F, 0x4E, 0x10, 0x02}},
201 {3, 448, 492, {0x33, 0xF4, 0x25, 0x0F, 0x52, 0x0D, 0xC2, 0x09, 0x28, 0xC0, 0x69, 0x10, 0x02}}, 201 {3, 448, 492, {0x33, 0xF4, 0x25, 0x0F, 0x52, 0x0D, 0xC2, 0x09, 0x28, 0xC0, 0x69, 0x10, 0x02}},
202 }, 202 },
203 /* 20 fps */ 203 /* 20 fps */
204 { 204 {
205 {0, }, 205 {0, },
206 {9, 958, 782, {0x32, 0xF4, 0x0D, 0x18, 0x6A, 0x16, 0xDA, 0x0B, 0x58, 0xBE, 0x33, 0xD0, 0x02}}, 206 {9, 958, 782, {0x32, 0xF4, 0x0D, 0x18, 0x6A, 0x16, 0xDA, 0x0B, 0x58, 0xBE, 0x33, 0xD0, 0x02}},
207 {5, 703, 574, {0x32, 0xF4, 0x1D, 0x11, 0xE7, 0x10, 0x57, 0x0B, 0x40, 0xBF, 0x42, 0xD0, 0x02}}, 207 {5, 703, 574, {0x32, 0xF4, 0x1D, 0x11, 0xE7, 0x10, 0x57, 0x0B, 0x40, 0xBF, 0x42, 0xD0, 0x02}},
208 {3, 446, 364, {0x32, 0xF4, 0x3D, 0x0B, 0x5C, 0x09, 0xCC, 0x0E, 0x30, 0xBE, 0x69, 0xD0, 0x02}}, 208 {3, 446, 364, {0x32, 0xF4, 0x3D, 0x0B, 0x5C, 0x09, 0xCC, 0x0E, 0x30, 0xBE, 0x69, 0xD0, 0x02}},
209 }, 209 },
210 /* 25 fps */ 210 /* 25 fps */
211 { 211 {
212 {0, }, 212 {0, },
213 {9, 958, 654, {0x31, 0xF4, 0x15, 0x14, 0x66, 0x12, 0xD6, 0x0B, 0x50, 0xBE, 0x33, 0x90, 0x02}}, 213 {9, 958, 654, {0x31, 0xF4, 0x15, 0x14, 0x66, 0x12, 0xD6, 0x0B, 0x50, 0xBE, 0x33, 0x90, 0x02}},
214 {6, 776, 530, {0x31, 0xF4, 0x25, 0x10, 0x8C, 0x0E, 0xFC, 0x0C, 0x48, 0x08, 0x3F, 0x90, 0x02}}, 214 {6, 776, 530, {0x31, 0xF4, 0x25, 0x10, 0x8C, 0x0E, 0xFC, 0x0C, 0x48, 0x08, 0x3F, 0x90, 0x02}},
215 {4, 592, 404, {0x31, 0xF4, 0x35, 0x0C, 0x96, 0x0B, 0x06, 0x0B, 0x38, 0x50, 0x4E, 0x90, 0x02}}, 215 {4, 592, 404, {0x31, 0xF4, 0x35, 0x0C, 0x96, 0x0B, 0x06, 0x0B, 0x38, 0x50, 0x4E, 0x90, 0x02}},
216 }, 216 },
217 /* 30 fps */ 217 /* 30 fps */
218 { 218 {
219 {0, }, 219 {0, },
220 {9, 957, 526, {0x30, 0xF4, 0x25, 0x10, 0x68, 0x0E, 0xD8, 0x0D, 0x58, 0xBD, 0x33, 0x60, 0x02}}, 220 {9, 957, 526, {0x30, 0xF4, 0x25, 0x10, 0x68, 0x0E, 0xD8, 0x0D, 0x58, 0xBD, 0x33, 0x60, 0x02}},
221 {6, 775, 426, {0x30, 0xF4, 0x35, 0x0D, 0x48, 0x0B, 0xB8, 0x0F, 0x50, 0x07, 0x3F, 0x60, 0x02}}, 221 {6, 775, 426, {0x30, 0xF4, 0x35, 0x0D, 0x48, 0x0B, 0xB8, 0x0F, 0x50, 0x07, 0x3F, 0x60, 0x02}},
222 {4, 590, 324, {0x30, 0x7A, 0x4B, 0x0A, 0x1C, 0x08, 0xB4, 0x0E, 0x40, 0x4E, 0x52, 0x60, 0x02}}, 222 {4, 590, 324, {0x30, 0x7A, 0x4B, 0x0A, 0x1C, 0x08, 0xB4, 0x0E, 0x40, 0x4E, 0x52, 0x60, 0x02}},
223 }, 223 },
224 }, 224 },
225 /* CIF */ 225 /* CIF */
226 { 226 {
227 /* 5 fps */ 227 /* 5 fps */
228 { 228 {
229 {6, 771, 0, {0x15, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x3F, 0x80, 0x02}}, 229 {6, 771, 0, {0x15, 0xF4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x3F, 0x80, 0x02}},
230 {4, 465, 1278, {0x15, 0xF4, 0x05, 0x27, 0xEE, 0x26, 0x36, 0x03, 0x18, 0xD1, 0x65, 0x80, 0x02}}, 230 {4, 465, 1278, {0x15, 0xF4, 0x05, 0x27, 0xEE, 0x26, 0x36, 0x03, 0x18, 0xD1, 0x65, 0x80, 0x02}},
231 {2, 291, 800, {0x15, 0xF4, 0x15, 0x18, 0xF4, 0x17, 0x3C, 0x05, 0x18, 0x23, 0xA1, 0x80, 0x02}}, 231 {2, 291, 800, {0x15, 0xF4, 0x15, 0x18, 0xF4, 0x17, 0x3C, 0x05, 0x18, 0x23, 0xA1, 0x80, 0x02}},
232 {1, 193, 528, {0x15, 0xF4, 0x2D, 0x10, 0x7E, 0x0E, 0xC6, 0x0A, 0x18, 0xC1, 0xF4, 0x80, 0x02}}, 232 {1, 193, 528, {0x15, 0xF4, 0x2D, 0x10, 0x7E, 0x0E, 0xC6, 0x0A, 0x18, 0xC1, 0xF4, 0x80, 0x02}},
233 }, 233 },
234 /* 10 fps */ 234 /* 10 fps */
235 { 235 {
236 {0, }, 236 {0, },
237 {9, 932, 1278, {0x14, 0xF4, 0x05, 0x27, 0xEE, 0x26, 0x36, 0x04, 0x30, 0xA4, 0x33, 0x10, 0x02}}, 237 {9, 932, 1278, {0x14, 0xF4, 0x05, 0x27, 0xEE, 0x26, 0x36, 0x04, 0x30, 0xA4, 0x33, 0x10, 0x02}},
238 {4, 591, 812, {0x14, 0xF4, 0x15, 0x19, 0x56, 0x17, 0x9E, 0x06, 0x28, 0x4F, 0x4E, 0x10, 0x02}}, 238 {4, 591, 812, {0x14, 0xF4, 0x15, 0x19, 0x56, 0x17, 0x9E, 0x06, 0x28, 0x4F, 0x4E, 0x10, 0x02}},
239 {2, 291, 400, {0x14, 0xF4, 0x3D, 0x0C, 0x7A, 0x0A, 0xC2, 0x0E, 0x28, 0x23, 0xA1, 0x10, 0x02}}, 239 {2, 291, 400, {0x14, 0xF4, 0x3D, 0x0C, 0x7A, 0x0A, 0xC2, 0x0E, 0x28, 0x23, 0xA1, 0x10, 0x02}},
240 }, 240 },
241 /* 15 fps */ 241 /* 15 fps */
242 { 242 {
243 {0, }, 243 {0, },
244 {9, 956, 876, {0x13, 0xF4, 0x0D, 0x1B, 0x58, 0x19, 0xA0, 0x05, 0x38, 0xBC, 0x33, 0x60, 0x02}}, 244 {9, 956, 876, {0x13, 0xF4, 0x0D, 0x1B, 0x58, 0x19, 0xA0, 0x05, 0x38, 0xBC, 0x33, 0x60, 0x02}},
245 {5, 703, 644, {0x13, 0xF4, 0x1D, 0x14, 0x1C, 0x12, 0x64, 0x08, 0x38, 0xBF, 0x42, 0x60, 0x02}}, 245 {5, 703, 644, {0x13, 0xF4, 0x1D, 0x14, 0x1C, 0x12, 0x64, 0x08, 0x38, 0xBF, 0x42, 0x60, 0x02}},
246 {3, 448, 410, {0x13, 0xF4, 0x3D, 0x0C, 0xC4, 0x0B, 0x0C, 0x0E, 0x38, 0xC0, 0x69, 0x60, 0x02}}, 246 {3, 448, 410, {0x13, 0xF4, 0x3D, 0x0C, 0xC4, 0x0B, 0x0C, 0x0E, 0x38, 0xC0, 0x69, 0x60, 0x02}},
247 }, 247 },
248 /* 20 fps */ 248 /* 20 fps */
249 { 249 {
250 {0, }, 250 {0, },
251 {9, 956, 650, {0x12, 0xF4, 0x1D, 0x14, 0x4A, 0x12, 0x92, 0x09, 0x48, 0xBC, 0x33, 0x10, 0x03}}, 251 {9, 956, 650, {0x12, 0xF4, 0x1D, 0x14, 0x4A, 0x12, 0x92, 0x09, 0x48, 0xBC, 0x33, 0x10, 0x03}},
252 {6, 776, 528, {0x12, 0xF4, 0x2D, 0x10, 0x7E, 0x0E, 0xC6, 0x0A, 0x40, 0x08, 0x3F, 0x10, 0x03}}, 252 {6, 776, 528, {0x12, 0xF4, 0x2D, 0x10, 0x7E, 0x0E, 0xC6, 0x0A, 0x40, 0x08, 0x3F, 0x10, 0x03}},
253 {4, 591, 402, {0x12, 0xF4, 0x3D, 0x0C, 0x8F, 0x0A, 0xD7, 0x0E, 0x40, 0x4F, 0x4E, 0x10, 0x03}}, 253 {4, 591, 402, {0x12, 0xF4, 0x3D, 0x0C, 0x8F, 0x0A, 0xD7, 0x0E, 0x40, 0x4F, 0x4E, 0x10, 0x03}},
254 }, 254 },
255 /* 25 fps */ 255 /* 25 fps */
256 { 256 {
257 {0, }, 257 {0, },
258 {9, 956, 544, {0x11, 0xF4, 0x25, 0x10, 0xF4, 0x0F, 0x3C, 0x0A, 0x48, 0xBC, 0x33, 0xC0, 0x02}}, 258 {9, 956, 544, {0x11, 0xF4, 0x25, 0x10, 0xF4, 0x0F, 0x3C, 0x0A, 0x48, 0xBC, 0x33, 0xC0, 0x02}},
259 {7, 840, 478, {0x11, 0xF4, 0x2D, 0x0E, 0xEB, 0x0D, 0x33, 0x0B, 0x48, 0x48, 0x3B, 0xC0, 0x02}}, 259 {7, 840, 478, {0x11, 0xF4, 0x2D, 0x0E, 0xEB, 0x0D, 0x33, 0x0B, 0x48, 0x48, 0x3B, 0xC0, 0x02}},
260 {5, 703, 400, {0x11, 0xF4, 0x3D, 0x0C, 0x7A, 0x0A, 0xC2, 0x0E, 0x48, 0xBF, 0x42, 0xC0, 0x02}}, 260 {5, 703, 400, {0x11, 0xF4, 0x3D, 0x0C, 0x7A, 0x0A, 0xC2, 0x0E, 0x48, 0xBF, 0x42, 0xC0, 0x02}},
261 }, 261 },
262 /* 30 fps */ 262 /* 30 fps */
263 { 263 {
264 {0, }, 264 {0, },
265 {9, 956, 438, {0x10, 0xF4, 0x35, 0x0D, 0xAC, 0x0B, 0xF4, 0x0D, 0x50, 0xBC, 0x33, 0x10, 0x02}}, 265 {9, 956, 438, {0x10, 0xF4, 0x35, 0x0D, 0xAC, 0x0B, 0xF4, 0x0D, 0x50, 0xBC, 0x33, 0x10, 0x02}},
266 {7, 838, 384, {0x10, 0xF4, 0x45, 0x0B, 0xFD, 0x0A, 0x45, 0x0F, 0x50, 0x46, 0x3B, 0x10, 0x02}}, 266 {7, 838, 384, {0x10, 0xF4, 0x45, 0x0B, 0xFD, 0x0A, 0x45, 0x0F, 0x50, 0x46, 0x3B, 0x10, 0x02}},
267 {6, 773, 354, {0x10, 0x7A, 0x4B, 0x0B, 0x0C, 0x09, 0x80, 0x10, 0x50, 0x05, 0x3F, 0x10, 0x02}}, 267 {6, 773, 354, {0x10, 0x7A, 0x4B, 0x0B, 0x0C, 0x09, 0x80, 0x10, 0x50, 0x05, 0x3F, 0x10, 0x02}},
268 }, 268 },
269 }, 269 },
270 /* VGA */ 270 /* VGA */
271 { 271 {
272 /* 5 fps */ 272 /* 5 fps */
273 { 273 {
274 {0, }, 274 {0, },
275 {6, 773, 1272, {0x1D, 0xF4, 0x15, 0x27, 0xB6, 0x24, 0x96, 0x02, 0x30, 0x05, 0x3F, 0x10, 0x02}}, 275 {6, 773, 1272, {0x1D, 0xF4, 0x15, 0x27, 0xB6, 0x24, 0x96, 0x02, 0x30, 0x05, 0x3F, 0x10, 0x02}},
276 {4, 592, 976, {0x1D, 0xF4, 0x25, 0x1E, 0x78, 0x1B, 0x58, 0x03, 0x30, 0x50, 0x4E, 0x10, 0x02}}, 276 {4, 592, 976, {0x1D, 0xF4, 0x25, 0x1E, 0x78, 0x1B, 0x58, 0x03, 0x30, 0x50, 0x4E, 0x10, 0x02}},
277 {3, 448, 738, {0x1D, 0xF4, 0x3D, 0x17, 0x0C, 0x13, 0xEC, 0x04, 0x30, 0xC0, 0x69, 0x10, 0x02}}, 277 {3, 448, 738, {0x1D, 0xF4, 0x3D, 0x17, 0x0C, 0x13, 0xEC, 0x04, 0x30, 0xC0, 0x69, 0x10, 0x02}},
278 }, 278 },
279 /* 10 fps */ 279 /* 10 fps */
280 { 280 {
281 {0, }, 281 {0, },
282 {9, 956, 788, {0x1C, 0xF4, 0x35, 0x18, 0x9C, 0x15, 0x7C, 0x03, 0x48, 0xBC, 0x33, 0x10, 0x02}}, 282 {9, 956, 788, {0x1C, 0xF4, 0x35, 0x18, 0x9C, 0x15, 0x7C, 0x03, 0x48, 0xBC, 0x33, 0x10, 0x02}},
283 {6, 776, 640, {0x1C, 0x7A, 0x53, 0x13, 0xFC, 0x11, 0x2C, 0x04, 0x48, 0x08, 0x3F, 0x10, 0x02}}, 283 {6, 776, 640, {0x1C, 0x7A, 0x53, 0x13, 0xFC, 0x11, 0x2C, 0x04, 0x48, 0x08, 0x3F, 0x10, 0x02}},
284 {4, 592, 488, {0x1C, 0x7A, 0x6B, 0x0F, 0x3C, 0x0C, 0x6C, 0x06, 0x48, 0x50, 0x4E, 0x10, 0x02}}, 284 {4, 592, 488, {0x1C, 0x7A, 0x6B, 0x0F, 0x3C, 0x0C, 0x6C, 0x06, 0x48, 0x50, 0x4E, 0x10, 0x02}},
285 }, 285 },
286 /* 15 fps */ 286 /* 15 fps */
287 { 287 {
288 {0, }, 288 {0, },
289 {9, 957, 526, {0x1B, 0x7A, 0x63, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x33, 0x80, 0x02}}, 289 {9, 957, 526, {0x1B, 0x7A, 0x63, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x33, 0x80, 0x02}},
290 {9, 957, 526, {0x1B, 0x7A, 0x63, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x33, 0x80, 0x02}}, 290 {9, 957, 526, {0x1B, 0x7A, 0x63, 0x10, 0x68, 0x0D, 0x98, 0x06, 0x58, 0xBD, 0x33, 0x80, 0x02}},
291 {8, 895, 492, {0x1B, 0x7A, 0x6B, 0x0F, 0x5D, 0x0C, 0x8D, 0x06, 0x58, 0x7F, 0x37, 0x80, 0x02}}, 291 {8, 895, 492, {0x1B, 0x7A, 0x6B, 0x0F, 0x5D, 0x0C, 0x8D, 0x06, 0x58, 0x7F, 0x37, 0x80, 0x02}},
292 }, 292 },
293 /* 20 fps */ 293 /* 20 fps */
294 { 294 {
295 {0, }, 295 {0, },
296 {0, }, 296 {0, },
297 {0, }, 297 {0, },
298 {0, }, 298 {0, },
299 }, 299 },
300 /* 25 fps */ 300 /* 25 fps */
301 { 301 {
302 {0, }, 302 {0, },
303 {0, }, 303 {0, },
304 {0, }, 304 {0, },
305 {0, }, 305 {0, },
306 }, 306 },
307 /* 30 fps */ 307 /* 30 fps */
308 { 308 {
309 {0, }, 309 {0, },
310 {0, }, 310 {0, },
311 {0, }, 311 {0, },
312 {0, }, 312 {0, },
313 }, 313 },
314 }, 314 },
315}; 315};
diff --git a/drivers/media/video/pwc/pwc-uncompress.c b/drivers/media/video/pwc/pwc-uncompress.c
index ef4204eab6c4..b37a89a163f9 100644
--- a/drivers/media/video/pwc/pwc-uncompress.c
+++ b/drivers/media/video/pwc/pwc-uncompress.c
@@ -109,9 +109,9 @@ int pwc_decompress(struct pwc_device *pdev)
109 in planar format immediately. 109 in planar format immediately.
110 */ 110 */
111 int flags; 111 int flags;
112 112
113 flags = PWCX_FLAG_PLANAR; 113 flags = PWCX_FLAG_PLANAR;
114 if (pdev->vsize == PSZ_VGA && pdev->vframes == 5 && pdev->vsnapshot) 114 if (pdev->vsize == PSZ_VGA && pdev->vframes == 5 && pdev->vsnapshot)
115 { 115 {
116 printk(KERN_ERR "pwc: Mode Bayer is not supported for now\n"); 116 printk(KERN_ERR "pwc: Mode Bayer is not supported for now\n");
117 flags |= PWCX_FLAG_BAYER; 117 flags |= PWCX_FLAG_BAYER;
diff --git a/drivers/media/video/pwc/pwc-uncompress.h b/drivers/media/video/pwc/pwc-uncompress.h
index d3b9250e4ed3..f75e1b6cbe19 100644
--- a/drivers/media/video/pwc/pwc-uncompress.h
+++ b/drivers/media/video/pwc/pwc-uncompress.h
@@ -24,7 +24,7 @@
24 24
25/* This file is the bridge between the kernel module and the plugin; it 25/* This file is the bridge between the kernel module and the plugin; it
26 describes the structures and datatypes used in both modules. Any 26 describes the structures and datatypes used in both modules. Any
27 significant change should be reflected by increasing the 27 significant change should be reflected by increasing the
28 pwc_decompressor_version major number. 28 pwc_decompressor_version major number.
29 */ 29 */
30#ifndef PWC_UNCOMPRESS_H 30#ifndef PWC_UNCOMPRESS_H
diff --git a/drivers/media/video/pwc/pwc.h b/drivers/media/video/pwc/pwc.h
index 6dd76bb3dff1..1b0ee0ced0ed 100644
--- a/drivers/media/video/pwc/pwc.h
+++ b/drivers/media/video/pwc/pwc.h
@@ -123,7 +123,7 @@ struct pwc_device
123#endif 123#endif
124 /* Pointer to our usb_device */ 124 /* Pointer to our usb_device */
125 struct usb_device *udev; 125 struct usb_device *udev;
126 126
127 int type; /* type of cam (645, 646, 675, 680, 690, 720, 730, 740, 750) */ 127 int type; /* type of cam (645, 646, 675, 680, 690, 720, 730, 740, 750) */
128 int release; /* release number */ 128 int release; /* release number */
129 int features; /* feature bits */ 129 int features; /* feature bits */
@@ -149,7 +149,7 @@ struct pwc_device
149 char vsnapshot; /* snapshot mode */ 149 char vsnapshot; /* snapshot mode */
150 char vsync; /* used by isoc handler */ 150 char vsync; /* used by isoc handler */
151 char vmirror; /* for ToUCaM series */ 151 char vmirror; /* for ToUCaM series */
152 152
153 int cmd_len; 153 int cmd_len;
154 unsigned char cmd_buf[13]; 154 unsigned char cmd_buf[13];
155 155