diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-07-05 10:49:20 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 06:17:15 -0400 |
commit | c2446b3eba97243acbe2ad0939a28b5edb97eae7 (patch) | |
tree | f7ff764cf48062c4ef7c243205b85ae73d69763e /drivers/media/video/gspca/pac7311.c | |
parent | efab8211db79d20032fa7d09b8a3671e68a9c5b9 (diff) |
V4L/DVB (8201): gspca: v4l2_pix_format in each subdriver.
main: Parameter comp_fac removed.
main, pac207:
get_buff_size op removed.
(all) v4l2_pix_format in each subdriver.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/gspca/pac7311.c')
-rw-r--r-- | drivers/media/video/gspca/pac7311.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c index c2d4b6a4dcf4..1a2347aa7157 100644 --- a/drivers/media/video/gspca/pac7311.c +++ b/drivers/media/video/gspca/pac7311.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) |
27 | static const char version[] = "2.1.4"; | 27 | static const char version[] = "2.1.5"; |
28 | 28 | ||
29 | MODULE_AUTHOR("Thomas Kaiser thomas@kaiser-linux.li"); | 29 | MODULE_AUTHOR("Thomas Kaiser thomas@kaiser-linux.li"); |
30 | MODULE_DESCRIPTION("Pixart PAC7311"); | 30 | MODULE_DESCRIPTION("Pixart PAC7311"); |
@@ -116,10 +116,22 @@ static struct ctrl sd_ctrls[] = { | |||
116 | }, | 116 | }, |
117 | }; | 117 | }; |
118 | 118 | ||
119 | static struct cam_mode vga_mode[] = { | 119 | static struct v4l2_pix_format vga_mode[] = { |
120 | {V4L2_PIX_FMT_JPEG, 160, 120, 2}, | 120 | {160, 120, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
121 | {V4L2_PIX_FMT_JPEG, 320, 240, 1}, | 121 | .bytesperline = 160, |
122 | {V4L2_PIX_FMT_JPEG, 640, 480, 0}, | 122 | .sizeimage = 160 * 120 * 3 / 8 + 590, |
123 | .colorspace = V4L2_COLORSPACE_JPEG, | ||
124 | .priv = 2}, | ||
125 | {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, | ||
126 | .bytesperline = 320, | ||
127 | .sizeimage = 320 * 240 * 3 / 8 + 590, | ||
128 | .colorspace = V4L2_COLORSPACE_JPEG, | ||
129 | .priv = 1}, | ||
130 | {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, | ||
131 | .bytesperline = 640, | ||
132 | .sizeimage = 640 * 480 * 3 / 8 + 590, | ||
133 | .colorspace = V4L2_COLORSPACE_JPEG, | ||
134 | .priv = 0}, | ||
123 | }; | 135 | }; |
124 | 136 | ||
125 | #define PAC7311_JPEG_HEADER_SIZE (sizeof pac7311_jpeg_header) /* (594) */ | 137 | #define PAC7311_JPEG_HEADER_SIZE (sizeof pac7311_jpeg_header) /* (594) */ |
@@ -393,7 +405,7 @@ static void sd_start(struct gspca_dev *gspca_dev) | |||
393 | setcolors(gspca_dev); | 405 | setcolors(gspca_dev); |
394 | 406 | ||
395 | /* set correct resolution */ | 407 | /* set correct resolution */ |
396 | switch (gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].mode) { | 408 | switch (gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv) { |
397 | case 2: /* 160x120 */ | 409 | case 2: /* 160x120 */ |
398 | pac7311_reg_write(dev, 0xff, 0x04); | 410 | pac7311_reg_write(dev, 0xff, 0x04); |
399 | pac7311_reg_write(dev, 0x02, 0x03); | 411 | pac7311_reg_write(dev, 0x02, 0x03); |