From: Stelian Pop <stelian@popies.net>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
Subject: [PATCH 12/12] meye: cache the camera settings in the driver
Date: Thu, 4 Nov 2004 12:18:57 +0100 [thread overview]
Message-ID: <20041104111856.GR3472@crusoe.alcove-fr> (raw)
In-Reply-To: <20041104111231.GF3472@crusoe.alcove-fr>
===================================================================
ChangeSet@1.2352, 2004-11-04 11:50:37+01:00, stelian@popies.net
meye: retrieving the current settings from the camera does not work
very well, we need to cache the values in the driver
Signed-off-by: Stelian Pop <stelian@popies.net>
===================================================================
meye.c | 31 +++++++++++++++----------------
1 files changed, 15 insertions(+), 16 deletions(-)
===================================================================
diff -Nru a/drivers/media/video/meye.c b/drivers/media/video/meye.c
--- a/drivers/media/video/meye.c 2004-11-04 11:52:38 +01:00
+++ b/drivers/media/video/meye.c 2004-11-04 11:52:38 +01:00
@@ -1281,34 +1281,40 @@
down(&meye.lock);
switch (c->id) {
-
case V4L2_CID_BRIGHTNESS:
sonypi_camera_command(
SONYPI_COMMAND_SETCAMERABRIGHTNESS, c->value);
+ meye.picture.brightness = c->value << 10;
break;
case V4L2_CID_HUE:
sonypi_camera_command(
SONYPI_COMMAND_SETCAMERAHUE, c->value);
+ meye.picture.hue = c->value << 10;
break;
case V4L2_CID_CONTRAST:
sonypi_camera_command(
- SONYPI_COMMAND_SETCAMERACOLOR, c->value);
+ SONYPI_COMMAND_SETCAMERACONTRAST, c->value);
+ meye.picture.contrast = c->value << 10;
break;
case V4L2_CID_SATURATION:
sonypi_camera_command(
SONYPI_COMMAND_SETCAMERACOLOR, c->value);
+ meye.picture.colour = c->value << 10;
break;
case V4L2_CID_AGC:
sonypi_camera_command(
SONYPI_COMMAND_SETCAMERAAGC, c->value);
+ meye.params.agc = c->value;
break;
case V4L2_CID_SHARPNESS:
sonypi_camera_command(
SONYPI_COMMAND_SETCAMERASHARPNESS, c->value);
+ meye.params.sharpness = c->value;
break;
case V4L2_CID_PICTURE:
sonypi_camera_command(
SONYPI_COMMAND_SETCAMERAPICTURE, c->value);
+ meye.params.picture = c->value;
break;
case V4L2_CID_JPEGQUAL:
meye.params.quality = c->value;
@@ -1330,32 +1336,25 @@
down(&meye.lock);
switch (c->id) {
case V4L2_CID_BRIGHTNESS:
- c->value = sonypi_camera_command(
- SONYPI_COMMAND_GETCAMERABRIGHTNESS, 0);
+ c->value = meye.picture.brightness >> 10;
break;
case V4L2_CID_HUE:
- c->value = sonypi_camera_command(
- SONYPI_COMMAND_GETCAMERAHUE, 0);
+ c->value = meye.picture.hue >> 10;
break;
case V4L2_CID_CONTRAST:
- c->value = sonypi_camera_command(
- SONYPI_COMMAND_GETCAMERACOLOR, 0);
+ c->value = meye.picture.contrast >> 10;
break;
case V4L2_CID_SATURATION:
- c->value = sonypi_camera_command(
- SONYPI_COMMAND_GETCAMERACOLOR, 0);
+ c->value = meye.picture.colour >> 10;
break;
case V4L2_CID_AGC:
- c->value = sonypi_camera_command(
- SONYPI_COMMAND_GETCAMERAAGC, 0);
+ c->value = meye.params.agc;
break;
case V4L2_CID_SHARPNESS:
- c->value = sonypi_camera_command(
- SONYPI_COMMAND_GETCAMERASHARPNESS, 0);
+ c->value = meye.params.sharpness;
break;
case V4L2_CID_PICTURE:
- c->value = sonypi_camera_command(
- SONYPI_COMMAND_GETCAMERAPICTURE, 0);
+ c->value = meye.params.picture;
break;
case V4L2_CID_JPEGQUAL:
c->value = meye.params.quality;
next prev parent reply other threads:[~2004-11-04 11:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-04 11:12 [PATCH 0/12] meye driver update Stelian Pop
2004-11-04 11:13 ` [PATCH 1/12] meye: module related fixes Stelian Pop
2004-11-04 11:13 ` [PATCH 2/12] meye: replace homebrew queue with kfifo Stelian Pop
2004-11-04 11:14 ` [PATCH 3/12] meye: picture depth is in bits not in bytes Stelian Pop
2004-11-04 11:14 ` [PATCH 4/12] meye: do lock properly when waiting for buffers Stelian Pop
2004-11-04 11:15 ` [PATCH 5/12] meye: implement non blocking access using poll() Stelian Pop
2004-11-04 11:15 ` [PATCH 6/12] meye: cleanup init/exit paths Stelian Pop
2004-11-04 11:16 ` [PATCH 7/12] meye: the driver is no longer experimental and depends on PCI Stelian Pop
2004-11-04 11:41 ` Christoph Hellwig
2004-11-04 11:49 ` Stelian Pop
2004-11-04 12:23 ` Arjan van de Ven
2004-11-04 12:32 ` Stelian Pop
2004-11-04 13:16 ` Arjan van de Ven
2004-11-04 14:09 ` Stelian Pop
2004-11-04 11:16 ` [PATCH 8/12] meye: module parameters documentation fixes Stelian Pop
2004-11-04 11:17 ` [PATCH 9/12] meye: add v4l2 support Stelian Pop
2004-11-04 11:17 ` [PATCH 10/12] meye: whitespace and coding style cleanups Stelian Pop
2004-11-04 11:18 ` [PATCH 11/12] meye: bump up the version number Stelian Pop
2004-11-04 11:18 ` Stelian Pop [this message]
2004-11-04 12:25 ` [PATCH 0/12] meye driver update Emmanuel Fleury
2004-11-04 12:36 ` Stelian Pop
2004-11-04 21:19 ` meye bug? (was: meye driver update) Roland Mas
2004-11-04 21:42 ` Roland Mas
2004-11-04 21:58 ` Stelian Pop
2004-11-05 11:18 ` meye bug? No Roland Mas
2004-11-05 22:25 ` Stelian Pop
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041104111856.GR3472@crusoe.alcove-fr \
--to=stelian@popies.net \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®