diff options
Diffstat (limited to 'drivers/media/video/gspca/vc032x.c')
-rw-r--r-- | drivers/media/video/gspca/vc032x.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index e4e933c400bc..26dd155efcc3 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c | |||
@@ -42,7 +42,7 @@ struct sd { | |||
42 | char bridge; | 42 | char bridge; |
43 | #define BRIDGE_VC0321 0 | 43 | #define BRIDGE_VC0321 0 |
44 | #define BRIDGE_VC0323 1 | 44 | #define BRIDGE_VC0323 1 |
45 | char sensor; | 45 | u8 sensor; |
46 | #define SENSOR_HV7131R 0 | 46 | #define SENSOR_HV7131R 0 |
47 | #define SENSOR_MI0360 1 | 47 | #define SENSOR_MI0360 1 |
48 | #define SENSOR_MI1310_SOC 2 | 48 | #define SENSOR_MI1310_SOC 2 |
@@ -159,17 +159,17 @@ static const struct v4l2_pix_format vc0323_mode[] = { | |||
159 | .priv = 2}, | 159 | .priv = 2}, |
160 | }; | 160 | }; |
161 | static const struct v4l2_pix_format bi_mode[] = { | 161 | static const struct v4l2_pix_format bi_mode[] = { |
162 | {320, 240, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE, | 162 | {320, 240, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, |
163 | .bytesperline = 320, | 163 | .bytesperline = 320, |
164 | .sizeimage = 320 * 240 * 2, | 164 | .sizeimage = 320 * 240 * 2, |
165 | .colorspace = V4L2_COLORSPACE_SRGB, | 165 | .colorspace = V4L2_COLORSPACE_SRGB, |
166 | .priv = 2}, | 166 | .priv = 2}, |
167 | {640, 480, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE, | 167 | {640, 480, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, |
168 | .bytesperline = 640, | 168 | .bytesperline = 640, |
169 | .sizeimage = 640 * 480 * 2, | 169 | .sizeimage = 640 * 480 * 2, |
170 | .colorspace = V4L2_COLORSPACE_SRGB, | 170 | .colorspace = V4L2_COLORSPACE_SRGB, |
171 | .priv = 1}, | 171 | .priv = 1}, |
172 | {1280, 1024, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE, | 172 | {1280, 1024, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, |
173 | .bytesperline = 1280, | 173 | .bytesperline = 1280, |
174 | .sizeimage = 1280 * 1024 * 2, | 174 | .sizeimage = 1280 * 1024 * 2, |
175 | .colorspace = V4L2_COLORSPACE_SRGB, | 175 | .colorspace = V4L2_COLORSPACE_SRGB, |
@@ -2453,6 +2453,17 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
2453 | struct usb_device *dev = gspca_dev->dev; | 2453 | struct usb_device *dev = gspca_dev->dev; |
2454 | struct cam *cam; | 2454 | struct cam *cam; |
2455 | int sensor; | 2455 | int sensor; |
2456 | static u8 npkt[] = { /* number of packets per ISOC message */ | ||
2457 | 64, /* HV7131R 0 */ | ||
2458 | 32, /* MI0360 1 */ | ||
2459 | 32, /* MI1310_SOC 2 */ | ||
2460 | 64, /* MI1320 3 */ | ||
2461 | 128, /* MI1320_SOC 4 */ | ||
2462 | 32, /* OV7660 5 */ | ||
2463 | 64, /* OV7670 6 */ | ||
2464 | 128, /* PO1200 7 */ | ||
2465 | 128, /* PO3130NC 8 */ | ||
2466 | }; | ||
2456 | 2467 | ||
2457 | cam = &gspca_dev->cam; | 2468 | cam = &gspca_dev->cam; |
2458 | sd->bridge = id->driver_info; | 2469 | sd->bridge = id->driver_info; |
@@ -2508,6 +2519,8 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
2508 | case SENSOR_MI1320_SOC: | 2519 | case SENSOR_MI1320_SOC: |
2509 | cam->cam_mode = bi_mode; | 2520 | cam->cam_mode = bi_mode; |
2510 | cam->nmodes = ARRAY_SIZE(bi_mode); | 2521 | cam->nmodes = ARRAY_SIZE(bi_mode); |
2522 | cam->input_flags = V4L2_IN_ST_VFLIP | | ||
2523 | V4L2_IN_ST_HFLIP; | ||
2511 | break; | 2524 | break; |
2512 | default: | 2525 | default: |
2513 | cam->cam_mode = vc0323_mode; | 2526 | cam->cam_mode = vc0323_mode; |
@@ -2515,6 +2528,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
2515 | break; | 2528 | break; |
2516 | } | 2529 | } |
2517 | } | 2530 | } |
2531 | cam->npkt = npkt[sd->sensor]; | ||
2518 | 2532 | ||
2519 | sd->hflip = HFLIP_DEF; | 2533 | sd->hflip = HFLIP_DEF; |
2520 | sd->vflip = VFLIP_DEF; | 2534 | sd->vflip = VFLIP_DEF; |