diff options
author | Jonathan Corbet <corbet@lwn.net> | 2010-03-18 18:10:18 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-17 23:51:24 -0400 |
commit | a8e68c37c846236499ac05e95af76dff2e9aa1eb (patch) | |
tree | e33529034620e4dbcff84eab526bb04e1f787887 | |
parent | 467142093de1507833a08c50740d74b3b8c8eaca (diff) |
V4L/DVB: ov7670: Always rewrite clkrc when setting format
That makes frame rate configuration persistent.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/ov7670.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/ov7670.c b/drivers/media/video/ov7670.c index 21243303755f..82d37d925eb4 100644 --- a/drivers/media/video/ov7670.c +++ b/drivers/media/video/ov7670.c | |||
@@ -838,8 +838,12 @@ static int ov7670_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt) | |||
838 | * the other parameters or the image looks poor. If we're *not* | 838 | * the other parameters or the image looks poor. If we're *not* |
839 | * doing RGB565, we must not rewrite clkrc or the image looks | 839 | * doing RGB565, we must not rewrite clkrc or the image looks |
840 | * *really* poor. | 840 | * *really* poor. |
841 | * | ||
842 | * (Update) Now that we retain clkrc state, we should be able | ||
843 | * to write it unconditionally, and that will make the frame | ||
844 | * rate persistent too. | ||
841 | */ | 845 | */ |
842 | if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_RGB565 && ret == 0) | 846 | if (ret == 0) |
843 | ret = ov7670_write(sd, REG_CLKRC, info->clkrc); | 847 | ret = ov7670_write(sd, REG_CLKRC, info->clkrc); |
844 | return ret; | 848 | return ret; |
845 | } | 849 | } |