diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-07-05 13:49:20 +0200 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2008-07-05 13:49:20 +0200 |
commit | 0809b225fb8954eecc82e6e05e32dbb462c06813 (patch) | |
tree | ba831382bd9eb4b3c5ec09fabfc8b119dced5f1a /linux/drivers/media/video/gspca/zc3xx.c | |
parent | 2b4e859c63beadbbf08e02cc99bdb91f75b1dd6f (diff) | |
download | mediapointer-dvb-s2-0809b225fb8954eecc82e6e05e32dbb462c06813.tar.gz mediapointer-dvb-s2-0809b225fb8954eecc82e6e05e32dbb462c06813.tar.bz2 |
gspca: v4l2_pix_format in each subdriver.
From: Jean-Francois Moine <moinejf@free.fr>
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>
Diffstat (limited to 'linux/drivers/media/video/gspca/zc3xx.c')
-rw-r--r-- | linux/drivers/media/video/gspca/zc3xx.c | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/linux/drivers/media/video/gspca/zc3xx.c b/linux/drivers/media/video/gspca/zc3xx.c index 6c1a0af9f..72ae1e006 100644 --- a/linux/drivers/media/video/gspca/zc3xx.c +++ b/linux/drivers/media/video/gspca/zc3xx.c @@ -24,8 +24,8 @@ #include "gspca.h" -#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 4) -static const char version[] = "2.1.4"; +#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 5) +static const char version[] = "2.1.5"; MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>, " "Serge A. Suchkov <Serge.A.S@tochka.ru>"); @@ -173,14 +173,30 @@ static struct ctrl sd_ctrls[] = { }, }; -static struct cam_mode vga_mode[] = { - {V4L2_PIX_FMT_JPEG, 320, 240, 1}, - {V4L2_PIX_FMT_JPEG, 640, 480, 0}, +static struct v4l2_pix_format vga_mode[] = { + {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, + .bytesperline = 320, + .sizeimage = 320 * 240 * 3 / 8 + 590, + .colorspace = V4L2_COLORSPACE_JPEG, + .priv = 1}, + {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, + .bytesperline = 640, + .sizeimage = 640 * 480 * 3 / 8 + 590, + .colorspace = V4L2_COLORSPACE_JPEG, + .priv = 0}, }; -static struct cam_mode sif_mode[] = { - {V4L2_PIX_FMT_JPEG, 176, 144, 1}, - {V4L2_PIX_FMT_JPEG, 352, 288, 0}, +static struct v4l2_pix_format sif_mode[] = { + {176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, + .bytesperline = 176, + .sizeimage = 176 * 144 * 3 / 8 + 590, + .colorspace = V4L2_COLORSPACE_JPEG, + .priv = 1}, + {352, 288, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, + .bytesperline = 352, + .sizeimage = 352 * 288 * 3 / 8 + 590, + .colorspace = V4L2_COLORSPACE_JPEG, + .priv = 0}, }; /* usb exchanges */ @@ -6606,7 +6622,7 @@ static int setlightfreq(struct gspca_dev *gspca_dev) }; i = sd->lightfreq * 2; - mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].mode; + mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv; if (!mode) i++; /* 640x480 */ zc3_freq = freq_tb[(int) sd->sensor][i]; @@ -7174,7 +7190,7 @@ static void sd_start(struct gspca_dev *gspca_dev) /* 16 */ }; - mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].mode; + mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv; zc3_init = init_tb[(int) sd->sensor][mode]; switch (sd->sensor) { case SENSOR_HV7131B: |