Commit cbefb762 authored by malattia@linux.it's avatar malattia@linux.it Committed by Len Brown

meye: make meye use sony-laptop instead of sonypi

Change sonypi_camera_command() calls to sony_pic_camera_command() and use
the renamed macros.
Signed-off-by: default avatarMattia Dongili <malattia@linux.it>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 1ce82c14
...@@ -5,10 +5,9 @@ Vaio Picturebook Motion Eye Camera Driver Readme ...@@ -5,10 +5,9 @@ Vaio Picturebook Motion Eye Camera Driver Readme
Copyright (C) 2000 Andrew Tridgell <tridge@samba.org> Copyright (C) 2000 Andrew Tridgell <tridge@samba.org>
This driver enable the use of video4linux compatible applications with the This driver enable the use of video4linux compatible applications with the
Motion Eye camera. This driver requires the "Sony Vaio Programmable I/O Motion Eye camera. This driver requires the "Sony Laptop Extras" driver (which
Control Device" driver (which can be found in the "Character drivers" can be found in the "Misc devices" section of the kernel configuration utility)
section of the kernel configuration utility) to be compiled and installed to be compiled and installed (using its "camera=1" parameter).
(using its "camera=1" parameter).
It can do at maximum 30 fps @ 320x240 or 15 fps @ 640x480. It can do at maximum 30 fps @ 320x240 or 15 fps @ 640x480.
......
...@@ -577,14 +577,14 @@ config VIDEO_ZORAN_AVS6EYES ...@@ -577,14 +577,14 @@ config VIDEO_ZORAN_AVS6EYES
config VIDEO_MEYE config VIDEO_MEYE
tristate "Sony Vaio Picturebook Motion Eye Video For Linux" tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
depends on PCI && SONYPI && VIDEO_V4L1 depends on PCI && SONY_LAPTOP && VIDEO_V4L1
---help--- ---help---
This is the video4linux driver for the Motion Eye camera found This is the video4linux driver for the Motion Eye camera found
in the Vaio Picturebook laptops. Please read the material in in the Vaio Picturebook laptops. Please read the material in
<file:Documentation/video4linux/meye.txt> for more information. <file:Documentation/video4linux/meye.txt> for more information.
If you say Y or M here, you need to say Y or M to "Sony Programmable If you say Y or M here, you need to say Y or M to "Sony Laptop
I/O Control Device" in the character device section. Extras" in the misc device section.
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called meye. module will be called meye.
......
...@@ -925,13 +925,13 @@ static int meye_do_ioctl(struct inode *inode, struct file *file, ...@@ -925,13 +925,13 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
if (p->palette != VIDEO_PALETTE_YUV422 && p->palette != VIDEO_PALETTE_YUYV) if (p->palette != VIDEO_PALETTE_YUV422 && p->palette != VIDEO_PALETTE_YUYV)
return -EINVAL; return -EINVAL;
mutex_lock(&meye.lock); mutex_lock(&meye.lock);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERABRIGHTNESS, sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERABRIGHTNESS,
p->brightness >> 10); p->brightness >> 10);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERAHUE, sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAHUE,
p->hue >> 10); p->hue >> 10);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERACOLOR, sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACOLOR,
p->colour >> 10); p->colour >> 10);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERACONTRAST, sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACONTRAST,
p->contrast >> 10); p->contrast >> 10);
meye.picture = *p; meye.picture = *p;
mutex_unlock(&meye.lock); mutex_unlock(&meye.lock);
...@@ -1043,11 +1043,11 @@ static int meye_do_ioctl(struct inode *inode, struct file *file, ...@@ -1043,11 +1043,11 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
meye.params.quality != jp->quality) meye.params.quality != jp->quality)
mchip_hic_stop(); /* need restart */ mchip_hic_stop(); /* need restart */
meye.params = *jp; meye.params = *jp;
sonypi_camera_command(SONYPI_COMMAND_SETCAMERASHARPNESS, sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERASHARPNESS,
meye.params.sharpness); meye.params.sharpness);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERAAGC, sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAAGC,
meye.params.agc); meye.params.agc);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERAPICTURE, sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAPICTURE,
meye.params.picture); meye.params.picture);
mutex_unlock(&meye.lock); mutex_unlock(&meye.lock);
break; break;
...@@ -1287,38 +1287,38 @@ static int meye_do_ioctl(struct inode *inode, struct file *file, ...@@ -1287,38 +1287,38 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
mutex_lock(&meye.lock); mutex_lock(&meye.lock);
switch (c->id) { switch (c->id) {
case V4L2_CID_BRIGHTNESS: case V4L2_CID_BRIGHTNESS:
sonypi_camera_command( sony_pic_camera_command(
SONYPI_COMMAND_SETCAMERABRIGHTNESS, c->value); SONY_PIC_COMMAND_SETCAMERABRIGHTNESS, c->value);
meye.picture.brightness = c->value << 10; meye.picture.brightness = c->value << 10;
break; break;
case V4L2_CID_HUE: case V4L2_CID_HUE:
sonypi_camera_command( sony_pic_camera_command(
SONYPI_COMMAND_SETCAMERAHUE, c->value); SONY_PIC_COMMAND_SETCAMERAHUE, c->value);
meye.picture.hue = c->value << 10; meye.picture.hue = c->value << 10;
break; break;
case V4L2_CID_CONTRAST: case V4L2_CID_CONTRAST:
sonypi_camera_command( sony_pic_camera_command(
SONYPI_COMMAND_SETCAMERACONTRAST, c->value); SONY_PIC_COMMAND_SETCAMERACONTRAST, c->value);
meye.picture.contrast = c->value << 10; meye.picture.contrast = c->value << 10;
break; break;
case V4L2_CID_SATURATION: case V4L2_CID_SATURATION:
sonypi_camera_command( sony_pic_camera_command(
SONYPI_COMMAND_SETCAMERACOLOR, c->value); SONY_PIC_COMMAND_SETCAMERACOLOR, c->value);
meye.picture.colour = c->value << 10; meye.picture.colour = c->value << 10;
break; break;
case V4L2_CID_AGC: case V4L2_CID_AGC:
sonypi_camera_command( sony_pic_camera_command(
SONYPI_COMMAND_SETCAMERAAGC, c->value); SONY_PIC_COMMAND_SETCAMERAAGC, c->value);
meye.params.agc = c->value; meye.params.agc = c->value;
break; break;
case V4L2_CID_SHARPNESS: case V4L2_CID_SHARPNESS:
sonypi_camera_command( sony_pic_camera_command(
SONYPI_COMMAND_SETCAMERASHARPNESS, c->value); SONY_PIC_COMMAND_SETCAMERASHARPNESS, c->value);
meye.params.sharpness = c->value; meye.params.sharpness = c->value;
break; break;
case V4L2_CID_PICTURE: case V4L2_CID_PICTURE:
sonypi_camera_command( sony_pic_camera_command(
SONYPI_COMMAND_SETCAMERAPICTURE, c->value); SONY_PIC_COMMAND_SETCAMERAPICTURE, c->value);
meye.params.picture = c->value; meye.params.picture = c->value;
break; break;
case V4L2_CID_JPEGQUAL: case V4L2_CID_JPEGQUAL:
...@@ -1848,7 +1848,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev, ...@@ -1848,7 +1848,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
memcpy(meye.video_dev, &meye_template, sizeof(meye_template)); memcpy(meye.video_dev, &meye_template, sizeof(meye_template));
meye.video_dev->dev = &meye.mchip_dev->dev; meye.video_dev->dev = &meye.mchip_dev->dev;
if ((ret = sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 1))) { if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) {
printk(KERN_ERR "meye: unable to power on the camera\n"); printk(KERN_ERR "meye: unable to power on the camera\n");
printk(KERN_ERR "meye: did you enable the camera in " printk(KERN_ERR "meye: did you enable the camera in "
"sonypi using the module options ?\n"); "sonypi using the module options ?\n");
...@@ -1928,13 +1928,13 @@ static int __devinit meye_probe(struct pci_dev *pcidev, ...@@ -1928,13 +1928,13 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
meye.params.picture = 0; meye.params.picture = 0;
meye.params.framerate = 0; meye.params.framerate = 0;
sonypi_camera_command(SONYPI_COMMAND_SETCAMERABRIGHTNESS, 32); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERABRIGHTNESS, 32);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERAHUE, 32); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAHUE, 32);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERACOLOR, 32); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACOLOR, 32);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERACONTRAST, 32); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACONTRAST, 32);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERASHARPNESS, 32); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERASHARPNESS, 32);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERAPICTURE, 0); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAPICTURE, 0);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERAAGC, 48); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAAGC, 48);
printk(KERN_INFO "meye: Motion Eye Camera Driver v%s.\n", printk(KERN_INFO "meye: Motion Eye Camera Driver v%s.\n",
MEYE_DRIVER_VERSION); MEYE_DRIVER_VERSION);
...@@ -1953,7 +1953,7 @@ outremap: ...@@ -1953,7 +1953,7 @@ outremap:
outregions: outregions:
pci_disable_device(meye.mchip_dev); pci_disable_device(meye.mchip_dev);
outenabledev: outenabledev:
sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 0); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 0);
outsonypienable: outsonypienable:
kfifo_free(meye.doneq); kfifo_free(meye.doneq);
outkfifoalloc2: outkfifoalloc2:
...@@ -1986,7 +1986,7 @@ static void __devexit meye_remove(struct pci_dev *pcidev) ...@@ -1986,7 +1986,7 @@ static void __devexit meye_remove(struct pci_dev *pcidev)
pci_disable_device(meye.mchip_dev); pci_disable_device(meye.mchip_dev);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 0); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 0);
kfifo_free(meye.doneq); kfifo_free(meye.doneq);
kfifo_free(meye.grabq); kfifo_free(meye.grabq);
......
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
/****************************************************************************/ /****************************************************************************/
/* Sony Programmable I/O Controller for accessing the camera commands */ /* Sony Programmable I/O Controller for accessing the camera commands */
#include <linux/sonypi.h> #include <linux/sony-laptop.h>
/* private API definitions */ /* private API definitions */
#include <linux/meye.h> #include <linux/meye.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment