diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-04 07:15:11 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-05 13:30:04 -0400 |
commit | 6934e6fface7b7d5fe7e578c3f43cbe8f23af2d4 (patch) | |
tree | 72d47c04db9252034db2500e402dc638bae2355f /drivers/media/video/mt9v011.c | |
parent | 27fe4a30a211a0561c72b0e519997e91fa91c452 (diff) |
V4L/DVB (12174): mt9v011: let's stick with datasheet values where it works
The original driver for Silvercrest cameras were using some values that
are different from what datasheet says. As result, it was taken very
less snapshots per second than expected.
A test with the datasheet values showed that they work fine and give a
better frame rate. So, let's stick with datasheet values.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/mt9v011.c')
-rw-r--r-- | drivers/media/video/mt9v011.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/media/video/mt9v011.c b/drivers/media/video/mt9v011.c index 3ed9511da8ed..1fe8fc9183a7 100644 --- a/drivers/media/video/mt9v011.c +++ b/drivers/media/video/mt9v011.c | |||
@@ -124,24 +124,12 @@ static const struct i2c_reg_value mt9v011_init_default[] = { | |||
124 | { R0D_MT9V011_RESET, 0x0001 }, | 124 | { R0D_MT9V011_RESET, 0x0001 }, |
125 | { R0D_MT9V011_RESET, 0x0000 }, | 125 | { R0D_MT9V011_RESET, 0x0000 }, |
126 | 126 | ||
127 | { R09_MT9V011_SHUTTER_WIDTH, 0x0418 }, | ||
128 | { R0A_MT9V011_CLK_SPEED, 0x0000 }, | ||
129 | { R0C_MT9V011_SHUTTER_DELAY, 0x0000 }, | 127 | { R0C_MT9V011_SHUTTER_DELAY, 0x0000 }, |
128 | { R09_MT9V011_SHUTTER_WIDTH, 0x1fc }, | ||
129 | |||
130 | { R0A_MT9V011_CLK_SPEED, 0x0000 }, | ||
130 | { R1E_MT9V011_DIGITAL_ZOOM, 0x0000 }, | 131 | { R1E_MT9V011_DIGITAL_ZOOM, 0x0000 }, |
131 | { R20_MT9V011_READ_MODE, 0x1100 }, | 132 | { R20_MT9V011_READ_MODE, 0x1000 }, |
132 | |||
133 | /* | ||
134 | * Those registers are not docummented at the datasheet. | ||
135 | * However, the original driver initializes them | ||
136 | */ | ||
137 | { 0x30, 0x0005 }, | ||
138 | { 0x34, 0x0100 }, | ||
139 | { 0x3d, 0x068f }, | ||
140 | { 0x40, 0x01e0 }, | ||
141 | { 0x52, 0x0100 }, | ||
142 | { 0x58, 0x0038 }, /* Datasheet default 0x0078 */ | ||
143 | { 0x59, 0x0723 }, /* Datasheet default 0x0703 */ | ||
144 | { 0x62, 0x041a }, /* Datasheet default 0x0418 */ | ||
145 | 133 | ||
146 | { R07_MT9V011_OUT_CTRL, 0x000a }, /* chip enable */ | 134 | { R07_MT9V011_OUT_CTRL, 0x000a }, /* chip enable */ |
147 | }; | 135 | }; |
@@ -177,6 +165,9 @@ static void set_res(struct v4l2_subdev *sd) | |||
177 | * hblank and vblank should be adjusted, in order to warrant that | 165 | * hblank and vblank should be adjusted, in order to warrant that |
178 | * we'll preserve the line timings for 30 fps, no matter what resolution | 166 | * we'll preserve the line timings for 30 fps, no matter what resolution |
179 | * is selected. | 167 | * is selected. |
168 | * NOTE: datasheet says that width (and height) should be filled with | ||
169 | * width-1. However, this doesn't work, since one pixel per line will | ||
170 | * be missing. | ||
180 | */ | 171 | */ |
181 | 172 | ||
182 | hstart = 14 + (640 - core->width) / 2; | 173 | hstart = 14 + (640 - core->width) / 2; |