Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 1 | /* DVB USB compliant linux driver for mobile DVB-T USB devices based on |
| 2 | * reference designs made by DiBcom (http://www.dibcom.fr/) (DiB3000M-C/P) |
| 3 | * |
Patrick Boettcher | 99e44da | 2016-01-24 12:56:58 -0200 | [diff] [blame] | 4 | * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de) |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 5 | * |
| 6 | * based on GPL code from DiBcom, which has |
Patrick Boettcher | 99e44da | 2016-01-24 12:56:58 -0200 | [diff] [blame] | 7 | * Copyright (C) 2004 Amaury Demol for DiBcom |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * under the terms of the GNU General Public License as published by the Free |
| 11 | * Software Foundation, version 2. |
| 12 | * |
| 13 | * see Documentation/dvb/README.dvb-usb for more information |
| 14 | */ |
| 15 | #include "dibusb.h" |
| 16 | |
Janne Grunau | 78e9200 | 2008-04-09 19:13:13 -0300 | [diff] [blame] | 17 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); |
| 18 | |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 19 | /* USB Driver stuff */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 20 | static struct dvb_usb_device_properties dibusb_mc_properties; |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 21 | |
| 22 | static int dibusb_mc_probe(struct usb_interface *intf, |
| 23 | const struct usb_device_id *id) |
| 24 | { |
Janne Grunau | 78e9200 | 2008-04-09 19:13:13 -0300 | [diff] [blame] | 25 | return dvb_usb_device_init(intf, &dibusb_mc_properties, THIS_MODULE, |
| 26 | NULL, adapter_nr); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | /* do not change the order of the ID table */ |
| 30 | static struct usb_device_id dibusb_dib3000mc_table [] = { |
| 31 | /* 00 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3001_COLD) }, |
| 32 | /* 01 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3001_WARM) }, |
| 33 | /* 02 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_USB2_COLD) }, |
Olivier DANET | a16bf5d | 2006-08-08 15:48:09 -0300 | [diff] [blame] | 34 | /* 03 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_USB2_WARM) }, // ( ? ) |
| 35 | /* 04 */ { USB_DEVICE(USB_VID_LITEON, USB_PID_LITEON_DVB_T_COLD) }, |
| 36 | /* 05 */ { USB_DEVICE(USB_VID_LITEON, USB_PID_LITEON_DVB_T_WARM) }, |
| 37 | /* 06 */ { USB_DEVICE(USB_VID_EMPIA, USB_PID_DIGIVOX_MINI_SL_COLD) }, |
| 38 | /* 07 */ { USB_DEVICE(USB_VID_EMPIA, USB_PID_DIGIVOX_MINI_SL_WARM) }, |
Patrick Boettcher | e4d6c1f | 2006-08-08 15:48:09 -0300 | [diff] [blame] | 39 | /* 08 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_GRANDTEC_DVBT_USB2_COLD) }, |
| 40 | /* 09 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_GRANDTEC_DVBT_USB2_WARM) }, |
Patrick Boettcher | cb25a74 | 2006-03-31 18:48:39 -0300 | [diff] [blame] | 41 | /* 10 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ARTEC_T14_COLD) }, |
| 42 | /* 11 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ARTEC_T14_WARM) }, |
Olivier DANET | d7357a5 | 2006-08-08 15:48:09 -0300 | [diff] [blame] | 43 | /* 12 */ { USB_DEVICE(USB_VID_LEADTEK, USB_PID_WINFAST_DTV_DONGLE_COLD) }, |
| 44 | /* 13 */ { USB_DEVICE(USB_VID_LEADTEK, USB_PID_WINFAST_DTV_DONGLE_WARM) }, |
Nam Phạm Thành | ce212f0 | 2009-07-12 11:51:10 -0300 | [diff] [blame] | 45 | /* 14 */ { USB_DEVICE(USB_VID_HUMAX_COEX, USB_PID_DVB_T_USB_STICK_HIGH_SPEED_COLD) }, |
| 46 | /* 15 */ { USB_DEVICE(USB_VID_HUMAX_COEX, USB_PID_DVB_T_USB_STICK_HIGH_SPEED_WARM) }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 47 | { } /* Terminating entry */ |
| 48 | }; |
| 49 | MODULE_DEVICE_TABLE (usb, dibusb_dib3000mc_table); |
| 50 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 51 | static struct dvb_usb_device_properties dibusb_mc_properties = { |
| 52 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 53 | |
| 54 | .usb_ctrl = CYPRESS_FX2, |
| 55 | .firmware = "dvb-usb-dibusb-6.0.0.8.fw", |
| 56 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 57 | .num_adapters = 1, |
| 58 | .adapter = { |
| 59 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 60 | .num_frontends = 1, |
| 61 | .fe = {{ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 62 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 63 | .pid_filter_count = 32, |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 64 | .streaming_ctrl = dibusb2_0_streaming_ctrl, |
| 65 | .pid_filter = dibusb_pid_filter, |
| 66 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, |
| 67 | .frontend_attach = dibusb_dib3000mc_frontend_attach, |
| 68 | .tuner_attach = dibusb_dib3000mc_tuner_attach, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 69 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 70 | /* parameter for the MPEG2-data transfer */ |
| 71 | .stream = { |
| 72 | .type = USB_BULK, |
Nam Phạm Thành | ce212f0 | 2009-07-12 11:51:10 -0300 | [diff] [blame] | 73 | .count = 8, |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 74 | .endpoint = 0x06, |
| 75 | .u = { |
| 76 | .bulk = { |
| 77 | .buffersize = 4096, |
| 78 | } |
| 79 | } |
| 80 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 81 | }}, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 82 | .size_of_priv = sizeof(struct dibusb_state), |
| 83 | } |
| 84 | }, |
| 85 | .power_ctrl = dibusb2_0_power_ctrl, |
| 86 | |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 87 | .rc.legacy = { |
| 88 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 89 | .rc_map_table = rc_map_dibusb_table, |
| 90 | .rc_map_size = 111, /* FIXME */ |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 91 | .rc_query = dibusb_rc_query, |
| 92 | }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 93 | |
| 94 | .i2c_algo = &dibusb_i2c_algo, |
| 95 | |
| 96 | .generic_bulk_ctrl_endpoint = 0x01, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 97 | |
Nam Phạm Thành | ce212f0 | 2009-07-12 11:51:10 -0300 | [diff] [blame] | 98 | .num_device_descs = 8, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 99 | .devices = { |
| 100 | { "DiBcom USB2.0 DVB-T reference design (MOD3000P)", |
| 101 | { &dibusb_dib3000mc_table[0], NULL }, |
| 102 | { &dibusb_dib3000mc_table[1], NULL }, |
| 103 | }, |
Olivier DANET | a16bf5d | 2006-08-08 15:48:09 -0300 | [diff] [blame] | 104 | { "Artec T1 USB2.0 TVBOX (please check the warm ID)", |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 105 | { &dibusb_dib3000mc_table[2], NULL }, |
Olivier DANET | a16bf5d | 2006-08-08 15:48:09 -0300 | [diff] [blame] | 106 | { &dibusb_dib3000mc_table[3], NULL }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 107 | }, |
Olivier DANET | a16bf5d | 2006-08-08 15:48:09 -0300 | [diff] [blame] | 108 | { "LITE-ON USB2.0 DVB-T Tuner", |
| 109 | /* Also rebranded as Intuix S800, Toshiba */ |
| 110 | { &dibusb_dib3000mc_table[4], NULL }, |
| 111 | { &dibusb_dib3000mc_table[5], NULL }, |
| 112 | }, |
| 113 | { "MSI Digivox Mini SL", |
| 114 | { &dibusb_dib3000mc_table[6], NULL }, |
| 115 | { &dibusb_dib3000mc_table[7], NULL }, |
| 116 | }, |
| 117 | { "GRAND - USB2.0 DVB-T adapter", |
| 118 | { &dibusb_dib3000mc_table[8], NULL }, |
| 119 | { &dibusb_dib3000mc_table[9], NULL }, |
| 120 | }, |
Patrick Boettcher | cb25a74 | 2006-03-31 18:48:39 -0300 | [diff] [blame] | 121 | { "Artec T14 - USB2.0 DVB-T", |
| 122 | { &dibusb_dib3000mc_table[10], NULL }, |
| 123 | { &dibusb_dib3000mc_table[11], NULL }, |
| 124 | }, |
Olivier DANET | d7357a5 | 2006-08-08 15:48:09 -0300 | [diff] [blame] | 125 | { "Leadtek - USB2.0 Winfast DTV dongle", |
| 126 | { &dibusb_dib3000mc_table[12], NULL }, |
| 127 | { &dibusb_dib3000mc_table[13], NULL }, |
| 128 | }, |
Nam Phạm Thành | ce212f0 | 2009-07-12 11:51:10 -0300 | [diff] [blame] | 129 | { "Humax/Coex DVB-T USB Stick 2.0 High Speed", |
| 130 | { &dibusb_dib3000mc_table[14], NULL }, |
| 131 | { &dibusb_dib3000mc_table[15], NULL }, |
| 132 | }, |
Olivier DANET | a16bf5d | 2006-08-08 15:48:09 -0300 | [diff] [blame] | 133 | { NULL }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 134 | } |
| 135 | }; |
| 136 | |
| 137 | static struct usb_driver dibusb_mc_driver = { |
Patrick Boettcher | 63b5c1c | 2005-07-07 17:58:30 -0700 | [diff] [blame] | 138 | .name = "dvb_usb_dibusb_mc", |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 139 | .probe = dibusb_mc_probe, |
| 140 | .disconnect = dvb_usb_device_exit, |
| 141 | .id_table = dibusb_dib3000mc_table, |
| 142 | }; |
| 143 | |
Greg Kroah-Hartman | ecb3b2b | 2011-11-18 09:46:12 -0800 | [diff] [blame] | 144 | module_usb_driver(dibusb_mc_driver); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 145 | |
Patrick Boettcher | 99e44da | 2016-01-24 12:56:58 -0200 | [diff] [blame] | 146 | MODULE_AUTHOR("Patrick Boettcher <patrick.boettcher@posteo.de>"); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 147 | MODULE_DESCRIPTION("Driver for DiBcom USB2.0 DVB-T (DiB3000M-C/P based) devices"); |
| 148 | MODULE_VERSION("1.0"); |
| 149 | MODULE_LICENSE("GPL"); |