Commit a256185c authored by Nemosoft Unv's avatar Nemosoft Unv Committed by Greg Kroah-Hartman

[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
parent f28bef0c
...@@ -446,8 +446,8 @@ int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frame ...@@ -446,8 +446,8 @@ int pwc_set_video_mode(struct pwc_device *pdev, int width, int height, int frame
Info("Video mode %s@%d fps is only supported with the decompressor module (pwcx).\n", size2name[size], frames); Info("Video mode %s@%d fps is only supported with the decompressor module (pwcx).\n", size2name[size], frames);
else { else {
Err("Failed to set video mode %s@%d fps; return code = %d\n", size2name[size], frames, ret); 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.x = width;
pdev->view.y = height; pdev->view.y = height;
...@@ -1535,6 +1535,14 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg) ...@@ -1535,6 +1535,14 @@ int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
break; break;
} }
case VIDIOCPWCGREALSIZE:
{
struct pwc_imagesize *size = arg;
size->width = pdev->image.x;
size->height = pdev->image.y;
break;
}
default: default:
ret = -ENOIOCTLCMD; ret = -ENOIOCTLCMD;
......
...@@ -77,7 +77,7 @@ static struct usb_device_id pwc_device_table [] = { ...@@ -77,7 +77,7 @@ static struct usb_device_id pwc_device_table [] = {
{ USB_DEVICE(0x0471, 0x0312) }, { USB_DEVICE(0x0471, 0x0312) },
{ USB_DEVICE(0x069A, 0x0001) }, /* Askey */ { USB_DEVICE(0x069A, 0x0001) }, /* Askey */
{ USB_DEVICE(0x046D, 0x08b0) }, /* Logitech QuickCam Pro 3000 */ { 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, 0x08b2) }, /* Logitech QuickCam Pro 4000 */
{ USB_DEVICE(0x046D, 0x08b3) }, /* Logitech QuickCam Zoom */ { USB_DEVICE(0x046D, 0x08b3) }, /* Logitech QuickCam Zoom */
{ USB_DEVICE(0x055D, 0x9000) }, /* Samsung */ { USB_DEVICE(0x055D, 0x9000) }, /* Samsung */
...@@ -1064,7 +1064,6 @@ static int pwc_video_open(struct inode *inode, struct file *file) ...@@ -1064,7 +1064,6 @@ static int pwc_video_open(struct inode *inode, struct file *file)
i = pwc_isoc_init(pdev); i = pwc_isoc_init(pdev);
if (i) { if (i) {
Trace(TRACE_OPEN, "Failed to init ISOC stuff = %d.\n", i); Trace(TRACE_OPEN, "Failed to init ISOC stuff = %d.\n", i);
MOD_DEC_USE_COUNT;
up(&pdev->modlock); up(&pdev->modlock);
return i; return i;
} }
...@@ -1689,8 +1688,8 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id ...@@ -1689,8 +1688,8 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
type_id = 730; type_id = 730;
break; break;
case 0x08b1: case 0x08b1:
Info("Logitech QuickCam for Noteboos USB webcam detected.\n"); Info("Logitech QuickCam Notebook Pro USB webcam detected.\n");
name = "Logitech QuickCam Notebook"; name = "Logitech QuickCam Notebook Pro";
type_id = 740; /* ?? unknown sensor */ type_id = 740; /* ?? unknown sensor */
break; break;
case 0x08b2: case 0x08b2:
......
...@@ -18,12 +18,13 @@ ...@@ -18,12 +18,13 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 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 Changes
2001/08/03 Alvarado Added ioctl constants to access methods for 2001/08/03 Alvarado Added ioctl constants to access methods for
changing white balance and red/blue gains 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. /* These are private ioctl() commands, specific for the Philips webcams.
...@@ -104,7 +105,12 @@ struct pwc_leds ...@@ -104,7 +105,12 @@ struct pwc_leds
int led_off; /* Led off-time; range = 0..25000 */ int led_off; /* Led off-time; range = 0..25000 */
}; };
/* Image size (used with GREALSIZE) */
struct pwc_imagesize
{
int width;
int height;
};
/* Restore user settings */ /* Restore user settings */
#define VIDIOCPWCRUSER _IO('v', 192) #define VIDIOCPWCRUSER _IO('v', 192)
...@@ -173,4 +179,7 @@ struct pwc_leds ...@@ -173,4 +179,7 @@ struct pwc_leds
#define VIDIOCPWCSDYNNOISE _IOW('v', 209, int) #define VIDIOCPWCSDYNNOISE _IOW('v', 209, int)
#define VIDIOCPWCGDYNNOISE _IOR('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 #endif
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
significant change should be reflected by increasing the significant change should be reflected by increasing the
pwc_decompressor_version major number. pwc_decompressor_version major number.
*/ */
#ifndef PWC_DEC_H #ifndef PWC_UNCOMPRESS_H
#define PWC_DEC_H #define PWC_UNCOMPRESS_H
#include <linux/config.h> #include <linux/config.h>
#include <linux/list.h> #include <linux/list.h>
......
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
/* Version block */ /* Version block */
#define PWC_MAJOR 8 #define PWC_MAJOR 8
#define PWC_MINOR 9 #define PWC_MINOR 10
#define PWC_VERSION "8.9" #define PWC_VERSION "8.10"
#define PWC_NAME "pwc" #define PWC_NAME "pwc"
/* Turn certain features on/off */ /* Turn certain features on/off */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment