Web lists-archives.org

[Spca50x-devs] Add support Creative Live! Cam Notebook Pro (gspcaV2)




Hi Michel  and all, 
Enclosed patch for gspca-20060813 add support  Creative Live! Cam Notebook Pro  (ID 0x041e:0x4051) in V4L2 gspcaV2 driver.
Works correctly only with  luvcview-20060706.

Regards,
Serge A. Suchkov
--
Don't change the reason, just change the excuses!
		-- Joe Cointment
diff -u -r -N gspcav2/gspcaV2.c gspcav2/gspcaV2.c
--- gspcav2/gspcaV2.c	2006-06-18 14:35:00.000000000 +0200
+++ gspcav2/gspcaV2.c	2006-08-25 14:02:36.000000000 +0200
@@ -289,6 +289,7 @@
 	LogitechQCCool,
 	QCimconnect,
 	QCmessenger,
+	CreativeLiveCamNotebookPro,
 	LastCamera
 };
 static struct cam_list clist[] = {
@@ -457,6 +458,7 @@
 	{LogitechQCCool, "Logitech QuickCam Cool"},
 	{QCimconnect, "Logitech QuickCam IM/Connect "},
 	{QCmessenger, "Logitech QuickCam Messenger "},
+	{CreativeLiveCamNotebookPro, "Creative Live!Cam Notebook Pro"},
 	{-1, NULL}
 };
 static __devinitdata struct usb_device_id device_table[] = {
@@ -627,6 +629,7 @@
 	{USB_DEVICE(0x046d, 0x08ac)},	/* Logitech QuickCam Cool */
 	{USB_DEVICE(0x046d, 0x08d9)},	/* Logitech QuickCam IM/Connect */
 	{USB_DEVICE(0x046d, 0x08da)},	/* Logitech QuickCam Messenger */
+	{USB_DEVICE(0x041e, 0x4051)},	/* Creative Live!Cam Notebook Pro (FV0205)*/
 	{USB_DEVICE(0x0000, 0x0000)},	/* MystFromOri Unknow Camera */
 	{}			/* Terminating entry */
 };
diff -u -r -N gspcav2/gspcaV2.h gspcav2/gspcaV2.h
--- gspcav2/gspcaV2.h	2006-06-14 13:36:31.000000000 +0200
+++ gspcav2/gspcaV2.h	2006-08-25 14:02:05.000000000 +0200
@@ -86,7 +86,7 @@
 #define SENSOR_PB100_BA 4
 #define SENSOR_PB100_92 5
 #define SENSOR_PAS106_80 6
-#define SENSOR_TAS5130C 7
+#define SENSOR_TAS5130CXX 7
 #define SENSOR_ICM105A 8
 #define SENSOR_HDCS2020 9
 #define SENSOR_PAS106 10
@@ -101,6 +101,7 @@
 #define SENSOR_PAS202 19
 #define SENSOR_PAC207 20
 #define SENSOR_OV7630C 21
+#define SENSOR_TAS5130C_FV0250 22
 /* Sequence packet identifier for a dropped packet */
 #define SPCA50X_SEQUENCE_DROP 0xFF
 /* Offsets into the 10 byte header on the first ISO packet */
@@ -298,6 +299,12 @@
 	cam_set_ctrl set_ctrl;
 	cam_get_ctrl get_ctrl;
 	cam_query_ctrl query_ctrl;
+	cam_ops  set_50HZ;
+	cam_ops  set_60HZ;
+	cam_ops  set_50HZScale;
+	cam_ops  set_60HZScale;
+	cam_ops  set_NoFliker;
+	cam_ops  set_NoFlikerScale;
 };
 
 struct gspca_device{
diff -u -r -N gspcav2/Sonix/sonix.h gspcav2/Sonix/sonix.h
--- gspcav2/Sonix/sonix.h	2006-08-05 15:14:02.000000000 +0200
+++ gspcav2/Sonix/sonix.h	2006-08-14 18:04:11.000000000 +0200
@@ -392,7 +392,7 @@
 	__u8 i2cp202[] = { 0xA0, 0x40, 0x10, 0x0E, 0x31, 0x00, 0x63, 0x15 };
 	__u8 i2cpdoit[] = { 0xA0, 0x40, 0x11, 0x01, 0x31, 0x00, 0x63, 0x16 };
 	__u8 i2cpexpo[] = { 0xB0, 0x40, 0x0e, 0x01, 0xab, 0x00, 0x63, 0x16 };
-	if (gspca_dev->sensor == SENSOR_TAS5130C ||
+	if (gspca_dev->sensor == SENSOR_TAS5130CXX ||
 	    gspca_dev->sensor == SENSOR_TAS5110) {
 		value = (0xFF - gspca_dev->stream_param.brightness);
 		i2c[4] = value & 0xFF;
@@ -621,7 +621,7 @@
 		CompressCtrl[1] = 0x20;
 		MCK_SIZE = 0x20;
 		break;
-	case SENSOR_TAS5130C:
+	case SENSOR_TAS5130CXX:
 		sn9c10x = initTas5130;
 		compress = gspca_dev->mode << 4 | COMP;
 		CompressCtrl[0] = compress;
@@ -686,7 +686,7 @@
 	/* Set the whole registers from the template */
 	sonixRegWrite(dev, 0x08, 0x01, 0x0000, sn9c10x, 0x1f);
 	switch (gspca_dev->sensor) {
-	case SENSOR_TAS5130C:
+	case SENSOR_TAS5130CXX:
 		err = tas5130_I2cinit(gspca_dev);
 		break;
 	case SENSOR_PAS106:
@@ -746,7 +746,7 @@
 		camera->type = SN9C;
 	switch (gspca_dev->sensor) {
 	case SENSOR_OV7630:
-	case SENSOR_TAS5130C:
+	case SENSOR_TAS5130CXX:
 	case SENSOR_HV7131R:
 	case SENSOR_MI0360:
 	case SENSOR_PAS202:
@@ -866,7 +866,7 @@
 			case 0x6024:
 			case 0x6025:
 			gspca_dev->desc = Sonix6025;
-			gspca_dev->sensor = SENSOR_TAS5130C;
+			gspca_dev->sensor = SENSOR_TAS5130CXX;
 			camera->customid = SN9C102;
 			camera->i2c_ctrl_reg = 0x20;
 			camera->i2c_base = 0x11;
diff -u -r -N gspcav2/template/vpidvimicro.c gspcav2/template/vpidvimicro.c
--- gspcav2/template/vpidvimicro.c	2006-05-28 11:19:34.000000000 +0200
+++ gspcav2/template/vpidvimicro.c	2006-08-15 22:22:17.000000000 +0200
@@ -90,6 +90,9 @@
 		case 0x4017:	// zc301 chips 
 			gspca_dev->desc = CreativeMobile;
 			goto the_end;
+		case 0x4051:	// zc301 chips 
+			gspca_dev->desc = CreativeLiveCamNotebookPro;
+			goto the_end;
 		}
 		break;
 	case VENDOR_PHILIPS:
diff -u -r -N gspcav2/Vimicro/tas5130c_fv0250.h gspcav2/Vimicro/tas5130c_fv0250.h
--- gspcav2/Vimicro/tas5130c_fv0250.h	1970-01-01 01:00:00.000000000 +0100
+++ gspcav2/Vimicro/tas5130c_fv0250.h	2006-08-25 13:57:39.000000000 +0200
@@ -0,0 +1,326 @@
+/****************************************************************************
+#    		TAS5130C library, firmware version from			    #
+#		Creative Live!Cam Notebook Pro (FV0250)			    #
+# 		Copyright (C) 2004 Michel Xhaard   mxhaard@xxxxxxxx         #
+#  Copyright (C) 2006 Serge Suchkov  Serge.Suchkov@xxxxxxxxxxxxxxxxxxxxxxxx #
+#                                                                           #
+# This program is free software; you can redistribute it and/or modify      #
+# it under the terms of the GNU General Public License as published by      #
+# the Free Software Foundation; either version 2 of the License, or         #
+# (at your option) any later version.                                       #
+#                                                                           #
+# This program is distributed in the hope that it will be useful,           #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of            #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             #
+# GNU General Public License for more details.                              #
+#                                                                           #
+# You should have received a copy of the GNU General Public License         #
+# along with this program; if not, write to the Free Software               #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA #
+#                                                                           #
+****************************************************************************/
+static __u16 tas5130c_fv0250_start_data[][3] = {
+    {0xa0, 0x0001, 0x0000},           //00,00,01,cc,
+    {0xa0, 0x0002, 0x0008},           //00,08,02,cc,
+    {0xa0, 0x0001, 0x0010},           //00,10,01,cc, 
+    {0xa0, 0x0010, 0x0002},           //00,02,00,cc,  0<->10
+    {0xa0, 0x0002, 0x0003},           //00,03,02,cc, 
+    {0xa0, 0x0080, 0x0004},           //00,04,80,cc, 
+    {0xa0, 0x0001, 0x0005},           //00,05,01,cc, 
+    {0xa0, 0x00e0, 0x0006},           //00,06,e0,cc, 
+    {0xa0, 0x0098, 0x008b},           //00,8b,98,cc, 
+    {0xa0, 0x0001, 0x0001},           //00,01,01,cc, 
+    {0xa0, 0x0003, 0x0012},           //00,12,03,cc, 
+    {0xa0, 0x0001, 0x0012},           //00,12,01,cc, 
+    {0xa0, 0x0000, 0x0098},           //00,98,00,cc, 
+    {0xa0, 0x0000, 0x009a},           //00,9a,00,cc, 
+    {0xa0, 0x0000, 0x011a},           //01,1a,00,cc, 
+    {0xa0, 0x0000, 0x011c},           //01,1c,00,cc, 
+    {0xa0, 0x00e8, 0x009c},           //00,9c,e6,cc,  6<->8
+    {0xa0, 0x0088, 0x009e},           //00,9e,86,cc,  6<->8
+    {0xa0, 0x0010, 0x0087},           //00,87,10,cc, 
+    {0xa0, 0x0098, 0x008b},           //00,8b,98,cc, 
+    {0xa0, 0x001b, 0x0092},           //00,1b,24,aa, 
+    {0xa0, 0x0024, 0x0093},            
+    {0xa0, 0x0000, 0x0094},           
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x0000, 0x0039},           //00,00,80,dd, ???
+    {0xa1, 0x0001, 0x0037},           //             ???
+    {0xa0, 0x001b, 0x0092},           //00,1b,00,aa,   
+    {0xa0, 0x0000, 0x0093},
+    {0xa0, 0x0000, 0x0094},
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x0013, 0x0092},           //00,13,02,aa, 
+    {0xa0, 0x0002, 0x0093},
+    {0xa0, 0x0000, 0x0094},
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x0015, 0x0092},           //00,15,04,aa
+    {0xa0, 0x0004, 0x0093},
+    {0xa0, 0x0000, 0x0094},
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x0001, 0x0092},
+    {0xa0, 0x0000, 0x0093},
+    {0xa0, 0x0000, 0x0094},
+    {0xa0, 0x0001, 0x0090},          //00,01,00,aa,   
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x0001, 0x0092},            
+    {0xa0, 0x0000, 0x0093},            
+    {0xa0, 0x0000, 0x0094},            
+    {0xa0, 0x0001, 0x0090},            
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x001a, 0x0092},          //00,1a,00,aa,  
+    {0xa0, 0x0000, 0x0093},            
+    {0xa0, 0x0000, 0x0094},            
+    {0xa0, 0x0001, 0x0090},            
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x001c, 0x0092},          //00,1c,17,aa,  
+    {0xa0, 0x0017, 0x0093},           
+    {0xa0, 0x0000, 0x0094},           
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x0082, 0x0086},           //00,86,82,cc,  
+    {0xa0, 0x0083, 0x0087},           //00,87,83,cc,  
+    {0xa0, 0x0084, 0x0088},           //00,88,84,cc,  
+    {0xa0, 0x0005, 0x0092},           //00,05,10,aa,  
+    {0xa0, 0x0010, 0x0093},           
+    {0xa0, 0x0000, 0x0094},           
+    {0xa0, 0x0001, 0x0090},           
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x000a, 0x0092},           //00,0a,00,aa, 
+    {0xa0, 0x0000, 0x0093},                          
+    {0xa0, 0x0000, 0x0094},          
+    {0xa0, 0x0001, 0x0090},          
+    {0xa1, 0x0001, 0x0091},          
+    {0xa0, 0x000b, 0x0092},           //00,0b,a0,aa, 
+    {0xa0, 0x00a0, 0x0093},                          
+    {0xa0, 0x0000, 0x0094},            
+    {0xa1, 0x0001, 0x0091},           
+    {0xa0, 0x0001, 0x0090},            
+    {0xa0, 0x000c, 0x0092},           //00,0c,00,aa, 
+    {0xa0, 0x0000, 0x0093},           
+    {0xa0, 0x0000, 0x0094},           
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x000d, 0x0092},           //00,0d,a0,aa, 
+    {0xa0, 0x00a0, 0x0093},           
+    {0xa0, 0x0000, 0x0094},                          
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x000e, 0x0092},           //00,0e,00,aa, 
+    {0xa0, 0x0000, 0x0093},
+    {0xa0, 0x0000, 0x0094},
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x000f, 0x0092},           //00,0f,a0,aa,
+    {0xa0, 0x00a0, 0x0093},
+    {0xa0, 0x0000, 0x0094},
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x0010, 0x0092},           //00,10,00,aa,
+    {0xa0, 0x0000, 0x0093},
+    {0xa0, 0x0000, 0x0094},
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x0011, 0x0092},           //00,11,a0,aa,
+    {0xa0, 0x00a0, 0x0093},
+    {0xa0, 0x0000, 0x0094},
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x0000, 0x0039},
+    {0xa1, 0x0001, 0x0037},
+    {0xa0, 0x0016, 0x0092},           //00,16,01,aa,
+    {0xa0, 0x0001, 0x0093},
+    {0xa0, 0x0000, 0x0094},
+    {0xa0, 0x0001, 0x0090},
+    {0xa0, 0x0017, 0x0092},           //00,17,e6,aa,
+    {0xa0, 0x00e8, 0x0093},           //  6<->8 
+    {0xa0, 0x0000, 0x0094},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x0001, 0x0090},
+    {0xa0, 0x0018, 0x0092},           //00,18,02,aa,
+    {0xa0, 0x0002, 0x0093},
+    {0xa0, 0x0000, 0x0094},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x0001, 0x0090},
+    {0xa0, 0x0019, 0x0092},           //00,19,86,aa,
+    {0xa0, 0x0088, 0x0093},           //  6<->8
+    {0xa0, 0x0000, 0x0094},
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x0020, 0x0092},           //00,20,20,aa,
+    {0xa0, 0x0020, 0x0093},           
+    {0xa0, 0x0000, 0x0094},
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x00b7, 0x0101},           //01,01,b7,cc,
+    {0xa0, 0x0005, 0x0012},           //00,12,05,cc, 
+    {0xa0, 0x000d, 0x0100},           //01,00,0d,cc, 
+    {0xa0, 0x0076, 0x0189},           //01,89,76,cc,
+    {0xa0, 0x0009, 0x01ad},           //01,ad,09,cc,
+    {0xa0, 0x0003, 0x01c5},           //01,c5,03,cc,
+    {0xa0, 0x0013, 0x01cb},           //01,cb,13,cc,
+    {0xa0, 0x0008, 0x0250},           //02,50,08,cc,
+    {0xa0, 0x0008, 0x0301},           //03,01,08,cc,
+    {0xa0, 0x0060, 0x01a8},           //01,a8,60,cc,
+    {0xa0, 0x0061, 0x0116},           //01,16,61,cc,
+    {0xa0, 0x0065, 0x0118},           //01,18,65,cc  
+ /********************/
+    {0, 0, 0}
+};
+
+static __u16 tas5130c_fv0250_scale_data[][3] = {
+    {0xa0, 0x0001, 0x0000},          //00,00,01,cc,
+    {0xa0, 0x0002, 0x0008},          //00,08,02,cc,
+    {0xa0, 0x0001, 0x0010},          //00,10,01,cc,
+    {0xa0, 0x0000, 0x0002},          //00,02,10,cc, 
+    {0xa0, 0x0002, 0x0003},          //00,03,02,cc, 
+    {0xa0, 0x0080, 0x0004},          //00,04,80,cc, 
+    {0xa0, 0x0001, 0x0005},          //00,05,01,cc, 
+    {0xa0, 0x00e0, 0x0006},          //00,06,e0,cc, 
+    {0xa0, 0x0098, 0x008b},          //00,8b,98,cc, 
+    {0xa0, 0x0001, 0x0001},          //00,01,01,cc, 
+    {0xa0, 0x0003, 0x0012},          //00,12,03,cc, 
+    {0xa0, 0x0001, 0x0012},          //00,12,01,cc, 
+    {0xa0, 0x0000, 0x0098},          //00,98,00,cc, 
+    {0xa0, 0x0000, 0x009a},          //00,9a,00,cc, 
+    {0xa0, 0x0000, 0x011a},          //01,1a,00,cc, 
+    {0xa0, 0x0000, 0x011c},          //01,1c,00,cc, 
+    {0xa0, 0x00e8, 0x009c},          //00,9c,e8,cc, 8<->6 
+    {0xa0, 0x0088, 0x009e},          //00,9e,88,cc, 8<->6 
+    {0xa0, 0x0010, 0x0087},          //00,87,10,cc,      
+    {0xa0, 0x0098, 0x008b},          //00,8b,98,cc,      
+    {0xa0, 0x001b, 0x0092},          //00,1b,24,aa,      
+    {0xa0, 0x0024, 0x0093},             
+    {0xa0, 0x0000, 0x0094},                              
+    {0xa0, 0x0001, 0x0090},                              
+    {0xa1, 0x0001, 0x0091},                              
+    {0xa0, 0x0000, 0x0039},          //00,00,80,dd, ??                   
+    {0xa1, 0x0001, 0x0037},          //             ??        
+    {0xa0, 0x001b, 0x0092},          //00,1b,00,aa,                    
+    {0xa0, 0x0000, 0x0093},                              
+    {0xa0, 0x0000, 0x0094},                              
+    {0xa0, 0x0001, 0x0090},                
+    {0xa1, 0x0001, 0x0091},                              
+    {0xa0, 0x0013, 0x0092},          //00,13,02,aa,                    
+    {0xa0, 0x0002, 0x0093},                              
+    {0xa0, 0x0000, 0x0094},                
+    {0xa0, 0x0001, 0x0090},                              
+    {0xa1, 0x0001, 0x0091},                              
+    {0xa0, 0x0015, 0x0092},          //00,15,04,aa                     
+    {0xa0, 0x0004, 0x0093},                              
+    {0xa0, 0x0000, 0x0094},
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x0001, 0x0092},            
+    {0xa0, 0x0000, 0x0093},         //00,01,00,aa,   
+    {0xa0, 0x0000, 0x0094},           
+    {0xa0, 0x0001, 0x0090},           
+    {0xa1, 0x0001, 0x0091},           
+    {0xa0, 0x0001, 0x0092},           
+    {0xa0, 0x0000, 0x0093},           
+    {0xa0, 0x0000, 0x0094},           
+    {0xa0, 0x0001, 0x0090},           
+    {0xa1, 0x0001, 0x0091},           
+    {0xa0, 0x001a, 0x0092},         //00,1a,00,aa, 
+    {0xa0, 0x0000, 0x0093},          
+    {0xa0, 0x0000, 0x0094},           
+    {0xa0, 0x0001, 0x0090},         
+    {0xa1, 0x0001, 0x0091},            
+    {0xa0, 0x001c, 0x0092},         //00,1c,17,aa,  
+    {0xa0, 0x0017, 0x0093},           
+    {0xa0, 0x0000, 0x0094},          
+    {0xa0, 0x0001, 0x0090},           
+    {0xa1, 0x0001, 0x0091},          
+    {0xa0, 0x0082, 0x0086},          //00,86,82,cc, 
+    {0xa0, 0x0083, 0x0087},          //00,87,83,cc, 
+    {0xa0, 0x0084, 0x0088},          //00,88,84,cc, 
+    {0xa0, 0x0005, 0x0092},          //00,05,10,aa,
+    {0xa0, 0x0010, 0x0093},          
+    {0xa0, 0x0000, 0x0094},          
+    {0xa0, 0x0001, 0x0090},          
+    {0xa1, 0x0001, 0x0091},          
+    {0xa0, 0x000a, 0x0092},          //00,0a,00,aa, 
+    {0xa0, 0x0000, 0x0093},                         
+    {0xa0, 0x0000, 0x0094},         
+    {0xa0, 0x0001, 0x0090},         
+    {0xa1, 0x0001, 0x0091},         
+    {0xa0, 0x000b, 0x0092},          //00,0b,a0,aa, 
+    {0xa0, 0x00a0, 0x0093},          
+    {0xa0, 0x0000, 0x0094},          
+    {0xa1, 0x0001, 0x0091},          
+    {0xa0, 0x0001, 0x0090},            
+    {0xa0, 0x000c, 0x0092},          //00,0c,00,aa,  
+    {0xa0, 0x0000, 0x0093},           
+    {0xa0, 0x0000, 0x0094},          
+    {0xa0, 0x0001, 0x0090},           
+    {0xa1, 0x0001, 0x0091},           
+    {0xa0, 0x000d, 0x0092},          //00,0d,a0,aa, 
+    {0xa0, 0x00a0, 0x0093},          
+    {0xa0, 0x0000, 0x0094},          
+    {0xa0, 0x0001, 0x0090},          
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x000e, 0x0092},          //00,0e,00,aa,
+    {0xa0, 0x0000, 0x0093},          
+    {0xa0, 0x0000, 0x0094},          
+    {0xa0, 0x0001, 0x0090},          
+    {0xa1, 0x0001, 0x0091},          
+    {0xa0, 0x000f, 0x0092},          //00,0f,a0,aa, 
+    {0xa0, 0x00a0, 0x0093},          
+    {0xa0, 0x0000, 0x0094},          
+    {0xa0, 0x0001, 0x0090},           
+    {0xa1, 0x0001, 0x0091},          
+    {0xa0, 0x0010, 0x0092},          //00,10,00,aa,                
+    {0xa0, 0x0000, 0x0093},
+    {0xa0, 0x0000, 0x0094},
+    {0xa0, 0x0001, 0x0090},         
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x0011, 0x0092},          //00,11,a0,aa,
+    {0xa0, 0x00a0, 0x0093},         
+    {0xa0, 0x0000, 0x0094},         
+    {0xa0, 0x0001, 0x0090},          
+    {0xa1, 0x0001, 0x0091},         
+    {0xa0, 0x0000, 0x0039},         
+    {0xa1, 0x0001, 0x0037},          
+    {0xa0, 0x0016, 0x0092},          //00,16,01,aa, 
+    {0xa0, 0x0001, 0x0093},
+    {0xa0, 0x0000, 0x0094},
+    {0xa0, 0x0001, 0x0090},          
+    {0xa0, 0x0017, 0x0092},          //00,17,e6,aa
+    {0xa0, 0x00e8, 0x0093},          // 8<->6         
+    {0xa0, 0x0000, 0x0094},          
+    {0xa1, 0x0001, 0x0091},          
+    {0xa0, 0x0001, 0x0090},          
+    {0xa0, 0x0018, 0x0092},          //00,18,02,aa,
+    {0xa0, 0x0002, 0x0093},          
+    {0xa0, 0x0000, 0x0094},          
+    {0xa1, 0x0001, 0x0091},          
+    {0xa0, 0x0001, 0x0090},          
+    {0xa0, 0x0019, 0x0092},          //00,19,88,aa,
+    {0xa0, 0x0088, 0x0093},          //  8<->6          
+    {0xa0, 0x0000, 0x0094},          
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x0020, 0x0092},          //00,20,20,aa,
+    {0xa0, 0x0020, 0x0093},
+    {0xa0, 0x0000, 0x0094},
+    {0xa0, 0x0001, 0x0090},
+    {0xa1, 0x0001, 0x0091},
+    {0xa0, 0x00b7, 0x0101},          //01,01,b7,cc, 
+    {0xa0, 0x0005, 0x0012},          //00,12,05,cc, 
+    {0xa0, 0x000d, 0x0100},          //01,00,0d,cc, 
+    {0xa0, 0x0076, 0x0189},          //01,89,76,cc, 
+    {0xa0, 0x0009, 0x01ad},          //01,ad,09,cc, 
+    {0xa0, 0x0003, 0x01c5},          //01,c5,03,cc, 
+    {0xa0, 0x0013, 0x01cb},          //01,cb,13,cc, 
+    {0xa0, 0x0008, 0x0250},          //02,50,08,cc, 
+    {0xa0, 0x0008, 0x0301},          //03,01,08,cc, 
+    {0xa0, 0x0060, 0x01a8},          //01,a8,60,cc, 
+    {0xa0, 0x0061, 0x0116},          //01,16,61,cc, 
+    {0xa0, 0x0065, 0x0118},          //01,18,65,cc  
+ /********************/                                                           
+    {0, 0, 0}                                                                       
+};                                                                                
diff -u -r -N gspcav2/Vimicro/zc3xx.h gspcav2/Vimicro/zc3xx.h
--- gspcav2/Vimicro/zc3xx.h	2006-08-05 15:45:41.000000000 +0200
+++ gspcav2/Vimicro/zc3xx.h	2006-08-25 14:01:21.000000000 +0200
@@ -22,6 +22,7 @@
 #                                                                           #
 ****************************************************************************/
 #include "tas5130c.h"
