Commit d7b09335 authored by Mark W. McClelland's avatar Mark W. McClelland Committed by Linus Torvalds

Update USB ov511 driver to version 1.53

parent cf16aaca
...@@ -182,9 +182,9 @@ MODULE PARAMETERS: ...@@ -182,9 +182,9 @@ MODULE PARAMETERS:
DEFAULT: 1 (Always on) DEFAULT: 1 (Always on)
DESC: Controls whether the LED (the little light) on the front of the camera DESC: Controls whether the LED (the little light) on the front of the camera
is always off (0), always on (1), or only on when driver is open (2). is always off (0), always on (1), or only on when driver is open (2).
This is only supported with the OV511+ chipset, and even then only on This is not supported with the OV511, and might only work with certain
some cameras (ones that actually have the LED wired to the control pin, cameras (ones that actually have the LED wired to the control pin, and
and not just hardwired to be on all the time). not just hard-wired to be on all the time).
NAME: dump_bridge NAME: dump_bridge
TYPE: integer (Boolean) TYPE: integer (Boolean)
......
This diff is collapsed.
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#ifdef OV511_DEBUG #ifdef OV511_DEBUG
#define PDEBUG(level, fmt, args...) \ #define PDEBUG(level, fmt, args...) \
if (debug >= (level)) info("[" __PRETTY_FUNCTION__ ":%d] " fmt,\ if (debug >= (level)) info("[%s:%d] " fmt, \
__LINE__ , ## args) __PRETTY_FUNCTION__, __LINE__ , ## args)
#else #else
#define PDEBUG(level, fmt, args...) do {} while(0) #define PDEBUG(level, fmt, args...) do {} while(0)
#endif #endif
...@@ -243,6 +243,16 @@ ...@@ -243,6 +243,16 @@
#define OV511_ENDPOINT_ADDRESS 1 /* Isoc endpoint number */ #define OV511_ENDPOINT_ADDRESS 1 /* Isoc endpoint number */
#define OV511_NUMFRAMES 2
#if OV511_NUMFRAMES > VIDEO_MAX_FRAME
#error "OV511_NUMFRAMES is too high"
#endif
#define OV511_NUMSBUF 2
/* Control transfers use up to 4 bytes */
#define OV511_CBUF_SIZE 4
/* Bridge types */ /* Bridge types */
enum { enum {
BRG_UNKNOWN, BRG_UNKNOWN,
...@@ -376,9 +386,14 @@ struct ov511_i2c_struct { ...@@ -376,9 +386,14 @@ struct ov511_i2c_struct {
struct ov511_i2c_struct) struct ov511_i2c_struct)
/* ------------- End IOCTL interface -------------- */ /* ------------- End IOCTL interface -------------- */
struct usb_ov511; /* Forward declaration */
struct ov511_sbuf { struct ov511_sbuf {
char *data; struct usb_ov511 *ov;
unsigned char *data;
struct urb *urb; struct urb *urb;
spinlock_t lock;
int n;
}; };
enum { enum {
...@@ -401,9 +416,10 @@ struct ov511_regvals { ...@@ -401,9 +416,10 @@ struct ov511_regvals {
struct ov511_frame { struct ov511_frame {
int framenum; /* Index of this frame */ int framenum; /* Index of this frame */
char *data; /* Frame buffer */ unsigned char *data; /* Frame buffer */
char *tempdata; /* Temp buffer for multi-stage conversions */ unsigned char *tempdata; /* Temp buffer for multi-stage conversions */
char *rawdata; /* Raw camera data buffer */ unsigned char *rawdata; /* Raw camera data buffer */
unsigned char *compbuf; /* Temp buffer for decompressor */
int depth; /* Bytes per pixel */ int depth; /* Bytes per pixel */
int width; /* Width application is expecting */ int width; /* Width application is expecting */
...@@ -428,27 +444,20 @@ struct ov511_frame { ...@@ -428,27 +444,20 @@ struct ov511_frame {
int snapshot; /* True if frame was a snapshot */ int snapshot; /* True if frame was a snapshot */
}; };
#define DECOMP_INTERFACE_VER 2 #define DECOMP_INTERFACE_VER 3
/* Compression module operations */ /* Compression module operations */
struct ov51x_decomp_ops { struct ov51x_decomp_ops {
int (*decomp_400)(unsigned char *, unsigned char *, int, int, int); int (*decomp_400)(unsigned char *, unsigned char *, unsigned char *,
int (*decomp_420)(unsigned char *, unsigned char *, int, int, int); int, int, int);
int (*decomp_422)(unsigned char *, unsigned char *, int, int, int); int (*decomp_420)(unsigned char *, unsigned char *, unsigned char *,
int, int, int);
int (*decomp_422)(unsigned char *, unsigned char *, unsigned char *,
int, int, int);
void (*decomp_lock)(void); void (*decomp_lock)(void);
void (*decomp_unlock)(void); void (*decomp_unlock)(void);
}; };
#define OV511_NUMFRAMES 2
#if OV511_NUMFRAMES > VIDEO_MAX_FRAME
#error "OV511_NUMFRAMES is too high"
#endif
#define OV511_NUMSBUF 2
/* Control transfers use up to 4 bytes */
#define OV511_CBUF_SIZE 4
struct usb_ov511 { struct usb_ov511 {
struct video_device vdev; struct video_device vdev;
...@@ -456,7 +465,7 @@ struct usb_ov511 { ...@@ -456,7 +465,7 @@ struct usb_ov511 {
struct usb_device *dev; struct usb_device *dev;
int customid; int customid;
int desc; char *desc;
unsigned char iface; unsigned char iface;
/* Determined by sensor type */ /* Determined by sensor type */
...@@ -490,9 +499,9 @@ struct usb_ov511 { ...@@ -490,9 +499,9 @@ struct usb_ov511 {
int lightfreq; /* Power (lighting) frequency */ int lightfreq; /* Power (lighting) frequency */
int bandfilt; /* Banding filter enabled flag */ int bandfilt; /* Banding filter enabled flag */
char *fbuf; /* Videodev buffer area */ unsigned char *fbuf; /* Videodev buffer area */
char *tempfbuf; /* Temporary (intermediate) buffer area */ unsigned char *tempfbuf; /* Temporary (intermediate) buffer area */
char *rawfbuf; /* Raw camera data buffer area */ unsigned char *rawfbuf; /* Raw camera data buffer area */
int sub_flag; /* Pix Array subcapture on flag */ int sub_flag; /* Pix Array subcapture on flag */
int subx; /* Pix Array subcapture x offset */ int subx; /* Pix Array subcapture x offset */
...@@ -556,16 +565,29 @@ struct usb_ov511 { ...@@ -556,16 +565,29 @@ struct usb_ov511 {
struct semaphore cbuf_lock; struct semaphore cbuf_lock;
}; };
struct cam_list { /* Used to represent a list of values and their respective symbolic names */
int id; struct symbolic_list {
char *description;
};
struct palette_list {
int num; int num;
char *name; char *name;
}; };
#define NOT_DEFINED_STR "Unknown"
/* Returns the name of the matching element in the symbolic_list array. The
* end of the list must be marked with an element that has a NULL name.
*/
static inline char *
symbolic(struct symbolic_list list[], int num)
{
int i;
for (i = 0; list[i].name != NULL; i++)
if (list[i].num == num)
return (list[i].name);
return (NOT_DEFINED_STR);
}
struct mode_list_518 { struct mode_list_518 {
int width; int width;
int height; int height;
......
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