aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/video4linux/meye.txt7
-rw-r--r--drivers/media/video/Kconfig6
-rw-r--r--drivers/media/video/meye.c62
-rw-r--r--drivers/media/video/meye.h2
4 files changed, 38 insertions, 39 deletions
diff --git a/Documentation/video4linux/meye.txt b/Documentation/video4linux/meye.txt
index ecb34160e61d..5e51c59bf2b0 100644
--- a/Documentation/video4linux/meye.txt
+++ b/Documentation/video4linux/meye.txt
@@ -5,10 +5,9 @@ Vaio Picturebook Motion Eye Camera Driver Readme
5 Copyright (C) 2000 Andrew Tridgell <tridge@samba.org> 5 Copyright (C) 2000 Andrew Tridgell <tridge@samba.org>
6 6
7This driver enable the use of video4linux compatible applications with the 7This driver enable the use of video4linux compatible applications with the
8Motion Eye camera. This driver requires the "Sony Vaio Programmable I/O 8Motion Eye camera. This driver requires the "Sony Laptop Extras" driver (which
9Control Device" driver (which can be found in the "Character drivers" 9can be found in the "Misc devices" section of the kernel configuration utility)
10section of the kernel configuration utility) to be compiled and installed 10to be compiled and installed (using its "camera=1" parameter).
11(using its "camera=1" parameter).
12 11
13It can do at maximum 30 fps @ 320x240 or 15 fps @ 640x480. 12It can do at maximum 30 fps @ 320x240 or 15 fps @ 640x480.
14 13
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index 7a6105153f23..ff6aefde10df 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -577,14 +577,14 @@ config VIDEO_ZORAN_AVS6EYES
577 577
578config VIDEO_MEYE 578config VIDEO_MEYE
579 tristate "Sony Vaio Picturebook Motion Eye Video For Linux" 579 tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
580 depends on PCI && SONYPI && VIDEO_V4L1 580 depends on PCI && SONY_LAPTOP && VIDEO_V4L1
581 ---help--- 581 ---help---
582 This is the video4linux driver for the Motion Eye camera found 582 This is the video4linux driver for the Motion Eye camera found
583 in the Vaio Picturebook laptops. Please read the material in 583 in the Vaio Picturebook laptops. Please read the material in
584 <file:Documentation/video4linux/meye.txt> for more information. 584 <file:Documentation/video4linux/meye.txt> for more information.
585 585
586 If you say Y or M here, you need to say Y or M to "Sony Programmable 586 If you say Y or M here, you need to say Y or M to "Sony Laptop
587 I/O Control Device" in the character device section. 587 Extras" in the misc device section.
588 588
589 To compile this driver as a module, choose M here: the 589 To compile this driver as a module, choose M here: the
590 module will be called meye. 590 module will be called meye.
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c
index 98681da5e3b9..664aba8b4d85 100644
--- a/drivers/media/video/meye.c
+++ b/drivers/media/video/meye.c
@@ -925,13 +925,13 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
925 if (p->palette != VIDEO_PALETTE_YUV422 && p->palette != VIDEO_PALETTE_YUYV) 925 if (p->palette != VIDEO_PALETTE_YUV422 && p->palette != VIDEO_PALETTE_YUYV)
926 return -EINVAL; 926 return -EINVAL;
927 mutex_lock(&meye.lock); 927 mutex_lock(&meye.lock);
928 sonypi_camera_command(SONYPI_COMMAND_SETCAMERABRIGHTNESS, 928 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERABRIGHTNESS,
929 p->brightness >> 10); 929 p->brightness >> 10);
930 sonypi_camera_command(SONYPI_COMMAND_SETCAMERAHUE, 930 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAHUE,
931 p->hue >> 10); 931 p->hue >> 10);
932 sonypi_camera_command(SONYPI_COMMAND_SETCAMERACOLOR, 932 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACOLOR,
933 p->colour >> 10); 933 p->colour >> 10);
934 sonypi_camera_command(SONYPI_COMMAND_SETCAMERACONTRAST, 934 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACONTRAST,
935 p->contrast >> 10); 935 p->contrast >> 10);
936 meye.picture = *p; 936 meye.picture = *p;
937 mutex_unlock(&meye.lock); 937 mutex_unlock(&meye.lock);
@@ -1043,11 +1043,11 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
1043 meye.params.quality != jp->quality) 1043 meye.params.quality != jp->quality)
1044 mchip_hic_stop(); /* need restart */ 1044 mchip_hic_stop(); /* need restart */
1045 meye.params = *jp; 1045 meye.params = *jp;
1046 sonypi_camera_command(SONYPI_COMMAND_SETCAMERASHARPNESS, 1046 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERASHARPNESS,
1047 meye.params.sharpness); 1047 meye.params.sharpness);
1048 sonypi_camera_command(SONYPI_COMMAND_SETCAMERAAGC, 1048 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAAGC,
1049 meye.params.agc); 1049 meye.params.agc);
1050 sonypi_camera_command(SONYPI_COMMAND_SETCAMERAPICTURE, 1050 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAPICTURE,
1051 meye.params.picture); 1051 meye.params.picture);
1052 mutex_unlock(&meye.lock); 1052 mutex_unlock(&meye.lock);
1053 break; 1053 break;
@@ -1287,38 +1287,38 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
1287 mutex_lock(&meye.lock); 1287 mutex_lock(&meye.lock);
1288 switch (c->id) { 1288 switch (c->id) {
1289 case V4L2_CID_BRIGHTNESS: 1289 case V4L2_CID_BRIGHTNESS:
1290 sonypi_camera_command( 1290 sony_pic_camera_command(
1291 SONYPI_COMMAND_SETCAMERABRIGHTNESS, c->value); 1291 SONY_PIC_COMMAND_SETCAMERABRIGHTNESS, c->value);
1292 meye.picture.brightness = c->value << 10; 1292 meye.picture.brightness = c->value << 10;
1293 break; 1293 break;
1294 case V4L2_CID_HUE: 1294 case V4L2_CID_HUE:
1295 sonypi_camera_command( 1295 sony_pic_camera_command(
1296 SONYPI_COMMAND_SETCAMERAHUE, c->value); 1296 SONY_PIC_COMMAND_SETCAMERAHUE, c->value);
1297 meye.picture.hue = c->value << 10; 1297 meye.picture.hue = c->value << 10;
1298 break; 1298 break;
1299 case V4L2_CID_CONTRAST: 1299 case V4L2_CID_CONTRAST:
1300 sonypi_camera_command( 1300 sony_pic_camera_command(
1301 SONYPI_COMMAND_SETCAMERACONTRAST, c->value); 1301 SONY_PIC_COMMAND_SETCAMERACONTRAST, c->value);
1302 meye.picture.contrast = c->value << 10; 1302 meye.picture.contrast = c->value << 10;
1303 break; 1303 break;
1304 case V4L2_CID_SATURATION: 1304 case V4L2_CID_SATURATION:
1305 sonypi_camera_command( 1305 sony_pic_camera_command(
1306 SONYPI_COMMAND_SETCAMERACOLOR, c->value); 1306 SONY_PIC_COMMAND_SETCAMERACOLOR, c->value);
1307 meye.picture.colour = c->value << 10; 1307 meye.picture.colour = c->value << 10;
1308 break; 1308 break;
1309 case V4L2_CID_AGC: 1309 case V4L2_CID_AGC:
1310 sonypi_camera_command( 1310 sony_pic_camera_command(
1311 SONYPI_COMMAND_SETCAMERAAGC, c->value); 1311 SONY_PIC_COMMAND_SETCAMERAAGC, c->value);
1312 meye.params.agc = c->value; 1312 meye.params.agc = c->value;
1313 break; 1313 break;
1314 case V4L2_CID_SHARPNESS: 1314 case V4L2_CID_SHARPNESS:
1315 sonypi_camera_command( 1315 sony_pic_camera_command(
1316 SONYPI_COMMAND_SETCAMERASHARPNESS, c->value); 1316 SONY_PIC_COMMAND_SETCAMERASHARPNESS, c->value);
1317 meye.params.sharpness = c->value; 1317 meye.params.sharpness = c->value;
1318 break; 1318 break;
1319 case V4L2_CID_PICTURE: 1319 case V4L2_CID_PICTURE:
1320 sonypi_camera_command( 1320 sony_pic_camera_command(
1321 SONYPI_COMMAND_SETCAMERAPICTURE, c->value); 1321 SONY_PIC_COMMAND_SETCAMERAPICTURE, c->value);
1322 meye.params.picture = c->value; 1322 meye.params.picture = c->value;
1323 break; 1323 break;
1324 case V4L2_CID_JPEGQUAL: 1324 case V4L2_CID_JPEGQUAL:
@@ -1848,7 +1848,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
1848 memcpy(meye.video_dev, &meye_template, sizeof(meye_template)); 1848 memcpy(meye.video_dev, &meye_template, sizeof(meye_template));
1849 meye.video_dev->dev = &meye.mchip_dev->dev; 1849 meye.video_dev->dev = &meye.mchip_dev->dev;
1850 1850
1851 if ((ret = sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 1))) { 1851 if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) {
1852 printk(KERN_ERR "meye: unable to power on the camera\n"); 1852 printk(KERN_ERR "meye: unable to power on the camera\n");
1853 printk(KERN_ERR "meye: did you enable the camera in " 1853 printk(KERN_ERR "meye: did you enable the camera in "
1854 "sonypi using the module options ?\n"); 1854 "sonypi using the module options ?\n");
@@ -1928,13 +1928,13 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
1928 meye.params.picture = 0; 1928 meye.params.picture = 0;
1929 meye.params.framerate = 0; 1929 meye.params.framerate = 0;
1930 1930
1931 sonypi_camera_command(SONYPI_COMMAND_SETCAMERABRIGHTNESS, 32); 1931 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERABRIGHTNESS, 32);
1932 sonypi_camera_command(SONYPI_COMMAND_SETCAMERAHUE, 32); 1932 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAHUE, 32);
1933 sonypi_camera_command(SONYPI_COMMAND_SETCAMERACOLOR, 32); 1933 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACOLOR, 32);
1934 sonypi_camera_command(SONYPI_COMMAND_SETCAMERACONTRAST, 32); 1934 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACONTRAST, 32);
1935 sonypi_camera_command(SONYPI_COMMAND_SETCAMERASHARPNESS, 32); 1935 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERASHARPNESS, 32);
1936 sonypi_camera_command(SONYPI_COMMAND_SETCAMERAPICTURE, 0); 1936 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAPICTURE, 0);
1937 sonypi_camera_command(SONYPI_COMMAND_SETCAMERAAGC, 48); 1937 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAAGC, 48);
1938 1938
1939 printk(KERN_INFO "meye: Motion Eye Camera Driver v%s.\n", 1939 printk(KERN_INFO "meye: Motion Eye Camera Driver v%s.\n",
1940 MEYE_DRIVER_VERSION); 1940 MEYE_DRIVER_VERSION);
@@ -1953,7 +1953,7 @@ outremap:
1953outregions: 1953outregions:
1954 pci_disable_device(meye.mchip_dev); 1954 pci_disable_device(meye.mchip_dev);
1955outenabledev: 1955outenabledev:
1956 sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 0); 1956 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 0);
1957outsonypienable: 1957outsonypienable:
1958 kfifo_free(meye.doneq); 1958 kfifo_free(meye.doneq);
1959outkfifoalloc2: 1959outkfifoalloc2:
@@ -1986,7 +1986,7 @@ static void __devexit meye_remove(struct pci_dev *pcidev)
1986 1986
1987 pci_disable_device(meye.mchip_dev); 1987 pci_disable_device(meye.mchip_dev);
1988 1988
1989 sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 0); 1989 sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 0);
1990 1990
1991 kfifo_free(meye.doneq); 1991 kfifo_free(meye.doneq);
1992 kfifo_free(meye.grabq); 1992 kfifo_free(meye.grabq);
diff --git a/drivers/media/video/meye.h b/drivers/media/video/meye.h
index ea107cb5c845..323d0074120d 100644
--- a/drivers/media/video/meye.h
+++ b/drivers/media/video/meye.h
@@ -255,7 +255,7 @@
255/****************************************************************************/ 255/****************************************************************************/
256 256
257/* Sony Programmable I/O Controller for accessing the camera commands */ 257/* Sony Programmable I/O Controller for accessing the camera commands */
258#include <linux/sonypi.h> 258#include <linux/sony-laptop.h>
259 259
260/* private API definitions */ 260/* private API definitions */
261#include <linux/meye.h> 261#include <linux/meye.h>