1 /* olympus_desc.c:
2  *
3  * Olympus 3040 specific code (most of this file):
4  * 	David Selmeczi <david@esr.elte.hu>
5  * Olympus 3000z code, based on data from:
6  * 	Till Kamppeter <till.kamppeter@gmx.net>
7  * Original code:
8  *  Copyright 2002 Patrick Mansfield <patman@aracnet.com>
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the
22  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23  * Boston, MA  02110-1301  USA
24  */
25 #include <stdio.h>
26 #include <_stdint.h>
27 #include <sys/types.h>
28 #include <stdlib.h>
29 #include <string.h>
30 #include <gphoto2/gphoto2-library.h>
31 #include "sierra.h"
32 #include "library.h"
33 #include "sierra-desc.h"
34 
35 /*
36  * Camera descriptor for Olympus C-3040Z, 3000Z (and somday maybe others).
37  */
38 
39 /*
40  * Notes:
41  *
42  * The variable "value" in a ValueNameType is the first element of
43  * the name/value union, and so it is the default value initialized.
44  *
45  * To init to a range, use:
46  *	{ .range = { 100.1, 2000.0, 10 } }, NULL
47  *
48  * Casts are used to avoid warnings about using a const.
49  *
50  * Only registers that are used by the camera configuration are listed
51  * here (for use in the get/set config functions); no settings, capture or
52  * other data is stored here.
53  */
54 
55 #ifdef ENABLE_NLS
56 #  include <libintl.h>
57 #  undef _
58 #  define _(String) dgettext (GETTEXT_PACKAGE, String)
59 #  ifdef gettext_noop
60 #    define N_(String) gettext_noop (String)
61 #  else
62 #    define N_(String) (String)
63 #  endif
64 #else
65 #  define textdomain(String) (String)
66 #  define gettext(String) (String)
67 #  define dgettext(Domain,Message) (Message)
68 #  define dcgettext(Domain,Message,Type) (Message)
69 #  define bindtextdomain(Domain,Directory) (Domain)
70 #  define _(String) (String)
71 #  define N_(String) (String)
72 #endif
73 
74 /*
75  * Register 1: resolution/size.
76  *
77  * These values suck. why didn't they make these maskable, or use a nibble
78  * for each part?  Just use a the combined resolution + size.  It would be
79  * good to try and break these into two selections.
80  */
81 static const ValueNameType oly3040_reg_01_val_names[] = {
82 	{ { 0x01 }, "640x480-Normal" },
83 	{ { 0x04 }, "640x480-Fine" },
84 	{ { 0x05 }, "1024x768-Normal" },
85 	{ { 0x06 }, "1024x768-Fine" },
86 	{ { 0x07 }, "1280x960-Normal" },
87 	{ { 0x08 }, "1280x960-Fine" },
88 	{ { 0x09 }, "1600x1200-Normal" },
89 	{ { 0x0a }, "1600x1200-Fine" },
90 /* Only for E-100RS
91 	{ { 0x0b }, "1360x1024-Normal" },
92 	{ { 0x0c }, "1360x1024-Fine" },
93 */
94 	{ { 0x02 }, "2048x1536-Normal" },
95 	{ { 0x03 }, "2048x1536-Fine" },
96 	{ { 0x21 }, "640x480-TIFF" },
97 	{ { 0x22 }, "1024x768-TIFF" },
98 	{ { 0x23 }, "1280x960-TIFF" },
99 	{ { 0x24 }, "1600x1200-TIFF" },
100 	{ { 0x25 }, "2048x1536-TIFF" },
101 	{ { 0x26 }, "1360x1024-TIFF" },
102 };
103 static const RegisterDescriptorType oly3040_reg_01[] = {
104 	{
105 		GP_WIDGET_MENU, GP_REG_NO_MASK,
106 		"resolution", N_("Resolution plus Size"),
107 		VAL_NAME_INIT (oly3040_reg_01_val_names)
108 	}
109 };
110 
111 static const ValueNameType oly750uz_reg_01_val_names[] = {
112 	{ { 0x01 }, "SQ2-640x480-NORMAL" },
113 	{ { 0x02 }, "SQ1-2048x1536-NORMAL" },
114 	{ { 0x03 }, "SQ1-2048x1536-HIGH" },
115 	{ { 0x04 }, "SQ2-640x480-HIGH" },
116 	{ { 0x05 }, "SQ2-1024x768-NORMAL" },
117 	{ { 0x06 }, "SQ2-1024x768-HIGH" },
118 	{ { 0x07 }, "SQ1-1280x960-NORMAL" },
119 	{ { 0x08 }, "SQ1-1280x960-HIGH" },
120 	{ { 0x09 }, "SQ1-1600x1200-NORMAL" },
121 	{ { 0x0a }, "SQ1-1600x1200-HIGH" },
122 	{ { 0x0d }, "HQ-2288x1712" },
123 	{ { 0x0e }, "SHQ-2288x1712" },
124 	{ { 0x0f }, "3:2-HQ-2288x1520" },
125 	{ { 0x10 }, "3:2-SHQ-2288x1620" },
126 	{ { 0x13 }, "LG-HQ-3200x2400" },
127 	{ { 0x14 }, "LG-SHQ-3200x2400" },
128 	{ { 0x24 }, "TIFF-1600x1200" },
129 	{ { 0x25 }, "TIFF-2048x1536" },
130 	{ { 0x26 }, "TIFF-2218x1712" },
131 	{ { 0x27 }, "3:2-TIFF-2218x1712" },
132 };
133 static const RegisterDescriptorType oly750uz_reg_01[] = {
134 	{
135 		GP_WIDGET_MENU, GP_REG_NO_MASK,
136 		"resolution", N_("Resolution plus Size"),
137 		VAL_NAME_INIT (oly750uz_reg_01_val_names)
138 	}
139 };
140 
141 static const ValueNameType olysp500uz_reg_01_val_names[] = {
142 	{ { 0x00 }, "SQ2-640x480-NORMAL" },
143 	{ { 0x01 }, "SQ2-1024x768-NORMAL" },
144 	{ { 0x02 }, "SQ2-1280x960-NORMAL" },
145 	{ { 0x03 }, "SQ1-1600x1200-NORMAL" },
146 	{ { 0x04 }, "SQ1-2048x1536-NORMAL" },
147 	{ { 0x05 }, "SQ1-2288x1712-NORMAL" },
148 	{ { 0x06 }, "SQ1-2592x1944-NORMAL" },
149 	{ { 0x07 }, "RAW?-2816x2112-NORMAL" },
150 	{ { 0x100 }, "SQ2-640x480-HIGH" },
151 	{ { 0x101 }, "SQ2-1024x768-HIGH" },
152 	{ { 0x102 }, "SQ2-1280x960-HIGH" },
153 	{ { 0x103 }, "SQ1-1600x1200-HIGH" },
154 	{ { 0x104 }, "SQ1-2048x1536-HIGH" },
155 	{ { 0x105 }, "SQ1-2288x1712-HIGH" },
156 	{ { 0x106 }, "SQ1-2592x1944-HIGH" },
157 	{ { 0x1007 }, "HQ?-2816x1880-NORMAL" },
158 	{ { 0x10007 }, "HQ?-2816x1880-NORMAL" },
159 	{ { 0x10107 }, "HQ?-2816x1880-3:2" },
160 	{ { 0x107 }, "HQ?-2816x2112-3:2" },
161 };
162 static const RegisterDescriptorType olysp500uz_reg_01[] = {
163 	{
164 		GP_WIDGET_MENU, GP_REG_NO_MASK,
165 		"resolution", N_("Resolution plus Size"),
166 		VAL_NAME_INIT (olysp500uz_reg_01_val_names)
167 	}
168 };
169 
170 /*
171  * Register 2: Date and time.
172  */
173 static const ValueNameType oly3040_reg_02_val_names[] = {
174 	/*
175 	 * Dummy value, since we need at least one of these to
176 	 * display anything.
177 	 */
178 	{ { 0x00 }, "Dummy" },
179 };
180 static const RegisterDescriptorType oly3040_reg_02[] = {
181 	{
182 		GP_WIDGET_DATE, GP_REG_NO_MASK,
183 		"date-time", N_("Date and time (GMT)"),
184 		VAL_NAME_INIT (oly3040_reg_02_val_names)
185 	}
186 };
187 
188 /*
189  * Register 3: shutter speed, some cameras must be in S or M mode.
190  *
191  * In S mode, aperture is compensated.
192  *
193  * Possibly could be any other value in the range of 1250 and 16M
194  */
195 static const ValueNameType oly3040_reg_03_val_names[] = {
196 	{ {       0 }, N_("Auto") },
197 	{ {    1250 }, "1/800" },
198 	{ {    2000 }, "1/500" },
199 	{ {    2500 }, "1/400" },
200 	{ {    4000 }, "1/250" },
201 	{ {    5000 }, "1/200" },
202 	{ {    6250 }, "1/160" },
203 	{ {    8000 }, "1/125" },
204 	{ {   10000 }, "1/100" },
205 	{ {   12500 }, "1/80" },
206 	{ {   16666 }, "1/60" },
207 	{ {   20000 }, "1/50" },
208 	{ {   33333 }, "1/30" },
209 	{ {   40000 }, "1/25" },
210 	{ {   66667 }, "1/15" },
211 	{ {  100000 }, "1/10" },
212 	{ {  125000 }, "1/8" },
213 	{ {  200000 }, "1/4" }, /* XXX patman should this be 25000? */
214 	{ {  500000 }, "1/2" },
215 	{ { 1000000 }, "1" },
216 	{ { 2000000 }, "2" },
217 	{ { 3000000 }, "3" },
218 	{ { 4000000 }, "4" },
219 	{ { 5000000 }, "5" },
220 	{ { 6000000 }, "6" },
221 	{ { 8000000 }, "8" },
222 	{ {10000000 }, "10" },
223 	{ {16000000 }, "16" },
224 
225 };
226 static const RegisterDescriptorType oly3040_reg_03[] = {
227 	{
228 		GP_WIDGET_MENU, GP_REG_NO_MASK,
229 		"shutter", N_("Shutter Speed (in seconds)"),
230 		VAL_NAME_INIT (oly3040_reg_03_val_names)
231 	}
232 };
233 
234 static const ValueNameType oly750uz_reg_03_val_names[] = {
235 	{ {       0 }, N_("Auto") },
236 	{ {    1000 }, "1/1000" },
237 	{ {    1250 }, "1/800" },
238 	{ {    1538 }, "1/650" },
239 	{ {    2000 }, "1/500" },
240 	{ {    2500 }, "1/400" },
241 	{ {    3125 }, "1/320" },
242 	{ {    4000 }, "1/250" },
243 	{ {    5000 }, "1/200" },
244 	{ {    6250 }, "1/160" },
245 	{ {    8000 }, "1/125" },
246 	{ {   10000 }, "1/100" },
247 	{ {   12500 }, "1/80" },
248 	{ {   16666 }, "1/60" },
249 	{ {   20000 }, "1/50" },
250 	{ {   25000 }, "1/40" },
251 	{ {   33333 }, "1/30" },
252 	{ {   40000 }, "1/25" },
253 	{ {   50000 }, "1/20" },
254 	{ {   66667 }, "1/15" },
255 	{ {   76923 }, "1/13" },
256 	{ {  100000 }, "1/10" },
257 	{ {  125000 }, "1/8" },
258 	{ {  166667 }, "1/6" },
259 	{ {  200000 }, "1/5" },
260 	{ {  250000 }, "1/4" },
261 	{ {  333333 }, "1/3" },
262 	{ {  400000 }, "1/2.5" },
263 	{ {  500000 }, "1/2" },
264 	{ {  625000 }, "1/1.6" },
265 	{ {  769230 }, "1/1.3" },
266 	{ { 1000000 }, "1" },
267 	{ { 1300000 }, "1.3" },
268 	{ { 1600000 }, "1.6" },
269 	{ { 2000000 }, "2" },
270 	{ { 2500000 }, "2.5" },
271 	{ { 3200000 }, "3.2" },
272 	{ { 4000000 }, "4" },
273 	{ { 5000000 }, "5" },
274 	{ { 6000000 }, "6" },
275 	{ { 8000000 }, "8" },
276 	{ {10000000 }, "10" },
277 	{ {13000000 }, "13" },
278 	{ {16000000 }, "16" },
279 };
280 static const RegisterDescriptorType oly750uz_reg_03[] = {
281 	{
282 		GP_WIDGET_MENU, GP_REG_NO_MASK,
283 		"shutter", N_("Shutter Speed (in seconds)"),
284 		VAL_NAME_INIT (oly750uz_reg_03_val_names)
285 	}
286 };
287 
288 static const ValueNameType olysp500uz_reg_03_val_names[] = {
289 	{ {       0 }, N_("Auto") },
290 	{ {     250 }, "1/4000" },
291 	{ {     313 }, "1/3200" },
292 	{ {     400 }, "1/2500" },
293 	{ {     500 }, "1/2000" },
294 	{ {     625 }, "1/1600" },
295 	{ {     800 }, "1/1250" },
296 	{ {    1000 }, "1/1000" },
297 	{ {    1250 }, "1/800" },
298 	{ {    1538 }, "1/650" },
299 	{ {    2000 }, "1/500" },
300 	{ {    2500 }, "1/400" },
301 	{ {    3125 }, "1/320" },
302 	{ {    4000 }, "1/250" },
303 	{ {    5000 }, "1/200" },
304 	{ {    6250 }, "1/160" },
305 	{ {    8000 }, "1/125" },
306 	{ {   10000 }, "1/100" },
307 	{ {   12500 }, "1/80" },
308 	{ {   16666 }, "1/60" },
309 	{ {   20000 }, "1/50" },
310 	{ {   25000 }, "1/40" },
311 	{ {   33333 }, "1/30" },
312 	{ {   40000 }, "1/25" },
313 	{ {   50000 }, "1/20" },
314 	{ {   66667 }, "1/15" },
315 	{ {   76923 }, "1/13" },
316 	{ {  100000 }, "1/10" },
317 	{ {  125000 }, "1/8" },
318 	{ {  166667 }, "1/6" },
319 	{ {  200000 }, "1/5" },
320 	{ {  250000 }, "1/4" },
321 	{ {  333333 }, "1/3" },
322 	{ {  400000 }, "1/2.5" },
323 	{ {  500000 }, "1/2" },
324 	{ {  625000 }, "1/1.6" },
325 	{ {  769230 }, "1/1.3" },
326 	{ { 1000000 }, "1" },
327 	{ { 1300000 }, "1.3" },
328 	{ { 1600000 }, "1.6" },
329 	{ { 2000000 }, "2" },
330 	{ { 2500000 }, "2.5" },
331 	{ { 3200000 }, "3.2" },
332 	{ { 4000000 }, "4" },
333 	{ { 5000000 }, "5" },
334 	{ { 6000000 }, "6" },
335 	{ { 8000000 }, "8" },
336 	{ {10000000 }, "10" },
337 	{ {13000000 }, "13" },
338 	{ {16000000 }, "16" },
339 };
340 static const RegisterDescriptorType olysp500uz_reg_03[] = {
341 	{
342 		GP_WIDGET_MENU, GP_REG_NO_MASK,
343 		"shutter", N_("Shutter Speed (in seconds)"),
344 		VAL_NAME_INIT (olysp500uz_reg_03_val_names)
345 	}
346 };
347 /*
348  * Past behaviour is that you have to pick a supported value, you can't
349  * arbitrarily set this to some value and have it work, so using a range
350  * does not work well, since only about 30 of some 16 million values are
351  * valid.
352  */
353 #if 0
354 static const ValueNameType olyrange_reg_03_val_names[] = {
355 	{
356 		{ .range = { 0, 16000000, 100 } }, NULL
357 	}
358 };
359 static const RegisterDescriptorType olyrange_reg_03[] = {
360 	{
361 		GP_WIDGET_RANGE, GP_REG_NO_MASK,
362 		"shutter", N_("Shutter Speed microseconds (0 auto)"),
363 		VAL_NAME_INIT (olyrange_reg_03_val_names)
364 	}
365 };
366 #endif
367 
368 /*
369  * Olympus 3040 Register 5: aperture settings. Works only in A or M mode
370  * In A mode, shutter speed is compensated
371  */
372 static const ValueNameType oly3040_reg_05_val_names[] = {
373 	{ { 0 }, N_("Auto") },
374 	{ { 1 }, "F1.8" },
375 	{ { 2 }, "F2.0" },
376 	{ { 3 }, "F2.3" },
377 	{ { 4 }, "F2.6" },
378 	{ { 5 }, "F2.8" },
379 	{ { 6 }, "F3.2" },
380 	{ { 7 }, "F3.6" },
381 	{ { 8 }, "F4.0" },
382 	{ { 9 }, "F4.5" },
383 	{ { 10 }, "F5.0" },
384 	{ { 11 }, "F5.6" },
385 	{ { 12 }, "F6.3" },
386 	{ { 13 }, "F7" },
387 	{ { 14 }, "F8" },
388 	{ { 15 }, "F9" },
389 	{ { 16 }, "F10" },
390 };
391 static const RegisterDescriptorType oly3040_reg_05[] = {
392 	{
393 		GP_WIDGET_MENU, GP_REG_NO_MASK,
394 		"aperture", N_("Aperture Settings"),
395 		VAL_NAME_INIT (oly3040_reg_05_val_names)
396 	}
397 };
398 
399 /*
400  * Olympus 3000z Register 5: aperture settings. Unknown if this comment
401  * applies: Works only in A or M mode In A mode, shutter speed is
402  * compensated
403  */
404 static const ValueNameType oly3000z_reg_05_val_names[] = {
405 	{ { 0 }, N_("Auto") },
406 	{ { 1 }, "F2.2" },
407 	{ { 2 }, "F2.5" },
408 	{ { 3 }, "F2.8" },
409 	{ { 4 }, "F3.2" },
410 	{ { 5 }, "F3.6" },
411 	{ { 6 }, "F4.0" },
412 	{ { 7 }, "F4.5" },
413 	{ { 8 }, "F5.0" },
414 	{ { 9 }, "F5.6" },
415 	{ { 10 }, "F6.3" },
416 	{ { 11 }, "F7.0" },
417 	{ { 12 }, "F8.0" },
418 	{ { 13 }, "F9.0" },
419 	{ { 14 }, "F10.0" },
420 	{ { 15 }, "F11.0" },
421 	{ { 16 }, "F2.0" }, /* Odd */
422 };
423 static const RegisterDescriptorType oly3000z_reg_05[] = {
424 	{
425 		GP_WIDGET_MENU, GP_REG_NO_MASK,
426 		"aperture", N_("Aperture Settings"),
427 		VAL_NAME_INIT (oly3000z_reg_05_val_names)
428 	}
429 };
430 
431 /*
432  * Olympus 750uz Register 5: aperture settings.
433  */
434 static const ValueNameType oly750uz_reg_05_val_names[] = {
435 	{ { 0 }, N_("Auto") },
436 	{ { 3 }, "F2.8" },
437 	{ { 4 }, "F3.2" },
438 	{ { 5 }, "F3.5" },
439 	{ { 6 }, "F4.0" },
440 	{ { 7 }, "F4.5" },
441 	{ { 8 }, "F5.0" },
442 	{ { 9 }, "F5.6" },
443 	{ { 10 }, "F6.3" },
444 	{ { 11 }, "F7.0" },
445 	{ { 12 }, "F8.0" },
446 };
447 static const RegisterDescriptorType oly750uz_reg_05[] = {
448 	{
449 		GP_WIDGET_MENU, GP_REG_NO_MASK,
450 		"aperture", N_("Aperture Settings"),
451 		VAL_NAME_INIT (oly750uz_reg_05_val_names)
452 	}
453 };
454 
455 /*
456  * Olympus SP-500uz Register 5: aperture settings.
457  */
458 #if 0
459 static const ValueNameType olysp500uz_reg_05_val_names[] = {
460 	{ { 0 }, N_("Auto") },
461 	{ { 28 }, "F2.8" },
462 	{ { 32 }, "F3.2" },
463 	{ { 35 }, "F3.5" },
464 	{ { 40 }, "F4.0" },
465 	{ { 45 }, "F4.5" },
466 	{ { 50 }, "F5.0" },
467 	{ { 56 }, "F5.6" },
468 	{ { 63 }, "F6.3" },
469 	{ { 80 }, "F8.0" },
470 	{ { 90 }, "F9.0" },
471 };
472 static const RegisterDescriptorType olysp500uz_reg_05[] = {
473 	{
474 		GP_WIDGET_MENU, GP_REG_NO_MASK,
475 		"aperture", N_("Aperture Settings"),
476 		VAL_NAME_INIT (olysp500uz_reg_05_val_names)
477 	}
478 };
479 #endif
480 
481 /*
482  * Register 6: color mode
483  */
484 static const ValueNameType oly3040_reg_06_val_names[] = {
485 	{ { 0 }, N_("Normal") },
486 	{ { 1 }, N_("B/W") },
487 	{ { 2 }, N_("Sepia") },
488 	{ { 3 }, N_("White board") },
489 	{ { 4 }, N_("Black board") },
490 };
491 static const RegisterDescriptorType oly3040_reg_06[] = {
492 	{
493 		GP_WIDGET_RADIO, GP_REG_NO_MASK,
494 		"color", N_("Color or Function Mode"),
495 		VAL_NAME_INIT (oly3040_reg_06_val_names)
496 	}
497 };
498 
499 /*
500  * Olyumpus 3040 Register 7: flash settings
501  */
502 static const ValueNameType oly3040_reg_07_val_names[] = {
503 	{ { 0 }, N_("Auto") },
504 	{ { 1 }, N_("Force") },
505 	{ { 2 }, N_("Off") },
506 	{ { 3 }, N_("Anti-redeye") },
507 };
508 static const RegisterDescriptorType oly3040_reg_07[] = {
509 	{
510 		GP_WIDGET_RADIO, GP_REG_NO_MASK,
511 		"flash", N_("Flash Settings"),
512 		VAL_NAME_INIT (oly3040_reg_07_val_names)
513 	}
514 };
515 
516 /*
517  * Olumpus 750uz Register 7: flash settings
518  */
519 static const ValueNameType oly750uz_reg_07_val_names[] = {
520 	{ { 0 }, N_("Auto") },
521 	{ { 1 }, N_("Force") },
522 	{ { 2 }, N_("Off") },
523 	{ { 3 }, N_("Anti-redeye") },
524 	{ { 4 }, N_("Slow") },
525 	/* This is always 4 for slow 1, 2, or slow with redeye */
526 };
527 static const RegisterDescriptorType oly750uz_reg_07[] = {
528 	{
529 		GP_WIDGET_RADIO, GP_REG_NO_MASK,
530 		"flash", N_("Flash Settings"),
531 		VAL_NAME_INIT (oly750uz_reg_07_val_names)
532 	}
533 };
534 
535 /*
536  * Olumpus SP-500uz Register 7: flash settings
537  */
538 static const ValueNameType olysp500uz_reg_07_val_names[] = {
539 	{ { 0 }, N_("Auto") },
540 	{ { 1 }, N_("Force") },
541 	{ { 2 }, N_("Off") },
542 	{ { 3 }, N_("Anti-redeye") },
543 	{ { 4 }, N_("Slow") },
544 	/* This is always 4 for slow 1, 2, or slow with redeye */
545 	{ { 6 }, N_("Anti-redeye Fill") },
546 };
547 
548 static const RegisterDescriptorType olysp500uz_reg_07[] = {
549 	{
550 		GP_WIDGET_RADIO, GP_REG_NO_MASK,
551 		"flash", N_("Flash Settings"),
552 		VAL_NAME_INIT (olysp500uz_reg_07_val_names)
553 	}
554 };
555 
556 /*
557  * Olympus 3040: Register 20: white balance.
558  */
559 static const ValueNameType oly3040_reg_20_val_names[] = {
560 	{ { 0x00 }, N_("Auto") },
561 	{ { 0x01 }, N_("Daylight") },
562 	{ { 0x02 }, N_("Fluorescent") },
563 	{ { 0x03 }, N_("Tungsten") },
564 	{ { 0xff }, N_("Cloudy") },
565 };
566 static const RegisterDescriptorType oly3040_reg_20[] = {
567 	{
568 		GP_WIDGET_RADIO, GP_REG_NO_MASK,
569 		"whitebalance", N_("White Balance"),
570 		VAL_NAME_INIT (oly3040_reg_20_val_names)
571 	}
572 };
573 
574 /*
575  * Olympus 3000z: Register 20: white balance. Only difference seems to be
576  * that cloudy is 0x04, not 0xff.
577  */
578 static const ValueNameType oly3000z_reg_20_val_names[] = {
579 	{ { 0x00 }, N_("Auto") },
580 	{ { 0x01 }, N_("Daylight") },
581 	{ { 0x02 }, N_("Fluorescent") },
582 	{ { 0x03 }, N_("Tungsten") },
583 	{ { 0x04 }, N_("Cloudy") },
584 };
585 static const RegisterDescriptorType oly3000z_reg_20[] = {
586 	{
587 		GP_WIDGET_RADIO, GP_REG_NO_MASK,
588 		"whitebalance", N_("White Balance"),
589 		VAL_NAME_INIT (oly3000z_reg_20_val_names)
590 	}
591 };
592 
593 /*
594  * Olympus 750uz: Register 20: white balance. The main difference is that
595  * we have the fluorescent 1 2 and 3:
596  */
597 static const ValueNameType oly750uz_reg_20_val_names[] = {
598 	{ { 0x00 }, N_("Auto") },
599 	{ { 0x01 }, N_("Daylight") },
600 	{ { 0x03 }, N_("Tungsten") },
601 	{ { 0x04 }, N_("Fluorescent-1-home-6700K") },
602 	{ { 0x05 }, N_("Fluorescent-2-desk-5000K") },
603 	{ { 0x06 }, N_("Fluorescent-3-office-4200K") },
604 	{ { 0xff }, N_("Cloudy") },
605 };
606 static const RegisterDescriptorType oly750uz_reg_20[] = {
607 	{
608 		GP_WIDGET_RADIO, GP_REG_NO_MASK,
609 		"whitebalance", N_("White Balance"),
610 		VAL_NAME_INIT (oly750uz_reg_20_val_names)
611 	}
612 };
613 
614 /*
615  * Olympus SP 500uz: Register 20: white balance. The main difference is that
616  * we have the fluorescent 1 2 and 3:
617  */
618 static const ValueNameType olysp500uz_reg_20_val_names[] = {
619 	{ { 0x00 }, N_("Auto") },
620 	{ { 0x01 }, N_("Daylight") },
621 	{ { 0x03 }, N_("Tungsten") },
622 	{ { 0x04 }, N_("Fluorescent-1-home-6700K") },
623 	{ { 0x05 }, N_("Fluorescent-2-desk-5000K") },
624 	{ { 0x06 }, N_("Fluorescent-3-office-4200K") },
625 	{ { 0x09 }, N_("Dusk") },
626 	{ { 0x0a }, N_("Preset") },
627 	{ { 0xff }, N_("Cloudy") },
628 };
629 
630 static const RegisterDescriptorType olysp500uz_reg_20[] = {
631 	{
632 		GP_WIDGET_RADIO, GP_REG_NO_MASK,
633 		"whitebalance", N_("White Balance"),
634 		VAL_NAME_INIT (olysp500uz_reg_20_val_names)
635 	}
636 };
637 
638 /*
639  * Register 33: focus mode.
640  */
641 static const ValueNameType oly3040_reg_33_val_names[] = {
642 	{ { 0x01 }, N_("Macro") },
643 	{ { 0x02 }, N_("Auto") },
644 	{ { 0x03 }, N_("Manual") },
645 };
646 static const RegisterDescriptorType oly3040_reg_33[] = {
647 	{
648 		GP_WIDGET_RADIO, GP_REG_NO_MASK,
649 		"focus-mode", N_("Focus Mode"),
650 		VAL_NAME_INIT (oly3040_reg_33_val_names)
651 	}
652 };
653 
654 /*
655  * Register 34: LCD mode / write-only through SIERRA_SUBACTION / ACTION_LCD_MODE
656  * This register always contains 1 (OFF).
657  * Note: Always swicth off LCD before disconnecting the camera. Otherwise the camera
658  * controls won't work, and you will need to replug the cable and switch off the LCD.
659  * (This _is_ a documented "feature".)
660  */
661 
662 static const ValueNameType oly3040_reg_34_val_names[] = {
663 	{ { 0x01 }, N_("Off") },
664 	{ { 0x02 }, N_("Monitor") },
665 	{ { 0x03 }, N_("Normal") },
666 };
667 static const RegisterDescriptorType oly3040_reg_34[] = {
668 	{
669 		GP_WIDGET_RADIO, GP_REG_NO_MASK,
670 		"lcd-mode", N_("LCD Mode"),
671 		VAL_NAME_INIT (oly3040_reg_34_val_names)
672 	}
673 };
674 
675 
676 /*
677  * Register 35: lcd brightness.
678  */
679 static const ValueNameType oly3040_reg_35_val_names[] = {
680 	{ { .range = { 0, 7 } }, NULL },
681 };
682 static const RegisterDescriptorType oly3040_reg_35[] = {
683 	{
684 		GP_WIDGET_RANGE, GP_REG_NO_MASK,
685 		"lcd-brightness", N_("LCD Brightness"),
686 		VAL_NAME_INIT (oly3040_reg_35_val_names)
687 	}
688 };
689 
690 /*
691  * Register 24: camera power save (idle time before entering power save mode)
692  */
693 static const ValueNameType oly3040_reg_24_val_names[] = {
694 	{ { .range = { 30, 600, 30  } }, NULL },
695 };
696 static const RegisterDescriptorType oly3040_reg_24[] = {
697 	{
698 		GP_WIDGET_RANGE, GP_REG_NO_MASK,
699 		"camera-power-save", N_("Camera power save (seconds)"),
700 		VAL_NAME_INIT (oly3040_reg_24_val_names)
701 	}
702 };
703 
704 /*
705  * Register 23: camera power save when connected to PC
706  * (idle time before entering power save mode)
707  */
708 static const ValueNameType oly3040_reg_23_val_names[] = {
709 	{ { .range = { 30, 600, 30  } }, NULL },
710 };
711 static const RegisterDescriptorType oly3040_reg_23[] = {
712 	{
713 		GP_WIDGET_RANGE, GP_REG_NO_MASK,
714 		"host-power-save", N_("Host power save (seconds)"),
715 		VAL_NAME_INIT (oly3040_reg_23_val_names)
716 	}
717 };
718 /*
719  * Register 38: lcd auto shut off time
720  */
721 static const ValueNameType oly3040_reg_38_val_names[] = {
722 	{ { .range = { 30, 600, 30  } }, NULL },
723 };
724 static const RegisterDescriptorType oly3040_reg_38[] = {
725 	{
726 		GP_WIDGET_RANGE, GP_REG_NO_MASK,
727 		"lcd-auto-shutoff", N_("LCD Auto Shut Off (seconds)"),
728 		VAL_NAME_INIT (oly3040_reg_38_val_names)
729 	}
730 };
731 
732 /*
733  * Register 53: language setting. No meaning on Olympus
734  */
735 /*
736 static const ValueNameType oly3040_reg_53_val_names[] = {
737 	{ { 0x03 }, N_("English") },
738 	{ { 0x04 }, N_("French") },
739 	{ { 0x05 }, N_("German") },
740 };
741 static const RegisterDescriptorType oly3040_reg_53[] = {
742 	{
743 		GP_WIDGET_RADIO, GP_REG_NO_MASK,
744 		"language", N_("Language"),
745 		VAL_NAME_INIT (oly3040_reg_53_val_names)
746 	}
747 };
748 */
749 
750 /*
751  * Register 69: exposure compensation.
752  */
753 static const ValueNameType oly3040_reg_69_val_names[] = {
754 	{ { -20 }, "-2.0" },
755 	{ { -17 }, "-1.7" },
756 	{ { -13 }, "-1.3" },
757 	{ { -10 }, "-1.0" },
758 	{ { -07 }, "-0.7" },
759 	{ { -03 }, "-0.3" },
760 	{ {  00 }, " 0" },
761 	{ { +03 }, "+0.3" },
762 	{ { +07 }, "+0.7" },
763 	{ { +10 }, "+1.0" },
764 	{ { +13 }, "+1.3" },
765 	{ { +17 }, "+1.7" },
766 	{ { +20 }, "+2.0" },
767 };
768 static const RegisterDescriptorType oly3040_reg_69[] = {
769 	{
770 		GP_WIDGET_MENU, GP_REG_NO_MASK,
771 		"exp", N_("Exposure Compensation"),
772 		VAL_NAME_INIT (oly3040_reg_69_val_names)
773 	}
774 };
775 
776 /*
777  * Register 70: exposure meter.
778  */
779 static const ValueNameType oly3040_reg_70_val_names[] = {
780 	{ { 0x03 }, N_("Spot") },
781 	{ { 0x05 }, N_("Matrix") },
782 };
783 static const RegisterDescriptorType oly3040_reg_70[] = {
784 	{
785 		GP_WIDGET_RADIO, GP_REG_NO_MASK,
786 		"exp-meter", N_("Exposure Metering"),
787 		VAL_NAME_INIT (oly3040_reg_70_val_names)
788 	}
789 };
790 
791 /*
792  * Olympus SP-500uz Register 70: exposure meter.
793  */
794 static const ValueNameType olysp500uz_reg_70_val_names[] = {
795 	{ { 0x02 }, N_("Center Weighted") },
796 	{ { 0x03 }, N_("Spot") },
797 	{ { 0x04 }, N_("ESP") },
798 	{ { 0x05 }, N_("Matrix") },
799 };
800 
801 static const RegisterDescriptorType olysp500uz_reg_70[] = {
802 	{
803 		GP_WIDGET_RADIO, GP_REG_NO_MASK,
804 		"exp-meter", N_("Exposure Metering"),
805 		VAL_NAME_INIT (olysp500uz_reg_70_val_names)
806 	}
807 };
808 
809 /*
810  * Oly 750 uz Register 71: optical zoom value.
811  */
812 static const ValueNameType oly750uz_reg_71_val_names[] = {
813 	{
814 		{ .range = { 6.3, 63.0, .1 } }, NULL
815 	}
816 };
817 static const RegisterDescriptorType oly750uz_reg_71[] = {
818 	{
819 		GP_WIDGET_RANGE, GP_REG_NO_MASK,
820 		"zoom", N_("Zoom (in millimeters)"),
821 		VAL_NAME_INIT (oly750uz_reg_71_val_names)
822 	}
823 };
824 
825 /*
826  * Oly SP-500 uz Register 71: optical zoom value.
827  */
828 #if 0
829 static const ValueNameType olysp500uz_reg_71_val_names[] = {
830 	{
831 		{ .range = { 6.3, 63.0, .3 } }, NULL
832 	}
833 };
834 static const RegisterDescriptorType olysp500uz_reg_71[] = {
835 	{
836 		GP_WIDGET_RANGE, GP_REG_NO_MASK,
837 		"zoom", N_("Zoom (in millimeters)"),
838 		VAL_NAME_INIT (olysp500uz_reg_71_val_names)
839 	}
840 };
841 #endif
842 
843 /*
844  * Oly 3040 Register 71: optical zoom value.
845  */
846 static const ValueNameType oly3040_reg_71_val_names[] = {
847 	{
848 		{ .range = { 7.3, 21.0, .1 } }, NULL
849 	}
850 };
851 static const RegisterDescriptorType oly3040_reg_71[] = {
852 	{
853 		GP_WIDGET_RANGE, GP_REG_NO_MASK,
854 		"zoom", N_("Zoom (in millimeters)"),
855 		VAL_NAME_INIT (oly3040_reg_71_val_names)
856 	}
857 };
858 
859 /*
860  * Register 72: digital zoom
861  */
862 static const ValueNameType oly3040_reg_72_val_names[] = {
863 	{ { 0x0000 }, N_("Off") },
864 	{ { 0x0208 }, "1.5x" },
865 	{ { 0x0008 }, "2x" },
866 	{ { 0x0408 }, "2.5x" },
867 };
868 static const RegisterDescriptorType oly3040_reg_72[] = {
869 	{
870 		GP_WIDGET_MENU, GP_REG_NO_MASK,
871 		"dzoom", N_("Digital zoom"),
872 		VAL_NAME_INIT (oly3040_reg_72_val_names)
873 	}
874 };
875 
876 /*
877  * Register 85: ISO speed, read only on some cameras
878  */
879 static const ValueNameType oly3040_reg_85_val_names[] = {
880 	{ { 0 }, N_("Auto") },
881 	{ { 1 }, "100" },
882 	{ { 2 }, "200" },
883 	{ { 3 }, "400" },
884 };
885 static const RegisterDescriptorType oly3040_reg_85[] = {
886 	{
887 		GP_WIDGET_MENU, GP_REG_NO_MASK,
888 		"iso", N_("ISO Speed"),
889 		VAL_NAME_INIT (oly3040_reg_85_val_names)
890 	}
891 };
892 
893 /*
894  * Olympus 750uz Register 85: ISO speed, writable
895  */
896 static const ValueNameType oly750uz_reg_85_val_names[] = {
897 	{ { 0 }, N_("Auto") },
898 	{ { 1 }, "100" },
899 	{ { 2 }, "200" },
900 	{ { 3 }, "400" },
901 	{ { 4 }, "50" },
902 };
903 static const RegisterDescriptorType oly750uz_reg_85[] = {
904 	{
905 		GP_WIDGET_MENU, GP_REG_NO_MASK,
906 		"iso", N_("ISO Speed"),
907 		VAL_NAME_INIT (oly750uz_reg_85_val_names)
908 	}
909 };
910 
911 /*
912  * Register 103: focus position (only applicable in manual focus mode)
913  *     1 to 120: macro positions
914  *   121 to 240: normal positions
915  */
916 static const ValueNameType oly3040_reg_103_val_names[] = {
917 	{ { .range = { 1, 240, 1 } }, NULL },
918 };
919 static const RegisterDescriptorType oly3040_reg_103[] = {
920 	{
921 		GP_WIDGET_RANGE, GP_REG_NO_MASK,
922 		"focus-pos", N_("Focus position"),
923 		VAL_NAME_INIT (oly3040_reg_103_val_names)
924 	}
925 };
926 
927 /*
928  * Olyumpus 750uz Register 103: focus position
929  *     27 to 120: if in macro mode
930  *      0 to 120: non-macro mode
931  */
932 static const ValueNameType oly750uz_reg_103_val_names[] = {
933 	{ { .range = { 1, 120, 1 } }, NULL },
934 };
935 static const RegisterDescriptorType oly750uz_reg_103[] = {
936 	{
937 		GP_WIDGET_RANGE, GP_REG_NO_MASK,
938 		"focus-pos", N_("Focus position"),
939 		VAL_NAME_INIT (oly750uz_reg_103_val_names)
940 	}
941 };
942 
943 /*
944  * Register 41: time format, read only
945  */
946 static const ValueNameType oly3040_reg_41_val_names[] = {
947 	{ { 0 }, N_("Off") },
948 	{ { 1 }, "yymmdd" },
949 	{ { 2 }, "mmddyy" },
950 	{ { 3 }, "ddmmyy" },
951 };
952 static const RegisterDescriptorType oly3040_reg_41[] = {
953 	{
954 		GP_WIDGET_MENU, GP_REG_NO_MASK,
955 		"timefmt", N_("Time format"),
956 		VAL_NAME_INIT (oly3040_reg_41_val_names)
957 	}
958 };
959 
960 
961 /*
962  * Olympus 3040: All of the register used to modify picture settings. The
963  * register value received from the camera is stored into this data area,
964  * so it cannot be a const.
965  */
966 static CameraRegisterType oly3040_pic_regs[] =  {
967 	/* camera prefix, register number, size of register */
968 	CAM_REG_TYPE_INIT (oly3040, 01, 4, CAM_DESC_DEFAULT, 0), /* resolution/size */
969 	CAM_REG_TYPE_INIT (oly3040, 03, 4, CAM_DESC_DEFAULT, 0), /* shutter */
970 	CAM_REG_TYPE_INIT (oly3040, 05, 4, CAM_DESC_DEFAULT, 0), /* aperture (f-stop) */
971 	CAM_REG_TYPE_INIT (oly3040, 06, 4, CAM_DESC_DEFAULT, 0), /* color mode */
972 	CAM_REG_TYPE_INIT (oly3040, 07, 4, CAM_DESC_DEFAULT, 0), /* flash */
973 	CAM_REG_TYPE_INIT (oly3040, 20, 4, CAM_DESC_DEFAULT, 0), /* white balance */
974 	CAM_REG_TYPE_INIT (oly3040, 33, 4, CAM_DESC_DEFAULT, 0), /* focus mode */
975 	CAM_REG_TYPE_INIT (oly3040,103, 4, CAM_DESC_DEFAULT, 0), /* focus position */
976 	CAM_REG_TYPE_INIT (oly3040, 69, 8, CAM_DESC_DEFAULT, 0), /* exposure compensation */
977 	CAM_REG_TYPE_INIT (oly3040, 70, 4, CAM_DESC_DEFAULT, 0), /* exposure metering */
978 	CAM_REG_TYPE_INIT (oly3040, 71, 8, CAM_DESC_DEFAULT, 0), /* optical zoom */
979 	CAM_REG_TYPE_INIT (oly3040, 72, 4, CAM_DESC_DEFAULT, 0), /* digital zoom + lense +  AE lock */
980 	CAM_REG_TYPE_INIT (oly3040, 85, 4, CAM_DESC_DEFAULT, 0), /* ISO Speed, read only  */
981 };
982 
983 /*
984  * Olympus 3000z: All of the register used to modify picture settings.
985  * Note that most of these are the same as the 3040.
986  */
987 static CameraRegisterType oly3000z_pic_regs[] =  {
988 	/* camera prefix, register number, size of register */
989 	CAM_REG_TYPE_INIT (oly3040, 01, 4, CAM_DESC_DEFAULT, 0), /* resolution/size */
990 	CAM_REG_TYPE_INIT (oly3040, 03, 4, CAM_DESC_DEFAULT, 0), /* shutter */
991 	CAM_REG_TYPE_INIT (oly3000z, 05, 4, CAM_DESC_DEFAULT, 0), /* aperture (f-stop) */
992 	CAM_REG_TYPE_INIT (oly3040, 06, 4, CAM_DESC_DEFAULT, 0), /* color mode */
993 	CAM_REG_TYPE_INIT (oly3040, 07, 4, CAM_DESC_DEFAULT, 0), /* flash */
994 	CAM_REG_TYPE_INIT (oly3000z, 20, 4, CAM_DESC_DEFAULT, 0), /* white balance */
995 	CAM_REG_TYPE_INIT (oly3040, 33, 4, CAM_DESC_DEFAULT, 0), /* focus mode */
996 	CAM_REG_TYPE_INIT (oly3040,103, 4, CAM_DESC_DEFAULT, 0), /* focus position */
997 	CAM_REG_TYPE_INIT (oly3040, 69, 8, CAM_DESC_DEFAULT, 0), /* exposure compensation */
998 	CAM_REG_TYPE_INIT (oly3040, 70, 4, CAM_DESC_DEFAULT, 0), /* exposure metering */
999 	CAM_REG_TYPE_INIT (oly3040, 71, 8, CAM_DESC_DEFAULT, 0), /* optical zoom */
1000 	CAM_REG_TYPE_INIT (oly3040, 72, 4, CAM_DESC_DEFAULT, 0), /* digital zoom + lense +  AE lock */
1001 	CAM_REG_TYPE_INIT (oly3040, 85, 4, CAM_DESC_DEFAULT, 0), /* ISO Speed, read only  */
1002 };
1003 
1004 /*
1005  * All of the register used to modify camera settings.
1006  */
1007 static CameraRegisterType oly3040_cam_regs[] = {
1008 	CAM_REG_TYPE_INIT (oly3040, 02, 4, CAM_DESC_DEFAULT, 0), /* date-time */
1009 	CAM_REG_TYPE_INIT (oly3040, 34, 4, CAM_DESC_SUBACTION,
1010 			  SIERRA_ACTION_LCD_MODE), /* lcd mode */
1011 	CAM_REG_TYPE_INIT (oly3040, 35, 4, CAM_DESC_DEFAULT, 0), /* LCD brightness */
1012 	CAM_REG_TYPE_INIT (oly3040, 38, 4, CAM_DESC_DEFAULT, 0), /* LCD auto shutoff */
1013 	CAM_REG_TYPE_INIT (oly3040, 24, 4, CAM_DESC_DEFAULT, 0), /* Camera power save */
1014 	CAM_REG_TYPE_INIT (oly3040, 23, 4, CAM_DESC_DEFAULT, 0), /* Host power save */
1015 	CAM_REG_TYPE_INIT (oly3040, 41, 4, CAM_DESC_DEFAULT, 0), /* time format, read only */
1016 };
1017 
1018 static const CameraRegisterSetType oly3040_desc[] = {
1019 		{
1020 			N_("Picture Settings"),
1021 			SIZE_ADDR (CameraRegisterType, oly3040_pic_regs)
1022 		},
1023 		{
1024 			N_("Camera Settings"),
1025 			SIZE_ADDR (CameraRegisterType, oly3040_cam_regs)
1026 		},
1027 };
1028 
1029 /*
1030  * Olympus 750UZ: All of the register used to modify picture settings.
1031  */
1032 static CameraRegisterType oly750uz_pic_regs[] =  {
1033 	/* camera prefix, register number, size of register */
1034 	CAM_REG_TYPE_INIT (oly750uz, 01, 4, CAM_DESC_DEFAULT, 0), /* resolution/size */
1035 	CAM_REG_TYPE_INIT (oly750uz, 03, 4, CAM_DESC_DEFAULT, 0), /* shutter */
1036 	CAM_REG_TYPE_INIT (oly750uz, 05, 4, CAM_DESC_DEFAULT, 0), /* aperture (f-stop) */
1037 	CAM_REG_TYPE_INIT (oly3040, 06, 4, CAM_DESC_DEFAULT, 0), /* color mode */
1038 	CAM_REG_TYPE_INIT (oly750uz, 07, 4, CAM_DESC_DEFAULT, 0), /* flash */
1039 	CAM_REG_TYPE_INIT (oly750uz, 20, 4, CAM_DESC_DEFAULT, 0), /* white balance */
1040 	CAM_REG_TYPE_INIT (oly3040, 33, 4, CAM_DESC_DEFAULT, 0), /* focus mode */
1041 	/*
1042 	 * Note: in "super macro" focus mode, the camera can only auto
1043 	 * focus. Could not figure out how to set or get super macro mode.
1044 	 */
1045 	CAM_REG_TYPE_INIT (oly750uz,103, 4, CAM_DESC_DEFAULT, 0), /* focus position */
1046 	CAM_REG_TYPE_INIT (oly3040, 69, 8, CAM_DESC_DEFAULT, 0), /* exposure compensation */
1047 	CAM_REG_TYPE_INIT (oly3040, 70, 4, CAM_DESC_DEFAULT, 0), /* exposure metering */
1048 	/*
1049 	 * Could not figure out how or if mulit-metering can be set for
1050 	 * the exposure metering.
1051 	 */
1052 	CAM_REG_TYPE_INIT (oly750uz, 71, 8, CAM_DESC_DEFAULT, 0), /* optical zoom */
1053 	CAM_REG_TYPE_INIT (oly3040, 72, 4, CAM_DESC_DEFAULT, 0), /* digital zoom + lense +  AE lock */
1054 	CAM_REG_TYPE_INIT (oly750uz, 85, 4, CAM_DESC_DEFAULT, 0), /* ISO Speed, read only  */
1055 };
1056 
1057 /*
1058  * All of the register used to modify camera settings.
1059  *
1060  * All the same as 3040.
1061  */
1062 static CameraRegisterType oly750uz_cam_regs[] = {
1063 	CAM_REG_TYPE_INIT (oly3040, 02, 4, CAM_DESC_DEFAULT, 0), /* date-time */
1064 	CAM_REG_TYPE_INIT (oly3040, 34, 4, CAM_DESC_SUBACTION,
1065 			  SIERRA_ACTION_LCD_MODE), /* lcd mode */
1066 	CAM_REG_TYPE_INIT (oly3040, 35, 4, CAM_DESC_DEFAULT, 0), /* LCD brightness */
1067 	CAM_REG_TYPE_INIT (oly3040, 38, 4, CAM_DESC_DEFAULT, 0), /* LCD auto shutoff */
1068 	CAM_REG_TYPE_INIT (oly3040, 24, 4, CAM_DESC_DEFAULT, 0), /* Camera power save */
1069 	CAM_REG_TYPE_INIT (oly3040, 23, 4, CAM_DESC_DEFAULT, 0), /* Host power save */
1070 	CAM_REG_TYPE_INIT (oly3040, 41, 4, CAM_DESC_DEFAULT, 0), /* time format, read only */
1071 };
1072 
1073 /*
1074  * Olympus SP-500UZ: All of the register used to modify picture settings.
1075  */
1076 static CameraRegisterType olysp500uz_pic_regs[] =  {
1077 	/* camera prefix, register number, size of register */
1078 	CAM_REG_TYPE_INIT (olysp500uz, 01, 4, CAM_DESC_DEFAULT, 0), /* resolution/size */
1079 	CAM_REG_TYPE_INIT (olysp500uz, 03, 4, CAM_DESC_DEFAULT, 0), /* shutter */
1080 	CAM_REG_TYPE_INIT (oly750uz, 05, 4, CAM_DESC_DEFAULT, 0), /* aperture (f-stop) */
1081 	CAM_REG_TYPE_INIT (oly3040, 06, 4, CAM_DESC_DEFAULT, 0), /* color mode */
1082 	CAM_REG_TYPE_INIT (olysp500uz, 07, 4, CAM_DESC_DEFAULT, 0), /* flash */
1083 	CAM_REG_TYPE_INIT (olysp500uz, 20, 4, CAM_DESC_DEFAULT, 0), /* white balance */
1084 	CAM_REG_TYPE_INIT (oly3040, 33, 4, CAM_DESC_DEFAULT, 0), /* focus mode */
1085 	/*
1086 	 * Note: in "super macro" focus mode, the camera can only auto
1087 	 * focus. Could not figure out how to set or get super macro mode.
1088 	 */
1089 	CAM_REG_TYPE_INIT (oly3040,103, 4, CAM_DESC_DEFAULT, 0), /* focus position */
1090 	CAM_REG_TYPE_INIT (oly3040, 69, 8, CAM_DESC_DEFAULT, 0), /* exposure compensation */
1091 	CAM_REG_TYPE_INIT (olysp500uz, 70, 4, CAM_DESC_DEFAULT, 0), /* exposure metering */
1092 	/*
1093 	 * Could not figure out how or if mulit-metering can be set for
1094 	 * the exposure metering.
1095 	 */
1096 	CAM_REG_TYPE_INIT (oly750uz, 71, 8, CAM_DESC_DEFAULT, 0), /* optical zoom */
1097 	CAM_REG_TYPE_INIT (oly3040, 72, 4, CAM_DESC_DEFAULT, 0), /* digital zoom + lense +  AE lock */
1098 	CAM_REG_TYPE_INIT (oly750uz, 85, 4, CAM_DESC_DEFAULT, 0), /* ISO Speed, read only  */
1099 };
1100 
1101 /*
1102  * All of the register used to modify camera settings.
1103  *
1104  * All the same as 3040.
1105  */
1106 static CameraRegisterType olysp500uz_cam_regs[] = {
1107 	CAM_REG_TYPE_INIT (oly3040, 02, 4, CAM_DESC_DEFAULT, 0), /* date-time */
1108 	CAM_REG_TYPE_INIT (oly3040, 34, 4, CAM_DESC_SUBACTION,
1109 			  SIERRA_ACTION_LCD_MODE), /* lcd mode */
1110 	CAM_REG_TYPE_INIT (oly3040, 35, 4, CAM_DESC_DEFAULT, 0), /* LCD brightness */
1111 	CAM_REG_TYPE_INIT (oly3040, 38, 4, CAM_DESC_DEFAULT, 0), /* LCD auto shutoff */
1112 	CAM_REG_TYPE_INIT (oly3040, 24, 4, CAM_DESC_DEFAULT, 0), /* Camera power save */
1113 	CAM_REG_TYPE_INIT (oly3040, 23, 4, CAM_DESC_DEFAULT, 0), /* Host power save */
1114 	CAM_REG_TYPE_INIT (oly3040, 41, 4, CAM_DESC_DEFAULT, 0), /* time format, read only */
1115 };
1116 
1117 static const CameraRegisterSetType olysp500uz_desc[] = {
1118 		{
1119 			N_("Picture Settings"),
1120 			SIZE_ADDR (CameraRegisterType, olysp500uz_pic_regs)
1121 		},
1122 		{
1123 			N_("Camera Settings"),
1124 			SIZE_ADDR (CameraRegisterType, olysp500uz_cam_regs)
1125 		},
1126 };
1127 
1128 static const CameraRegisterSetType oly750uz_desc[] = {
1129 		{
1130 			N_("Picture Settings"),
1131 			SIZE_ADDR (CameraRegisterType, oly750uz_pic_regs)
1132 		},
1133 		{
1134 			N_("Camera Settings"),
1135 			SIZE_ADDR (CameraRegisterType, oly750uz_cam_regs)
1136 		},
1137 };
1138 static const CameraRegisterSetType oly3000z_desc[] = {
1139 		{
1140 			N_("Picture Settings"),
1141 			SIZE_ADDR (CameraRegisterType, oly3000z_pic_regs)
1142 		},
1143 		{
1144 			/*
1145 			 * Assumed that these are all the same as the 3040
1146 			 */
1147 			N_("Camera Settings"),
1148 			SIZE_ADDR (CameraRegisterType, oly3040_cam_regs)
1149 		},
1150 };
1151 
1152 static const char oly3040_manual[] =
1153 N_(
1154 "Some notes about Olympus cameras:\n"
1155 "(1) Camera Configuration:\n"
1156 "    A zero value will take the default one (auto).\n"
1157 "(2) Olympus C-3040Z (and possibly also the C-2040Z\n"
1158 "    and others) have a USB PC Control mode. To switch\n"
1159 "    into 'USB PC control mode', turn on the camera, open\n"
1160 "    the memory card access door and then press and\n"
1161 "    hold both of the menu and LCD buttons until the\n"
1162 "    camera control menu appears. Set it to ON.\n"
1163 "(3) If you switch the 'LCD mode' to 'Monitor' or\n"
1164 "    'Normal', don't forget to switch it back to 'Off'\n"
1165 "    before disconnecting. Otherwise you can't use\n"
1166 "    the camera buttons. If you end up in this\n"
1167 "    state, you should reconnect the camera to the\n"
1168 "    PC, then switch LCD to 'Off'."
1169 );
1170 
1171 static const char oly750uz_manual[] =
1172 N_(
1173 "Olympus 750 Ultra Zoom:\n"
1174 "(1) Olympus 750UZ has a USB PC Control mode. To switch\n"
1175 "    into 'USB PC control mode', turn on the camera, open\n"
1176 "    the memory card access door and then press and\n"
1177 "    hold both the 'OK' and 'quickview' buttons until the\n"
1178 "    camera control menu appears. Set it to control mode.\n"
1179 "(2) If you switch the 'LCD mode' to 'Monitor' or\n"
1180 "    'Normal', don't forget to switch it back to 'Off'\n"
1181 "    before disconnecting. Otherwise you can't use\n"
1182 "    the camera buttons. If you end up in this\n"
1183 "    state, you should reconnect the camera to the\n"
1184 "    PC, then switch LCD to 'Off'."
1185 );
1186 
1187 static const char default_manual[] =
1188 N_(
1189 "Default sierra driver:\n\n"
1190 "    This is the default sierra driver, it\n"
1191 "    should be capable of supporting the download\n"
1192 "    and browsing of pictures on your camera.\n\n"
1193 "    Camera configuration (or preferences)\n"
1194 "    settings are based on the Olympus 3040,\n"
1195 "    and are likely incomplete. If you verify\n"
1196 "    that the configuration settings are\n"
1197 "    complete for your camera, or can contribute\n"
1198 "    code to support complete configuration,\n"
1199 "    please contact the developer mailing list.\n"
1200 );
1201 const CameraDescType olysp500uz_cam_desc = { olysp500uz_desc, oly750uz_manual,
1202 	SIERRA_EXT_PROTO, };
1203 const CameraDescType oly750uz_cam_desc = { oly750uz_desc, oly750uz_manual,
1204 	SIERRA_EXT_PROTO, };
1205 const CameraDescType oly3040_cam_desc = { oly3040_desc, oly3040_manual,
1206 	SIERRA_EXT_PROTO, };
1207 const CameraDescType oly3000z_cam_desc = { oly3000z_desc, oly3040_manual,
1208 	SIERRA_EXT_PROTO, };
1209 const CameraDescType sierra_default_cam_desc = { oly3040_desc, default_manual,
1210 	0, };
1211