Commit 873ecd8f authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB: cpia2: remove V4L1 support from this driver

V4L1 is deprecated and will be removed completely soon.
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 401e5f8d
config VIDEO_CPIA2
tristate "CPiA2 Video For Linux"
depends on VIDEO_DEV && USB && VIDEO_V4L1
depends on VIDEO_DEV && USB && VIDEO_V4L2
---help---
This is the video4linux driver for cameras based on Vision's CPiA2
(Colour Processor Interface ASIC), such as the Digital Blue QX5
......
......@@ -32,7 +32,7 @@
#define __CPIA2_H__
#include <linux/version.h>
#include <linux/videodev.h>
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <linux/usb.h>
#include <linux/poll.h>
......@@ -43,7 +43,7 @@
/* define for verbose debug output */
//#define _CPIA2_DEBUG_
#define CPIA2_MAJ_VER 2
#define CPIA2_MAJ_VER 3
#define CPIA2_MIN_VER 0
#define CPIA2_PATCH_VER 0
......@@ -396,8 +396,8 @@ struct camera_data {
/* v4l */
int video_size; /* VIDEO_SIZE_ */
struct video_device *vdev; /* v4l videodev */
struct video_picture vp; /* v4l camera settings */
struct video_window vw; /* v4l capture area */
u32 width;
u32 height; /* Its size */
__u32 pixelformat; /* Format fourcc */
/* USB */
......
......@@ -1058,44 +1058,44 @@ static int set_vw_size(struct camera_data *cam, int size)
DBG("Setting size to VGA\n");
cam->params.roi.width = STV_IMAGE_VGA_COLS;
cam->params.roi.height = STV_IMAGE_VGA_ROWS;
cam->vw.width = STV_IMAGE_VGA_COLS;
cam->vw.height = STV_IMAGE_VGA_ROWS;
cam->width = STV_IMAGE_VGA_COLS;
cam->height = STV_IMAGE_VGA_ROWS;
break;
case VIDEOSIZE_CIF:
DBG("Setting size to CIF\n");
cam->params.roi.width = STV_IMAGE_CIF_COLS;
cam->params.roi.height = STV_IMAGE_CIF_ROWS;
cam->vw.width = STV_IMAGE_CIF_COLS;
cam->vw.height = STV_IMAGE_CIF_ROWS;
cam->width = STV_IMAGE_CIF_COLS;
cam->height = STV_IMAGE_CIF_ROWS;
break;
case VIDEOSIZE_QVGA:
DBG("Setting size to QVGA\n");
cam->params.roi.width = STV_IMAGE_QVGA_COLS;
cam->params.roi.height = STV_IMAGE_QVGA_ROWS;
cam->vw.width = STV_IMAGE_QVGA_COLS;
cam->vw.height = STV_IMAGE_QVGA_ROWS;
cam->width = STV_IMAGE_QVGA_COLS;
cam->height = STV_IMAGE_QVGA_ROWS;
break;
case VIDEOSIZE_288_216:
cam->params.roi.width = 288;
cam->params.roi.height = 216;
cam->vw.width = 288;
cam->vw.height = 216;
cam->width = 288;
cam->height = 216;
break;
case VIDEOSIZE_256_192:
cam->vw.width = 256;
cam->vw.height = 192;
cam->width = 256;
cam->height = 192;
cam->params.roi.width = 256;
cam->params.roi.height = 192;
break;
case VIDEOSIZE_224_168:
cam->vw.width = 224;
cam->vw.height = 168;
cam->width = 224;
cam->height = 168;
cam->params.roi.width = 224;
cam->params.roi.height = 168;
break;
case VIDEOSIZE_192_144:
cam->vw.width = 192;
cam->vw.height = 144;
cam->width = 192;
cam->height = 144;
cam->params.roi.width = 192;
cam->params.roi.height = 144;
break;
......@@ -1103,8 +1103,8 @@ static int set_vw_size(struct camera_data *cam, int size)
DBG("Setting size to QCIF\n");
cam->params.roi.width = STV_IMAGE_QCIF_COLS;
cam->params.roi.height = STV_IMAGE_QCIF_ROWS;
cam->vw.width = STV_IMAGE_QCIF_COLS;
cam->vw.height = STV_IMAGE_QCIF_ROWS;
cam->width = STV_IMAGE_QCIF_COLS;
cam->height = STV_IMAGE_QCIF_ROWS;
break;
default:
retval = -EINVAL;
......@@ -2224,23 +2224,8 @@ static void reset_camera_struct(struct camera_data *cam)
cam->params.roi.height = STV_IMAGE_CIF_ROWS;
}
/***
* Fill in the v4l structures. video_cap is filled in inside the VIDIOCCAP
* Ioctl. Here, just do the window and picture stucts.
***/
cam->vp.palette = (u16) VIDEO_PALETTE_RGB24; /* Is this right? */
cam->vp.brightness = (u16) cam->params.color_params.brightness * 256;
cam->vp.colour = (u16) cam->params.color_params.saturation * 256;
cam->vp.contrast = (u16) cam->params.color_params.contrast * 256;
cam->vw.x = 0;
cam->vw.y = 0;
cam->vw.width = cam->params.roi.width;
cam->vw.height = cam->params.roi.height;
cam->vw.flags = 0;
cam->vw.clipcount = 0;
return;
cam->width = cam->params.roi.width;
cam->height = cam->params.roi.height;
}
/******************************************************************************
......
This diff is collapsed.
......@@ -29,14 +29,14 @@
#ifndef CPIA2_DEV_HEADER
#define CPIA2_DEV_HEADER
#include <linux/videodev.h>
#include <linux/videodev2.h>
/***
* The following defines are ioctl numbers based on video4linux private ioctls,
* which can range from 192 (BASE_VIDIOCPRIVATE) to 255. All of these take int
* args
*/
#define CPIA2_IOC_SET_GPIO _IOW('v', BASE_VIDIOCPRIVATE + 17, __u32)
#define CPIA2_IOC_SET_GPIO _IOW('v', BASE_VIDIOC_PRIVATE + 17, __u32)
/* V4L2 driver specific controls */
#define CPIA2_CID_TARGET_KB (V4L2_CID_PRIVATE_BASE+0)
......
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