+#include "tas5130c_fv0250.h"
 #include "icm105a.h"
 #include "hdcs2020.h"
 #include "hv7131b.h"
@@ -31,7 +32,6 @@
 #include "pas106b.h"
 #include "ov7630c.h"
 /*******************     Camera Interface   ***********************/
-
 static int zc3xx_init(struct gspca_device *gspca_dev);
 static int zc3xx_config(struct gspca_device *gspca_dev);
 static void zc3xx_start(struct gspca_device *gspca_dev);
@@ -385,15 +385,18 @@
 }
 
 #define CLAMP(x) (unsigned char)(((x)>0xFF)?0xff:(((x)<1)?1:(x)))
-
-static __u8 Tgamma[16] =
-    { 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, 0xd4, 0xdf, 0xe7,
-0xee, 0xf4, 0xf9, 0xfc, 0xff };
-static __u8 Tgradient[16] =
-    { 0x26, 0x22, 0x20, 0x1c, 0x16, 0x13, 0x10, 0x0d, 0x0b, 0x09, 0x07,
-0x06, 0x05, 0x04, 0x03, 0x02 };
-//static __u8 Tgamma[16]={0x24,0x44,0x64,0x84,0x9d,0xb2,0xc4,0xd3,0xe0,0xeb,0xf4,0xff,0xff,0xff,0xff,0xff}; //CS2102
-//static __u8 Tgradient[16]={0x18,0x20,0x20,0x1c,0x16,0x13,0x10,0x0e,0x0b,0x09,0x07,0x00,0x00,0x00,0x00,0x01};
+static __u8 Tgamma_default[16] =
+    { 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff };
+static __u8 Tgradient_default[16] =
+    { 0x26, 0x22, 0x20, 0x1c, 0x16, 0x13, 0x10, 0x0d, 0x0b, 0x09, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02 };
+static __u8 Tgamma_FV0250[16] =
+    { 0x04, 0x16, 0x30, 0x4e, 0x68, 0x81, 0x98, 0xac, 0xbe, 0xcd, 0xda, 0xe4, 0xed, 0xf5, 0xfb, 0xff };
+static __u8 Tgradient_FV0250[16] =
+    { 0x00, 0x16, 0x1b, 0x1c, 0x19, 0x18, 0x15, 0x12, 0x10, 0x0d, 0x0b, 0x09, 0x08, 0x06, 0x05, 0x00 };
+static __u8 Tgamma_CS2102[16] =
+    { 0x24, 0x44, 0x64, 0x84, 0x9d, 0xb2, 0xc4, 0xd3, 0xe0, 0xeb, 0xf4, 0xff, 0xff, 0xff, 0xff ,0xff }; 
+static __u8 Tgradient_CS2102[16] = 
+    { 0x18, 0x20, 0x20, 0x1c, 0x16, 0x13, 0x10, 0x0e, 0x0b, 0x09, 0x07, 0x00, 0x00, 0x00, 0x00, 0x01 };
 
 static __u16 zc3xx_initcontrol(struct gspca_device *gspca_dev)
 {
@@ -430,9 +433,23 @@
     int gr0 = 0;
     int index = 0;
     int i;
+    __u8 *   Tgamma = Tgamma_default;
+    __u8 *   Tgradient = Tgradient_default;
     /* now get the index of gamma table */
     index = zc3xx_getcontrast(gspca_dev);
     PDEBUG(2, "starting new table index %d ", index);
+
+    switch (gspca_dev->sensor) {
+     case SENSOR_TAS5130C_FV0250:
+       Tgamma = Tgamma_FV0250;
+       Tgradient = Tgradient_FV0250;
+     break;
+     case SENSOR_CS2102:
+       Tgamma = Tgamma_CS2102;
+       Tgradient = Tgradient_CS2102;
+     break;
+    }
+
     for (i = 0; i < 16; i++) {
 	gm0 = Tgamma[i] * index >> 2;
 	gr0 = Tgradient[i] * index >> 2;
@@ -444,13 +461,14 @@
 
 static __u16 zc3xx_getcolors(struct gspca_device *gspca_dev)
 {	
-return gspca_dev->stream_param.colors;
+ return gspca_dev->stream_param.colors;
 }
 
 static void zc3xx_setcolors(struct gspca_device *gspca_dev)
 {
 	gspca_dev->stream_param.colors = zc3xx_controls[GSPCA_COLOR].default_value;
 }
+
 static void zc3xx_setAutobright(struct gspca_device *gspca_dev)
 {
     __u8 autoval = 0;
@@ -577,13 +595,20 @@
     camera->epaddr = 0x01;
     camera->transfert = USB_ENDPOINT_XFER_ISOC;
     camera->type = JPGH;
+
+    PDEBUG(0, "Sensor ID:%d",gspca_dev->sensor);
     
     sensor = zcxx_probeSensor(gspca_dev);
     switch (sensor) {
     case -1:
-	PDEBUG(0, "Find Sensor UNKNOW_0 force Tas5130");
-	gspca_dev->sensor = SENSOR_TAS5130C;
-	set_zc3xxVGA(gspca_dev);
+         if(gspca_dev->sensor == SENSOR_TAS5130C_FV0250) {
+            PDEBUG(0, "Find Sensor Tas5130 (FV0205)");
+	    set_zc3xxVGA(gspca_dev);
+        } else { 	
+	    PDEBUG(0, "Find Sensor UNKNOW_0 force Tas5130");
+	    gspca_dev->sensor = SENSOR_TAS5130CXX;
+	    set_zc3xxVGA(gspca_dev);
+	}
 	break;
     case 0:
 	PDEBUG(0, "Find Sensor HV7131B");
@@ -648,7 +673,7 @@
 	break;
     case 0x10:
 	PDEBUG(0, "Find Sensor TAS5130");
-	gspca_dev->sensor = SENSOR_TAS5130C;
+	gspca_dev->sensor = SENSOR_TAS5130CXX;
 	set_zc3xxVGA(gspca_dev);
 	break;
     case 0x11:
@@ -658,7 +683,7 @@
 	break;
     case 0x12:
 	PDEBUG(0, "Find Sensor TAS5130");
-	gspca_dev->sensor = SENSOR_TAS5130C;
+	gspca_dev->sensor = SENSOR_TAS5130CXX;
 	set_zc3xxVGA(gspca_dev);
 	break;
     case 0x13:
@@ -722,7 +747,7 @@
     int err = 0;
     /* Assume start use the good resolution from gspca_dev->mode */
     switch (gspca_dev->sensor) {
-    case SENSOR_TAS5130C:
+    case SENSOR_TAS5130CXX:
 	if (gspca_dev->mode) {
 	    /* 320x240 */
 	    err = zc3xxWriteVector(dev, tas5130cxx_start_data);
@@ -731,6 +756,15 @@
 	    err = zc3xxWriteVector(dev, tas5130cxx_scale_data);
 	}
 	break;
+    case SENSOR_TAS5130C_FV0250: // Firmware version 0250
+	if (gspca_dev->mode) {
+	    /* 320x240 */
+	    err = zc3xxWriteVector(dev, tas5130c_fv0250_start_data);
+	} else {
+	    /* 640x480 */
+	    err = zc3xxWriteVector(dev, tas5130c_fv0250_scale_data);
+	}
+	break;
     case SENSOR_ICM105A:
 	if (gspca_dev->mode) {
 	    /* 320x240 */
@@ -968,6 +1002,10 @@
 		case 0x4017:	// zc301 chips 
 			gspca_dev->desc = CreativeMobile;
 			goto the_end;
+		case 0x4051:	// zc301 chips 
+			gspca_dev->desc   = CreativeLiveCamNotebookPro;
+			gspca_dev->sensor = SENSOR_TAS5130C_FV0250; // 
+			goto the_end;
 		}
 		break;
 	case VENDOR_PHILIPS:
@@ -1034,5 +1072,4 @@
 	gspca_dev->bridge = BRIDGE_ZC3XX;
 	return product;
 }
-
 #endif				// ZC3XXUSB_H
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Spca50x-devs mailing list
Spca50x-devs@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/spca50x-devs