diff options
author | Jean-François Moine <moinejf@free.fr> | 2011-02-10 11:37:48 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-21 19:32:08 -0400 |
commit | c42cedbb658bde9b7bea0ce24e2388b7c717fdb3 (patch) | |
tree | 63fd3235ccb2bfd6aca3fc84b5142bb6d70e6c99 /drivers/media/video | |
parent | 07c6c9c6d0e797590a7cc76fc8f0b740f34d21a2 (diff) |
[media] gspca - ov519: Add the 800x600 resolution for sensors ov2610/2610ae
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/gspca/ov519.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index cda7ee2c8bb4..42670ec7ef3b 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c | |||
@@ -431,6 +431,11 @@ static const struct v4l2_pix_format ovfx2_cif_mode[] = { | |||
431 | .priv = 0}, | 431 | .priv = 0}, |
432 | }; | 432 | }; |
433 | static const struct v4l2_pix_format ovfx2_ov2610_mode[] = { | 433 | static const struct v4l2_pix_format ovfx2_ov2610_mode[] = { |
434 | {800, 600, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, | ||
435 | .bytesperline = 800, | ||
436 | .sizeimage = 800 * 600, | ||
437 | .colorspace = V4L2_COLORSPACE_SRGB, | ||
438 | .priv = 1}, | ||
434 | {1600, 1200, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, | 439 | {1600, 1200, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE, |
435 | .bytesperline = 1600, | 440 | .bytesperline = 1600, |
436 | .sizeimage = 1600 * 1200, | 441 | .sizeimage = 1600 * 1200, |
@@ -547,6 +552,7 @@ static const struct v4l2_pix_format ovfx2_ov3610_mode[] = { | |||
547 | * buffers, there are some pretty strict real time constraints for | 552 | * buffers, there are some pretty strict real time constraints for |
548 | * isochronous transfer for larger frame sizes). | 553 | * isochronous transfer for larger frame sizes). |
549 | */ | 554 | */ |
555 | /*jfm: this value works well for 1600x1200, but not 800x600 - see isoc_init */ | ||
550 | #define OVFX2_BULK_SIZE (13 * 4096) | 556 | #define OVFX2_BULK_SIZE (13 * 4096) |
551 | 557 | ||
552 | /* I2C registers */ | 558 | /* I2C registers */ |
@@ -3434,6 +3440,22 @@ error: | |||
3434 | return -EINVAL; | 3440 | return -EINVAL; |
3435 | } | 3441 | } |
3436 | 3442 | ||
3443 | /* function called at start time before URB creation */ | ||
3444 | static int sd_isoc_init(struct gspca_dev *gspca_dev) | ||
3445 | { | ||
3446 | struct sd *sd = (struct sd *) gspca_dev; | ||
3447 | |||
3448 | switch (sd->bridge) { | ||
3449 | case BRIDGE_OVFX2: | ||
3450 | if (gspca_dev->width == 1600) | ||
3451 | gspca_dev->cam.bulk_size = OVFX2_BULK_SIZE; | ||
3452 | else | ||
3453 | gspca_dev->cam.bulk_size = 7 * 4096; | ||
3454 | break; | ||
3455 | } | ||
3456 | return 0; | ||
3457 | } | ||
3458 | |||
3437 | /* Set up the OV511/OV511+ with the given image parameters. | 3459 | /* Set up the OV511/OV511+ with the given image parameters. |
3438 | * | 3460 | * |
3439 | * Do not put any sensor-specific code in here (including I2C I/O functions) | 3461 | * Do not put any sensor-specific code in here (including I2C I/O functions) |
@@ -4788,6 +4810,7 @@ static const struct sd_desc sd_desc = { | |||
4788 | .nctrls = ARRAY_SIZE(sd_ctrls), | 4810 | .nctrls = ARRAY_SIZE(sd_ctrls), |
4789 | .config = sd_config, | 4811 | .config = sd_config, |
4790 | .init = sd_init, | 4812 | .init = sd_init, |
4813 | .isoc_init = sd_isoc_init, | ||
4791 | .start = sd_start, | 4814 | .start = sd_start, |
4792 | .stopN = sd_stopN, | 4815 | .stopN = sd_stopN, |
4793 | .stop0 = sd_stop0, | 4816 | .stop0 = sd_stop0, |