Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
d7b09335
Commit
d7b09335
authored
Mar 04, 2002
by
Mark W. McClelland
Committed by
Linus Torvalds
Mar 04, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update USB ov511 driver to version 1.53
parent
cf16aaca
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1015 additions
and
1064 deletions
+1015
-1064
Documentation/usb/ov511.txt
Documentation/usb/ov511.txt
+3
-3
drivers/usb/ov511.c
drivers/usb/ov511.c
+960
-1031
drivers/usb/ov511.h
drivers/usb/ov511.h
+52
-30
No files found.
Documentation/usb/ov511.txt
View file @
d7b09335
...
...
@@ -182,9 +182,9 @@ MODULE PARAMETERS:
DEFAULT: 1 (Always on)
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).
This is
only supported with the OV511+ chipset, and even then only o
n
some cameras (ones that actually have the LED wired to the control pin,
and not just hard
wired to be on all the time).
This is
not supported with the OV511, and might only work with certai
n
cameras (ones that actually have the LED wired to the control pin, and
not just hard-
wired to be on all the time).
NAME: dump_bridge
TYPE: integer (Boolean)
...
...
drivers/usb/ov511.c
View file @
d7b09335
This diff is collapsed.
Click to expand it.
drivers/usb/ov511.h
View file @
d7b09335
...
...
@@ -10,8 +10,8 @@
#ifdef OV511_DEBUG
#define PDEBUG(level, fmt, args...) \
if (debug >= (level)) info("[
" __PRETTY_FUNCTION__ ":%d] " fmt,
\
__LINE__ , ## args)
if (debug >= (level)) info("[
%s:%d] " fmt,
\
__
PRETTY_FUNCTION__, __
LINE__ , ## args)
#else
#define PDEBUG(level, fmt, args...) do {} while(0)
#endif
...
...
@@ -243,6 +243,16 @@
#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 */
enum
{
BRG_UNKNOWN
,
...
...
@@ -376,9 +386,14 @@ struct ov511_i2c_struct {
struct ov511_i2c_struct)
/* ------------- End IOCTL interface -------------- */
struct
usb_ov511
;
/* Forward declaration */
struct
ov511_sbuf
{
char
*
data
;
struct
usb_ov511
*
ov
;
unsigned
char
*
data
;
struct
urb
*
urb
;
spinlock_t
lock
;
int
n
;
};
enum
{
...
...
@@ -401,9 +416,10 @@ struct ov511_regvals {
struct
ov511_frame
{
int
framenum
;
/* Index of this frame */
char
*
data
;
/* Frame buffer */
char
*
tempdata
;
/* Temp buffer for multi-stage conversions */
char
*
rawdata
;
/* Raw camera data buffer */
unsigned
char
*
data
;
/* Frame buffer */
unsigned
char
*
tempdata
;
/* Temp buffer for multi-stage conversions */
unsigned
char
*
rawdata
;
/* Raw camera data buffer */
unsigned
char
*
compbuf
;
/* Temp buffer for decompressor */
int
depth
;
/* Bytes per pixel */
int
width
;
/* Width application is expecting */
...
...
@@ -428,27 +444,20 @@ struct ov511_frame {
int
snapshot
;
/* True if frame was a snapshot */
};
#define DECOMP_INTERFACE_VER
2
#define DECOMP_INTERFACE_VER
3
/* Compression module operations */
struct
ov51x_decomp_ops
{
int
(
*
decomp_400
)(
unsigned
char
*
,
unsigned
char
*
,
int
,
int
,
int
);
int
(
*
decomp_420
)(
unsigned
char
*
,
unsigned
char
*
,
int
,
int
,
int
);
int
(
*
decomp_422
)(
unsigned
char
*
,
unsigned
char
*
,
int
,
int
,
int
);
int
(
*
decomp_400
)(
unsigned
char
*
,
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_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
video_device
vdev
;
...
...
@@ -456,7 +465,7 @@ struct usb_ov511 {
struct
usb_device
*
dev
;
int
customid
;
int
desc
;
char
*
desc
;
unsigned
char
iface
;
/* Determined by sensor type */
...
...
@@ -490,9 +499,9 @@ struct usb_ov511 {
int
lightfreq
;
/* Power (lighting) frequency */
int
bandfilt
;
/* Banding filter enabled flag */
char
*
fbuf
;
/* Videodev buffer area */
char
*
tempfbuf
;
/* Temporary (intermediate) buffer area */
char
*
rawfbuf
;
/* Raw camera data buffer area */
unsigned
char
*
fbuf
;
/* Videodev buffer area */
unsigned
char
*
tempfbuf
;
/* Temporary (intermediate) buffer area */
unsigned
char
*
rawfbuf
;
/* Raw camera data buffer area */
int
sub_flag
;
/* Pix Array subcapture on flag */
int
subx
;
/* Pix Array subcapture x offset */
...
...
@@ -556,16 +565,29 @@ struct usb_ov511 {
struct
semaphore
cbuf_lock
;
};
struct
cam_list
{
int
id
;
char
*
description
;
};
struct
palette_list
{
/* Used to represent a list of values and their respective symbolic names */
struct
symbolic_list
{
int
num
;
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
{
int
width
;
int
height
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment