diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-07-05 11:49:20 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 07:17:15 -0300 |
commit | c2446b3eba97243acbe2ad0939a28b5edb97eae7 (patch) | |
tree | f7ff764cf48062c4ef7c243205b85ae73d69763e /drivers/media/video/gspca/pac207.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/pac207.c')
-rw-r--r-- | drivers/media/video/gspca/pac207.c | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/video/gspca/pac207.c index ab83d7b6934..b580af92d23 100644 --- a/drivers/media/video/gspca/pac207.c +++ b/drivers/media/video/gspca/pac207.c @@ -27,8 +27,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("Hans de Goede <j.w.r.degoede@hhs.nl>"); MODULE_DESCRIPTION("Pixart PAC207"); @@ -157,9 +157,18 @@ static struct ctrl sd_ctrls[] = { }, }; -static struct cam_mode sif_mode[] = { - {V4L2_PIX_FMT_PAC207, 176, 144, 1}, - {V4L2_PIX_FMT_PAC207, 352, 288, 0}, +static struct v4l2_pix_format sif_mode[] = { + {176, 144, V4L2_PIX_FMT_PAC207, V4L2_FIELD_NONE, + .bytesperline = 176, + .sizeimage = (176 + 2) * 144, + /* uncompressed, add 2 bytes / line for line header */ + .colorspace = V4L2_COLORSPACE_SRGB, + .priv = 1}, + {352, 288, V4L2_PIX_FMT_PAC207, V4L2_FIELD_NONE, + .bytesperline = 352, + .sizeimage = 352 * 288 / 2, /* compressed */ + .colorspace = V4L2_COLORSPACE_SRGB, + .priv = 0}, }; static const __u8 pac207_sensor_init[][8] = { @@ -346,19 +355,6 @@ static void sd_close(struct gspca_dev *gspca_dev) { } -static int sd_get_buff_size_op(struct gspca_dev *gspca_dev, int mode) -{ - switch (gspca_dev->cam.cam_mode[mode].width) { - case 176: /* 176x144 */ - /* uncompressed, add 2 bytes / line for line header */ - return (176 + 2) * 144; - case 352: /* 352x288 */ - /* compressed */ - return 352 * 288 / 2; - } - return -EIO; /* should never happen */ -} - /* auto gain and exposure algorithm based on the knee algorithm described here: * <http://ytse.tricolour.net/docs/LowLightOptimization.html> */ static void pac207_do_auto_gain(struct gspca_dev *gspca_dev) @@ -632,7 +628,6 @@ static const struct sd_desc sd_desc = { .close = sd_close, .dq_callback = pac207_do_auto_gain, .pkt_scan = sd_pkt_scan, - .get_buff_size = sd_get_buff_size_op, }; /* -- module initialisation -- */ |