diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-28 19:57:21 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-28 19:57:21 -0300 |
commit | 5cc5c2fb8cd1546a22afb5cbeb9ac6130247feb8 (patch) | |
tree | e736794602bbeeb144d64b844f30bcfb91648120 /linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c | |
parent | b254ef22ff520250431995106e98ce08a9cd0af2 (diff) | |
parent | 747dc9fdc6b6205f3b51f9e11f1b0de7ce9db90a (diff) | |
download | mediapointer-dvb-s2-5cc5c2fb8cd1546a22afb5cbeb9ac6130247feb8.tar.gz mediapointer-dvb-s2-5cc5c2fb8cd1546a22afb5cbeb9ac6130247feb8.tar.bz2 |
merge: http://linuxtv.org/hg/~eandren/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c')
-rw-r--r-- | linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c b/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c index 241108c78..a9780dfc7 100644 --- a/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c +++ b/linux/drivers/media/video/gspca/m5602/m5602_mt9m111.c @@ -36,6 +36,7 @@ static int mt9m111_get_red_balance(struct gspca_dev *gspca_dev, __s32 *val); static int mt9m111_set_red_balance(struct gspca_dev *gspca_dev, __s32 val); static struct v4l2_pix_format mt9m111_modes[] = { +#if 0 { 320, 240, @@ -45,7 +46,9 @@ static struct v4l2_pix_format mt9m111_modes[] = { .bytesperline = 320, .colorspace = V4L2_COLORSPACE_SRGB, .priv = 0 - }, { + }, +#endif + { 640, 480, V4L2_PIX_FMT_SBGGR8, @@ -67,7 +70,7 @@ const static struct ctrl mt9m111_ctrls[] = { .minimum = 0, .maximum = 1, .step = 1, - .default_value = 1 + .default_value = 0 }, .set = mt9m111_set_vflip, .get = mt9m111_get_vflip @@ -81,7 +84,7 @@ const static struct ctrl mt9m111_ctrls[] = { .minimum = 0, .maximum = 1, .step = 1, - .default_value = 1 + .default_value = 0 }, .set = mt9m111_set_hflip, .get = mt9m111_get_hflip @@ -95,7 +98,7 @@ const static struct ctrl mt9m111_ctrls[] = { .minimum = 0, .maximum = (INITIAL_MAX_GAIN - 1) * 2 * 2 * 2, .step = 1, - .default_value = DEFAULT_GAIN, + .default_value = MT9M111_DEFAULT_GAIN, .flags = V4L2_CTRL_FLAG_SLIDER }, .set = mt9m111_set_gain, @@ -391,6 +394,9 @@ static int mt9m111_set_vflip(struct gspca_dev *gspca_dev, __s32 val) sensor_settings[VFLIP_IDX] = val; + /* The mt9m111 is flipped by default */ + val = !val; + /* Set the correct page map */ err = m5602_write_sensor(sd, MT9M111_PAGE_MAP, data, 2); if (err < 0) @@ -427,6 +433,10 @@ static int mt9m111_set_hflip(struct gspca_dev *gspca_dev, __s32 val) PDEBUG(D_V4L2, "Set horizontal flip to %d", val); sensor_settings[HFLIP_IDX] = val; + + /* The mt9m111 is flipped by default */ + val = !val; + /* Set the correct page map */ err = m5602_write_sensor(sd, MT9M111_PAGE_MAP, data, 2); if (err < 0) |