diff options
author | Andoni Zubimendi <andoni.zubimendi@gmail.com> | 2008-07-14 08:50:26 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 06:26:24 -0400 |
commit | 4b972d29bbccc86877221164c7f39d52694d4a81 (patch) | |
tree | 06e88f3d340f853511cf8fd381e7ca8605996d44 /drivers/media | |
parent | 739570bb218bb4607df1f197282561e97a98e54a (diff) |
V4L/DVB (8353): gspca: 640x480 for bridge sn9c103 / sensor ov7630.
sonixb: 640x480 mode for sn9c103 - ov7630.
Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/gspca/sonixb.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/video/gspca/sonixb.c index ce8b28f504d3..cfa62aef4700 100644 --- a/drivers/media/video/gspca/sonixb.c +++ b/drivers/media/video/gspca/sonixb.c | |||
@@ -278,8 +278,14 @@ static const __u8 ov7630_sensor_init[][8] = { | |||
278 | {0xa0, 0x21, 0x76, 0x02, 0xbd, 0x06, 0xf6, 0x16}, | 278 | {0xa0, 0x21, 0x76, 0x02, 0xbd, 0x06, 0xf6, 0x16}, |
279 | {0xa0, 0x21, 0x00, 0x10, 0xbd, 0x06, 0xf6, 0x15}, /* gain */ | 279 | {0xa0, 0x21, 0x00, 0x10, 0xbd, 0x06, 0xf6, 0x15}, /* gain */ |
280 | }; | 280 | }; |
281 | static const __u8 ov7630_sensor_init_3[][8] = { | 281 | static const __u8 ov7630_sensor_init_3[][5][8] = { |
282 | {0xa0, 0x21, 0x10, 0x83, 0xbd, 0x06, 0xf6, 0x16}, /* exposure */ | 282 | { {0xa0, 0x21, 0x10, 0x36, 0xbd, 0x06, 0xf6, 0x16}, /* exposure */ |
283 | {0xa0, 0x21, 0x76, 0x03, 0xbd, 0x06, 0xf6, 0x16}, | ||
284 | {0xa0, 0x21, 0x11, 0x01, 0xbd, 0x06, 0xf6, 0x16}, | ||
285 | {0xa0, 0x21, 0x00, 0x10, 0xbd, 0x06, 0xf6, 0x15}, /* gain */ | ||
286 | {0xb0, 0x21, 0x2a, 0xa0, 0x1c, 0x06, 0xf6, 0x1d}, | ||
287 | }, | ||
288 | { {0xa0, 0x21, 0x10, 0x83, 0xbd, 0x06, 0xf6, 0x16}, /* exposure */ | ||
283 | {0xa0, 0x21, 0x76, 0x00, 0xbd, 0x06, 0xf6, 0x16}, | 289 | {0xa0, 0x21, 0x76, 0x00, 0xbd, 0x06, 0xf6, 0x16}, |
284 | {0xa0, 0x21, 0x11, 0x00, 0xbd, 0x06, 0xf6, 0x16}, | 290 | {0xa0, 0x21, 0x11, 0x00, 0xbd, 0x06, 0xf6, 0x16}, |
285 | {0xa0, 0x21, 0x00, 0x10, 0xbd, 0x06, 0xf6, 0x15}, /* gain */ | 291 | {0xa0, 0x21, 0x00, 0x10, 0xbd, 0x06, 0xf6, 0x15}, /* gain */ |
@@ -287,6 +293,7 @@ static const __u8 ov7630_sensor_init_3[][8] = { | |||
287 | * a0 1c,a0 1f,c0 3c frame rate ?line interval from ov6630 */ | 293 | * a0 1c,a0 1f,c0 3c frame rate ?line interval from ov6630 */ |
288 | /* {0xb0, 0x21, 0x2a, 0xa0, 0x1f, 0x06, 0xf6, 0x1d}, * from win */ | 294 | /* {0xb0, 0x21, 0x2a, 0xa0, 0x1f, 0x06, 0xf6, 0x1d}, * from win */ |
289 | {0xb0, 0x21, 0x2a, 0x80, 0x60, 0x06, 0xf6, 0x1d}, | 295 | {0xb0, 0x21, 0x2a, 0x80, 0x60, 0x06, 0xf6, 0x1d}, |
296 | } | ||
290 | }; | 297 | }; |
291 | 298 | ||
292 | static const __u8 initPas106[] = { | 299 | static const __u8 initPas106[] = { |
@@ -730,6 +737,11 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
730 | if (!sif) { | 737 | if (!sif) { |
731 | cam->cam_mode = vga_mode; | 738 | cam->cam_mode = vga_mode; |
732 | cam->nmodes = ARRAY_SIZE(vga_mode); | 739 | cam->nmodes = ARRAY_SIZE(vga_mode); |
740 | if (sd->sensor == SENSOR_OV7630_3) { | ||
741 | /* We only have 320x240 & 640x480 */ | ||
742 | cam->cam_mode++; | ||
743 | cam->nmodes--; | ||
744 | } | ||
733 | } else { | 745 | } else { |
734 | cam->cam_mode = sif_mode; | 746 | cam->cam_mode = sif_mode; |
735 | cam->nmodes = ARRAY_SIZE(sif_mode); | 747 | cam->nmodes = ARRAY_SIZE(sif_mode); |
@@ -877,8 +889,8 @@ static void sd_start(struct gspca_dev *gspca_dev) | |||
877 | i2c_w_vector(gspca_dev, ov7630_sensor_init_com, | 889 | i2c_w_vector(gspca_dev, ov7630_sensor_init_com, |
878 | sizeof ov7630_sensor_init_com); | 890 | sizeof ov7630_sensor_init_com); |
879 | msleep(200); | 891 | msleep(200); |
880 | i2c_w_vector(gspca_dev, ov7630_sensor_init_3, | 892 | i2c_w_vector(gspca_dev, ov7630_sensor_init_3[mode], |
881 | sizeof ov7630_sensor_init_3); | 893 | sizeof ov7630_sensor_init_3[mode]); |
882 | break; | 894 | break; |
883 | case SENSOR_PAS106: | 895 | case SENSOR_PAS106: |
884 | pas106_i2cinit(gspca_dev); | 896 | pas106_i2cinit(gspca_dev); |