diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-07-14 11:50:26 +0200 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2008-07-14 11:50:26 +0200 |
commit | 13e49623c52dc533382cf809c9461caf3a295eda (patch) | |
tree | 46ab02862e21c8d9578660bdc3e2d32d28eef360 /linux/drivers | |
parent | 3e6fb557cb5a96fa415ec4ea6b141d22fb948b12 (diff) | |
download | mediapointer-dvb-s2-13e49623c52dc533382cf809c9461caf3a295eda.tar.gz mediapointer-dvb-s2-13e49623c52dc533382cf809c9461caf3a295eda.tar.bz2 |
gspca: 640x480 for bridge sn9c103 / sensor ov7630.
From: Andoni Zubimendi <andoni.zubimendi@gmail.com>
sonixb: 640x480 mode for sn9c103 - ov7630.
Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/gspca/sonixb.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/linux/drivers/media/video/gspca/sonixb.c b/linux/drivers/media/video/gspca/sonixb.c index 16e11e17b..86c42a466 100644 --- a/linux/drivers/media/video/gspca/sonixb.c +++ b/linux/drivers/media/video/gspca/sonixb.c @@ -304,8 +304,14 @@ static const __u8 ov7630_sensor_init[][8] = { {0xa0, 0x21, 0x76, 0x02, 0xbd, 0x06, 0xf6, 0x16}, {0xa0, 0x21, 0x00, 0x10, 0xbd, 0x06, 0xf6, 0x15}, /* gain */ }; -static const __u8 ov7630_sensor_init_3[][8] = { - {0xa0, 0x21, 0x10, 0x83, 0xbd, 0x06, 0xf6, 0x16}, /* exposure */ +static const __u8 ov7630_sensor_init_3[][5][8] = { + { {0xa0, 0x21, 0x10, 0x36, 0xbd, 0x06, 0xf6, 0x16}, /* exposure */ + {0xa0, 0x21, 0x76, 0x03, 0xbd, 0x06, 0xf6, 0x16}, + {0xa0, 0x21, 0x11, 0x01, 0xbd, 0x06, 0xf6, 0x16}, + {0xa0, 0x21, 0x00, 0x10, 0xbd, 0x06, 0xf6, 0x15}, /* gain */ + {0xb0, 0x21, 0x2a, 0xa0, 0x1c, 0x06, 0xf6, 0x1d}, + }, + { {0xa0, 0x21, 0x10, 0x83, 0xbd, 0x06, 0xf6, 0x16}, /* exposure */ {0xa0, 0x21, 0x76, 0x00, 0xbd, 0x06, 0xf6, 0x16}, {0xa0, 0x21, 0x11, 0x00, 0xbd, 0x06, 0xf6, 0x16}, {0xa0, 0x21, 0x00, 0x10, 0xbd, 0x06, 0xf6, 0x15}, /* gain */ @@ -313,6 +319,7 @@ static const __u8 ov7630_sensor_init_3[][8] = { * a0 1c,a0 1f,c0 3c frame rate ?line interval from ov6630 */ /* {0xb0, 0x21, 0x2a, 0xa0, 0x1f, 0x06, 0xf6, 0x1d}, * from win */ {0xb0, 0x21, 0x2a, 0x80, 0x60, 0x06, 0xf6, 0x1d}, + } }; static const __u8 initPas106[] = { @@ -756,6 +763,11 @@ static int sd_config(struct gspca_dev *gspca_dev, if (!sif) { cam->cam_mode = vga_mode; cam->nmodes = ARRAY_SIZE(vga_mode); + if (sd->sensor == SENSOR_OV7630_3) { + /* We only have 320x240 & 640x480 */ + cam->cam_mode++; + cam->nmodes--; + } } else { cam->cam_mode = sif_mode; cam->nmodes = ARRAY_SIZE(sif_mode); @@ -903,8 +915,8 @@ static void sd_start(struct gspca_dev *gspca_dev) i2c_w_vector(gspca_dev, ov7630_sensor_init_com, sizeof ov7630_sensor_init_com); msleep(200); - i2c_w_vector(gspca_dev, ov7630_sensor_init_3, - sizeof ov7630_sensor_init_3); + i2c_w_vector(gspca_dev, ov7630_sensor_init_3[mode], + sizeof ov7630_sensor_init_3[mode]); break; case SENSOR_PAS106: pas106_i2cinit(gspca_dev); |