Path: blob/master/drivers/media/video/gspca/nw80x.c
17683 views
/*1* DivIO nw80x subdriver2*3* Copyright (C) 2011 Jean-François Moine (http://moinejf.free.fr)4* Copyright (C) 2003 Sylvain Munaut <[email protected]>5* Kjell Claesson <[email protected]>6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* any later version.11*12* This program is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15* GNU General Public License for more details.16*17* You should have received a copy of the GNU General Public License18* along with this program; if not, write to the Free Software19* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA20*/2122#define MODULE_NAME "nw80x"2324#include "gspca.h"2526MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>");27MODULE_DESCRIPTION("NW80x USB Camera Driver");28MODULE_LICENSE("GPL");2930static int webcam;3132/* controls */33enum e_ctrl {34GAIN,35EXPOSURE,36AUTOGAIN,37NCTRLS /* number of controls */38};3940#define AUTOGAIN_DEF 14142/* specific webcam descriptor */43struct sd {44struct gspca_dev gspca_dev; /* !! must be the first item */4546struct gspca_ctrl ctrls[NCTRLS];4748u32 ae_res;49s8 ag_cnt;50#define AG_CNT_START 1351u8 exp_too_low_cnt;52u8 exp_too_high_cnt;5354u8 bridge;55u8 webcam;56};5758enum bridges {59BRIDGE_NW800, /* and et31x110 */60BRIDGE_NW801,61BRIDGE_NW802,62};63enum webcams {64Generic800,65SpaceCam, /* Trust 120 SpaceCam */66SpaceCam2, /* other Trust 120 SpaceCam */67Cvideopro, /* Conceptronic Video Pro */68Dlink350c,69DS3303u,70Kr651us,71Kritter,72Mustek300,73Proscope,74Twinkle,75DvcV6,76P35u,77Generic802,78NWEBCAMS /* number of webcams */79};8081static const u8 webcam_chip[NWEBCAMS] = {82[Generic800] = BRIDGE_NW800, /* 06a5:000083* Typhoon Webcam 100 USB */8485[SpaceCam] = BRIDGE_NW800, /* 06a5:d80086* Trust SpaceCam120 or SpaceCam100 PORTABLE */8788[SpaceCam2] = BRIDGE_NW800, /* 06a5:d800 - pas10689* other Trust SpaceCam120 or SpaceCam100 PORTABLE */9091[Cvideopro] = BRIDGE_NW802, /* 06a5:d00192* Conceptronic Video Pro 'CVIDEOPRO USB Webcam CCD' */9394[Dlink350c] = BRIDGE_NW802, /* 06a5:d00195* D-Link NetQam Pro 250plus */9697[DS3303u] = BRIDGE_NW801, /* 06a5:d00198* Plustek Opticam 500U or ProLink DS3303u */99100[Kr651us] = BRIDGE_NW802, /* 06a5:d001101* Panasonic GP-KR651US */102103[Kritter] = BRIDGE_NW802, /* 06a5:d001104* iRez Kritter cam */105106[Mustek300] = BRIDGE_NW802, /* 055f:d001107* Mustek Wcam 300 mini */108109[Proscope] = BRIDGE_NW802, /* 06a5:d001110* Scalar USB Microscope (ProScope) */111112[Twinkle] = BRIDGE_NW800, /* 06a5:d800 - hv7121b? (seems pas106)113* Divio Chicony TwinkleCam114* DSB-C110 */115116[DvcV6] = BRIDGE_NW802, /* 0502:d001117* DVC V6 */118119[P35u] = BRIDGE_NW801, /* 052b:d001, 06a5:d001 and 06be:d001120* EZCam Pro p35u */121122[Generic802] = BRIDGE_NW802,123};124/*125* other webcams:126* - nw801 046d:d001127* Logitech QuickCam Pro (dark focus ring)128* - nw801 0728:d001129* AVerMedia Camguard130* - nw??? 06a5:d001131* D-Link NetQam Pro 250plus132* - nw800 065a:d800133* Showcam NGS webcam134* - nw??? ????:????135* Sceptre svc300136*/137138/*139* registers140* nw800/et31x110 nw801 nw802141* 0000..009e 0000..00a1 0000..009e142* 0200..0211 id id143* 0300..0302 id id144* 0400..0406 (inex) 0400..0406145* 0500..0505 0500..0506 (inex)146* 0600..061a 0600..0601 0600..0601147* 0800..0814 id id148* 1000..109c 1000..10a1 1000..109a149*/150151/* resolutions152* nw800: 320x240, 352x288153* nw801/802: 320x240, 640x480154*/155static const struct v4l2_pix_format cif_mode[] = {156{320, 240, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE,157.bytesperline = 320,158.sizeimage = 320 * 240 * 4 / 8,159.colorspace = V4L2_COLORSPACE_JPEG},160{352, 288, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE,161.bytesperline = 352,162.sizeimage = 352 * 288 * 4 / 8,163.colorspace = V4L2_COLORSPACE_JPEG}164};165static const struct v4l2_pix_format vga_mode[] = {166{320, 240, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE,167.bytesperline = 320,168.sizeimage = 320 * 240 * 4 / 8,169.colorspace = V4L2_COLORSPACE_JPEG},170{640, 480, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE,171.bytesperline = 640,172.sizeimage = 640 * 480 * 3 / 8,173.colorspace = V4L2_COLORSPACE_JPEG},174};175176/*177* The sequences below contain:178* - 1st and 2nd bytes: either179* - register number (BE)180* - I2C0 + i2c address181* - 3rd byte: data length (=0 for end of sequence)182* - n bytes: data183*/184#define I2C0 0xff185186static const u8 nw800_init[] = {1870x04, 0x05, 0x01, 0x61,1880x04, 0x04, 0x01, 0x01,1890x04, 0x06, 0x01, 0x04,1900x04, 0x04, 0x03, 0x00, 0x00, 0x00,1910x05, 0x05, 0x01, 0x00,1920, 0, 0193};194static const u8 nw800_start[] = {1950x04, 0x06, 0x01, 0xc0,1960x00, 0x00, 0x40, 0x10, 0x43, 0x00, 0xb4, 0x01, 0x10, 0x00, 0x4f,1970xef, 0x0e, 0x00, 0x74, 0x01, 0x01, 0x00, 0x19,1980x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,1990x00, 0x01, 0x00, 0x19, 0x00, 0x3e, 0x00, 0x24,2000x03, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,2010x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,2020x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,2030x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,2040x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,2050x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,2060x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,2070x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,2080x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,2090x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,2100x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,2110x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,2120x00, 0x80, 0x1f, 0xa0, 0x48, 0xc3, 0x02, 0x88, 0x0c, 0x68, 0x00,2130x00, 0x00, 0x00, 0x00, 0xa8, 0x06, 0x00, 0x08,2140x00, 0x32, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,2150x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00,2160x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,2170x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,2180x40, 0x20,2190x03, 0x00, 0x03, 0x03, 0x00, 0x00,2200x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0xc0,2210x05, 0x00, 0x06, 0xe8, 0x00, 0x00, 0x00, 0x20, 0x20,2220x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,2230x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,2240x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,2250x00, 0x00, 0x00,2260x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,2270x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,2280x00, 0x00, 0x00, 0x00, 0x00,2290x10, 0x00, 0x40, 0x83, 0x02, 0x20, 0x00, 0x13, 0x00, 0x00, 0x00,2300x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,2310x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,2320x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,2330x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,2340x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,2350x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,2360xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,2370x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,2380xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,2390xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,2400x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,2410xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,2420x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,2430xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,2440x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,2450x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,2460x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x62,2470x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,2480x01, 0x60, 0x01, 0x00, 0x00,2492500x04, 0x04, 0x01, 0xff,2510x04, 0x06, 0x01, 0xc4,2522530x04, 0x06, 0x01, 0xc0,2540x00, 0x00, 0x40, 0x10, 0x43, 0x00, 0xb4, 0x01, 0x10, 0x00, 0x4f,2550xef, 0x0e, 0x00, 0x74, 0x01, 0x01, 0x00, 0x19,2560x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,2570x00, 0x01, 0x00, 0x19, 0x00, 0x3e, 0x00, 0x24,2580x03, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,2590x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,2600x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,2610x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,2620x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,2630x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,2640x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,2650x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,2660x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,2670x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,2680x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,2690x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,2700x00, 0x80, 0x1f, 0xa0, 0x48, 0xc3, 0x02, 0x88, 0x0c, 0x68, 0x00,2710x00, 0x00, 0x00, 0x00, 0xa8, 0x06, 0x00, 0x08,2720x00, 0x32, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,2730x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00,2740x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,2750x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,2760x40, 0x20,2770x03, 0x00, 0x03, 0x03, 0x00, 0x00,2780x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0xc0,2790x05, 0x00, 0x06, 0xe8, 0x00, 0x00, 0x00, 0x20, 0x20,2800x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,2810x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,2820x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,2830x00, 0x00, 0x00,2840x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,2850x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,2860x00, 0x00, 0x00, 0x00, 0x00,2870x10, 0x00, 0x40, 0x83, 0x02, 0x20, 0x00, 0x13, 0x00, 0x00, 0x00,2880x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,2890x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,2900x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,2910x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,2920x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,2930x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,2940xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,2950x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,2960xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,2970xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,2980x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,2990xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,3000x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,3010xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,3020x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,3030x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,3040x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x62,3050x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,3060x01, 0x60, 0x01, 0x00, 0x00,3073080x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,3090x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,3100x40,3110x00, 0x80, 0x01, 0xa0,3120x10, 0x1a, 0x01, 0x00,3130x00, 0x91, 0x02, 0x6c, 0x01,3140x00, 0x03, 0x02, 0xc8, 0x01,3150x10, 0x1a, 0x01, 0x00,3160x10, 0x00, 0x01, 0x83,3170x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,3180x20, 0x01, 0x60, 0x01,3190x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,3200x10, 0x1b, 0x02, 0x69, 0x00,3210x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,3220x05, 0x02, 0x01, 0x02,3230x06, 0x00, 0x02, 0x04, 0xd9,3240x05, 0x05, 0x01, 0x20,3250x05, 0x05, 0x01, 0x21,3260x10, 0x0e, 0x01, 0x08,3270x10, 0x41, 0x11, 0x00, 0x08, 0x21, 0x3d, 0x52, 0x63, 0x75, 0x83,3280x91, 0x9e, 0xaa, 0xb6, 0xc1, 0xcc, 0xd6, 0xe0,3290xea,3300x10, 0x03, 0x01, 0x00,3310x10, 0x0f, 0x02, 0x13, 0x13,3320x10, 0x03, 0x01, 0x14,3330x10, 0x41, 0x11, 0x00, 0x08, 0x21, 0x3d, 0x52, 0x63, 0x75, 0x83,3340x91, 0x9e, 0xaa, 0xb6, 0xc1, 0xcc, 0xd6, 0xe0,3350xea,3360x10, 0x0b, 0x01, 0x14,3370x10, 0x0d, 0x01, 0x20,3380x10, 0x0c, 0x01, 0x34,3390x04, 0x06, 0x01, 0xc3,3400x04, 0x04, 0x01, 0x00,3410x05, 0x02, 0x01, 0x02,3420x06, 0x00, 0x02, 0x00, 0x48,3430x05, 0x05, 0x01, 0x20,3440x05, 0x05, 0x01, 0x21,3450, 0, 0346};347348/* 06a5:d001 - nw801 - Panasonic349* P35u */350static const u8 nw801_start_1[] = {3510x05, 0x06, 0x01, 0x04,3520x00, 0x00, 0x40, 0x0e, 0x00, 0x00, 0xf9, 0x02, 0x11, 0x00, 0x0e,3530x01, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,3540x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,3550x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,3560x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,3570x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,3580x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,3590x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,3600x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,3610x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,3620x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,3630x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,3640x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,3650x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,3660x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,3670x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,3680x00, 0x80, 0x22, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x08, 0x00,3690x00, 0x00, 0x00, 0x00, 0x69, 0xa8, 0x1f, 0x00,3700x0d, 0x02, 0x07, 0x00, 0x01, 0x00, 0x19, 0x00,3710xf2, 0x00, 0x18, 0x06, 0x10, 0x06, 0x10, 0x00,3720x36, 0x00,3730x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,3740x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,3750x40, 0x20,3760x03, 0x00, 0x03, 0x00, 0x00, 0x00,3770x05, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,3780x06, 0x00, 0x02, 0x09, 0x99,3790x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,3800x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,3810x00, 0x00, 0x00, 0x00, 0x00,3820x10, 0x00, 0x40, 0x22, 0x02, 0x80, 0x00, 0x1e, 0x00, 0x00, 0x00,3830x00, 0x00, 0x00, 0x0a, 0x15, 0x08, 0x08, 0x0a,3840x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,3850x00, 0x01, 0x35, 0xfd, 0x07, 0x3d, 0x00, 0x00,3860x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x14, 0x02,3870x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,3880x40, 0x00, 0x00, 0x00, 0x40, 0x20, 0x10, 0x06,3890x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06, 0xf7,3900x10, 0x40, 0x40, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80, 0x80,3910x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99, 0xa4,3920xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc, 0xcf,3930xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54, 0x64,3940x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2, 0xe2,3950xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,3960x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,3970xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,3980x10, 0x80, 0x22, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,3990xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00, 0x00,4000x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x82, 0x02,4010xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40, 0x01,4020xf0, 0x00,4030, 0, 0,404};405static const u8 nw801_start_qvga[] = {4060x02, 0x00, 0x10, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,4070x00, 0x78, 0x18, 0x0b, 0x06, 0xa2, 0x86, 0x78,4080x02, 0x0f, 0x01, 0x6b,4090x10, 0x1a, 0x01, 0x15,4100x00, 0x00, 0x01, 0x1e,4110x10, 0x00, 0x01, 0x2f,4120x10, 0x8c, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,4130x10, 0x11, 0x08, 0x29, 0x00, 0x18, 0x01, 0x1f, 0x00, 0xd2, 0x00,414/* AE window */4150, 0, 0,416};417static const u8 nw801_start_vga[] = {4180x02, 0x00, 0x10, 0x78, 0xa0, 0x97, 0x78, 0xa0, 0x00, 0x00, 0x00,4190x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xf0,4200x02, 0x0f, 0x01, 0xd5,4210x10, 0x1a, 0x01, 0x15,4220x00, 0x00, 0x01, 0x0e,4230x10, 0x00, 0x01, 0x22,4240x10, 0x8c, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01,4250x10, 0x11, 0x08, 0x51, 0x00, 0x30, 0x02, 0x3d, 0x00, 0xa4, 0x01,4260, 0, 0,427};428static const u8 nw801_start_2[] = {4290x10, 0x04, 0x01, 0x1a,4300x10, 0x19, 0x01, 0x09, /* clock */4310x10, 0x24, 0x06, 0xc0, 0x00, 0x3f, 0x02, 0x00, 0x01,432/* .. gain .. */4330x00, 0x03, 0x02, 0x92, 0x03,4340x00, 0x1d, 0x04, 0xf2, 0x00, 0x24, 0x07,4350x00, 0x7b, 0x01, 0xcf,4360x10, 0x94, 0x01, 0x07,4370x05, 0x05, 0x01, 0x01,4380x05, 0x04, 0x01, 0x01,4390x10, 0x0e, 0x01, 0x08,4400x10, 0x48, 0x11, 0x00, 0x37, 0x55, 0x6b, 0x7d, 0x8d, 0x9b, 0xa8,4410xb4, 0xbf, 0xca, 0xd4, 0xdd, 0xe6, 0xef, 0xf0,4420xf0,4430x10, 0x03, 0x01, 0x00,4440x10, 0x0f, 0x02, 0x0c, 0x0c,4450x10, 0x03, 0x01, 0x08,4460x10, 0x48, 0x11, 0x00, 0x37, 0x55, 0x6b, 0x7d, 0x8d, 0x9b, 0xa8,4470xb4, 0xbf, 0xca, 0xd4, 0xdd, 0xe6, 0xef, 0xf0,4480xf0,4490x10, 0x0b, 0x01, 0x0b,4500x10, 0x0d, 0x01, 0x0b,4510x10, 0x0c, 0x01, 0x1f,4520x05, 0x06, 0x01, 0x03,4530, 0, 0454};455456/* nw802 (sharp IR3Y38M?) */457static const u8 nw802_start[] = {4580x04, 0x06, 0x01, 0x04,4590x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0xf9, 0x02, 0x10, 0x00, 0x4d,4600x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,4610x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,4620x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,4630x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,4640x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,4650x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,4660x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,4670x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,4680x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,4690x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,4700x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,4710x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,4720x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,4730x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,4740x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,4750x00, 0x80, 0x1f, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x68, 0x00,4760x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,4770x00, 0x0c, 0x02, 0x01, 0x00, 0x16, 0x00, 0x94,4780x00, 0x10, 0x06, 0x08, 0x00, 0x18, 0x00,4790x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,4800x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,4810x40, 0x20,4820x03, 0x00, 0x03, 0x03, 0x00, 0x00,4830x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00,4840x06, 0x00, 0x02, 0x09, 0x99,4850x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,4860x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,4870x00, 0x00, 0x00, 0x00, 0x00,4880x10, 0x00, 0x40, 0xa1, 0x02, 0x80, 0x00, 0x1d, 0x00, 0x00, 0x00,4890x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,4900x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,4910x00, 0x49, 0x13, 0xff, 0x01, 0xc0, 0x00, 0x14,4920x02, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00,4930x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,4940x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,4950xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,4960x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,4970xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,4980xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,4990x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,5000xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,5010x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,5020xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,5030x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,5040x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,5050x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x05, 0x82,5060x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,5070x01, 0xf0, 0x00,5080x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,5090x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,5100x40,5110x10, 0x1a, 0x01, 0x00,5120x10, 0x00, 0x01, 0xad,5130x00, 0x00, 0x01, 0x08,5140x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,5150x10, 0x1b, 0x02, 0x00, 0x00,5160x10, 0x11, 0x08, 0x51, 0x00, 0xf0, 0x00, 0x3d, 0x00, 0xb4, 0x00,5170x10, 0x1d, 0x08, 0x00, 0xa0, 0x00, 0xa0, 0x00, 0xa0, 0x00, 0xa0,5180x10, 0x0e, 0x01, 0x27,5190x10, 0x41, 0x11, 0x00, 0x0e, 0x35, 0x4f, 0x62, 0x71, 0x7f, 0x8b,5200x96, 0xa0, 0xa9, 0xb2, 0xbb, 0xc3, 0xca, 0xd2,5210xd8,5220x10, 0x03, 0x01, 0x00,5230x10, 0x0f, 0x02, 0x14, 0x14,5240x10, 0x03, 0x01, 0x0c,5250x10, 0x41, 0x11, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54, 0x64, 0x74,5260x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2, 0xe2, 0xf1,5270xff,528/* 0x00, 0x0e, 0x35, 0x4f, 0x62, 0x71, 0x7f, 0x8b,529* 0x96, 0xa0, 0xa9, 0xb2, 0xbb, 0xc3, 0xca, 0xd2,530* 0xd8, */5310x10, 0x0b, 0x01, 0x10,5320x10, 0x0d, 0x01, 0x11,5330x10, 0x0c, 0x01, 0x1c,5340x04, 0x06, 0x01, 0x03,5350x04, 0x04, 0x01, 0x00,5360, 0, 0537};538/* et31x110 - Trust 120 SpaceCam */539static const u8 spacecam_init[] = {5400x04, 0x05, 0x01, 0x01,5410x04, 0x04, 0x01, 0x01,5420x04, 0x06, 0x01, 0x04,5430x04, 0x04, 0x03, 0x00, 0x00, 0x00,5440x05, 0x05, 0x01, 0x00,5450, 0, 0546};547static const u8 spacecam_start[] = {5480x04, 0x06, 0x01, 0x44,5490x00, 0x00, 0x40, 0x10, 0x43, 0x00, 0xb4, 0x01, 0x10, 0x00, 0x4f,5500xef, 0x0e, 0x00, 0x74, 0x01, 0x01, 0x00, 0x19,5510x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,5520x00, 0x01, 0x00, 0x19, 0x00, 0x3e, 0x00, 0x24,5530x03, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,5540x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,5550x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,5560x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,5570x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,5580x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,5590x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,5600x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,5610x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,5620x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,5630x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,5640x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,5650x00, 0x80, 0x1f, 0xa0, 0x48, 0xc3, 0x02, 0x88, 0x0c, 0x68, 0x00,5660x00, 0x00, 0x00, 0x00, 0xa8, 0x06, 0x00, 0x08,5670x00, 0x32, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,5680x00, 0x4b, 0x00, 0x7c, 0x00, 0x80, 0x00,5690x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,5700x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,5710x40, 0x20,5720x03, 0x00, 0x03, 0x03, 0x00, 0x00,5730x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,5740x05, 0x00, 0x06, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,5750x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,5760x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,5770x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,5780x00, 0x00, 0x00,5790x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,5800x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,5810x00, 0x00, 0x00, 0x00, 0x00,5820x10, 0x00, 0x40, 0x83, 0x02, 0x20, 0x00, 0x11, 0x00, 0x00, 0x00,5830x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,5840x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,5850x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,5860x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,5870x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,5880x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,5890xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,5900x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,5910xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,5920xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,5930x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,5940xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,5950x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,5960xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,5970x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,5980x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,5990x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x62,6000x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,6010x01, 0x60, 0x01, 0x00, 0x00,6020x04, 0x06, 0x01, 0xc0,6030x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,6040x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,6050x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,6060x40,6070x00, 0x80, 0x01, 0xa0,6080x10, 0x1a, 0x01, 0x00,6090x00, 0x91, 0x02, 0x32, 0x01,6100x00, 0x03, 0x02, 0x08, 0x02,6110x10, 0x00, 0x01, 0x83,6120x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,6130x20, 0x01, 0x60, 0x01,6140x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,6150x10, 0x0e, 0x01, 0x08,6160x10, 0x41, 0x11, 0x00, 0x64, 0x99, 0xc0, 0xe2, 0xf9, 0xf9, 0xf9,6170xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,6180xf9,6190x10, 0x03, 0x01, 0x00,6200x10, 0x0f, 0x02, 0x13, 0x13,6210x10, 0x03, 0x01, 0x06,6220x10, 0x41, 0x11, 0x00, 0x64, 0x99, 0xc0, 0xe2, 0xf9, 0xf9, 0xf9,6230xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,6240xf9,6250x10, 0x0b, 0x01, 0x08,6260x10, 0x0d, 0x01, 0x10,6270x10, 0x0c, 0x01, 0x1f,6280x04, 0x06, 0x01, 0xc3,6290x04, 0x05, 0x01, 0x40,6300x04, 0x04, 0x01, 0x40,6310, 0, 0632};633/* et31x110 - pas106 - other Trust SpaceCam120 */634static const u8 spacecam2_start[] = {6350x04, 0x06, 0x01, 0x44,6360x04, 0x06, 0x01, 0x00,6370x00, 0x00, 0x40, 0x14, 0x83, 0x00, 0xba, 0x01, 0x10, 0x00, 0x4f,6380xef, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x19,6390x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,6400x00, 0x01, 0x00, 0x19, 0x00, 0x06, 0x00, 0xfc,6410x01, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,6420x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,6430x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,6440x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,6450x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,6460x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,6470x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,6480x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,6490x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,6500x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,6510x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,6520x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,6530x00, 0x80, 0x1f, 0xb8, 0x48, 0x0f, 0x04, 0x88, 0x14, 0x68, 0x00,6540x00, 0x00, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x03,6550x00, 0x24, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,6560x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00,6570x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,6580x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,6590x40, 0x20,6600x03, 0x00, 0x03, 0x03, 0x00, 0x00,6610x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0x00,6620x05, 0x00, 0x06, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,6630x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,6640x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,6650x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,6660x00, 0x00, 0x00,6670x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,6680x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,6690x00, 0x00, 0x00, 0x00, 0x00,6700x10, 0x00, 0x40, 0x80, 0x02, 0x20, 0x00, 0x13, 0x00, 0x00, 0x00,6710x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,6720x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,6730x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,6740x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,6750x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,6760x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,6770xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,6780x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,6790xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,6800xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,6810x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,6820xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,6830x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,6840xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,6850x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,6860x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,6870x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x62,6880x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,6890x01, 0x60, 0x01, 0x00, 0x00,6900x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,6910x04, 0x04, 0x01, 0x40,6920x04, 0x04, 0x01, 0x00,693I2C0, 0x40, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x05,6940x00, 0x00, 0x05, 0x05,695I2C0, 0x40, 0x02, 0x11, 0x06,696I2C0, 0x40, 0x02, 0x14, 0x00,697I2C0, 0x40, 0x02, 0x13, 0x01, /* i2c end */6980x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,6990x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,7000x40,701I2C0, 0x40, 0x02, 0x02, 0x0c, /* pixel clock */702I2C0, 0x40, 0x02, 0x0f, 0x00,703I2C0, 0x40, 0x02, 0x13, 0x01, /* i2c end */7040x10, 0x00, 0x01, 0x01,7050x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,7060x20, 0x01, 0x60, 0x01,707I2C0, 0x40, 0x02, 0x05, 0x0f, /* exposure */708I2C0, 0x40, 0x02, 0x13, 0x01, /* i2c end */709I2C0, 0x40, 0x07, 0x09, 0x0b, 0x0f, 0x05, 0x05, 0x0f, 0x00,710/* gains */711I2C0, 0x40, 0x03, 0x12, 0x04, 0x01,7120x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,7130x10, 0x0e, 0x01, 0x08,7140x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,7150xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,7160xf9,7170x10, 0x03, 0x01, 0x00,7180x10, 0x0f, 0x02, 0x13, 0x13,7190x10, 0x03, 0x01, 0x06,7200x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,7210xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,7220xf9,7230x10, 0x0b, 0x01, 0x11,7240x10, 0x0d, 0x01, 0x10,7250x10, 0x0c, 0x01, 0x14,7260x04, 0x06, 0x01, 0x03,7270x04, 0x05, 0x01, 0x61,7280x04, 0x04, 0x01, 0x00,7290, 0, 0730};731732/* nw802 - Conceptronic Video Pro */733static const u8 cvideopro_start[] = {7340x04, 0x06, 0x01, 0x04,7350x00, 0x00, 0x40, 0x54, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x4c,7360x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,7370x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,7380x00, 0x0b, 0x00, 0x1b, 0x00, 0xc8, 0x00, 0xf4,7390x05, 0xb4, 0x00, 0xcc, 0x00, 0x01, 0x00, 0x01,7400x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,7410x00, 0xa2, 0x00, 0xc6, 0x00, 0x60, 0x00, 0xc6,7420x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,7430x00, 0x40, 0x40, 0x00, 0xae, 0x00, 0xd2, 0x00, 0xae, 0x00, 0xd2,7440x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,7450x00, 0xa8, 0x00, 0xc0, 0x00, 0x66, 0x00, 0xc0,7460x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,7470x00, 0x0a, 0x00, 0x54, 0x00, 0x0a, 0x00, 0x54,7480x00, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,7490x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6,7500x00, 0x5d, 0x00, 0xc7, 0x00, 0x7e, 0x00, 0x30,7510x00, 0x80, 0x1f, 0x98, 0x43, 0x3f, 0x0d, 0x88, 0x20, 0x80, 0x3f,7520x47, 0xaf, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,7530x00, 0x0c, 0x02, 0x0c, 0x00, 0x1c, 0x00, 0x94,7540x00, 0x10, 0x06, 0x24, 0x00, 0x4a, 0x00,7550x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,7560x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,7570x40, 0x20,7580x03, 0x00, 0x03, 0x03, 0x00, 0x00,7590x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00,7600x06, 0x00, 0x02, 0x09, 0x99,7610x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,7620x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,7630x00, 0x00, 0x00, 0x00, 0x00,7640x10, 0x00, 0x40, 0xa0, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,7650x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,7660x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,7670x00, 0x49, 0x13, 0x00, 0x00, 0xe0, 0x00, 0x0c,7680x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,7690x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,7700x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,7710xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,7720x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,7730xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,7740xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,7750x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,7760xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,7770x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,7780xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,7790x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,7800x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,7810x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x05, 0x82,7820x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,7830x01, 0xf0, 0x00,7840x02, 0x00, 0x11, 0x3c, 0x50, 0x8c, 0x3c, 0x50, 0x00, 0x00, 0x00,7850x00, 0x78, 0x3f, 0x3f, 0x06, 0xf2, 0x8f, 0xf0,7860x40,7870x10, 0x1a, 0x01, 0x03,7880x10, 0x00, 0x01, 0xac,7890x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,7900x10, 0x1b, 0x02, 0x3b, 0x01,7910x10, 0x11, 0x08, 0x61, 0x00, 0xe0, 0x00, 0x49, 0x00, 0xa8, 0x00,7920x10, 0x1f, 0x06, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,7930x10, 0x1d, 0x02, 0x40, 0x06,7940x10, 0x0e, 0x01, 0x08,7950x10, 0x41, 0x11, 0x00, 0x0f, 0x46, 0x62, 0x76, 0x86, 0x94, 0xa0,7960xab, 0xb6, 0xbf, 0xc8, 0xcf, 0xd7, 0xdc, 0xdc,7970xdc,7980x10, 0x03, 0x01, 0x00,7990x10, 0x0f, 0x02, 0x12, 0x12,8000x10, 0x03, 0x01, 0x0c,8010x10, 0x41, 0x11, 0x00, 0x0f, 0x46, 0x62, 0x76, 0x86, 0x94, 0xa0,8020xab, 0xb6, 0xbf, 0xc8, 0xcf, 0xd7, 0xdc, 0xdc,8030xdc,8040x10, 0x0b, 0x01, 0x09,8050x10, 0x0d, 0x01, 0x10,8060x10, 0x0c, 0x01, 0x2f,8070x04, 0x06, 0x01, 0x03,8080x04, 0x04, 0x01, 0x00,8090, 0, 0810};811812/* nw802 - D-link dru-350c cam */813static const u8 dlink_start[] = {8140x04, 0x06, 0x01, 0x04,8150x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x92, 0x03, 0x10, 0x00, 0x4d,8160x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,8170x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,8180x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,8190x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,8200x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,8210x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,8220x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,8230x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,8240x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,8250x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,8260x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,8270x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,8280x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,8290x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,8300x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,8310x00, 0x80, 0x1f, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x68, 0x00,8320x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,8330x00, 0x0c, 0x02, 0x01, 0x00, 0x16, 0x00, 0x94,8340x00, 0x10, 0x06, 0x10, 0x00, 0x36, 0x00,8350x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,8360x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,8370x40, 0x20,8380x03, 0x00, 0x03, 0x03, 0x00, 0x00,8390x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00,8400x06, 0x00, 0x02, 0x09, 0x99,8410x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,8420x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,8430x00, 0x00, 0x00, 0x00, 0x00,8440x10, 0x00, 0x40, 0xa1, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,8450x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,8460x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,8470x00, 0x49, 0x13, 0x00, 0x00, 0xc0, 0x00, 0x14,8480x02, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00,8490x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,8500x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,8510xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,8520x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,8530xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,8540xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,8550x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,8560xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,8570x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,8580xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,8590x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,8600x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,8610x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x82,8620x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,8630x01, 0xf0, 0x00,8640x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,8650x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,8660x40,8670x10, 0x1a, 0x01, 0x00,8680x10, 0x00, 0x01, 0xad,8690x00, 0x00, 0x01, 0x08,8700x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,8710x10, 0x1b, 0x02, 0x00, 0x00,8720x10, 0x11, 0x08, 0x51, 0x00, 0xf0, 0x00, 0x3d, 0x00, 0xb4, 0x00,8730x10, 0x1d, 0x08, 0x40, 0x06, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,8740x10, 0x0e, 0x01, 0x20,8750x10, 0x41, 0x11, 0x00, 0x07, 0x1e, 0x38, 0x4d, 0x60, 0x70, 0x7f,8760x8e, 0x9b, 0xa8, 0xb4, 0xbf, 0xca, 0xd5, 0xdf,8770xea,8780x10, 0x03, 0x01, 0x00,8790x10, 0x0f, 0x02, 0x11, 0x11,8800x10, 0x03, 0x01, 0x10,8810x10, 0x41, 0x11, 0x00, 0x07, 0x1e, 0x38, 0x4d, 0x60, 0x70, 0x7f,8820x8e, 0x9b, 0xa8, 0xb4, 0xbf, 0xca, 0xd5, 0xdf,8830xea,8840x10, 0x0b, 0x01, 0x19,8850x10, 0x0d, 0x01, 0x10,8860x10, 0x0c, 0x01, 0x1e,8870x04, 0x06, 0x01, 0x03,8880x04, 0x04, 0x01, 0x00,8890, 0, 0890};891892/* 06a5:d001 - nw801 - Sony893* Plustek Opticam 500U or ProLink DS3303u (Hitachi HD49322BF) */894/*fixme: 320x240 only*/895static const u8 ds3303_start[] = {8960x05, 0x06, 0x01, 0x04,8970x00, 0x00, 0x40, 0x16, 0x00, 0x00, 0xf9, 0x02, 0x11, 0x00, 0x0e,8980x01, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,8990x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,9000x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,9010x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,9020x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,9030x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,9040x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,9050x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,9060x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,9070x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,9080x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,9090x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,9100x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,9110x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,9120x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,9130x00, 0x80, 0x22, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x08, 0x00,9140x00, 0x00, 0x00, 0x00, 0xa9, 0xa8, 0x1f, 0x00,9150x0d, 0x02, 0x07, 0x00, 0x01, 0x00, 0x19, 0x00,9160xf2, 0x00, 0x18, 0x06, 0x10, 0x06, 0x10, 0x00,9170x36, 0x00,9180x02, 0x00, 0x12, 0x03, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,9190x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0x50,9200x40, 0x20,9210x03, 0x00, 0x03, 0x03, 0x00, 0x00,9220x05, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00,9230x06, 0x00, 0x02, 0x09, 0x99,9240x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,9250x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,9260x00, 0x00, 0x00, 0x00, 0x00,9270x10, 0x00, 0x40, 0x2f, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,9280x00, 0x00, 0x00, 0x10, 0x1f, 0x10, 0x08, 0x0a,9290x0a, 0x51, 0x00, 0xf1, 0x00, 0x3c, 0x00, 0xb4,9300x00, 0x01, 0x15, 0xfd, 0x07, 0x3d, 0x00, 0x00,9310x00, 0x00, 0x00, 0x00, 0x8c, 0x04, 0x01, 0x20,9320x02, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00,9330x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x03,9340x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06, 0xf7,9350x10, 0x40, 0x40, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80, 0x80,9360x00, 0x2d, 0x46, 0x58, 0x67, 0x74, 0x7f, 0x88,9370x94, 0x9d, 0xa6, 0xae, 0xb5, 0xbd, 0xc4, 0xcb,9380xd1, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54, 0x64,9390x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2, 0xe2,9400xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,9410x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,9420xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,9430x10, 0x80, 0x22, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,9440xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x3f, 0x01,9450x00, 0x00, 0xef, 0x00, 0x02, 0x0a, 0x82, 0x02,9460xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40, 0x01,9470xf0, 0x00,9489490x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,9500x00, 0x78, 0x3f, 0x3f, 0x00, 0xf2, 0x8f, 0x81,9510x40,9520x10, 0x1a, 0x01, 0x15,9530x10, 0x00, 0x01, 0x2f,9540x10, 0x8c, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,9550x10, 0x1b, 0x02, 0x00, 0x00,9560x10, 0x11, 0x08, 0x61, 0x00, 0xe0, 0x00, 0x49, 0x00, 0xa8, 0x00,9570x10, 0x26, 0x06, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,9580x10, 0x24, 0x02, 0x40, 0x06,9590x10, 0x0e, 0x01, 0x08,9600x10, 0x48, 0x11, 0x00, 0x15, 0x40, 0x67, 0x84, 0x9d, 0xb2, 0xc6,9610xd6, 0xe7, 0xf6, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,9620xf9,9630x10, 0x03, 0x01, 0x00,9640x10, 0x0f, 0x02, 0x16, 0x16,9650x10, 0x03, 0x01, 0x0c,9660x10, 0x48, 0x11, 0x00, 0x15, 0x40, 0x67, 0x84, 0x9d, 0xb2, 0xc6,9670xd6, 0xe7, 0xf6, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,9680xf9,9690x10, 0x0b, 0x01, 0x26,9700x10, 0x0d, 0x01, 0x10,9710x10, 0x0c, 0x01, 0x1c,9720x05, 0x06, 0x01, 0x03,9730x05, 0x04, 0x01, 0x00,9740, 0, 0975};976977/* 06a5:d001 - nw802 - Panasonic978* GP-KR651US (Philips TDA8786) */979static const u8 kr651_start_1[] = {9800x04, 0x06, 0x01, 0x04,9810x00, 0x00, 0x40, 0x44, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x48,9820x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,9830x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,9840x00, 0x0b, 0x00, 0x1b, 0x00, 0xc8, 0x00, 0xf4,9850x05, 0xb4, 0x00, 0xcc, 0x00, 0x01, 0x00, 0x01,9860x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,9870x00, 0xa2, 0x00, 0xc6, 0x00, 0x60, 0x00, 0xc6,9880x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,9890x00, 0x40, 0x40, 0x00, 0xae, 0x00, 0xd2, 0x00, 0xae, 0x00, 0xd2,9900x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,9910x00, 0xa8, 0x00, 0xc0, 0x00, 0x66, 0x00, 0xc0,9920x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,9930x00, 0x0a, 0x00, 0x54, 0x00, 0x0a, 0x00, 0x54,9940x00, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,9950x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6,9960x00, 0x5d, 0x00, 0xc7, 0x00, 0x7e, 0x00, 0x30,9970x00, 0x80, 0x1f, 0x18, 0x43, 0x3f, 0x0d, 0x88, 0x20, 0x80, 0x3f,9980x47, 0xaf, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,9990x00, 0x0c, 0x02, 0x0c, 0x00, 0x1c, 0x00, 0x94,10000x00, 0x10, 0x06, 0x24, 0x00, 0x4a, 0x00,10010x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,10020x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,10030x40, 0x20,10040x03, 0x00, 0x03, 0x02, 0x00, 0x00,10050x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00,10060x06, 0x00, 0x02, 0x09, 0x99,10070x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,10080x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,10090x00, 0x00, 0x00, 0x00, 0x00,10100x10, 0x00, 0x40, 0xa0, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,10110x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,10120x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,10130x00, 0x49, 0x13, 0x00, 0x00, 0xe0, 0x00, 0x0c,10140x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,10150x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,10160x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,10170xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,10180x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,10190xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,10200xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,10210x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,10220xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,10230x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,10240xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,10250x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,10260x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,10270x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x05, 0x82,10280x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,10290x01, 0xf0, 0x00,10300, 0, 01031};1032static const u8 kr651_start_qvga[] = {10330x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,10340x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,10350x40,10360x10, 0x1a, 0x01, 0x03,10370x10, 0x00, 0x01, 0xac,10380x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,10390x10, 0x1b, 0x02, 0x00, 0x00,10400x10, 0x11, 0x08, 0x29, 0x00, 0x18, 0x01, 0x1f, 0x00, 0xd2, 0x00,10410x10, 0x1d, 0x06, 0xe0, 0x00, 0x0c, 0x00, 0x52, 0x00,10420x10, 0x1d, 0x02, 0x28, 0x01,10430, 0, 01044};1045static const u8 kr651_start_vga[] = {10460x02, 0x00, 0x11, 0x78, 0xa0, 0x8c, 0x78, 0xa0, 0x00, 0x00, 0x00,10470x00, 0xf0, 0x30, 0x03, 0x01, 0x82, 0x82, 0x98,10480x80,10490x10, 0x1a, 0x01, 0x03,10500x10, 0x00, 0x01, 0xa0,10510x10, 0x85, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01,10520x10, 0x1b, 0x02, 0x00, 0x00,10530x10, 0x11, 0x08, 0x51, 0x00, 0x30, 0x02, 0x3d, 0x00, 0xa4, 0x01,10540x10, 0x1d, 0x06, 0xe0, 0x00, 0x0c, 0x00, 0x52, 0x00,10550x10, 0x1d, 0x02, 0x68, 0x00,1056};1057static const u8 kr651_start_2[] = {10580x10, 0x0e, 0x01, 0x08,10590x10, 0x41, 0x11, 0x00, 0x11, 0x3c, 0x5c, 0x74, 0x88, 0x99, 0xa8,10600xb7, 0xc4, 0xd0, 0xdc, 0xdc, 0xdc, 0xdc, 0xdc,10610xdc,10620x10, 0x03, 0x01, 0x00,10630x10, 0x0f, 0x02, 0x0c, 0x0c,10640x10, 0x03, 0x01, 0x0c,10650x10, 0x41, 0x11, 0x00, 0x11, 0x3c, 0x5c, 0x74, 0x88, 0x99, 0xa8,10660xb7, 0xc4, 0xd0, 0xdc, 0xdc, 0xdc, 0xdc, 0xdc,10670xdc,10680x10, 0x0b, 0x01, 0x10,10690x10, 0x0d, 0x01, 0x10,10700x10, 0x0c, 0x01, 0x2d,10710x04, 0x06, 0x01, 0x03,10720x04, 0x04, 0x01, 0x00,10730, 0, 01074};10751076/* nw802 - iRez Kritter cam */1077static const u8 kritter_start[] = {10780x04, 0x06, 0x01, 0x06,10790x00, 0x00, 0x40, 0x44, 0x96, 0x98, 0x94, 0x03, 0x18, 0x00, 0x48,10800x0f, 0x1e, 0x00, 0x0c, 0x02, 0x01, 0x00, 0x19,10810x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,10820x00, 0x0b, 0x00, 0x1b, 0x00, 0x0a, 0x01, 0x28,10830x07, 0xb4, 0x00, 0xcc, 0x00, 0x01, 0x00, 0x01,10840x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,10850x00, 0xa2, 0x00, 0xc6, 0x00, 0x60, 0x00, 0xc6,10860x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,10870x00, 0x40, 0x40, 0x00, 0xae, 0x00, 0xd2, 0x00, 0xae, 0x00, 0xd2,10880x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,10890x00, 0xa8, 0x00, 0xc0, 0x00, 0x66, 0x00, 0xc0,10900x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,10910x00, 0x0a, 0x00, 0x54, 0x00, 0x0a, 0x00, 0x54,10920x00, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,10930x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6,10940x00, 0x5d, 0x00, 0x0e, 0x00, 0x7e, 0x00, 0x30,10950x00, 0x80, 0x1f, 0x18, 0x43, 0x3f, 0x0d, 0x88, 0x20, 0x80, 0x3f,10960x47, 0xaf, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,10970x00, 0x0b, 0x02, 0x0c, 0x00, 0x1c, 0x00, 0x94,10980x00, 0x10, 0x06, 0x24, 0x00, 0x4a, 0x00,10990x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,11000x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,11010x40, 0x20,11020x03, 0x00, 0x03, 0x02, 0x00, 0x00,11030x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00,11040x06, 0x00, 0x02, 0x09, 0x99,11050x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,11060x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,11070x00, 0x00, 0x00, 0x00, 0x00,11080x10, 0x00, 0x40, 0xa0, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,11090x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,11100x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,11110x00, 0x49, 0x13, 0x00, 0x00, 0xe0, 0x00, 0x0c,11120x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,11130x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,11140x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,11150xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,11160x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,11170xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,11180xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,11190x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,11200xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,11210x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,11220xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,11230x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,11240x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,11250x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x82,11260x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,11270x01, 0xf0, 0x00,11280x02, 0x00, 0x11, 0x3c, 0x50, 0x8c, 0x3c, 0x50, 0x00, 0x00, 0x00,11290x00, 0x78, 0x3f, 0x3f, 0x06, 0xf2, 0x8f, 0xf0,11300x40,11310x10, 0x1a, 0x01, 0x03,11320x10, 0x00, 0x01, 0xaf,11330x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,11340x10, 0x1b, 0x02, 0x3b, 0x01,11350x10, 0x11, 0x08, 0x61, 0x00, 0xe0, 0x00, 0x49, 0x00, 0xa8, 0x00,11360x10, 0x1d, 0x06, 0xe0, 0x00, 0x0c, 0x00, 0x52, 0x00,11370x10, 0x1d, 0x02, 0x00, 0x00,11380x10, 0x0e, 0x01, 0x08,11390x10, 0x41, 0x11, 0x00, 0x0d, 0x36, 0x4e, 0x60, 0x6f, 0x7b, 0x86,11400x90, 0x98, 0xa1, 0xa9, 0xb1, 0xb7, 0xbe, 0xc4,11410xcb,11420x10, 0x03, 0x01, 0x00,11430x10, 0x0f, 0x02, 0x0d, 0x0d,11440x10, 0x03, 0x01, 0x02,11450x10, 0x41, 0x11, 0x00, 0x0d, 0x36, 0x4e, 0x60, 0x6f, 0x7b, 0x86,11460x90, 0x98, 0xa1, 0xa9, 0xb1, 0xb7, 0xbe, 0xc4,11470xcb,11480x10, 0x0b, 0x01, 0x17,11490x10, 0x0d, 0x01, 0x10,11500x10, 0x0c, 0x01, 0x1e,11510x04, 0x06, 0x01, 0x03,11520x04, 0x04, 0x01, 0x00,11530, 0, 01154};11551156/* nw802 - Mustek Wcam 300 mini */1157static const u8 mustek_start[] = {11580x04, 0x06, 0x01, 0x04,11590x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x92, 0x03, 0x10, 0x00, 0x4d,11600x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,11610x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,11620x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,11630x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,11640x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,11650x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,11660x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,11670x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,11680x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,11690x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,11700x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,11710x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,11720x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,11730x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,11740x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,11750x00, 0x80, 0x1f, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x68, 0x00,11760x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,11770x00, 0x0c, 0x02, 0x01, 0x00, 0x16, 0x00, 0x94,11780x00, 0x10, 0x06, 0xfc, 0x05, 0x0c, 0x06,11790x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,11800x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,11810x40, 0x20,11820x03, 0x00, 0x03, 0x03, 0x00, 0x00,11830x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00,11840x06, 0x00, 0x02, 0x09, 0x99,11850x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,11860x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,11870x00, 0x00, 0x00, 0x00, 0x00,11880x10, 0x00, 0x40, 0xa1, 0x02, 0x80, 0x00, 0x13, 0x00, 0x00, 0x00,11890x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,11900x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,11910x00, 0x49, 0x13, 0x00, 0x00, 0xc0, 0x00, 0x14,11920x02, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00,11930x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,11940x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,11950xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,11960x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,11970xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,11980xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,11990x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,12000xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,12010x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,12020xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,12030x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,12040x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,12050x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x01, 0x82,12060x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,12070x01, 0xf0, 0x00,12080x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,12090x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,12100x40,12110x10, 0x1a, 0x01, 0x00,12120x10, 0x00, 0x01, 0xad,12130x00, 0x00, 0x01, 0x08,12140x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,12150x10, 0x1b, 0x02, 0x00, 0x00,12160x10, 0x11, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,12170x10, 0x1d, 0x08, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20,12180x10, 0x0e, 0x01, 0x0f,12190x10, 0x41, 0x11, 0x00, 0x0f, 0x29, 0x4a, 0x64, 0x7a, 0x8c, 0x9e,12200xad, 0xba, 0xc7, 0xd3, 0xde, 0xe8, 0xf1, 0xf9,12210xff,12220x10, 0x0f, 0x02, 0x11, 0x11,12230x10, 0x03, 0x01, 0x0c,12240x10, 0x41, 0x11, 0x00, 0x0f, 0x29, 0x4a, 0x64, 0x7a, 0x8c, 0x9e,12250xad, 0xba, 0xc7, 0xd3, 0xde, 0xe8, 0xf1, 0xf9,12260xff,12270x10, 0x0b, 0x01, 0x1c,12280x10, 0x0d, 0x01, 0x1a,12290x10, 0x0c, 0x01, 0x34,12300x04, 0x05, 0x01, 0x61,12310x04, 0x04, 0x01, 0x40,12320x04, 0x06, 0x01, 0x03,12330, 0, 01234};12351236/* nw802 - Scope USB Microscope M2 (ProScope) (Hitachi HD49322BF) */1237static const u8 proscope_init[] = {12380x04, 0x05, 0x01, 0x21,12390x04, 0x04, 0x01, 0x01,12400, 0, 01241};1242static const u8 proscope_start_1[] = {12430x04, 0x06, 0x01, 0x04,12440x00, 0x00, 0x40, 0x10, 0x01, 0x00, 0xf9, 0x02, 0x10, 0x00, 0x04,12450x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,12460x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,12470x00, 0x08, 0x00, 0x17, 0x00, 0xce, 0x00, 0xf4,12480x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,12490x00, 0xce, 0x00, 0xf8, 0x03, 0x3e, 0x00, 0x86,12500x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,12510x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,12520x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0xb6,12530x00, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,12540x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,12550x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,12560x00, 0xf6, 0x03, 0x34, 0x04, 0xf6, 0x03, 0x34,12570x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,12580x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xe8,12590x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,12600x00, 0x80, 0x1f, 0xb4, 0x6f, 0x1f, 0x0f, 0x08, 0x20, 0xa8, 0x00,12610x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,12620x00, 0x0c, 0x02, 0x01, 0x00, 0x19, 0x00, 0x94,12630x00, 0x10, 0x06, 0x10, 0x00, 0x36, 0x00,12640x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,12650x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,12660x40, 0x20,12670x03, 0x00, 0x03, 0x03, 0x00, 0x00,12680x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00,12690x06, 0x00, 0x02, 0x09, 0x99,12700x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,12710x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,12720x00, 0x00, 0x00, 0x00, 0x00,12730x10, 0x00, 0x40, 0xad, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,12740x00, 0x00, 0x00, 0x10, 0x1f, 0x10, 0x08, 0x0a,12750x0a, 0x51, 0x00, 0xf1, 0x00, 0x3c, 0x00, 0xb4,12760x00, 0x49, 0x13, 0x00, 0x00, 0x8c, 0x04, 0x01,12770x20, 0x02, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00,12780x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,12790x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,12800xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,12810x10, 0x40, 0x40, 0x80, 0x00, 0x2d, 0x46, 0x58, 0x67, 0x74, 0x7f,12820x88, 0x94, 0x9d, 0xa6, 0xae, 0xb5, 0xbd, 0xc4,12830xcb, 0xd1, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,12840x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,12850xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,12860x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,12870xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,12880x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,12890x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x3f,12900x01, 0x00, 0x00, 0xef, 0x00, 0x09, 0x05, 0x82,12910x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,12920x01, 0xf0, 0x00,12930, 0, 01294};1295static const u8 proscope_start_qvga[] = {12960x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,12970x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,12980x40,12990x10, 0x1a, 0x01, 0x06,13000x00, 0x03, 0x02, 0xf9, 0x02,13010x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,13020x10, 0x1b, 0x02, 0x00, 0x00,13030x10, 0x11, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,13040x10, 0x1d, 0x08, 0xc0, 0x0d, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,13050x10, 0x0e, 0x01, 0x10,13060, 0, 01307};1308static const u8 proscope_start_vga[] = {13090x00, 0x03, 0x02, 0xf9, 0x02,13100x10, 0x85, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01,13110x02, 0x00, 0x11, 0x78, 0xa0, 0x8c, 0x78, 0xa0, 0x00, 0x00, 0x00,13120x00, 0xf0, 0x16, 0x00, 0x00, 0x82, 0x84, 0x00,13130x80,13140x10, 0x1a, 0x01, 0x06,13150x10, 0x00, 0x01, 0xa1,13160x10, 0x1b, 0x02, 0x00, 0x00,13170x10, 0x1d, 0x08, 0xc0, 0x0d, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,13180x10, 0x11, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01,13190x10, 0x0e, 0x01, 0x10,13200x10, 0x41, 0x11, 0x00, 0x10, 0x51, 0x6e, 0x83, 0x93, 0xa1, 0xae,13210xb9, 0xc3, 0xcc, 0xd4, 0xdd, 0xe4, 0xeb, 0xf2,13220xf9,13230x10, 0x03, 0x01, 0x00,13240, 0, 01325};1326static const u8 proscope_start_2[] = {13270x10, 0x0f, 0x02, 0x0c, 0x0c,13280x10, 0x03, 0x01, 0x0c,13290x10, 0x41, 0x11, 0x00, 0x10, 0x51, 0x6e, 0x83, 0x93, 0xa1, 0xae,13300xb9, 0xc3, 0xcc, 0xd4, 0xdd, 0xe4, 0xeb, 0xf2,13310xf9,13320x10, 0x0b, 0x01, 0x0b,13330x10, 0x0d, 0x01, 0x10,13340x10, 0x0c, 0x01, 0x1b,13350x04, 0x06, 0x01, 0x03,13360x04, 0x05, 0x01, 0x21,13370x04, 0x04, 0x01, 0x00,13380, 0, 01339};13401341/* nw800 - hv7121b? (seems pas106) - Divio Chicony TwinkleCam */1342static const u8 twinkle_start[] = {13430x04, 0x06, 0x01, 0x44,13440x04, 0x06, 0x01, 0x00,13450x00, 0x00, 0x40, 0x14, 0x83, 0x00, 0xba, 0x01, 0x10, 0x00, 0x4f,13460xef, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x19,13470x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,13480x00, 0x01, 0x00, 0x19, 0x00, 0x06, 0x00, 0xfc,13490x01, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,13500x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,13510x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,13520x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,13530x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,13540x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,13550x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,13560x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,13570x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,13580x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,13590x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,13600x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,13610x00, 0x80, 0x1f, 0xb8, 0x48, 0x0f, 0x04, 0x88, 0x14, 0x68, 0x00,13620x00, 0x00, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x03,13630x00, 0x24, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,13640x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00,13650x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,13660x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,13670x40, 0x20,13680x03, 0x00, 0x03, 0x03, 0x00, 0x00,13690x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0x00,13700x05, 0x00, 0x06, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,13710x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,13720x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,13730x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,13740x00, 0x00, 0x00,13750x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,13760x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,13770x00, 0x00, 0x00, 0x00, 0x00,13780x10, 0x00, 0x40, 0x80, 0x02, 0x20, 0x00, 0x11, 0x00, 0x00, 0x00,13790x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x08,13800x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,13810x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,13820x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,13830x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,13840x03, 0x00, 0x00, 0x10, 0x00, 0x20, 0x10, 0x06,13850xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x00, 0x80,13860x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,13870xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,13880xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,13890x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,13900xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,13910x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,13920xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,13930x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,13940x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,13950x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x62,13960x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,13970x01, 0x60, 0x01, 0x00, 0x00,139813990x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,14000x04, 0x04, 0x01, 0x10,14010x04, 0x04, 0x01, 0x00,14020x04, 0x05, 0x01, 0x61,14030x04, 0x04, 0x01, 0x01,1404I2C0, 0x40, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x00,14050x00, 0x00, 0x00, 0x0a,1406I2C0, 0x40, 0x02, 0x11, 0x06,1407I2C0, 0x40, 0x02, 0x14, 0x00,1408I2C0, 0x40, 0x02, 0x13, 0x01, /* i2c end */1409I2C0, 0x40, 0x02, 0x07, 0x01,14100x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,14110x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,14120x40,1413I2C0, 0x40, 0x02, 0x02, 0x0c,1414I2C0, 0x40, 0x02, 0x13, 0x01,14150x10, 0x00, 0x01, 0x01,14160x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,14170x20, 0x01, 0x60, 0x01,1418I2C0, 0x40, 0x02, 0x05, 0x0f,1419I2C0, 0x40, 0x02, 0x13, 0x01,1420I2C0, 0x40, 0x08, 0x08, 0x04, 0x0b, 0x01, 0x01, 0x02, 0x00, 0x17,1421I2C0, 0x40, 0x03, 0x12, 0x00, 0x01,14220x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,1423I2C0, 0x40, 0x02, 0x12, 0x00,1424I2C0, 0x40, 0x02, 0x0e, 0x00,1425I2C0, 0x40, 0x02, 0x11, 0x06,14260x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,14270xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,14280xf9,14290x10, 0x03, 0x01, 0x00,14300x10, 0x0f, 0x02, 0x0c, 0x0c,14310x10, 0x03, 0x01, 0x06,14320x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,14330xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,14340xf9,14350x10, 0x0b, 0x01, 0x19,14360x10, 0x0d, 0x01, 0x10,14370x10, 0x0c, 0x01, 0x0d,14380x04, 0x06, 0x01, 0x03,14390x04, 0x05, 0x01, 0x61,14400x04, 0x04, 0x01, 0x41,14410, 0, 01442};14431444/* nw802 dvc-v6 */1445static const u8 dvcv6_start[] = {14460x04, 0x06, 0x01, 0x06,14470x00, 0x00, 0x40, 0x54, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x4c,14480x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,14490x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,14500x00, 0x0b, 0x00, 0x1b, 0x00, 0xc8, 0x00, 0xf4,14510x05, 0xb4, 0x00, 0xcc, 0x00, 0x01, 0x00, 0x01,14520x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,14530x00, 0xa2, 0x00, 0xc6, 0x00, 0x60, 0x00, 0xc6,14540x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,14550x00, 0x40, 0x40, 0x00, 0xae, 0x00, 0xd2, 0x00, 0xae, 0x00, 0xd2,14560x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,14570x00, 0xa8, 0x00, 0xc0, 0x00, 0x66, 0x00, 0xc0,14580x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,14590x00, 0x0a, 0x00, 0x54, 0x00, 0x0a, 0x00, 0x54,14600x00, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,14610x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6,14620x00, 0x5d, 0x00, 0xc7, 0x00, 0x7e, 0x00, 0x30,14630x00, 0x80, 0x1f, 0x98, 0x43, 0x3f, 0x0d, 0x88, 0x20, 0x80, 0x3f,14640x47, 0xaf, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,14650x00, 0x0c, 0x02, 0x0c, 0x00, 0x1c, 0x00, 0x94,14660x00, 0x10, 0x06, 0x24, 0x00, 0x4a, 0x00,14670x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,14680x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,14690x40, 0x20,14700x03, 0x00, 0x03, 0x03, 0x00, 0x00,14710x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00,14720x06, 0x00, 0x02, 0x09, 0x99,14730x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,14740x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,14750x00, 0x00, 0x00, 0x00, 0x00,14760x10, 0x00, 0x40, 0xa0, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,14770x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,14780x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,14790x00, 0x49, 0x13, 0x00, 0x00, 0xe0, 0x00, 0x0c,14800x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,14810x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,14820x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,14830xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,14840x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,14850xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,14860xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,14870x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,14880xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,14890x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,14900xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,14910x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,14920x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,14930x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x05, 0x82,14940x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,14950x01, 0xf0, 0x00,14960x00, 0x03, 0x02, 0x94, 0x03,14970x00, 0x1d, 0x04, 0x0a, 0x01, 0x28, 0x07,14980x00, 0x7b, 0x02, 0xe0, 0x00,14990x10, 0x8d, 0x01, 0x00,15000x00, 0x09, 0x04, 0x1e, 0x00, 0x0c, 0x02,15010x00, 0x91, 0x02, 0x0b, 0x02,15020x10, 0x00, 0x01, 0xaf,15030x02, 0x00, 0x11, 0x3c, 0x50, 0x8f, 0x3c, 0x50, 0x00, 0x00, 0x00,15040x00, 0x78, 0x3f, 0x3f, 0x06, 0xf2, 0x8f, 0xf0,15050x40,15060x10, 0x1a, 0x01, 0x02,15070x10, 0x00, 0x01, 0xaf,15080x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,15090x10, 0x1b, 0x02, 0x07, 0x01,15100x10, 0x11, 0x08, 0x61, 0x00, 0xe0, 0x00, 0x49, 0x00, 0xa8, 0x00,15110x10, 0x1f, 0x06, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,15120x10, 0x1d, 0x02, 0x40, 0x06,15130x10, 0x0e, 0x01, 0x08,15140x10, 0x41, 0x11, 0x00, 0x0f, 0x54, 0x6f, 0x82, 0x91, 0x9f, 0xaa,15150xb4, 0xbd, 0xc5, 0xcd, 0xd5, 0xdb, 0xdc, 0xdc,15160xdc,15170x10, 0x03, 0x01, 0x00,15180x10, 0x0f, 0x02, 0x12, 0x12,15190x10, 0x03, 0x01, 0x11,15200x10, 0x41, 0x11, 0x00, 0x0f, 0x54, 0x6f, 0x82, 0x91, 0x9f, 0xaa,15210xb4, 0xbd, 0xc5, 0xcd, 0xd5, 0xdb, 0xdc, 0xdc,15220xdc,15230x10, 0x0b, 0x01, 0x16,15240x10, 0x0d, 0x01, 0x10,15250x10, 0x0c, 0x01, 0x1a,15260x04, 0x06, 0x01, 0x03,15270x04, 0x04, 0x01, 0x00,1528};15291530static const u8 *webcam_start[] = {1531[Generic800] = nw800_start,1532[SpaceCam] = spacecam_start,1533[SpaceCam2] = spacecam2_start,1534[Cvideopro] = cvideopro_start,1535[Dlink350c] = dlink_start,1536[DS3303u] = ds3303_start,1537[Kr651us] = kr651_start_1,1538[Kritter] = kritter_start,1539[Mustek300] = mustek_start,1540[Proscope] = proscope_start_1,1541[Twinkle] = twinkle_start,1542[DvcV6] = dvcv6_start,1543[P35u] = nw801_start_1,1544[Generic802] = nw802_start,1545};15461547/* -- write a register -- */1548static void reg_w(struct gspca_dev *gspca_dev,1549u16 index,1550const u8 *data,1551int len)1552{1553struct usb_device *dev = gspca_dev->dev;1554int ret;15551556if (gspca_dev->usb_err < 0)1557return;1558if (len == 1)1559PDEBUG(D_USBO, "SET 00 0000 %04x %02x", index, *data);1560else1561PDEBUG(D_USBO, "SET 00 0000 %04x %02x %02x ...",1562index, *data, data[1]);1563memcpy(gspca_dev->usb_buf, data, len);1564ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),15650x00,1566USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,15670x00, /* value */1568index,1569gspca_dev->usb_buf,1570len,1571500);1572if (ret < 0) {1573err("reg_w err %d", ret);1574gspca_dev->usb_err = ret;1575}1576}15771578/* -- read registers in usb_buf -- */1579static void reg_r(struct gspca_dev *gspca_dev,1580u16 index,1581int len)1582{1583struct usb_device *dev = gspca_dev->dev;1584int ret;15851586if (gspca_dev->usb_err < 0)1587return;1588ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),15890x00,1590USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,15910x00, index,1592gspca_dev->usb_buf, len, 500);1593if (ret < 0) {1594err("reg_r err %d", ret);1595gspca_dev->usb_err = ret;1596return;1597}1598if (len == 1)1599PDEBUG(D_USBI, "GET 00 0000 %04x %02x",1600index, gspca_dev->usb_buf[0]);1601else1602PDEBUG(D_USBI, "GET 00 0000 %04x %02x %02x ..",1603index, gspca_dev->usb_buf[0],1604gspca_dev->usb_buf[1]);1605}16061607static void i2c_w(struct gspca_dev *gspca_dev,1608u8 i2c_addr,1609const u8 *data,1610int len)1611{1612u8 val[2];1613int i;16141615reg_w(gspca_dev, 0x0600, data + 1, len - 1);1616reg_w(gspca_dev, 0x0600, data, len);1617val[0] = len;1618val[1] = i2c_addr;1619reg_w(gspca_dev, 0x0502, val, 2);1620val[0] = 0x01;1621reg_w(gspca_dev, 0x0501, val, 1);1622for (i = 5; --i >= 0; ) {1623msleep(4);1624reg_r(gspca_dev, 0x0505, 1);1625if (gspca_dev->usb_err < 0)1626return;1627if (gspca_dev->usb_buf[0] == 0)1628return;1629}1630gspca_dev->usb_err = -ETIME;1631}16321633static void reg_w_buf(struct gspca_dev *gspca_dev,1634const u8 *cmd)1635{1636u16 reg;1637int len;16381639for (;;) {1640reg = *cmd++ << 8;1641reg += *cmd++;1642len = *cmd++;1643if (len == 0)1644break;1645if (cmd[-3] != I2C0)1646reg_w(gspca_dev, reg, cmd, len);1647else1648i2c_w(gspca_dev, reg, cmd, len);1649cmd += len;1650}1651}16521653static int swap_bits(int v)1654{1655int r, i;16561657r = 0;1658for (i = 0; i < 8; i++) {1659r <<= 1;1660if (v & 1)1661r++;1662v >>= 1;1663}1664return r;1665}16661667static void setgain(struct gspca_dev *gspca_dev)1668{1669struct sd *sd = (struct sd *) gspca_dev;1670u8 val, v[2];16711672val = sd->ctrls[GAIN].val;1673switch (sd->webcam) {1674case P35u:1675/* Note the control goes from 0-255 not 0-127, but anything1676above 127 just means amplifying noise */1677val >>= 1; /* 0 - 255 -> 0 - 127 */1678reg_w(gspca_dev, 0x1026, &val, 1);1679break;1680case Kr651us:1681/* 0 - 253 */1682val = swap_bits(val);1683v[0] = val << 3;1684v[1] = val >> 5;1685reg_w(gspca_dev, 0x101d, v, 2); /* SIF reg0/1 (AGC) */1686break;1687}1688}16891690static void setexposure(struct gspca_dev *gspca_dev)1691{1692struct sd *sd = (struct sd *) gspca_dev;1693s16 val;1694u8 v[2];16951696val = sd->ctrls[EXPOSURE].val;1697switch (sd->webcam) {1698case P35u:1699v[0] = ((9 - val) << 3) | 0x01;1700reg_w(gspca_dev, 0x1019, v, 1);1701break;1702case Cvideopro:1703case DvcV6:1704case Kritter:1705case Kr651us:1706v[0] = val;1707v[1] = val >> 8;1708reg_w(gspca_dev, 0x101b, v, 2);1709break;1710}1711}17121713static void setautogain(struct gspca_dev *gspca_dev)1714{1715struct sd *sd = (struct sd *) gspca_dev;1716int w, h;17171718if (gspca_dev->ctrl_dis & (1 << AUTOGAIN))1719return;1720if (!sd->ctrls[AUTOGAIN].val) {1721sd->ag_cnt = -1;1722return;1723}1724sd->ag_cnt = AG_CNT_START;17251726reg_r(gspca_dev, 0x1004, 1);1727if (gspca_dev->usb_buf[0] & 0x04) { /* if AE_FULL_FRM */1728sd->ae_res = gspca_dev->width * gspca_dev->height;1729} else { /* get the AE window size */1730reg_r(gspca_dev, 0x1011, 8);1731w = (gspca_dev->usb_buf[1] << 8) + gspca_dev->usb_buf[0]1732- (gspca_dev->usb_buf[3] << 8) - gspca_dev->usb_buf[2];1733h = (gspca_dev->usb_buf[5] << 8) + gspca_dev->usb_buf[4]1734- (gspca_dev->usb_buf[7] << 8) - gspca_dev->usb_buf[6];1735sd->ae_res = h * w;1736if (sd->ae_res == 0)1737sd->ae_res = gspca_dev->width * gspca_dev->height;1738}1739}17401741static int nw802_test_reg(struct gspca_dev *gspca_dev,1742u16 index,1743u8 value)1744{1745/* write the value */1746reg_w(gspca_dev, index, &value, 1);17471748/* read it */1749reg_r(gspca_dev, index, 1);17501751return gspca_dev->usb_buf[0] == value;1752}17531754/* this function is called at probe time */1755static int sd_config(struct gspca_dev *gspca_dev,1756const struct usb_device_id *id)1757{1758struct sd *sd = (struct sd *) gspca_dev;17591760if ((unsigned) webcam >= NWEBCAMS)1761webcam = 0;1762sd->webcam = webcam;1763gspca_dev->cam.reverse_alts = 1;1764gspca_dev->cam.ctrls = sd->ctrls;1765sd->ag_cnt = -1;17661767/*1768* Autodetect sequence inspired from some log.1769* We try to detect what registers exist or not.1770* If 0x0500 does not exist => NW8021771* If it does, test 0x109b. If it doesn't exist,1772* then it's a NW801. Else, a NW8001773* If a et31x110 (nw800 and 06a5:d800)1774* get the sensor ID1775*/1776if (!nw802_test_reg(gspca_dev, 0x0500, 0x55)) {1777sd->bridge = BRIDGE_NW802;1778if (sd->webcam == Generic800)1779sd->webcam = Generic802;1780} else if (!nw802_test_reg(gspca_dev, 0x109b, 0xaa)) {1781sd->bridge = BRIDGE_NW801;1782if (sd->webcam == Generic800)1783sd->webcam = P35u;1784} else if (id->idVendor == 0x06a5 && id->idProduct == 0xd800) {1785reg_r(gspca_dev, 0x0403, 1); /* GPIO */1786PDEBUG(D_PROBE, "et31x110 sensor type %02x",1787gspca_dev->usb_buf[0]);1788switch (gspca_dev->usb_buf[0] >> 1) {1789case 0x00: /* ?? */1790if (sd->webcam == Generic800)1791sd->webcam = SpaceCam;1792break;1793case 0x01: /* Hynix? */1794if (sd->webcam == Generic800)1795sd->webcam = Twinkle;1796break;1797case 0x0a: /* Pixart */1798if (sd->webcam == Generic800)1799sd->webcam = SpaceCam2;1800break;1801}1802}1803if (webcam_chip[sd->webcam] != sd->bridge) {1804err("Bad webcam type %d for NW80%d", sd->webcam, sd->bridge);1805gspca_dev->usb_err = -ENODEV;1806return gspca_dev->usb_err;1807}1808PDEBUG(D_PROBE, "Bridge nw80%d - type: %d", sd->bridge, sd->webcam);18091810if (sd->bridge == BRIDGE_NW800) {1811switch (sd->webcam) {1812case DS3303u:1813gspca_dev->cam.cam_mode = cif_mode; /* qvga */1814break;1815default:1816gspca_dev->cam.cam_mode = &cif_mode[1]; /* cif */1817break;1818}1819gspca_dev->cam.nmodes = 1;1820} else {1821gspca_dev->cam.cam_mode = vga_mode;1822switch (sd->webcam) {1823case Kr651us:1824case Proscope:1825case P35u:1826gspca_dev->cam.nmodes = ARRAY_SIZE(vga_mode);1827break;1828default:1829gspca_dev->cam.nmodes = 1; /* qvga only */1830break;1831}1832}1833switch (sd->webcam) {1834case P35u:1835/* sd->ctrls[EXPOSURE].max = 9;1836* sd->ctrls[EXPOSURE].def = 9; */1837/* coarse expo auto gain function gain minimum, to avoid1838* a large settings jump the first auto adjustment */1839sd->ctrls[GAIN].def = 255 / 5 * 2;1840break;1841case Cvideopro:1842case DvcV6:1843case Kritter:1844gspca_dev->ctrl_dis = (1 << GAIN) | (1 << AUTOGAIN);1845/* fall thru */1846case Kr651us:1847sd->ctrls[EXPOSURE].max = 315;1848sd->ctrls[EXPOSURE].def = 150;1849break;1850default:1851gspca_dev->ctrl_dis = (1 << GAIN) | (1 << EXPOSURE)1852| (1 << AUTOGAIN);1853break;1854}18551856#if AUTOGAIN_DEF1857if (!(gspca_dev->ctrl_dis & (1 << AUTOGAIN)))1858gspca_dev->ctrl_inac = (1 << GAIN) | (1 << EXPOSURE);1859#endif1860return gspca_dev->usb_err;1861}18621863/* this function is called at probe and resume time */1864static int sd_init(struct gspca_dev *gspca_dev)1865{1866struct sd *sd = (struct sd *) gspca_dev;18671868switch (sd->bridge) {1869case BRIDGE_NW800:1870switch (sd->webcam) {1871case SpaceCam:1872reg_w_buf(gspca_dev, spacecam_init);1873break;1874default:1875reg_w_buf(gspca_dev, nw800_init);1876break;1877}1878break;1879default:1880switch (sd->webcam) {1881case Mustek300:1882case P35u:1883case Proscope:1884reg_w_buf(gspca_dev, proscope_init);1885break;1886}1887break;1888}1889return gspca_dev->usb_err;1890}18911892/* -- start the camera -- */1893static int sd_start(struct gspca_dev *gspca_dev)1894{1895struct sd *sd = (struct sd *) gspca_dev;1896const u8 *cmd;18971898cmd = webcam_start[sd->webcam];1899reg_w_buf(gspca_dev, cmd);1900switch (sd->webcam) {1901case P35u:1902if (gspca_dev->width == 320)1903reg_w_buf(gspca_dev, nw801_start_qvga);1904else1905reg_w_buf(gspca_dev, nw801_start_vga);1906reg_w_buf(gspca_dev, nw801_start_2);1907break;1908case Kr651us:1909if (gspca_dev->width == 320)1910reg_w_buf(gspca_dev, kr651_start_qvga);1911else1912reg_w_buf(gspca_dev, kr651_start_vga);1913reg_w_buf(gspca_dev, kr651_start_2);1914break;1915case Proscope:1916if (gspca_dev->width == 320)1917reg_w_buf(gspca_dev, proscope_start_qvga);1918else1919reg_w_buf(gspca_dev, proscope_start_vga);1920reg_w_buf(gspca_dev, proscope_start_2);1921break;1922}19231924setgain(gspca_dev);1925setexposure(gspca_dev);1926setautogain(gspca_dev);1927sd->exp_too_high_cnt = 0;1928sd->exp_too_low_cnt = 0;1929return gspca_dev->usb_err;1930}19311932static void sd_stopN(struct gspca_dev *gspca_dev)1933{1934struct sd *sd = (struct sd *) gspca_dev;1935u8 value;19361937/* 'go' off */1938if (sd->bridge != BRIDGE_NW801) {1939value = 0x02;1940reg_w(gspca_dev, 0x0406, &value, 1);1941}19421943/* LED off */1944switch (sd->webcam) {1945case Cvideopro:1946case Kr651us:1947case DvcV6:1948case Kritter:1949value = 0xff;1950break;1951case Dlink350c:1952value = 0x21;1953break;1954case SpaceCam:1955case SpaceCam2:1956case Proscope:1957case Twinkle:1958value = 0x01;1959break;1960default:1961return;1962}1963reg_w(gspca_dev, 0x0404, &value, 1);1964}19651966static void sd_pkt_scan(struct gspca_dev *gspca_dev,1967u8 *data, /* isoc packet */1968int len) /* iso packet length */1969{1970/*1971* frame header = '00 00 hh ww ss xx ff ff'1972* with:1973* - 'hh': height / 41974* - 'ww': width / 41975* - 'ss': frame sequence number c0..dd1976*/1977if (data[0] == 0x00 && data[1] == 0x001978&& data[6] == 0xff && data[7] == 0xff) {1979gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0);1980gspca_frame_add(gspca_dev, FIRST_PACKET, data + 8, len - 8);1981} else {1982gspca_frame_add(gspca_dev, INTER_PACKET, data, len);1983}1984}19851986static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val)1987{1988struct sd *sd = (struct sd *) gspca_dev;19891990sd->ctrls[AUTOGAIN].val = val;1991if (val)1992gspca_dev->ctrl_inac = (1 << GAIN) | (1 << EXPOSURE);1993else1994gspca_dev->ctrl_inac = 0;1995if (gspca_dev->streaming)1996setautogain(gspca_dev);1997return gspca_dev->usb_err;1998}19992000#include "autogain_functions.h"20012002static void do_autogain(struct gspca_dev *gspca_dev)2003{2004struct sd *sd = (struct sd *) gspca_dev;2005int luma;20062007if (sd->ag_cnt < 0)2008return;2009if (--sd->ag_cnt >= 0)2010return;2011sd->ag_cnt = AG_CNT_START;20122013/* get the average luma */2014reg_r(gspca_dev, sd->bridge == BRIDGE_NW801 ? 0x080d : 0x080c, 4);2015luma = (gspca_dev->usb_buf[3] << 24) + (gspca_dev->usb_buf[2] << 16)2016+ (gspca_dev->usb_buf[1] << 8) + gspca_dev->usb_buf[0];2017luma /= sd->ae_res;20182019switch (sd->webcam) {2020case P35u:2021coarse_grained_expo_autogain(gspca_dev, luma, 100, 5);2022break;2023default:2024auto_gain_n_exposure(gspca_dev, luma, 100, 5, 230, 0);2025break;2026}2027}20282029/* V4L2 controls supported by the driver */2030static const struct ctrl sd_ctrls[NCTRLS] = {2031[GAIN] = {2032{2033.id = V4L2_CID_GAIN,2034.type = V4L2_CTRL_TYPE_INTEGER,2035.name = "Gain",2036.minimum = 0,2037.maximum = 253,2038.step = 1,2039.default_value = 1282040},2041.set_control = setgain2042},2043[EXPOSURE] = {2044{2045.id = V4L2_CID_EXPOSURE,2046.type = V4L2_CTRL_TYPE_INTEGER,2047.name = "Exposure",2048.minimum = 0,2049.maximum = 9,2050.step = 1,2051.default_value = 92052},2053.set_control = setexposure2054},2055[AUTOGAIN] = {2056{2057.id = V4L2_CID_AUTOGAIN,2058.type = V4L2_CTRL_TYPE_BOOLEAN,2059.name = "Auto Gain",2060.minimum = 0,2061.maximum = 1,2062.step = 1,2063.default_value = AUTOGAIN_DEF,2064.flags = V4L2_CTRL_FLAG_UPDATE2065},2066.set = sd_setautogain2067},2068};20692070/* sub-driver description */2071static const struct sd_desc sd_desc = {2072.name = MODULE_NAME,2073.ctrls = sd_ctrls,2074.nctrls = ARRAY_SIZE(sd_ctrls),2075.config = sd_config,2076.init = sd_init,2077.start = sd_start,2078.stopN = sd_stopN,2079.pkt_scan = sd_pkt_scan,2080.dq_callback = do_autogain,2081};20822083/* -- module initialisation -- */2084static const struct usb_device_id device_table[] = {2085{USB_DEVICE(0x046d, 0xd001)},2086{USB_DEVICE(0x0502, 0xd001)},2087{USB_DEVICE(0x052b, 0xd001)},2088{USB_DEVICE(0x055f, 0xd001)},2089{USB_DEVICE(0x06a5, 0x0000)},2090{USB_DEVICE(0x06a5, 0xd001)},2091{USB_DEVICE(0x06a5, 0xd800)},2092{USB_DEVICE(0x06be, 0xd001)},2093{USB_DEVICE(0x0728, 0xd001)},2094{}2095};2096MODULE_DEVICE_TABLE(usb, device_table);20972098/* -- device connect -- */2099static int sd_probe(struct usb_interface *intf,2100const struct usb_device_id *id)2101{2102return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),2103THIS_MODULE);2104}21052106static struct usb_driver sd_driver = {2107.name = MODULE_NAME,2108.id_table = device_table,2109.probe = sd_probe,2110.disconnect = gspca_disconnect,2111#ifdef CONFIG_PM2112.suspend = gspca_suspend,2113.resume = gspca_resume,2114#endif2115};21162117/* -- module insert / remove -- */2118static int __init sd_mod_init(void)2119{2120return usb_register(&sd_driver);2121}2122static void __exit sd_mod_exit(void)2123{2124usb_deregister(&sd_driver);2125}21262127module_init(sd_mod_init);2128module_exit(sd_mod_exit);21292130module_param(webcam, int, 0644);2131MODULE_PARM_DESC(webcam,2132"Webcam type\n"2133"0: generic\n"2134"1: Trust 120 SpaceCam\n"2135"2: other Trust 120 SpaceCam\n"2136"3: Conceptronic Video Pro\n"2137"4: D-link dru-350c\n"2138"5: Plustek Opticam 500U\n"2139"6: Panasonic GP-KR651US\n"2140"7: iRez Kritter\n"2141"8: Mustek Wcam 300 mini\n"2142"9: Scalar USB Microscope M2 (Proscope)\n"2143"10: Divio Chicony TwinkleCam\n"2144"11: DVC-V6\n");214521462147