1
2
3
4
5
6
7
8
9
10
11#ifndef _DVB_USB_DIBUSB_H_
12#define _DVB_USB_DIBUSB_H_
13
14#ifndef DVB_USB_LOG_PREFIX
15 #define DVB_USB_LOG_PREFIX "dibusb"
16#endif
17#include "dvb-usb.h"
18
19#include "dib3000.h"
20#include "dib3000mc.h"
21#include "mt2060.h"
22
23
24
25
26
27
28
29
30
31
32
33
34#define DIBUSB_REQ_START_READ 0x00
35#define DIBUSB_REQ_START_DEMOD 0x01
36
37
38
39
40
41
42#define DIBUSB_REQ_I2C_READ 0x02
43
44
45
46
47
48#define DIBUSB_REQ_I2C_WRITE 0x03
49
50
51
52
53
54
55#define DIBUSB_REQ_POLL_REMOTE 0x04
56
57
58#define DIBUSB_RC_HAUPPAUGE_KEY_PRESSED 0x01
59#define DIBUSB_RC_HAUPPAUGE_KEY_EMPTY 0x03
60
61
62
63
64
65
66#define DIBUSB_REQ_SET_STREAMING_MODE 0x05
67
68
69#define DIBUSB_REQ_INTR_READ 0x06
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86#define DIBUSB_REQ_SET_IOCTL 0x07
87
88
89
90
91#define DIBUSB_IOCTL_CMD_POWER_MODE 0x00
92#define DIBUSB_IOCTL_POWER_SLEEP 0x00
93#define DIBUSB_IOCTL_POWER_WAKEUP 0x01
94
95
96#define DIBUSB_IOCTL_CMD_ENABLE_STREAM 0x01
97#define DIBUSB_IOCTL_CMD_DISABLE_STREAM 0x02
98
99
100#define MAX_XFER_SIZE 64
101
102struct dibusb_state {
103 struct dib_fe_xfer_ops ops;
104 int mt2060_present;
105 u8 tuner_addr;
106};
107
108struct dibusb_device_state {
109
110 int old_toggle;
111 int last_repeat_count;
112};
113
114extern struct i2c_algorithm dibusb_i2c_algo;
115
116extern int dibusb_dib3000mc_frontend_attach(struct dvb_usb_adapter *);
117extern int dibusb_dib3000mc_tuner_attach (struct dvb_usb_adapter *);
118
119extern int dibusb_streaming_ctrl(struct dvb_usb_adapter *, int);
120extern int dibusb_pid_filter(struct dvb_usb_adapter *, int, u16, int);
121extern int dibusb_pid_filter_ctrl(struct dvb_usb_adapter *, int);
122extern int dibusb2_0_streaming_ctrl(struct dvb_usb_adapter *, int);
123
124extern int dibusb_power_ctrl(struct dvb_usb_device *, int);
125extern int dibusb2_0_power_ctrl(struct dvb_usb_device *, int);
126
127#define DEFAULT_RC_INTERVAL 150
128
129
130extern struct rc_map_table rc_map_dibusb_table[];
131extern int dibusb_rc_query(struct dvb_usb_device *, u32 *, int *);
132extern int dibusb_read_eeprom_byte(struct dvb_usb_device *, u8, u8 *);
133
134#endif
135