From 7ca03eac2d8ff90a5ffc56ee23935a4daf31aabf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Andr=C3=A9n?= Date: Thu, 12 Feb 2009 07:32:52 +0100 Subject: gspca - m5602-s5k4aa: Fixup SXGA resolution. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Grégory Lardière The SXGA resolution doesn't work unless you first force the VGA resolution. More investigation is needed in order to fix this the "right" way. Priority: normal Signed-off-by: Grégory Lardière Signed-off-by: Erik Andrén --- .../drivers/media/video/gspca/m5602/m5602_s5k4aa.c | 30 ++++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c') diff --git a/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c index 97c06c5d0..48bf519c6 100644 --- a/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c +++ b/linux/drivers/media/video/gspca/m5602/m5602_s5k4aa.c @@ -66,27 +66,25 @@ static }; static struct v4l2_pix_format s5k4aa_modes[] = { -#if 0 { - 1280, - 1024, + 640, + 480, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, .sizeimage = - 1280 * 1024, - .bytesperline = 1280, + 640 * 480, + .bytesperline = 640, .colorspace = V4L2_COLORSPACE_SRGB, .priv = 0 }, -#endif { - 640, - 480, + 1280, + 1024, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, .sizeimage = - 640 * 480, - .bytesperline = 640, + 1280 * 1024, + .bytesperline = 1280, .colorspace = V4L2_COLORSPACE_SRGB, .priv = 0 } @@ -303,6 +301,10 @@ int s5k4aa_start(struct sd *sd) return -EINVAL; } } + err = s5k4aa_set_noise(&sd->gspca_dev, 0); + if (err < 0) + return err; + break; case 640: PDEBUG(D_V4L2, "Configuring camera for VGA mode"); @@ -335,6 +337,10 @@ int s5k4aa_start(struct sd *sd) return -EINVAL; } } + err = s5k4aa_set_noise(&sd->gspca_dev, 1); + if (err < 0) + return err; + break; } return err; } @@ -389,10 +395,6 @@ int s5k4aa_init(struct sd *sd) if (err < 0) return err; - err = s5k4aa_set_noise(&sd->gspca_dev, sensor_settings[NOISE_SUPP_IDX]); - if (err < 0) - return err; - err = s5k4aa_set_vflip(&sd->gspca_dev, sensor_settings[VFLIP_IDX]); if (err < 0) return err; -- cgit v1.2.3