aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/spca505.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/spca505.c')
-rw-r--r--drivers/media/video/gspca/spca505.c38
1 files changed, 29 insertions, 9 deletions
diff --git a/drivers/media/video/gspca/spca505.c b/drivers/media/video/gspca/spca505.c
index 30d174fc4b9c..5d28d23b8375 100644
--- a/drivers/media/video/gspca/spca505.c
+++ b/drivers/media/video/gspca/spca505.c
@@ -23,8 +23,8 @@
23 23
24#include "gspca.h" 24#include "gspca.h"
25 25
26#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 4) 26#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 5)
27static const char version[] = "2.1.4"; 27static const char version[] = "2.1.5";
28 28
29MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>"); 29MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>");
30MODULE_DESCRIPTION("GSPCA/SPCA505 USB Camera Driver"); 30MODULE_DESCRIPTION("GSPCA/SPCA505 USB Camera Driver");
@@ -66,12 +66,32 @@ static struct ctrl sd_ctrls[] = {
66 }, 66 },
67}; 67};
68 68
69static struct cam_mode vga_mode[] = { 69static struct v4l2_pix_format vga_mode[] = {
70 {V4L2_PIX_FMT_YUYV, 160, 120, 5}, 70 {160, 120, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
71 {V4L2_PIX_FMT_YUYV, 176, 144, 4}, 71 .bytesperline = 160 * 2,
72 {V4L2_PIX_FMT_YUYV, 320, 240, 2}, 72 .sizeimage = 160 * 120 * 2,
73 {V4L2_PIX_FMT_YUYV, 352, 288, 1}, 73 .colorspace = V4L2_COLORSPACE_SRGB,
74 {V4L2_PIX_FMT_YUYV, 640, 480, 0}, 74 .priv = 5},
75 {176, 144, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
76 .bytesperline = 176 * 2,
77 .sizeimage = 176 * 144 * 2,
78 .colorspace = V4L2_COLORSPACE_SRGB,
79 .priv = 4},
80 {320, 240, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
81 .bytesperline = 320 * 2,
82 .sizeimage = 320 * 240 * 2,
83 .colorspace = V4L2_COLORSPACE_SRGB,
84 .priv = 2},
85 {352, 288, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
86 .bytesperline = 352 * 2,
87 .sizeimage = 352 * 288 * 2,
88 .colorspace = V4L2_COLORSPACE_SRGB,
89 .priv = 1},
90 {640, 480, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE,
91 .bytesperline = 640 * 2,
92 .sizeimage = 640 * 480 * 2,
93 .colorspace = V4L2_COLORSPACE_SRGB,
94 .priv = 0},
75}; 95};
76 96
77#define SPCA50X_OFFSET_DATA 10 97#define SPCA50X_OFFSET_DATA 10
@@ -708,7 +728,7 @@ static void sd_start(struct gspca_dev *gspca_dev)
708 * only once after loading module */ 728 * only once after loading module */
709 /* stopping usb registers Tomasz change */ 729 /* stopping usb registers Tomasz change */
710 reg_write(dev, 0x02, 0x0, 0x0); 730 reg_write(dev, 0x02, 0x0, 0x0);
711 switch (gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].mode) { 731 switch (gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv) {
712 case 0: 732 case 0:
713 reg_write(dev, 0x04, 0x00, 0x00); 733 reg_write(dev, 0x04, 0x00, 0x00);
714 reg_write(dev, 0x04, 0x06, 0x10); 734 reg_write(dev, 0x04, 0x06, 0x10);