aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx.h
diff options
context:
space:
mode:
authorAidan Thornton <makosoft@googlemail.com>2008-04-17 20:40:16 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:09:41 -0400
commit579f72e44fb1c991352f44c20b471c3001357f68 (patch)
tree1834a5b1624360955931a7c8bb5a9c000676b6b6 /drivers/media/video/em28xx/em28xx.h
parent7e6388a1b97cca57a1906df6104feb4001721576 (diff)
V4L/DVB (7602): em28xx: generalise URB setup code
Move the URB setup and management code to em28xx-core.c and generalise it slighlty so that the DVB code can use it. Signed-off-by: Aidan Thornton <makosoft@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx.h')
-rw-r--r--drivers/media/video/em28xx/em28xx.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index 3786dd819bbd..151bc57bd08b 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -119,6 +119,8 @@ enum em28xx_stream_state {
119 STREAM_ON, 119 STREAM_ON,
120}; 120};
121 121
122struct em28xx;
123
122struct em28xx_usb_isoc_ctl { 124struct em28xx_usb_isoc_ctl {
123 /* max packet size of isoc transaction */ 125 /* max packet size of isoc transaction */
124 int max_pkt_size; 126 int max_pkt_size;
@@ -148,6 +150,10 @@ struct em28xx_usb_isoc_ctl {
148 150
149 /* Stores the number of received fields */ 151 /* Stores the number of received fields */
150 int nfields; 152 int nfields;
153
154 /* isoc urb callback */
155 int (*isoc_copy) (struct em28xx *dev, struct urb *urb);
156
151}; 157};
152 158
153struct em28xx_fmt { 159struct em28xx_fmt {
@@ -279,6 +285,12 @@ enum em28xx_dev_state {
279 DEV_MISCONFIGURED = 0x04, 285 DEV_MISCONFIGURED = 0x04,
280}; 286};
281 287
288enum em28xx_capture_mode {
289 EM28XX_CAPTURE_OFF = 0,
290 EM28XX_ANALOG_CAPTURE,
291 EM28XX_DIGITAL_CAPTURE,
292};
293
282#define EM28XX_AUDIO_BUFS 5 294#define EM28XX_AUDIO_BUFS 5
283#define EM28XX_NUM_AUDIO_PACKETS 64 295#define EM28XX_NUM_AUDIO_PACKETS 64
284#define EM28XX_AUDIO_MAX_PACKET_SIZE 196 /* static value */ 296#define EM28XX_AUDIO_MAX_PACKET_SIZE 196 /* static value */
@@ -452,6 +464,11 @@ int em28xx_capture_start(struct em28xx *dev, int start);
452int em28xx_outfmt_set_yuv422(struct em28xx *dev); 464int em28xx_outfmt_set_yuv422(struct em28xx *dev);
453int em28xx_resolution_set(struct em28xx *dev); 465int em28xx_resolution_set(struct em28xx *dev);
454int em28xx_set_alternate(struct em28xx *dev); 466int em28xx_set_alternate(struct em28xx *dev);
467int em28xx_init_isoc(struct em28xx *dev, int max_packets,
468 int num_bufs, int max_pkt_size,
469 int (*isoc_copy) (struct em28xx *dev, struct urb *urb),
470 int cap_type);
471void em28xx_uninit_isoc(struct em28xx *dev);
455 472
456/* Provided by em28xx-video.c */ 473/* Provided by em28xx-video.c */
457int em28xx_register_extension(struct em28xx_ops *dev); 474int em28xx_register_extension(struct em28xx_ops *dev);