aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/sunplus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/sunplus.c')
-rw-r--r--drivers/media/video/gspca/sunplus.c60
1 files changed, 46 insertions, 14 deletions
diff --git a/drivers/media/video/gspca/sunplus.c b/drivers/media/video/gspca/sunplus.c
index f2d033508581..f66594a113a7 100644
--- a/drivers/media/video/gspca/sunplus.c
+++ b/drivers/media/video/gspca/sunplus.c
@@ -24,8 +24,8 @@
24#include "gspca.h" 24#include "gspca.h"
25#include "jpeg.h" 25#include "jpeg.h"
26 26
27#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 4) 27#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 5)
28static const char version[] = "2.1.4"; 28static const char version[] = "2.1.5";
29 29
30MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>"); 30MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>");
31MODULE_DESCRIPTION("GSPCA/SPCA5xx USB Camera Driver"); 31MODULE_DESCRIPTION("GSPCA/SPCA5xx USB Camera Driver");
@@ -126,21 +126,53 @@ static struct ctrl sd_ctrls[] = {
126 }, 126 },
127}; 127};
128 128
129static struct cam_mode vga_mode[] = { 129static struct v4l2_pix_format vga_mode[] = {
130 {V4L2_PIX_FMT_JPEG, 320, 240, 2}, 130 {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
131 {V4L2_PIX_FMT_JPEG, 640, 480, 1}, 131 .bytesperline = 320,
132 .sizeimage = 320 * 240 * 3 / 8 + 590,
133 .colorspace = V4L2_COLORSPACE_JPEG,
134 .priv = 2},
135 {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
136 .bytesperline = 640,
137 .sizeimage = 640 * 480 * 3 / 8 + 590,
138 .colorspace = V4L2_COLORSPACE_JPEG,
139 .priv = 1},
132}; 140};
133 141
134static struct cam_mode custom_mode[] = { 142static struct v4l2_pix_format custom_mode[] = {
135 {V4L2_PIX_FMT_JPEG, 320, 240, 2}, 143 {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
136 {V4L2_PIX_FMT_JPEG, 464, 480, 1}, 144 .bytesperline = 320,
145 .sizeimage = 320 * 240 * 3 / 8 + 590,
146 .colorspace = V4L2_COLORSPACE_JPEG,
147 .priv = 2},
148 {464, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
149 .bytesperline = 464,
150 .sizeimage = 464 * 480 * 3 / 8 + 590,
151 .colorspace = V4L2_COLORSPACE_JPEG,
152 .priv = 1},
137}; 153};
138 154
139static struct cam_mode vga_mode2[] = { 155static struct v4l2_pix_format vga_mode2[] = {
140 {V4L2_PIX_FMT_JPEG, 176, 144, 4}, 156 {176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
141 {V4L2_PIX_FMT_JPEG, 320, 240, 3}, 157 .bytesperline = 176,
142 {V4L2_PIX_FMT_JPEG, 352, 288, 2}, 158 .sizeimage = 176 * 144 * 3 / 8 + 590,
143 {V4L2_PIX_FMT_JPEG, 640, 480, 1}, 159 .colorspace = V4L2_COLORSPACE_JPEG,
160 .priv = 4},
161 {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
162 .bytesperline = 320,
163 .sizeimage = 320 * 240 * 3 / 8 + 590,
164 .colorspace = V4L2_COLORSPACE_JPEG,
165 .priv = 3},
166 {352, 288, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
167 .bytesperline = 352,
168 .sizeimage = 352 * 288 * 3 / 8 + 590,
169 .colorspace = V4L2_COLORSPACE_JPEG,
170 .priv = 2},
171 {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
172 .bytesperline = 640,
173 .sizeimage = 640 * 480 * 3 / 8 + 590,
174 .colorspace = V4L2_COLORSPACE_JPEG,
175 .priv = 1},
144}; 176};
145 177
146#define SPCA50X_OFFSET_DATA 10 178#define SPCA50X_OFFSET_DATA 10
@@ -655,7 +687,7 @@ static void spca504B_SetSizeType(struct gspca_dev *gspca_dev)
655 __u8 Type; 687 __u8 Type;
656 int rc; 688 int rc;
657 689
658 Size = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].mode; 690 Size = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv;
659 Type = 0; 691 Type = 0;
660 switch (sd->bridge) { 692 switch (sd->bridge) {
661 case BRIDGE_SPCA533: 693 case BRIDGE_SPCA533: