1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#include "dibusb.h"
16
17DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
18
19
20static struct dvb_usb_device_properties dibusb_mc_properties;
21
22static int dibusb_mc_probe(struct usb_interface *intf,
23 const struct usb_device_id *id)
24{
25 return dvb_usb_device_init(intf, &dibusb_mc_properties, THIS_MODULE,
26 NULL, adapter_nr);
27}
28
29
30static struct usb_device_id dibusb_dib3000mc_table [] = {
31 { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3001_COLD) },
32 { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3001_WARM) },
33 { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_USB2_COLD) },
34 { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_USB2_WARM) },
35 { USB_DEVICE(USB_VID_LITEON, USB_PID_LITEON_DVB_T_COLD) },
36 { USB_DEVICE(USB_VID_LITEON, USB_PID_LITEON_DVB_T_WARM) },
37 { USB_DEVICE(USB_VID_EMPIA, USB_PID_DIGIVOX_MINI_SL_COLD) },
38 { USB_DEVICE(USB_VID_EMPIA, USB_PID_DIGIVOX_MINI_SL_WARM) },
39 { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_GRANDTEC_DVBT_USB2_COLD) },
40 { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_GRANDTEC_DVBT_USB2_WARM) },
41 { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ARTEC_T14_COLD) },
42 { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ARTEC_T14_WARM) },
43 { USB_DEVICE(USB_VID_LEADTEK, USB_PID_WINFAST_DTV_DONGLE_COLD) },
44 { USB_DEVICE(USB_VID_LEADTEK, USB_PID_WINFAST_DTV_DONGLE_WARM) },
45 { USB_DEVICE(USB_VID_HUMAX_COEX, USB_PID_DVB_T_USB_STICK_HIGH_SPEED_COLD) },
46 { USB_DEVICE(USB_VID_HUMAX_COEX, USB_PID_DVB_T_USB_STICK_HIGH_SPEED_WARM) },
47 { }
48};
49MODULE_DEVICE_TABLE (usb, dibusb_dib3000mc_table);
50
51static struct dvb_usb_device_properties dibusb_mc_properties = {
52 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
53
54 .usb_ctrl = CYPRESS_FX2,
55 .firmware = "dvb-usb-dibusb-6.0.0.8.fw",
56
57 .num_adapters = 1,
58 .adapter = {
59 {
60 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
61 .pid_filter_count = 32,
62 .streaming_ctrl = dibusb2_0_streaming_ctrl,
63 .pid_filter = dibusb_pid_filter,
64 .pid_filter_ctrl = dibusb_pid_filter_ctrl,
65 .frontend_attach = dibusb_dib3000mc_frontend_attach,
66 .tuner_attach = dibusb_dib3000mc_tuner_attach,
67
68
69 .stream = {
70 .type = USB_BULK,
71 .count = 8,
72 .endpoint = 0x06,
73 .u = {
74 .bulk = {
75 .buffersize = 4096,
76 }
77 }
78 },
79 .size_of_priv = sizeof(struct dibusb_state),
80 }
81 },
82 .power_ctrl = dibusb2_0_power_ctrl,
83
84 .rc_interval = DEFAULT_RC_INTERVAL,
85 .rc_key_map = dibusb_rc_keys,
86 .rc_key_map_size = 111,
87 .rc_query = dibusb_rc_query,
88
89 .i2c_algo = &dibusb_i2c_algo,
90
91 .generic_bulk_ctrl_endpoint = 0x01,
92
93 .num_device_descs = 8,
94 .devices = {
95 { "DiBcom USB2.0 DVB-T reference design (MOD3000P)",
96 { &dibusb_dib3000mc_table[0], NULL },
97 { &dibusb_dib3000mc_table[1], NULL },
98 },
99 { "Artec T1 USB2.0 TVBOX (please check the warm ID)",
100 { &dibusb_dib3000mc_table[2], NULL },
101 { &dibusb_dib3000mc_table[3], NULL },
102 },
103 { "LITE-ON USB2.0 DVB-T Tuner",
104
105 { &dibusb_dib3000mc_table[4], NULL },
106 { &dibusb_dib3000mc_table[5], NULL },
107 },
108 { "MSI Digivox Mini SL",
109 { &dibusb_dib3000mc_table[6], NULL },
110 { &dibusb_dib3000mc_table[7], NULL },
111 },
112 { "GRAND - USB2.0 DVB-T adapter",
113 { &dibusb_dib3000mc_table[8], NULL },
114 { &dibusb_dib3000mc_table[9], NULL },
115 },
116 { "Artec T14 - USB2.0 DVB-T",
117 { &dibusb_dib3000mc_table[10], NULL },
118 { &dibusb_dib3000mc_table[11], NULL },
119 },
120 { "Leadtek - USB2.0 Winfast DTV dongle",
121 { &dibusb_dib3000mc_table[12], NULL },
122 { &dibusb_dib3000mc_table[13], NULL },
123 },
124 { "Humax/Coex DVB-T USB Stick 2.0 High Speed",
125 { &dibusb_dib3000mc_table[14], NULL },
126 { &dibusb_dib3000mc_table[15], NULL },
127 },
128 { NULL },
129 }
130};
131
132static struct usb_driver dibusb_mc_driver = {
133 .name = "dvb_usb_dibusb_mc",
134 .probe = dibusb_mc_probe,
135 .disconnect = dvb_usb_device_exit,
136 .id_table = dibusb_dib3000mc_table,
137};
138
139
140static int __init dibusb_mc_module_init(void)
141{
142 int result;
143 if ((result = usb_register(&dibusb_mc_driver))) {
144 err("usb_register failed. Error number %d",result);
145 return result;
146 }
147
148 return 0;
149}
150
151static void __exit dibusb_mc_module_exit(void)
152{
153
154 usb_deregister(&dibusb_mc_driver);
155}
156
157module_init (dibusb_mc_module_init);
158module_exit (dibusb_mc_module_exit);
159
160MODULE_AUTHOR("Patrick Boettcher <patrick.boettcher@desy.de>");
161MODULE_DESCRIPTION("Driver for DiBcom USB2.0 DVB-T (DiB3000M-C/P based) devices");
162MODULE_VERSION("1.0");
163MODULE_LICENSE("GPL");
164