diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-06-30 14:50:11 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 06:14:49 -0400 |
commit | 6a7eba24e4f0ff725d33159f6265e3a79d53a833 (patch) | |
tree | 3e50d669cb91affbcfad9333d74ddc452783094f /drivers/media/video/gspca/gspca.h | |
parent | d43fa32fec442571f10f5d0c3b553413288728de (diff) |
V4L/DVB (8157): gspca: all subdrivers
- remaning subdrivers added
- remove the decoding helper and some specific frame decodings
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/gspca/gspca.h')
-rw-r--r-- | drivers/media/video/gspca/gspca.h | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h index e69d8472a284..1581fa808b6f 100644 --- a/drivers/media/video/gspca/gspca.h +++ b/drivers/media/video/gspca/gspca.h | |||
@@ -9,7 +9,26 @@ | |||
9 | #include <media/v4l2-common.h> | 9 | #include <media/v4l2-common.h> |
10 | #include <linux/mutex.h> | 10 | #include <linux/mutex.h> |
11 | 11 | ||
12 | #ifdef GSPCA_DEBUG | 12 | /* values in 2.6.27 */ |
13 | #ifndef V4L2_PIX_FMT_SPCA501 | ||
14 | #define V4L2_PIX_FMT_SPCA501 v4l2_fourcc('S', '5', '0', '1') | ||
15 | #endif | ||
16 | #ifndef V4L2_PIX_FMT_SPCA561 | ||
17 | #define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') | ||
18 | #endif | ||
19 | |||
20 | /* values in 2.6.26 */ | ||
21 | #ifndef V4L2_CID_POWER_LINE_FREQUENCY | ||
22 | #define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) | ||
23 | #endif | ||
24 | #ifndef V4L2_CID_WHITE_BALANCE_TEMPERATURE | ||
25 | #define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE + 26) | ||
26 | #endif | ||
27 | #ifndef V4L2_CID_SHARPNESS | ||
28 | #define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27) | ||
29 | #endif | ||
30 | |||
31 | #ifdef VIDEO_ADV_DEBUG | ||
13 | /* GSPCA our debug messages */ | 32 | /* GSPCA our debug messages */ |
14 | extern int gspca_debug; | 33 | extern int gspca_debug; |
15 | #define PDEBUG(level, fmt, args...) \ | 34 | #define PDEBUG(level, fmt, args...) \ |
@@ -47,7 +66,7 @@ extern int gspca_debug; | |||
47 | 66 | ||
48 | #define GSPCA_MAX_FRAMES 16 /* maximum number of video frame buffers */ | 67 | #define GSPCA_MAX_FRAMES 16 /* maximum number of video frame buffers */ |
49 | /* ISOC transfers */ | 68 | /* ISOC transfers */ |
50 | #define MAX_NURBS 32 /* max number of URBs (read & userptr) */ | 69 | #define MAX_NURBS 16 /* max number of URBs */ |
51 | #define ISO_MAX_PKT 32 /* max number of packets in an ISOC transfer */ | 70 | #define ISO_MAX_PKT 32 /* max number of packets in an ISOC transfer */ |
52 | #define ISO_MAX_SIZE 0x8000 /* max size of one URB buffer (32 Kb) */ | 71 | #define ISO_MAX_SIZE 0x8000 /* max size of one URB buffer (32 Kb) */ |
53 | 72 | ||
@@ -79,7 +98,7 @@ typedef int (*cam_qmnu_op) (struct gspca_dev *, | |||
79 | struct v4l2_querymenu *); | 98 | struct v4l2_querymenu *); |
80 | typedef void (*cam_pkt_op) (struct gspca_dev *gspca_dev, | 99 | typedef void (*cam_pkt_op) (struct gspca_dev *gspca_dev, |
81 | struct gspca_frame *frame, | 100 | struct gspca_frame *frame, |
82 | unsigned char *data, | 101 | __u8 *data, |
83 | int len); | 102 | int len); |
84 | 103 | ||
85 | struct ctrl { | 104 | struct ctrl { |
@@ -116,8 +135,8 @@ struct sd_desc { | |||
116 | #define LAST_PACKET 3 | 135 | #define LAST_PACKET 3 |
117 | 136 | ||
118 | struct gspca_frame { | 137 | struct gspca_frame { |
119 | unsigned char *data; /* frame buffer */ | 138 | __u8 *data; /* frame buffer */ |
120 | unsigned char *data_end; /* end of frame while filling */ | 139 | __u8 *data_end; /* end of frame while filling */ |
121 | int vma_use_count; | 140 | int vma_use_count; |
122 | struct v4l2_buffer v4l2_buf; | 141 | struct v4l2_buffer v4l2_buf; |
123 | }; | 142 | }; |
@@ -135,7 +154,7 @@ struct gspca_dev { | |||
135 | 154 | ||
136 | __u8 *frbuf; /* buffer for nframes */ | 155 | __u8 *frbuf; /* buffer for nframes */ |
137 | struct gspca_frame frame[GSPCA_MAX_FRAMES]; | 156 | struct gspca_frame frame[GSPCA_MAX_FRAMES]; |
138 | unsigned int frsz; /* frame size */ | 157 | __u32 frsz; /* frame size */ |
139 | char nframes; /* number of frames */ | 158 | char nframes; /* number of frames */ |
140 | char fr_i; /* frame being filled */ | 159 | char fr_i; /* frame being filled */ |
141 | char fr_q; /* next frame to queue */ | 160 | char fr_q; /* next frame to queue */ |
@@ -145,10 +164,10 @@ struct gspca_dev { | |||
145 | 164 | ||
146 | __u8 iface; /* USB interface number */ | 165 | __u8 iface; /* USB interface number */ |
147 | __u8 alt; /* USB alternate setting */ | 166 | __u8 alt; /* USB alternate setting */ |
148 | unsigned char curr_mode; /* current camera mode */ | 167 | __u8 curr_mode; /* current camera mode */ |
149 | __u32 pixfmt; /* current mode parameters */ | 168 | __u32 pixfmt; /* current mode parameters */ |
150 | short width; | 169 | __u16 width; |
151 | short height; | 170 | __u16 height; |
152 | 171 | ||
153 | atomic_t nevent; /* number of frames done */ | 172 | atomic_t nevent; /* number of frames done */ |
154 | wait_queue_head_t wq; /* wait queue */ | 173 | wait_queue_head_t wq; /* wait queue */ |
@@ -176,6 +195,6 @@ void gspca_disconnect(struct usb_interface *intf); | |||
176 | struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev, | 195 | struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev, |
177 | int packet_type, | 196 | int packet_type, |
178 | struct gspca_frame *frame, | 197 | struct gspca_frame *frame, |
179 | unsigned char *data, | 198 | __u8 *data, |
180 | int len); | 199 | int len); |
181 | #endif /* GSPCAV2_H */ | 200 | #endif /* GSPCAV2_H */ |