diff options
Diffstat (limited to 'drivers/media/video/gspca/gl860/gl860-mi1320.c')
-rw-r--r-- | drivers/media/video/gspca/gl860/gl860-mi1320.c | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/drivers/media/video/gspca/gl860/gl860-mi1320.c b/drivers/media/video/gspca/gl860/gl860-mi1320.c index 39f6261c1a0..1355e526ee8 100644 --- a/drivers/media/video/gspca/gl860/gl860-mi1320.c +++ b/drivers/media/video/gspca/gl860/gl860-mi1320.c | |||
@@ -1,6 +1,5 @@ | |||
1 | /* @file gl860-mi1320.c | 1 | /* Subdriver for the GL860 chip with the MI1320 sensor |
2 | * @author Olivier LORIN from my logs | 2 | * Author Olivier LORIN from own logs |
3 | * @date 2009-08-27 | ||
4 | * | 3 | * |
5 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
@@ -127,49 +126,49 @@ static u8 dat_wbalBL[] = | |||
127 | 126 | ||
128 | static u8 dat_hvflip1[] = {0xf0, 0x00, 0xf1, 0x00}; | 127 | static u8 dat_hvflip1[] = {0xf0, 0x00, 0xf1, 0x00}; |
129 | 128 | ||
130 | static u8 s000[] = | 129 | static u8 dat_common00[] = |
131 | "\x00\x01\x07\x6a\x06\x63\x0d\x6a" "\xc0\x00\x10\x10\xc1\x03\xc2\x42" | 130 | "\x00\x01\x07\x6a\x06\x63\x0d\x6a" "\xc0\x00\x10\x10\xc1\x03\xc2\x42" |
132 | "\xd8\x04\x58\x00\x04\x02"; | 131 | "\xd8\x04\x58\x00\x04\x02"; |
133 | static u8 s001[] = | 132 | static u8 dat_common01[] = |
134 | "\x0d\x00\xf1\x0b\x0d\x00\xf1\x08" "\x35\x00\xf1\x22\x68\x00\xf1\x5d" | 133 | "\x0d\x00\xf1\x0b\x0d\x00\xf1\x08" "\x35\x00\xf1\x22\x68\x00\xf1\x5d" |
135 | "\xf0\x00\xf1\x01\x06\x70\xf1\x0e" "\xf0\x00\xf1\x02\xdd\x18\xf1\xe0"; | 134 | "\xf0\x00\xf1\x01\x06\x70\xf1\x0e" "\xf0\x00\xf1\x02\xdd\x18\xf1\xe0"; |
136 | static u8 s002[] = | 135 | static u8 dat_common02[] = |
137 | "\x05\x01\xf1\x84\x06\x00\xf1\x44" "\x07\x00\xf1\xbe\x08\x00\xf1\x1e" | 136 | "\x05\x01\xf1\x84\x06\x00\xf1\x44" "\x07\x00\xf1\xbe\x08\x00\xf1\x1e" |
138 | "\x20\x01\xf1\x03\x21\x84\xf1\x00" "\x22\x0d\xf1\x0f\x24\x80\xf1\x00" | 137 | "\x20\x01\xf1\x03\x21\x84\xf1\x00" "\x22\x0d\xf1\x0f\x24\x80\xf1\x00" |
139 | "\x34\x18\xf1\x2d\x35\x00\xf1\x22" "\x43\x83\xf1\x83\x59\x00\xf1\xff"; | 138 | "\x34\x18\xf1\x2d\x35\x00\xf1\x22" "\x43\x83\xf1\x83\x59\x00\xf1\xff"; |
140 | static u8 s003[] = | 139 | static u8 dat_common03[] = |
141 | "\xf0\x00\xf1\x02\x39\x06\xf1\x8c" "\x3a\x06\xf1\x8c\x3b\x03\xf1\xda" | 140 | "\xf0\x00\xf1\x02\x39\x06\xf1\x8c" "\x3a\x06\xf1\x8c\x3b\x03\xf1\xda" |
142 | "\x3c\x05\xf1\x30\x57\x01\xf1\x0c" "\x58\x01\xf1\x42\x59\x01\xf1\x0c" | 141 | "\x3c\x05\xf1\x30\x57\x01\xf1\x0c" "\x58\x01\xf1\x42\x59\x01\xf1\x0c" |
143 | "\x5a\x01\xf1\x42\x5c\x13\xf1\x0e" "\x5d\x17\xf1\x12\x64\x1e\xf1\x1c"; | 142 | "\x5a\x01\xf1\x42\x5c\x13\xf1\x0e" "\x5d\x17\xf1\x12\x64\x1e\xf1\x1c"; |
144 | static u8 s004[] = | 143 | static u8 dat_common04[] = |
145 | "\xf0\x00\xf1\x02\x24\x5f\xf1\x20" "\x28\xea\xf1\x02\x5f\x41\xf1\x43"; | 144 | "\xf0\x00\xf1\x02\x24\x5f\xf1\x20" "\x28\xea\xf1\x02\x5f\x41\xf1\x43"; |
146 | static u8 s005[] = | 145 | static u8 dat_common05[] = |
147 | "\x02\x00\xf1\xee\x03\x29\xf1\x1a" "\x04\x02\xf1\xa4\x09\x00\xf1\x68" | 146 | "\x02\x00\xf1\xee\x03\x29\xf1\x1a" "\x04\x02\xf1\xa4\x09\x00\xf1\x68" |
148 | "\x0a\x00\xf1\x2a\x0b\x00\xf1\x04" "\x0c\x00\xf1\x93\x0d\x00\xf1\x82" | 147 | "\x0a\x00\xf1\x2a\x0b\x00\xf1\x04" "\x0c\x00\xf1\x93\x0d\x00\xf1\x82" |
149 | "\x0e\x00\xf1\x40\x0f\x00\xf1\x5f" "\x10\x00\xf1\x4e\x11\x00\xf1\x5b"; | 148 | "\x0e\x00\xf1\x40\x0f\x00\xf1\x5f" "\x10\x00\xf1\x4e\x11\x00\xf1\x5b"; |
150 | static u8 s006[] = | 149 | static u8 dat_common06[] = |
151 | "\x15\x00\xf1\xc9\x16\x00\xf1\x5e" "\x17\x00\xf1\x9d\x18\x00\xf1\x06" | 150 | "\x15\x00\xf1\xc9\x16\x00\xf1\x5e" "\x17\x00\xf1\x9d\x18\x00\xf1\x06" |
152 | "\x19\x00\xf1\x89\x1a\x00\xf1\x12" "\x1b\x00\xf1\xa1\x1c\x00\xf1\xe4" | 151 | "\x19\x00\xf1\x89\x1a\x00\xf1\x12" "\x1b\x00\xf1\xa1\x1c\x00\xf1\xe4" |
153 | "\x1d\x00\xf1\x7a\x1e\x00\xf1\x64" "\xf6\x00\xf1\x5f"; | 152 | "\x1d\x00\xf1\x7a\x1e\x00\xf1\x64" "\xf6\x00\xf1\x5f"; |
154 | static u8 s007[] = | 153 | static u8 dat_common07[] = |
155 | "\xf0\x00\xf1\x01\x53\x09\xf1\x03" "\x54\x3d\xf1\x1c\x55\x99\xf1\x72" | 154 | "\xf0\x00\xf1\x01\x53\x09\xf1\x03" "\x54\x3d\xf1\x1c\x55\x99\xf1\x72" |
156 | "\x56\xc1\xf1\xb1\x57\xd8\xf1\xce" "\x58\xe0\xf1\x00\xdc\x0a\xf1\x03" | 155 | "\x56\xc1\xf1\xb1\x57\xd8\xf1\xce" "\x58\xe0\xf1\x00\xdc\x0a\xf1\x03" |
157 | "\xdd\x45\xf1\x20\xde\xae\xf1\x82" "\xdf\xdc\xf1\xc9\xe0\xf6\xf1\xea" | 156 | "\xdd\x45\xf1\x20\xde\xae\xf1\x82" "\xdf\xdc\xf1\xc9\xe0\xf6\xf1\xea" |
158 | "\xe1\xff\xf1\x00"; | 157 | "\xe1\xff\xf1\x00"; |
159 | static u8 s008[] = | 158 | static u8 dat_common08[] = |
160 | "\xf0\x00\xf1\x01\x80\x00\xf1\x06" "\x81\xf6\xf1\x08\x82\xfb\xf1\xf7" | 159 | "\xf0\x00\xf1\x01\x80\x00\xf1\x06" "\x81\xf6\xf1\x08\x82\xfb\xf1\xf7" |
161 | "\x83\x00\xf1\xfe\xb6\x07\xf1\x03" "\xb7\x18\xf1\x0c\x84\xfb\xf1\x06" | 160 | "\x83\x00\xf1\xfe\xb6\x07\xf1\x03" "\xb7\x18\xf1\x0c\x84\xfb\xf1\x06" |
162 | "\x85\xfb\xf1\xf9\x86\x00\xf1\xff" "\xb8\x07\xf1\x04\xb9\x16\xf1\x0a"; | 161 | "\x85\xfb\xf1\xf9\x86\x00\xf1\xff" "\xb8\x07\xf1\x04\xb9\x16\xf1\x0a"; |
163 | static u8 s009[] = | 162 | static u8 dat_common09[] = |
164 | "\x87\xfa\xf1\x05\x88\xfc\xf1\xf9" "\x89\x00\xf1\xff\xba\x06\xf1\x03" | 163 | "\x87\xfa\xf1\x05\x88\xfc\xf1\xf9" "\x89\x00\xf1\xff\xba\x06\xf1\x03" |
165 | "\xbb\x17\xf1\x09\x8a\xe8\xf1\x14" "\x8b\xf7\xf1\xf0\x8c\xfd\xf1\xfa" | 164 | "\xbb\x17\xf1\x09\x8a\xe8\xf1\x14" "\x8b\xf7\xf1\xf0\x8c\xfd\xf1\xfa" |
166 | "\x8d\x00\xf1\x00\xbc\x05\xf1\x01" "\xbd\x0c\xf1\x08\xbe\x00\xf1\x14"; | 165 | "\x8d\x00\xf1\x00\xbc\x05\xf1\x01" "\xbd\x0c\xf1\x08\xbe\x00\xf1\x14"; |
167 | static u8 s010[] = | 166 | static u8 dat_common10[] = |
168 | "\x8e\xea\xf1\x13\x8f\xf7\xf1\xf2" "\x90\xfd\xf1\xfa\x91\x00\xf1\x00" | 167 | "\x8e\xea\xf1\x13\x8f\xf7\xf1\xf2" "\x90\xfd\xf1\xfa\x91\x00\xf1\x00" |
169 | "\xbf\x05\xf1\x01\xc0\x0a\xf1\x08" "\xc1\x00\xf1\x0c\x92\xed\xf1\x0f" | 168 | "\xbf\x05\xf1\x01\xc0\x0a\xf1\x08" "\xc1\x00\xf1\x0c\x92\xed\xf1\x0f" |
170 | "\x93\xf9\xf1\xf4\x94\xfe\xf1\xfb" "\x95\x00\xf1\x00\xc2\x04\xf1\x01" | 169 | "\x93\xf9\xf1\xf4\x94\xfe\xf1\xfb" "\x95\x00\xf1\x00\xc2\x04\xf1\x01" |
171 | "\xc3\x0a\xf1\x07\xc4\x00\xf1\x10"; | 170 | "\xc3\x0a\xf1\x07\xc4\x00\xf1\x10"; |
172 | static u8 s011[] = | 171 | static u8 dat_common11[] = |
173 | "\xf0\x00\xf1\x01\x05\x00\xf1\x06" "\x25\x00\xf1\x55\x34\x10\xf1\x10" | 172 | "\xf0\x00\xf1\x01\x05\x00\xf1\x06" "\x25\x00\xf1\x55\x34\x10\xf1\x10" |
174 | "\x35\xf0\xf1\x10\x3a\x02\xf1\x03" "\x3b\x04\xf1\x2a\x9b\x43\xf1\x00" | 173 | "\x35\xf0\xf1\x10\x3a\x02\xf1\x03" "\x3b\x04\xf1\x2a\x9b\x43\xf1\x00" |
175 | "\xa4\x03\xf1\xc0\xa7\x02\xf1\x81"; | 174 | "\xa4\x03\xf1\xc0\xa7\x02\xf1\x81"; |
@@ -222,26 +221,26 @@ void mi1320_init_settings(struct gspca_dev *gspca_dev) | |||
222 | 221 | ||
223 | static void common(struct gspca_dev *gspca_dev) | 222 | static void common(struct gspca_dev *gspca_dev) |
224 | { | 223 | { |
225 | s32 n; /* reserved for FETCH macros */ | 224 | s32 n; /* reserved for FETCH functions */ |
226 | 225 | ||
227 | ctrl_out(gspca_dev, 0x40, 3, 0x0000, 0x0200, 22, s000); | 226 | ctrl_out(gspca_dev, 0x40, 3, 0x0000, 0x0200, 22, dat_common00); |
228 | ctrl_out(gspca_dev, 0x40, 1, 0x0041, 0x0000, 0, NULL); | 227 | ctrl_out(gspca_dev, 0x40, 1, 0x0041, 0x0000, 0, NULL); |
229 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 32, s001); | 228 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 32, dat_common01); |
230 | n = fetch_validx(gspca_dev, tbl_common, ARRAY_SIZE(tbl_common)); | 229 | n = fetch_validx(gspca_dev, tbl_common, ARRAY_SIZE(tbl_common)); |
231 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 48, s002); | 230 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 48, dat_common02); |
232 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 48, s003); | 231 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 48, dat_common03); |
233 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 16, s004); | 232 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 16, dat_common04); |
234 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 48, s005); | 233 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 48, dat_common05); |
235 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 44, s006); | 234 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 44, dat_common06); |
236 | keep_on_fetching_validx(gspca_dev, tbl_common, | 235 | keep_on_fetching_validx(gspca_dev, tbl_common, |
237 | ARRAY_SIZE(tbl_common), n); | 236 | ARRAY_SIZE(tbl_common), n); |
238 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 52, s007); | 237 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 52, dat_common07); |
239 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 48, s008); | 238 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 48, dat_common08); |
240 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 48, s009); | 239 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 48, dat_common09); |
241 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 56, s010); | 240 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 56, dat_common10); |
242 | keep_on_fetching_validx(gspca_dev, tbl_common, | 241 | keep_on_fetching_validx(gspca_dev, tbl_common, |
243 | ARRAY_SIZE(tbl_common), n); | 242 | ARRAY_SIZE(tbl_common), n); |
244 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 40, s011); | 243 | ctrl_out(gspca_dev, 0x40, 3, 0xba00, 0x0200, 40, dat_common11); |
245 | keep_on_fetching_validx(gspca_dev, tbl_common, | 244 | keep_on_fetching_validx(gspca_dev, tbl_common, |
246 | ARRAY_SIZE(tbl_common), n); | 245 | ARRAY_SIZE(tbl_common), n); |
247 | } | 246 | } |