diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2010-01-04 14:09:47 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 13:10:28 -0500 |
commit | 38719d45f937178718d49516d1f72208d5d72d22 (patch) | |
tree | 2962193853fe57138c821926a13e9c38fba91cd7 /drivers/media/video/gspca/zc3xx.c | |
parent | fd18046fffc24b06c9820d9b540c518fc0e1b627 (diff) |
V4L/DVB (13896): gspca - zc3xx: Adjust the pas202b exchanges.
- adapt the start sequences from the info file of the ms-win driver
of the webcams 046d:08a2/046d:08aa (lvWIMv.inf)
- disable the brightness for this sensor
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/zc3xx.c')
-rw-r--r-- | drivers/media/video/gspca/zc3xx.c | 133 |
1 files changed, 77 insertions, 56 deletions
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index d217c042dee..845d691d2f3 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c | |||
@@ -3972,10 +3972,10 @@ static const struct usb_action pas106b_NoFliker[] = { | |||
3972 | {} | 3972 | {} |
3973 | }; | 3973 | }; |
3974 | 3974 | ||
3975 | /* from usbvm31b.inf */ | 3975 | /* from lvWIMv.inf 046d:08a2/:08aa 2007/06/03 */ |
3976 | static const struct usb_action pas202b_Initial[] = { /* 640x480 */ | 3976 | static const struct usb_action pas202b_Initial[] = { /* 640x480 */ |
3977 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ | 3977 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
3978 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, /* 00,08,00,cc */ | 3978 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
3979 | {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0e,cc */ | 3979 | {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0e,cc */ |
3980 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* 00,02,00,cc */ | 3980 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* 00,02,00,cc */ |
3981 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ | 3981 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
@@ -4000,7 +4000,7 @@ static const struct usb_action pas202b_Initial[] = { /* 640x480 */ | |||
4000 | {0xaa, 0x09, 0x0006}, /* 00,09,06,aa */ | 4000 | {0xaa, 0x09, 0x0006}, /* 00,09,06,aa */ |
4001 | {0xaa, 0x0a, 0x0001}, /* 00,0a,01,aa */ | 4001 | {0xaa, 0x0a, 0x0001}, /* 00,0a,01,aa */ |
4002 | {0xaa, 0x0b, 0x0001}, /* 00,0b,01,aa */ | 4002 | {0xaa, 0x0b, 0x0001}, /* 00,0b,01,aa */ |
4003 | {0xaa, 0x0c, 0x0008}, /* 00,0c,08,aa */ | 4003 | {0xaa, 0x0c, 0x0006}, |
4004 | {0xaa, 0x0d, 0x0000}, /* 00,0d,00,aa */ | 4004 | {0xaa, 0x0d, 0x0000}, /* 00,0d,00,aa */ |
4005 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ | 4005 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
4006 | {0xaa, 0x12, 0x0005}, /* 00,12,05,aa */ | 4006 | {0xaa, 0x12, 0x0005}, /* 00,12,05,aa */ |
@@ -4019,13 +4019,13 @@ static const struct usb_action pas202b_Initial[] = { /* 640x480 */ | |||
4019 | }; | 4019 | }; |
4020 | static const struct usb_action pas202b_InitialScale[] = { /* 320x240 */ | 4020 | static const struct usb_action pas202b_InitialScale[] = { /* 320x240 */ |
4021 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ | 4021 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
4022 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, /* 00,08,00,cc */ | 4022 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
4023 | {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0e,cc */ | 4023 | {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0e,cc */ |
4024 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ | 4024 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
4025 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ | 4025 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
4026 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ | 4026 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
4027 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ | 4027 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
4028 | {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d0,cc */ | 4028 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
4029 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ | 4029 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
4030 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ | 4030 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
4031 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ | 4031 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
@@ -4035,7 +4035,7 @@ static const struct usb_action pas202b_InitialScale[] = { /* 320x240 */ | |||
4035 | {0xa0, 0x08, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,08,cc */ | 4035 | {0xa0, 0x08, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,08,cc */ |
4036 | {0xa0, 0x02, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,02,cc */ | 4036 | {0xa0, 0x02, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,02,cc */ |
4037 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ | 4037 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ |
4038 | {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,d8,cc */ | 4038 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
4039 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ | 4039 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ |
4040 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ | 4040 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
4041 | {0xaa, 0x02, 0x0002}, /* 00,02,02,aa */ | 4041 | {0xaa, 0x02, 0x0002}, /* 00,02,02,aa */ |
@@ -4044,7 +4044,7 @@ static const struct usb_action pas202b_InitialScale[] = { /* 320x240 */ | |||
4044 | {0xaa, 0x09, 0x0006}, /* 00,09,06,aa */ | 4044 | {0xaa, 0x09, 0x0006}, /* 00,09,06,aa */ |
4045 | {0xaa, 0x0a, 0x0001}, /* 00,0a,01,aa */ | 4045 | {0xaa, 0x0a, 0x0001}, /* 00,0a,01,aa */ |
4046 | {0xaa, 0x0b, 0x0001}, /* 00,0b,01,aa */ | 4046 | {0xaa, 0x0b, 0x0001}, /* 00,0b,01,aa */ |
4047 | {0xaa, 0x0c, 0x0008}, /* 00,0c,08,aa */ | 4047 | {0xaa, 0x0c, 0x0006}, |
4048 | {0xaa, 0x0d, 0x0000}, /* 00,0d,00,aa */ | 4048 | {0xaa, 0x0d, 0x0000}, /* 00,0d,00,aa */ |
4049 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ | 4049 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
4050 | {0xaa, 0x12, 0x0005}, /* 00,12,05,aa */ | 4050 | {0xaa, 0x12, 0x0005}, /* 00,12,05,aa */ |
@@ -4059,6 +4059,8 @@ static const struct usb_action pas202b_InitialScale[] = { /* 320x240 */ | |||
4059 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ | 4059 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
4060 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ | 4060 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
4061 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, /* 01,8d,70,cc */ | 4061 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, /* 01,8d,70,cc */ |
4062 | {0xa0, 0xff, ZC3XX_R097_WINYSTARTHIGH}, | ||
4063 | {0xa0, 0xfe, ZC3XX_R098_WINYSTARTLOW}, | ||
4062 | {} | 4064 | {} |
4063 | }; | 4065 | }; |
4064 | static const struct usb_action pas202b_50HZ[] = { | 4066 | static const struct usb_action pas202b_50HZ[] = { |
@@ -4066,22 +4068,22 @@ static const struct usb_action pas202b_50HZ[] = { | |||
4066 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ | 4068 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
4067 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ | 4069 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
4068 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ | 4070 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ |
4069 | {0xaa, 0x21, 0x0068}, /* 00,21,68,aa */ | 4071 | {0xaa, 0x21, 0x001b}, |
4070 | {0xaa, 0x03, 0x0044}, /* 00,03,44,aa */ | 4072 | {0xaa, 0x03, 0x0044}, /* 00,03,44,aa */ |
4071 | {0xaa, 0x04, 0x0009}, /* 00,04,09,aa */ | 4073 | {0xaa, 0x04, 0x0008}, |
4072 | {0xaa, 0x05, 0x0028}, /* 00,05,28,aa */ | 4074 | {0xaa, 0x05, 0x001b}, |
4073 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ | 4075 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
4074 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ | 4076 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
4075 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,14,cc */ | 4077 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
4076 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ | 4078 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
4077 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ | 4079 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
4078 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,07,cc */ | 4080 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
4079 | {0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,d2,cc */ | 4081 | {0xa0, 0x1b, ZC3XX_R192_EXPOSURELIMITLOW}, |
4080 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ | 4082 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
4081 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ | 4083 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
4082 | {0xa0, 0x4d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,4d,cc */ | 4084 | {0xa0, 0x4d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,4d,cc */ |
4083 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ | 4085 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
4084 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ | 4086 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
4085 | {0xa0, 0x44, ZC3XX_R01D_HSYNC_0}, /* 00,1d,44,cc */ | 4087 | {0xa0, 0x44, ZC3XX_R01D_HSYNC_0}, /* 00,1d,44,cc */ |
4086 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ | 4088 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ |
4087 | {0xa0, 0xad, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ad,cc */ | 4089 | {0xa0, 0xad, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ad,cc */ |
@@ -4094,23 +4096,23 @@ static const struct usb_action pas202b_50HZScale[] = { | |||
4094 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ | 4096 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
4095 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ | 4097 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
4096 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ | 4098 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
4097 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ | 4099 | {0xaa, 0x20, 0x0004}, |
4098 | {0xaa, 0x21, 0x006c}, /* 00,21,6c,aa */ | 4100 | {0xaa, 0x21, 0x003d}, |
4099 | {0xaa, 0x03, 0x0041}, /* 00,03,41,aa */ | 4101 | {0xaa, 0x03, 0x0041}, /* 00,03,41,aa */ |
4100 | {0xaa, 0x04, 0x0009}, /* 00,04,09,aa */ | 4102 | {0xaa, 0x04, 0x0010}, |
4101 | {0xaa, 0x05, 0x002c}, /* 00,05,2c,aa */ | 4103 | {0xaa, 0x05, 0x003d}, |
4102 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ | 4104 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
4103 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ | 4105 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
4104 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,14,cc */ | 4106 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
4105 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ | 4107 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
4106 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ | 4108 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
4107 | {0xa0, 0x0f, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0f,cc */ | 4109 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
4108 | {0xa0, 0xbe, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,be,cc */ | 4110 | {0xa0, 0x3d, ZC3XX_R192_EXPOSURELIMITLOW}, |
4109 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ | 4111 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
4110 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ | 4112 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
4111 | {0xa0, 0x9b, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,9b,cc */ | 4113 | {0xa0, 0x9b, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,9b,cc */ |
4112 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ | 4114 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
4113 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ | 4115 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
4114 | {0xa0, 0x41, ZC3XX_R01D_HSYNC_0}, /* 00,1d,41,cc */ | 4116 | {0xa0, 0x41, ZC3XX_R01D_HSYNC_0}, /* 00,1d,41,cc */ |
4115 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ | 4117 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ |
4116 | {0xa0, 0xad, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ad,cc */ | 4118 | {0xa0, 0xad, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ad,cc */ |
@@ -4130,16 +4132,16 @@ static const struct usb_action pas202b_60HZ[] = { | |||
4130 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ | 4132 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
4131 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ | 4133 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
4132 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ | 4134 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
4133 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,14,cc */ | 4135 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
4134 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ | 4136 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
4135 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ | 4137 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
4136 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,07,cc */ | 4138 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
4137 | {0xa0, 0xc0, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,c0,cc */ | 4139 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
4138 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ | 4140 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
4139 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ | 4141 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
4140 | {0xa0, 0x40, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,40,cc */ | 4142 | {0xa0, 0x40, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,40,cc */ |
4141 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ | 4143 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
4142 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ | 4144 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
4143 | {0xa0, 0x45, ZC3XX_R01D_HSYNC_0}, /* 00,1d,45,cc */ | 4145 | {0xa0, 0x45, ZC3XX_R01D_HSYNC_0}, /* 00,1d,45,cc */ |
4144 | {0xa0, 0x8e, ZC3XX_R01E_HSYNC_1}, /* 00,1e,8e,cc */ | 4146 | {0xa0, 0x8e, ZC3XX_R01E_HSYNC_1}, /* 00,1e,8e,cc */ |
4145 | {0xa0, 0xc1, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c1,cc */ | 4147 | {0xa0, 0xc1, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c1,cc */ |
@@ -4152,23 +4154,23 @@ static const struct usb_action pas202b_60HZScale[] = { | |||
4152 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ | 4154 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
4153 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ | 4155 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
4154 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ | 4156 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
4155 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ | 4157 | {0xaa, 0x20, 0x0004}, |
4156 | {0xaa, 0x21, 0x0004}, /* 00,21,04,aa */ | 4158 | {0xaa, 0x21, 0x0008}, |
4157 | {0xaa, 0x03, 0x0042}, /* 00,03,42,aa */ | 4159 | {0xaa, 0x03, 0x0042}, /* 00,03,42,aa */ |
4158 | {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */ | 4160 | {0xaa, 0x04, 0x0010}, |
4159 | {0xaa, 0x05, 0x0004}, /* 00,05,04,aa */ | 4161 | {0xaa, 0x05, 0x0008}, |
4160 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ | 4162 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
4161 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ | 4163 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
4162 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,14,cc */ | 4164 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
4163 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ | 4165 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
4164 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ | 4166 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
4165 | {0xa0, 0x0f, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0f,cc */ | 4167 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
4166 | {0xa0, 0x9f, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,9f,cc */ | 4168 | {0xa0, 0x08, ZC3XX_R192_EXPOSURELIMITLOW}, |
4167 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ | 4169 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
4168 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ | 4170 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
4169 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,81,cc */ | 4171 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,81,cc */ |
4170 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ | 4172 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
4171 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ | 4173 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
4172 | {0xa0, 0x42, ZC3XX_R01D_HSYNC_0}, /* 00,1d,42,cc */ | 4174 | {0xa0, 0x42, ZC3XX_R01D_HSYNC_0}, /* 00,1d,42,cc */ |
4173 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ | 4175 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ |
4174 | {0xa0, 0xaf, ZC3XX_R01F_HSYNC_2}, /* 00,1f,af,cc */ | 4176 | {0xa0, 0xaf, ZC3XX_R01F_HSYNC_2}, /* 00,1f,af,cc */ |
@@ -4182,22 +4184,22 @@ static const struct usb_action pas202b_NoFliker[] = { | |||
4182 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ | 4184 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
4183 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ | 4185 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
4184 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ | 4186 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ |
4185 | {0xaa, 0x21, 0x0020}, /* 00,21,20,aa */ | 4187 | {0xaa, 0x21, 0x0006}, |
4186 | {0xaa, 0x03, 0x0040}, /* 00,03,40,aa */ | 4188 | {0xaa, 0x03, 0x0040}, /* 00,03,40,aa */ |
4187 | {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */ | 4189 | {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */ |
4188 | {0xaa, 0x05, 0x0020}, /* 00,05,20,aa */ | 4190 | {0xaa, 0x05, 0x0006}, |
4189 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ | 4191 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
4190 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ | 4192 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
4191 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ | 4193 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
4192 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,07,cc */ | 4194 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
4193 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,f0,cc */ | 4195 | {0xa0, 0x06, ZC3XX_R192_EXPOSURELIMITLOW}, |
4194 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ | 4196 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
4195 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ | 4197 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
4196 | {0xa0, 0x02, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,02,cc */ | 4198 | {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW}, |
4197 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ | 4199 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
4198 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ | 4200 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
4199 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ | 4201 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
4200 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ | 4202 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
4201 | {0xa0, 0x40, ZC3XX_R01D_HSYNC_0}, /* 00,1d,40,cc */ | 4203 | {0xa0, 0x40, ZC3XX_R01D_HSYNC_0}, /* 00,1d,40,cc */ |
4202 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, /* 00,1e,60,cc */ | 4204 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, /* 00,1e,60,cc */ |
4203 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, /* 00,1f,90,cc */ | 4205 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, /* 00,1f,90,cc */ |
@@ -4210,23 +4212,23 @@ static const struct usb_action pas202b_NoFlikerScale[] = { | |||
4210 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ | 4212 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
4211 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ | 4213 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
4212 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ | 4214 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
4213 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ | 4215 | {0xaa, 0x20, 0x0004}, |
4214 | {0xaa, 0x21, 0x0010}, /* 00,21,10,aa */ | 4216 | {0xaa, 0x21, 0x000c}, |
4215 | {0xaa, 0x03, 0x0040}, /* 00,03,40,aa */ | 4217 | {0xaa, 0x03, 0x0040}, /* 00,03,40,aa */ |
4216 | {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */ | 4218 | {0xaa, 0x04, 0x0010}, |
4217 | {0xaa, 0x05, 0x0010}, /* 00,05,10,aa */ | 4219 | {0xaa, 0x05, 0x000c}, |
4218 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ | 4220 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
4219 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ | 4221 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
4220 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ | 4222 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
4221 | {0xa0, 0x0f, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0f,cc */ | 4223 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
4222 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,f0,cc */ | 4224 | {0xa0, 0x0c, ZC3XX_R192_EXPOSURELIMITLOW}, |
4223 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ | 4225 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
4224 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ | 4226 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
4225 | {0xa0, 0x02, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,02,cc */ | 4227 | {0xa0, 0x02, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,02,cc */ |
4226 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ | 4228 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
4227 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ | 4229 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
4228 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ | 4230 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
4229 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ | 4231 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
4230 | {0xa0, 0x40, ZC3XX_R01D_HSYNC_0}, /* 00,1d,40,cc */ | 4232 | {0xa0, 0x40, ZC3XX_R01D_HSYNC_0}, /* 00,1d,40,cc */ |
4231 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, /* 00,1e,60,cc */ | 4233 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, /* 00,1e,60,cc */ |
4232 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, /* 00,1f,90,cc */ | 4234 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, /* 00,1f,90,cc */ |
@@ -6011,6 +6013,7 @@ static void setbrightness(struct gspca_dev *gspca_dev) | |||
6011 | switch (sd->sensor) { | 6013 | switch (sd->sensor) { |
6012 | case SENSOR_GC0305: | 6014 | case SENSOR_GC0305: |
6013 | case SENSOR_OV7620: | 6015 | case SENSOR_OV7620: |
6016 | case SENSOR_PAS202B: | ||
6014 | case SENSOR_PO2030: | 6017 | case SENSOR_PO2030: |
6015 | return; | 6018 | return; |
6016 | } | 6019 | } |
@@ -6115,6 +6118,7 @@ static void setquality(struct gspca_dev *gspca_dev) | |||
6115 | case SENSOR_GC0305: | 6118 | case SENSOR_GC0305: |
6116 | case SENSOR_HV7131B: | 6119 | case SENSOR_HV7131B: |
6117 | case SENSOR_OV7620: | 6120 | case SENSOR_OV7620: |
6121 | case SENSOR_PAS202B: | ||
6118 | case SENSOR_PO2030: | 6122 | case SENSOR_PO2030: |
6119 | return; | 6123 | return; |
6120 | } | 6124 | } |
@@ -6247,6 +6251,9 @@ static int setlightfreq(struct gspca_dev *gspca_dev) | |||
6247 | reg_w(gspca_dev->dev, 0x44, 0x0002); | 6251 | reg_w(gspca_dev->dev, 0x44, 0x0002); |
6248 | } | 6252 | } |
6249 | break; | 6253 | break; |
6254 | case SENSOR_PAS202B: | ||
6255 | reg_w(gspca_dev->dev, 0x00, 0x01a7); | ||
6256 | break; | ||
6250 | } | 6257 | } |
6251 | } | 6258 | } |
6252 | return 0; | 6259 | return 0; |
@@ -6283,6 +6290,12 @@ static void send_unknown(struct usb_device *dev, int sensor) | |||
6283 | reg_w(dev, 0x02, 0x003b); | 6290 | reg_w(dev, 0x02, 0x003b); |
6284 | reg_w(dev, 0x00, 0x0038); | 6291 | reg_w(dev, 0x00, 0x0038); |
6285 | break; | 6292 | break; |
6293 | case SENSOR_PAS202B: | ||
6294 | reg_w(dev, 0x03, 0x003b); | ||
6295 | reg_w(dev, 0x0c, 0x003a); | ||
6296 | reg_w(dev, 0x0b, 0x0039); | ||
6297 | reg_w(dev, 0x0b, 0x0038); | ||
6298 | break; | ||
6286 | } | 6299 | } |
6287 | } | 6300 | } |
6288 | 6301 | ||
@@ -6370,8 +6383,10 @@ static int vga_2wr_probe(struct gspca_dev *gspca_dev) | |||
6370 | i2c_write(gspca_dev, 0x03, 0xaa, 0x00); | 6383 | i2c_write(gspca_dev, 0x03, 0xaa, 0x00); |
6371 | msleep(50); | 6384 | msleep(50); |
6372 | retword = i2c_read(gspca_dev, 0x03); | 6385 | retword = i2c_read(gspca_dev, 0x03); |
6373 | if (retword != 0) | 6386 | if (retword != 0) { |
6387 | send_unknown(dev, SENSOR_PAS202B); | ||
6374 | return 0x0e; /* PAS202BCB */ | 6388 | return 0x0e; /* PAS202BCB */ |
6389 | } | ||
6375 | 6390 | ||
6376 | start_2wr_probe(dev, 0x02); /* TAS5130C */ | 6391 | start_2wr_probe(dev, 0x02); /* TAS5130C */ |
6377 | i2c_write(gspca_dev, 0x01, 0xaa, 0x00); | 6392 | i2c_write(gspca_dev, 0x01, 0xaa, 0x00); |
@@ -6759,6 +6774,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
6759 | switch (sd->sensor) { | 6774 | switch (sd->sensor) { |
6760 | case SENSOR_GC0305: | 6775 | case SENSOR_GC0305: |
6761 | case SENSOR_OV7620: | 6776 | case SENSOR_OV7620: |
6777 | case SENSOR_PAS202B: | ||
6762 | case SENSOR_PO2030: | 6778 | case SENSOR_PO2030: |
6763 | gspca_dev->ctrl_dis = (1 << BRIGHTNESS_IDX); | 6779 | gspca_dev->ctrl_dis = (1 << BRIGHTNESS_IDX); |
6764 | break; | 6780 | break; |
@@ -6847,6 +6863,11 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
6847 | reg_w(dev, 0x02, 0x003b); | 6863 | reg_w(dev, 0x02, 0x003b); |
6848 | reg_w(dev, 0x00, 0x0038); | 6864 | reg_w(dev, 0x00, 0x0038); |
6849 | break; | 6865 | break; |
6866 | case SENSOR_PAS202B: | ||
6867 | reg_w(dev, 0x03, 0x003b); | ||
6868 | reg_w(dev, 0x0c, 0x003a); | ||
6869 | reg_w(dev, 0x0b, 0x0039); | ||
6870 | break; | ||
6850 | } | 6871 | } |
6851 | 6872 | ||
6852 | setmatrix(gspca_dev); | 6873 | setmatrix(gspca_dev); |
@@ -6925,13 +6946,13 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
6925 | switch (sd->sensor) { | 6946 | switch (sd->sensor) { |
6926 | case SENSOR_PO2030: | 6947 | case SENSOR_PO2030: |
6927 | msleep(50); | 6948 | msleep(50); |
6928 | reg_r(gspca_dev, 0x0008); | ||
6929 | reg_r(gspca_dev, 0x0007); | ||
6930 | /*fall thru*/ | ||
6931 | case SENSOR_PAS202B: | ||
6932 | reg_w(dev, 0x00, 0x0007); /* (from win traces) */ | 6949 | reg_w(dev, 0x00, 0x0007); /* (from win traces) */ |
6933 | reg_w(dev, 0x02, ZC3XX_R008_CLOCKSETTING); | 6950 | reg_w(dev, 0x02, ZC3XX_R008_CLOCKSETTING); |
6934 | break; | 6951 | break; |
6952 | case SENSOR_PAS202B: | ||
6953 | reg_w(dev, 0x32, 0x0007); /* (from win traces) */ | ||
6954 | reg_w(dev, 0x02, ZC3XX_R008_CLOCKSETTING); | ||
6955 | break; | ||
6935 | } | 6956 | } |
6936 | return 0; | 6957 | return 0; |
6937 | } | 6958 | } |