aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/dabusb.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 11:37:36 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 11:37:36 -0500
commit368d17e068f691dba5a4f122c271db5ec9b2ebd6 (patch)
tree69954cea09e5efd4ad1b8268be0e1733a13b4fae /drivers/media/video/dabusb.h
parenta9312fb839e90668d05a90024f3a7e7ff646a4a3 (diff)
parent22fe087f0139e2f5cbe004f24f84cb1c08b4711e (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (33 commits) V4L/DVB (3604): V4l printk fix V4L/DVB (3599c): Whitespace cleanups under Documentation/video4linux V4L/DVB (3599b): Whitespace cleanups under drivers/media V4L/DVB (3599a): Move drivers/usb/media to drivers/media/video V4L/DVB (3599): Implement new routing commands for wm8775 and cs53l32a. V4L/DVB (3598): Add bit algorithm adapter for the Conexant CX2341X boards. V4L/DVB (3597): Vivi: fix warning: implicit declaration of function 'in_interrupt' V4L/DVB (3588): Remove VIDIOC_G/S_AUDOUT from msp3400 V4L/DVB (3587): Always wake thread after routing change. V4L/DVB (3584): Implement V4L2_TUNER_MODE_LANG1_LANG2 audio mode V4L/DVB (3582): Implement correct msp3400 input/output routing V4L/DVB (3581): Add new media/msp3400.h header containing the routing macros V4L/DVB (3580): Last round of msp3400 cleanups before adding routing commands V4L/DVB (3579): Move msp_modus to msp3400-kthreads, add JP and KR std detection V4L/DVB (3578): Make scart definitions easier to handle V4L/DVB (3577): Cleanup audio input handling V4L/DVB (3575): Cxusb: fix i2c debug messages for bluebird devices V4L/DVB (3574): Cxusb: fix debug messages V4L/DVB (3573): Cxusb: remove FIXME: comment in bluebird_patch_dvico_firmware_download V4L/DVB (3572): Cxusb: conditionalize gpio write for the medion box ...
Diffstat (limited to 'drivers/media/video/dabusb.h')
-rw-r--r--drivers/media/video/dabusb.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/drivers/media/video/dabusb.h b/drivers/media/video/dabusb.h
new file mode 100644
index 000000000000..00eb34c863eb
--- /dev/null
+++ b/drivers/media/video/dabusb.h
@@ -0,0 +1,85 @@
1#define _BULK_DATA_LEN 64
2typedef struct
3{
4 unsigned char data[_BULK_DATA_LEN];
5 unsigned int size;
6 unsigned int pipe;
7}bulk_transfer_t,*pbulk_transfer_t;
8
9#define DABUSB_MINOR 240 /* some unassigned USB minor */
10#define DABUSB_VERSION 0x1000
11#define IOCTL_DAB_BULK _IOWR('d', 0x30, bulk_transfer_t)
12#define IOCTL_DAB_OVERRUNS _IOR('d', 0x15, int)
13#define IOCTL_DAB_VERSION _IOR('d', 0x3f, int)
14
15#ifdef __KERNEL__
16
17typedef enum { _stopped=0, _started } driver_state_t;
18
19typedef struct
20{
21 struct mutex mutex;
22 struct usb_device *usbdev;
23 wait_queue_head_t wait;
24 wait_queue_head_t remove_ok;
25 spinlock_t lock;
26 atomic_t pending_io;
27 driver_state_t state;
28 int remove_pending;
29 int got_mem;
30 int total_buffer_size;
31 unsigned int overruns;
32 int readptr;
33 int opened;
34 int devnum;
35 struct list_head free_buff_list;
36 struct list_head rec_buff_list;
37} dabusb_t,*pdabusb_t;
38
39typedef struct
40{
41 pdabusb_t s;
42 struct urb *purb;
43 struct list_head buff_list;
44} buff_t,*pbuff_t;
45
46typedef struct
47{
48 wait_queue_head_t wait;
49} bulk_completion_context_t, *pbulk_completion_context_t;
50
51
52#define _DABUSB_IF 2
53#define _DABUSB_ISOPIPE 0x09
54#define _ISOPIPESIZE 16384
55
56#define _BULK_DATA_LEN 64
57// Vendor specific request code for Anchor Upload/Download
58// This one is implemented in the core
59#define ANCHOR_LOAD_INTERNAL 0xA0
60
61// EZ-USB Control and Status Register. Bit 0 controls 8051 reset
62#define CPUCS_REG 0x7F92
63#define _TOTAL_BUFFERS 384
64
65#define MAX_INTEL_HEX_RECORD_LENGTH 16
66
67#ifndef _BYTE_DEFINED
68#define _BYTE_DEFINED
69typedef unsigned char BYTE;
70#endif // !_BYTE_DEFINED
71
72#ifndef _WORD_DEFINED
73#define _WORD_DEFINED
74typedef unsigned short WORD;
75#endif // !_WORD_DEFINED
76
77typedef struct _INTEL_HEX_RECORD
78{
79 BYTE Length;
80 WORD Address;
81 BYTE Type;
82 BYTE Data[MAX_INTEL_HEX_RECORD_LENGTH];
83} INTEL_HEX_RECORD, *PINTEL_HEX_RECORD;
84
85#endif