diff options
author | Grégory Lardière <spmf2004-m560x@yahoo.fr> | 2009-02-12 01:32:52 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:20:52 -0400 |
commit | 60d52cecedf7b55bed07d59ab6039ae066f01124 (patch) | |
tree | 356a835ef7163f5170e57c55282e72cab313ed70 /drivers/media/video/gspca/m5602 | |
parent | 4db120bc07b330cd7221fda85bbfea54053a83af (diff) |
V4L/DVB (11688): gspca - m5602-s5k4aa: Fixup SXGA resolution.
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.
Signed-off-by: Grégory Lardière <spmf2004-m560x@yahoo.fr>
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/m5602')
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k4aa.c | 23 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k4aa.h | 9 |
2 files changed, 23 insertions, 9 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c index 73b826a8ab04..b5a9ddb2d218 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c +++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c | |||
@@ -74,6 +74,17 @@ static struct v4l2_pix_format s5k4aa_modes[] = { | |||
74 | .bytesperline = 640, | 74 | .bytesperline = 640, |
75 | .colorspace = V4L2_COLORSPACE_SRGB, | 75 | .colorspace = V4L2_COLORSPACE_SRGB, |
76 | .priv = 0 | 76 | .priv = 0 |
77 | }, | ||
78 | { | ||
79 | 1280, | ||
80 | 1024, | ||
81 | V4L2_PIX_FMT_SBGGR8, | ||
82 | V4L2_FIELD_NONE, | ||
83 | .sizeimage = | ||
84 | 1280 * 1024, | ||
85 | .bytesperline = 1280, | ||
86 | .colorspace = V4L2_COLORSPACE_SRGB, | ||
87 | .priv = 0 | ||
77 | } | 88 | } |
78 | }; | 89 | }; |
79 | 90 | ||
@@ -288,6 +299,10 @@ int s5k4aa_start(struct sd *sd) | |||
288 | return -EINVAL; | 299 | return -EINVAL; |
289 | } | 300 | } |
290 | } | 301 | } |
302 | err = s5k4aa_set_noise(&sd->gspca_dev, 0); | ||
303 | if (err < 0) | ||
304 | return err; | ||
305 | break; | ||
291 | 306 | ||
292 | case 640: | 307 | case 640: |
293 | PDEBUG(D_V4L2, "Configuring camera for VGA mode"); | 308 | PDEBUG(D_V4L2, "Configuring camera for VGA mode"); |
@@ -320,6 +335,10 @@ int s5k4aa_start(struct sd *sd) | |||
320 | return -EINVAL; | 335 | return -EINVAL; |
321 | } | 336 | } |
322 | } | 337 | } |
338 | err = s5k4aa_set_noise(&sd->gspca_dev, 1); | ||
339 | if (err < 0) | ||
340 | return err; | ||
341 | break; | ||
323 | } | 342 | } |
324 | return err; | 343 | return err; |
325 | } | 344 | } |
@@ -374,10 +393,6 @@ int s5k4aa_init(struct sd *sd) | |||
374 | if (err < 0) | 393 | if (err < 0) |
375 | return err; | 394 | return err; |
376 | 395 | ||
377 | err = s5k4aa_set_noise(&sd->gspca_dev, sensor_settings[NOISE_SUPP_IDX]); | ||
378 | if (err < 0) | ||
379 | return err; | ||
380 | |||
381 | err = s5k4aa_set_vflip(&sd->gspca_dev, sensor_settings[VFLIP_IDX]); | 396 | err = s5k4aa_set_vflip(&sd->gspca_dev, sensor_settings[VFLIP_IDX]); |
382 | if (err < 0) | 397 | if (err < 0) |
383 | return err; | 398 | return err; |
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.h b/drivers/media/video/gspca/m5602/m5602_s5k4aa.h index e0709a55eb44..4440da4e7f0f 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.h +++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.h | |||
@@ -265,18 +265,17 @@ static const unsigned char SXGA_s5k4aa[][4] = | |||
265 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xa0, 0x00}, /* 48 MHz */ | 265 | {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xa0, 0x00}, /* 48 MHz */ |
266 | 266 | ||
267 | {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00}, | 267 | {SENSOR, S5K4AA_PAGE_MAP, 0x02, 0x00}, |
268 | {SENSOR, S5K4AA_READ_MODE, S5K4AA_RM_H_FLIP | S5K4AA_RM_ROW_SKIP_2X | 268 | {SENSOR, S5K4AA_READ_MODE, S5K4AA_RM_H_FLIP, 0x00}, |
269 | | S5K4AA_RM_COL_SKIP_2X, 0x00}, | ||
270 | {SENSOR, 0x37, 0x01, 0x00}, | 269 | {SENSOR, 0x37, 0x01, 0x00}, |
271 | {SENSOR, S5K4AA_ROWSTART_HI, 0x00, 0x00}, | 270 | {SENSOR, S5K4AA_ROWSTART_HI, 0x00, 0x00}, |
272 | {SENSOR, S5K4AA_ROWSTART_LO, 0x0a, 0x00}, | 271 | {SENSOR, S5K4AA_ROWSTART_LO, 0x09, 0x00}, |
273 | {SENSOR, S5K4AA_COLSTART_HI, 0x00, 0x00}, | 272 | {SENSOR, S5K4AA_COLSTART_HI, 0x00, 0x00}, |
274 | {SENSOR, S5K4AA_COLSTART_LO, 0x0b, 0x00}, | 273 | {SENSOR, S5K4AA_COLSTART_LO, 0x0a, 0x00}, |
275 | {SENSOR, S5K4AA_WINDOW_HEIGHT_HI, 0x04, 0x00}, | 274 | {SENSOR, S5K4AA_WINDOW_HEIGHT_HI, 0x04, 0x00}, |
276 | {SENSOR, S5K4AA_WINDOW_HEIGHT_LO, 0x00, 0x00}, | 275 | {SENSOR, S5K4AA_WINDOW_HEIGHT_LO, 0x00, 0x00}, |
277 | {SENSOR, S5K4AA_WINDOW_WIDTH_HI, 0x05, 0x00}, | 276 | {SENSOR, S5K4AA_WINDOW_WIDTH_HI, 0x05, 0x00}, |
278 | {SENSOR, S5K4AA_WINDOW_WIDTH_LO, 0x00, 0x00}, | 277 | {SENSOR, S5K4AA_WINDOW_WIDTH_LO, 0x00, 0x00}, |
279 | {SENSOR, S5K4AA_H_BLANK_HI__, 0x00, 0x00}, | 278 | {SENSOR, S5K4AA_H_BLANK_HI__, 0x01, 0x00}, |
280 | {SENSOR, S5K4AA_H_BLANK_LO__, 0xa8, 0x00}, | 279 | {SENSOR, S5K4AA_H_BLANK_LO__, 0xa8, 0x00}, |
281 | {SENSOR, S5K4AA_EXPOSURE_HI, 0x01, 0x00}, | 280 | {SENSOR, S5K4AA_EXPOSURE_HI, 0x01, 0x00}, |
282 | {SENSOR, S5K4AA_EXPOSURE_LO, 0x00, 0x00}, | 281 | {SENSOR, S5K4AA_EXPOSURE_LO, 0x00, 0x00}, |