Commit a08d2c72 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

[media] pwc: Remove driver specific ioctls

This stems from the v4l1 era, with v4l2 everything can be done with
standardized v4l2 API calls.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent dc8a7e83
......@@ -460,15 +460,6 @@ Who: Jean Delvare <khali@linux-fr.org>
----------------------------
What: Support for driver specific ioctls in the pwc driver (everything
defined in media/pwc-ioctl.h)
When: 3.3
Why: This stems from the v4l1 era, with v4l2 everything can be done with
standardized v4l2 API calls
Who: Hans de Goede <hdegoede@redhat.com>
----------------------------
What: Software emulation of arbritary resolutions in the pwc driver
When: 3.3
Why: The pwc driver claims to support any resolution between 160x120
......
This diff is collapsed.
......@@ -27,7 +27,6 @@
#include "pwc-timon.h"
#include "pwc-kiara.h"
#include "pwc-dec23.h"
#include <media/pwc-ioctl.h>
#include <linux/string.h>
#include <linux/slab.h>
......
......@@ -1058,16 +1058,6 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
pdev->vframes = default_fps;
strcpy(pdev->serial, serial_number);
pdev->features = features;
if (vendor_id == 0x046D && product_id == 0x08B5) {
/* Logitech QuickCam Orbit
The ranges have been determined experimentally; they may differ from cam to cam.
Also, the exact ranges left-right and up-down are different for my cam
*/
pdev->angle_range.pan_min = -7000;
pdev->angle_range.pan_max = 7000;
pdev->angle_range.tilt_min = -3000;
pdev->angle_range.tilt_max = 2500;
}
pwc_construct(pdev); /* set min/max sizes correct */
mutex_init(&pdev->capt_file_lock);
......
......@@ -27,7 +27,7 @@
#ifndef PWC_KIARA_H
#define PWC_KIARA_H
#include <media/pwc-ioctl.h>
#include "pwc.h"
#define PWC_FPS_MAX_KIARA 6
......
......@@ -42,7 +42,7 @@
#ifndef PWC_TIMON_H
#define PWC_TIMON_H
#include <media/pwc-ioctl.h>
#include "pwc.h"
#define PWC_FPS_MAX_TIMON 6
......
......@@ -1122,14 +1122,6 @@ static int pwc_log_status(struct file *file, void *priv)
return 0;
}
static long pwc_default(struct file *file, void *fh, bool valid_prio,
int cmd, void *arg)
{
struct pwc_device *pdev = video_drvdata(file);
return pwc_ioctl(pdev, cmd, arg);
}
const struct v4l2_ioctl_ops pwc_ioctl_ops = {
.vidioc_querycap = pwc_querycap,
.vidioc_enum_input = pwc_enum_input,
......@@ -1148,8 +1140,4 @@ const struct v4l2_ioctl_ops pwc_ioctl_ops = {
.vidioc_log_status = pwc_log_status,
.vidioc_enum_framesizes = pwc_enum_framesizes,
.vidioc_enum_frameintervals = pwc_enum_frameintervals,
.vidioc_default = pwc_default,
};
/* vim: set cino= formatoptions=croql cindent shiftwidth=8 tabstop=8: */
......@@ -45,8 +45,6 @@
#include <linux/input.h>
#endif
#include <media/pwc-ioctl.h>
/* Version block */
#define PWC_VERSION "10.0.15"
#define PWC_NAME "pwc"
......@@ -189,6 +187,30 @@
#define PT_RESET_CONTROL_FORMATTER 0x02
#define PT_STATUS_FORMATTER 0x03
/* Enumeration of image sizes */
#define PSZ_SQCIF 0x00
#define PSZ_QSIF 0x01
#define PSZ_QCIF 0x02
#define PSZ_SIF 0x03
#define PSZ_CIF 0x04
#define PSZ_VGA 0x05
#define PSZ_MAX 6
struct pwc_raw_frame {
__le16 type; /* type of the webcam */
__le16 vbandlength; /* Size of 4 lines compressed (used by the
decompressor) */
__u8 cmd[4]; /* the four byte of the command (in case of
nala, only the first 3 bytes is filled) */
__u8 rawframe[0]; /* frame_size = H / 4 * vbandlength */
} __packed;
/* structure for transferring x & y coordinates */
struct pwc_coord {
int x, y; /* guess what */
int size; /* size, or offset */
};
/* intermediate buffers with raw data from the USB cam */
struct pwc_frame_buf
{
......@@ -269,11 +291,6 @@ struct pwc_device
struct pwc_coord image, view; /* image and viewport size */
struct pwc_coord offset; /* offset of the viewport */
/*** motorized pan/tilt feature */
struct pwc_mpt_range angle_range;
int pan_angle; /* in degrees * 100 */
int tilt_angle; /* absolute angle; 0,0 is home */
#ifdef CONFIG_USB_PWC_INPUT_EVDEV
struct input_dev *button_dev; /* webcam snapshot button input */
char button_phys[64];
......@@ -357,8 +374,6 @@ void pwc_construct(struct pwc_device *pdev);
extern int pwc_set_video_mode(struct pwc_device *pdev, int width, int height,
int frames, int compression);
extern unsigned int pwc_get_fps(struct pwc_device *pdev, unsigned int index, unsigned int size);
extern int pwc_mpt_reset(struct pwc_device *pdev, int flags);
extern int pwc_mpt_set_angle(struct pwc_device *pdev, int pan, int tilt);
extern int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value);
extern int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor);
extern int send_control_msg(struct pwc_device *pdev,
......@@ -377,9 +392,6 @@ int pwc_init_controls(struct pwc_device *pdev);
/* Power down or up the camera; not supported by all models */
extern void pwc_camera_power(struct pwc_device *pdev, int power);
/* Private ioctl()s; see pwc-ioctl.h */
extern long pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg);
extern const struct v4l2_ioctl_ops pwc_ioctl_ops;
/** pwc-uncompress.c */
......
This diff is collapsed.
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