diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2009-01-01 20:31:12 +0100 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2009-01-01 20:31:12 +0100 |
commit | 49ca9ac4b90c1edaa71c4c739b6934c1dee0a594 (patch) | |
tree | 998d5ac2a789385656d017225cb134fd435bbf5c /linux/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c | |
parent | 70e0ec035b78cab8338a5b20518bfc1d1307b7ad (diff) | |
parent | 3bdb904852c74d8c0d7c55a17fb9ed559ae1e855 (diff) | |
download | mediapointer-dvb-s2-49ca9ac4b90c1edaa71c4c739b6934c1dee0a594.tar.gz mediapointer-dvb-s2-49ca9ac4b90c1edaa71c4c739b6934c1dee0a594.tar.bz2 |
merge: v4l-dvb
Diffstat (limited to 'linux/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c')
-rw-r--r-- | linux/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c | 61 |
1 files changed, 57 insertions, 4 deletions
diff --git a/linux/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c b/linux/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c index 1ca91f2a6..a204b5891 100644 --- a/linux/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c +++ b/linux/drivers/media/video/gspca/stv06xx/stv06xx_vv6410.c @@ -29,6 +29,59 @@ #include "stv06xx_vv6410.h" +static struct v4l2_pix_format vv6410_mode[] = { + { + 356, + 292, + V4L2_PIX_FMT_SGRBG8, + V4L2_FIELD_NONE, + .sizeimage = 356 * 292, + .bytesperline = 356, + .colorspace = V4L2_COLORSPACE_SRGB, + .priv = 0 + } +}; + +static const struct ctrl vv6410_ctrl[] = { + { + { + .id = V4L2_CID_HFLIP, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "horizontal flip", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 0 + }, + .set = vv6410_set_hflip, + .get = vv6410_get_hflip + }, { + { + .id = V4L2_CID_VFLIP, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .name = "vertical flip", + .minimum = 0, + .maximum = 1, + .step = 1, + .default_value = 0 + }, + .set = vv6410_set_vflip, + .get = vv6410_get_vflip + }, { + { + .id = V4L2_CID_GAIN, + .type = V4L2_CTRL_TYPE_INTEGER, + .name = "analog gain", + .minimum = 0, + .maximum = 15, + .step = 1, + .default_value = 0 + }, + .set = vv6410_set_analog_gain, + .get = vv6410_get_analog_gain + } +}; + static int vv6410_probe(struct sd *sd) { u16 data; @@ -42,10 +95,10 @@ static int vv6410_probe(struct sd *sd) if (data == 0x19) { info("vv6410 sensor detected"); - sd->gspca_dev.cam.cam_mode = stv06xx_sensor_vv6410.modes; - sd->gspca_dev.cam.nmodes = stv06xx_sensor_vv6410.nmodes; - sd->desc.ctrls = stv06xx_sensor_vv6410.ctrls; - sd->desc.nctrls = stv06xx_sensor_vv6410.nctrls; + sd->gspca_dev.cam.cam_mode = vv6410_mode; + sd->gspca_dev.cam.nmodes = ARRAY_SIZE(vv6410_mode); + sd->desc.ctrls = vv6410_ctrl; + sd->desc.nctrls = ARRAY_SIZE(vv6410_ctrl); return 0; } |