ChangeSet 1.883.3.6, 2002/12/16 10:45:26-08:00, [EMAIL PROTECTED]
[PATCH] USB: PWC 8.10 for 2.5.51
Well, two patches in one... These patches will bring the PWC (Philips
Webcam) driver in both 2.4.20 and 2.5.51 up to version 8.10. Functionally,
the two branches are the same (about 70% of the code is shared), but the
differences in kernel architecture are too large to handle with a few
#ifdefs.
This patch fixes the following (this are only the differences between 8.9
and 8.10):
* Fixed ID for QuickCam Notebook pro
* Added GREALSIZE ioctl() call
* Fixed bug in case PWCX was not loaded and invalid size was set
diff -Nru a/drivers/usb/media/pwc-ctrl.c b/drivers/usb/media/pwc-ctrl.c
--- a/drivers/usb/media/pwc-ctrl.c Wed Dec 18 00:35:03 2002
+++ b/drivers/usb/media/pwc-ctrl.c Wed Dec 18 00:35:03 2002
@@ -446,8 +446,8 @@
Info("Video mode %s@%d fps is only supported with the
decompressor module (pwcx).\n", size2name[size], frames);
else {
Err("Failed to set video mode %s@%d fps; return code = %d\n",
size2name[size], frames, ret);
- return ret;
}
+ return ret;
}
pdev->view.x = width;
pdev->view.y = height;
@@ -1534,7 +1534,15 @@
*dynnoise = ret;
break;
}
-
+
+ case VIDIOCPWCGREALSIZE:
+ {
+ struct pwc_imagesize *size = arg;
+
+ size->width = pdev->image.x;
+ size->height = pdev->image.y;
+ break;
+ }
default:
ret = -ENOIOCTLCMD;
diff -Nru a/drivers/usb/media/pwc-if.c b/drivers/usb/media/pwc-if.c
--- a/drivers/usb/media/pwc-if.c Wed Dec 18 00:35:03 2002
+++ b/drivers/usb/media/pwc-if.c Wed Dec 18 00:35:03 2002
@@ -77,7 +77,7 @@
{ USB_DEVICE(0x0471, 0x0312) },
{ USB_DEVICE(0x069A, 0x0001) }, /* Askey */
{ USB_DEVICE(0x046D, 0x08b0) }, /* Logitech QuickCam Pro 3000 */
- { USB_DEVICE(0x046D, 0x08b1) }, /* Logitech QuickCam for Notebooks */
+ { USB_DEVICE(0x046D, 0x08b1) }, /* Logitech QuickCam Notebook Pro */
{ USB_DEVICE(0x046D, 0x08b2) }, /* Logitech QuickCam Pro 4000 */
{ USB_DEVICE(0x046D, 0x08b3) }, /* Logitech QuickCam Zoom */
{ USB_DEVICE(0x055D, 0x9000) }, /* Samsung */
@@ -992,7 +992,7 @@
case 0x40: sensor_type = "UPA 1021 sensor"; break;
case 0x100: sensor_type = "VGA sensor"; break;
case 0x101: sensor_type = "PAL MR sensor"; break;
- default: sensor_type = "unknown type of sensor"; break;
+ default: sensor_type = "unknown type of sensor"; break;
}
if (sensor_type != NULL)
Info("This %s camera is equipped with a %s (%d).\n",
pdev->vdev->name, sensor_type, i);
@@ -1064,7 +1064,6 @@
i = pwc_isoc_init(pdev);
if (i) {
Trace(TRACE_OPEN, "Failed to init ISOC stuff = %d.\n", i);
- MOD_DEC_USE_COUNT;
up(&pdev->modlock);
return i;
}
@@ -1689,8 +1688,8 @@
type_id = 730;
break;
case 0x08b1:
- Info("Logitech QuickCam for Noteboos USB webcam detected.\n");
- name = "Logitech QuickCam Notebook";
+ Info("Logitech QuickCam Notebook Pro USB webcam detected.\n");
+ name = "Logitech QuickCam Notebook Pro";
type_id = 740; /* ?? unknown sensor */
break;
case 0x08b2:
diff -Nru a/drivers/usb/media/pwc-ioctl.h b/drivers/usb/media/pwc-ioctl.h
--- a/drivers/usb/media/pwc-ioctl.h Wed Dec 18 00:35:03 2002
+++ b/drivers/usb/media/pwc-ioctl.h Wed Dec 18 00:35:03 2002
@@ -18,12 +18,13 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* This is pwc-ioctl.h belonging to PWC 8.7 */
+/* This is pwc-ioctl.h belonging to PWC 8.10 */
/*
Changes
2001/08/03 Alvarado Added ioctl constants to access methods for
changing white balance and red/blue gains
+ 2002/12/15 G. H. Fernandez-Toribio VIDIOCGREALSIZE
*/
/* These are private ioctl() commands, specific for the Philips webcams.
@@ -104,7 +105,12 @@
int led_off; /* Led off-time; range = 0..25000 */
};
-
+/* Image size (used with GREALSIZE) */
+struct pwc_imagesize
+{
+ int width;
+ int height;
+};
/* Restore user settings */
#define VIDIOCPWCRUSER _IO('v', 192)
@@ -173,4 +179,7 @@
#define VIDIOCPWCSDYNNOISE _IOW('v', 209, int)
#define VIDIOCPWCGDYNNOISE _IOR('v', 209, int)
+ /* Real image size as used by the camera; tells you whether or not there's a gray
+border around the image */
+#define VIDIOCPWCGREALSIZE _IOR('v', 210, struct pwc_imagesize)
+
#endif
diff -Nru a/drivers/usb/media/pwc-uncompress.h b/drivers/usb/media/pwc-uncompress.h
--- a/drivers/usb/media/pwc-uncompress.h Wed Dec 18 00:35:03 2002
+++ b/drivers/usb/media/pwc-uncompress.h Wed Dec 18 00:35:03 2002
@@ -20,8 +20,8 @@
significant change should be reflected by increasing the
pwc_decompressor_version major number.
*/
-#ifndef PWC_DEC_H
-#define PWC_DEC_H
+#ifndef PWC_UNCOMPRESS_H
+#define PWC_UNCOMPRESS_H
#include <linux/config.h>
#include <linux/list.h>
diff -Nru a/drivers/usb/media/pwc.h b/drivers/usb/media/pwc.h
--- a/drivers/usb/media/pwc.h Wed Dec 18 00:35:03 2002
+++ b/drivers/usb/media/pwc.h Wed Dec 18 00:35:03 2002
@@ -60,8 +60,8 @@
/* Version block */
#define PWC_MAJOR 8
-#define PWC_MINOR 9
-#define PWC_VERSION "8.9"
+#define PWC_MINOR 10
+#define PWC_VERSION "8.10"
#define PWC_NAME "pwc"
/* Turn certain features on/off */
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel