Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 1 | /* Linux driver for devices based on the DiBcom DiB0700 USB bridge |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify it |
| 4 | * under the terms of the GNU General Public License as published by the Free |
| 5 | * Software Foundation, version 2. |
| 6 | * |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 7 | * Copyright (C) 2005-9 DiBcom, SA et al |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 8 | */ |
| 9 | #include "dib0700.h" |
| 10 | |
| 11 | #include "dib3000mc.h" |
Patrick Boettcher | 91bb9be | 2006-12-02 21:15:51 -0200 | [diff] [blame] | 12 | #include "dib7000m.h" |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 13 | #include "dib7000p.h" |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 14 | #include "dib8000.h" |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 15 | #include "mt2060.h" |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 16 | #include "mt2266.h" |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 17 | #include "tuner-xc2028.h" |
Devin Heitmueller | cb22cb5 | 2008-09-08 05:42:42 -0300 | [diff] [blame] | 18 | #include "xc5000.h" |
| 19 | #include "s5h1411.h" |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 20 | #include "dib0070.h" |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 21 | #include "dib0090.h" |
Michael Krufky | ce904bc | 2009-01-19 01:12:55 -0300 | [diff] [blame] | 22 | #include "lgdt3305.h" |
| 23 | #include "mxl5007t.h" |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 24 | |
Patrick Boettcher | 7fb3fc0 | 2006-09-20 04:37:18 -0300 | [diff] [blame] | 25 | static int force_lna_activation; |
| 26 | module_param(force_lna_activation, int, 0644); |
| 27 | MODULE_PARM_DESC(force_lna_activation, "force the activation of Low-Noise-Amplifyer(s) (LNA), " |
| 28 | "if applicable for the device (default: 0=automatic/off)."); |
| 29 | |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 30 | struct dib0700_adapter_state { |
| 31 | int (*set_param_save) (struct dvb_frontend *, struct dvb_frontend_parameters *); |
| 32 | }; |
| 33 | |
| 34 | /* Hauppauge Nova-T 500 (aka Bristol) |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 35 | * has a LNA on GPIO0 which is enabled by setting 1 */ |
| 36 | static struct mt2060_config bristol_mt2060_config[2] = { |
| 37 | { |
| 38 | .i2c_address = 0x60, |
Patrick Boettcher | 303cbea | 2006-09-19 12:51:56 -0300 | [diff] [blame] | 39 | .clock_out = 3, |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 40 | }, { |
| 41 | .i2c_address = 0x61, |
| 42 | } |
| 43 | }; |
| 44 | |
Devin Heitmueller | 99afb98 | 2008-11-15 07:13:07 -0300 | [diff] [blame] | 45 | |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 46 | static struct dibx000_agc_config bristol_dib3000p_mt2060_agc_config = { |
| 47 | .band_caps = BAND_VHF | BAND_UHF, |
Patrick Boettcher | 01b4bf3 | 2006-09-19 12:51:53 -0300 | [diff] [blame] | 48 | .setup = (1 << 8) | (5 << 5) | (0 << 4) | (0 << 3) | (0 << 2) | (2 << 0), |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 49 | |
Patrick Boettcher | 6958eff | 2006-09-19 12:51:40 -0300 | [diff] [blame] | 50 | .agc1_max = 42598, |
| 51 | .agc1_min = 17694, |
| 52 | .agc2_max = 45875, |
| 53 | .agc2_min = 0, |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 54 | |
Patrick Boettcher | 6958eff | 2006-09-19 12:51:40 -0300 | [diff] [blame] | 55 | .agc1_pt1 = 0, |
| 56 | .agc1_pt2 = 59, |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 57 | |
Patrick Boettcher | 6958eff | 2006-09-19 12:51:40 -0300 | [diff] [blame] | 58 | .agc1_slope1 = 0, |
| 59 | .agc1_slope2 = 69, |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 60 | |
| 61 | .agc2_pt1 = 0, |
Patrick Boettcher | 6958eff | 2006-09-19 12:51:40 -0300 | [diff] [blame] | 62 | .agc2_pt2 = 59, |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 63 | |
Patrick Boettcher | 6958eff | 2006-09-19 12:51:40 -0300 | [diff] [blame] | 64 | .agc2_slope1 = 111, |
| 65 | .agc2_slope2 = 28, |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 66 | }; |
| 67 | |
| 68 | static struct dib3000mc_config bristol_dib3000mc_config[2] = { |
| 69 | { .agc = &bristol_dib3000p_mt2060_agc_config, |
| 70 | .max_time = 0x196, |
| 71 | .ln_adc_level = 0x1cc7, |
| 72 | .output_mpeg2_in_188_bytes = 1, |
| 73 | }, |
| 74 | { .agc = &bristol_dib3000p_mt2060_agc_config, |
| 75 | .max_time = 0x196, |
| 76 | .ln_adc_level = 0x1cc7, |
| 77 | .output_mpeg2_in_188_bytes = 1, |
| 78 | } |
| 79 | }; |
| 80 | |
| 81 | static int bristol_frontend_attach(struct dvb_usb_adapter *adap) |
| 82 | { |
Patrick Boettcher | 6958eff | 2006-09-19 12:51:40 -0300 | [diff] [blame] | 83 | struct dib0700_state *st = adap->dev->priv; |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 84 | if (adap->id == 0) { |
| 85 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); msleep(10); |
| 86 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); msleep(10); |
| 87 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); msleep(10); |
| 88 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); msleep(10); |
| 89 | |
Patrick Boettcher | 7fb3fc0 | 2006-09-20 04:37:18 -0300 | [diff] [blame] | 90 | if (force_lna_activation) |
| 91 | dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); |
| 92 | else |
| 93 | dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 0); |
Patrick Boettcher | 6958eff | 2006-09-19 12:51:40 -0300 | [diff] [blame] | 94 | |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 95 | if (dib3000mc_i2c_enumeration(&adap->dev->i2c_adap, 2, DEFAULT_DIB3000P_I2C_ADDRESS, bristol_dib3000mc_config) != 0) { |
| 96 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); msleep(10); |
| 97 | return -ENODEV; |
| 98 | } |
| 99 | } |
Patrick Boettcher | 6958eff | 2006-09-19 12:51:40 -0300 | [diff] [blame] | 100 | st->mt2060_if1[adap->id] = 1220; |
| 101 | return (adap->fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, |
| 102 | (10 + adap->id) << 1, &bristol_dib3000mc_config[adap->id])) == NULL ? -ENODEV : 0; |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 103 | } |
| 104 | |
Patrick Boettcher | 4a2b108 | 2008-01-25 07:32:58 -0300 | [diff] [blame] | 105 | static int eeprom_read(struct i2c_adapter *adap,u8 adrs,u8 *pval) |
Olivier DANET | c52344f | 2008-01-25 06:50:07 -0300 | [diff] [blame] | 106 | { |
| 107 | struct i2c_msg msg[2] = { |
| 108 | { .addr = 0x50, .flags = 0, .buf = &adrs, .len = 1 }, |
| 109 | { .addr = 0x50, .flags = I2C_M_RD, .buf = pval, .len = 1 }, |
| 110 | }; |
| 111 | if (i2c_transfer(adap, msg, 2) != 2) return -EREMOTEIO; |
| 112 | return 0; |
| 113 | } |
| 114 | |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 115 | static int bristol_tuner_attach(struct dvb_usb_adapter *adap) |
| 116 | { |
Olivier DANET | c52344f | 2008-01-25 06:50:07 -0300 | [diff] [blame] | 117 | struct i2c_adapter *prim_i2c = &adap->dev->i2c_adap; |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 118 | struct i2c_adapter *tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1); |
Olivier DANET | c52344f | 2008-01-25 06:50:07 -0300 | [diff] [blame] | 119 | s8 a; |
| 120 | int if1=1220; |
Al Viro | da5ee48 | 2008-05-21 00:31:21 -0300 | [diff] [blame] | 121 | if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) && |
| 122 | adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_500_2)) { |
Olivier DANET | c52344f | 2008-01-25 06:50:07 -0300 | [diff] [blame] | 123 | if (!eeprom_read(prim_i2c,0x59 + adap->id,&a)) if1=1220+a; |
| 124 | } |
| 125 | return dvb_attach(mt2060_attach,adap->fe, tun_i2c,&bristol_mt2060_config[adap->id], |
| 126 | if1) == NULL ? -ENODEV : 0; |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 127 | } |
| 128 | |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 129 | /* STK7700D: Pinnacle/Terratec/Hauppauge Dual DVB-T Diversity */ |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 130 | |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 131 | /* MT226x */ |
| 132 | static struct dibx000_agc_config stk7700d_7000p_mt2266_agc_config[2] = { |
| 133 | { |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 134 | BAND_UHF, |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 135 | |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 136 | /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1, P_agc_inv_pwm1=1, P_agc_inv_pwm2=1, |
| 137 | * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */ |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 138 | (0 << 15) | (0 << 14) | (1 << 11) | (1 << 10) | (1 << 9) | (0 << 8) |
| 139 | | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0), |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 140 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 141 | 1130, |
| 142 | 21, |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 143 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 144 | 0, |
| 145 | 118, |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 146 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 147 | 0, |
| 148 | 3530, |
| 149 | 1, |
| 150 | 0, |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 151 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 152 | 65535, |
| 153 | 33770, |
| 154 | 65535, |
| 155 | 23592, |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 156 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 157 | 0, |
| 158 | 62, |
| 159 | 255, |
| 160 | 64, |
| 161 | 64, |
| 162 | 132, |
| 163 | 192, |
| 164 | 80, |
| 165 | 80, |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 166 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 167 | 17, |
| 168 | 27, |
| 169 | 23, |
| 170 | 51, |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 171 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 172 | 1, |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 173 | }, { |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 174 | BAND_VHF | BAND_LBAND, |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 175 | |
| 176 | /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1, P_agc_inv_pwm1=1, P_agc_inv_pwm2=1, |
| 177 | * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */ |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 178 | (0 << 15) | (0 << 14) | (1 << 11) | (1 << 10) | (1 << 9) | (0 << 8) |
| 179 | | (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0), |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 180 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 181 | 2372, |
| 182 | 21, |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 183 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 184 | 0, |
| 185 | 118, |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 186 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 187 | 0, |
| 188 | 3530, |
| 189 | 1, |
| 190 | 0, |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 191 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 192 | 65535, |
| 193 | 0, |
| 194 | 65535, |
| 195 | 23592, |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 196 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 197 | 0, |
| 198 | 128, |
| 199 | 128, |
| 200 | 128, |
| 201 | 0, |
| 202 | 128, |
| 203 | 253, |
| 204 | 81, |
| 205 | 0, |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 206 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 207 | 17, |
| 208 | 27, |
| 209 | 23, |
| 210 | 51, |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 211 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 212 | 1, |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 213 | } |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 214 | }; |
| 215 | |
| 216 | static struct dibx000_bandwidth_config stk7700d_mt2266_pll_config = { |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 217 | 60000, 30000, |
| 218 | 1, 8, 3, 1, 0, |
| 219 | 0, 0, 1, 1, 2, |
| 220 | (3 << 14) | (1 << 12) | (524 << 0), |
| 221 | 0, |
| 222 | 20452225, |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 223 | }; |
| 224 | |
| 225 | static struct dib7000p_config stk7700d_dib7000p_mt2266_config[] = { |
| 226 | { .output_mpeg2_in_188_bytes = 1, |
| 227 | .hostbus_diversity = 1, |
| 228 | .tuner_is_baseband = 1, |
| 229 | |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 230 | .agc_config_count = 2, |
| 231 | .agc = stk7700d_7000p_mt2266_agc_config, |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 232 | .bw = &stk7700d_mt2266_pll_config, |
| 233 | |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 234 | .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS, |
| 235 | .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES, |
| 236 | .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS, |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 237 | }, |
| 238 | { .output_mpeg2_in_188_bytes = 1, |
| 239 | .hostbus_diversity = 1, |
| 240 | .tuner_is_baseband = 1, |
| 241 | |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 242 | .agc_config_count = 2, |
| 243 | .agc = stk7700d_7000p_mt2266_agc_config, |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 244 | .bw = &stk7700d_mt2266_pll_config, |
| 245 | |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 246 | .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS, |
| 247 | .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES, |
| 248 | .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS, |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 249 | } |
| 250 | }; |
| 251 | |
| 252 | static struct mt2266_config stk7700d_mt2266_config[2] = { |
| 253 | { .i2c_address = 0x60 |
| 254 | }, |
| 255 | { .i2c_address = 0x60 |
| 256 | } |
| 257 | }; |
| 258 | |
Daniel Gimpelevich | 132c318 | 2008-01-25 06:02:42 -0300 | [diff] [blame] | 259 | static int stk7700P2_frontend_attach(struct dvb_usb_adapter *adap) |
| 260 | { |
| 261 | if (adap->id == 0) { |
| 262 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); |
| 263 | msleep(10); |
| 264 | dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); |
| 265 | dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); |
| 266 | dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); |
| 267 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); |
| 268 | msleep(10); |
| 269 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); |
| 270 | msleep(10); |
Devin Heitmueller | 83c4fdf | 2009-01-21 01:55:45 -0300 | [diff] [blame] | 271 | if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18, |
| 272 | stk7700d_dib7000p_mt2266_config) |
| 273 | != 0) { |
| 274 | err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n", __func__); |
| 275 | return -ENODEV; |
| 276 | } |
Daniel Gimpelevich | 132c318 | 2008-01-25 06:02:42 -0300 | [diff] [blame] | 277 | } |
| 278 | |
| 279 | adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap,0x80+(adap->id << 1), |
| 280 | &stk7700d_dib7000p_mt2266_config[adap->id]); |
| 281 | |
| 282 | return adap->fe == NULL ? -ENODEV : 0; |
| 283 | } |
| 284 | |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 285 | static int stk7700d_frontend_attach(struct dvb_usb_adapter *adap) |
| 286 | { |
| 287 | if (adap->id == 0) { |
| 288 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); |
| 289 | msleep(10); |
| 290 | dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); |
| 291 | dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); |
| 292 | dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); |
| 293 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); |
| 294 | msleep(10); |
| 295 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); |
| 296 | msleep(10); |
| 297 | dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); |
Devin Heitmueller | 83c4fdf | 2009-01-21 01:55:45 -0300 | [diff] [blame] | 298 | if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 2, 18, |
| 299 | stk7700d_dib7000p_mt2266_config) |
| 300 | != 0) { |
| 301 | err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n", __func__); |
| 302 | return -ENODEV; |
| 303 | } |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 304 | } |
| 305 | |
| 306 | adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap,0x80+(adap->id << 1), |
| 307 | &stk7700d_dib7000p_mt2266_config[adap->id]); |
| 308 | |
| 309 | return adap->fe == NULL ? -ENODEV : 0; |
| 310 | } |
| 311 | |
| 312 | static int stk7700d_tuner_attach(struct dvb_usb_adapter *adap) |
| 313 | { |
| 314 | struct i2c_adapter *tun_i2c; |
| 315 | tun_i2c = dib7000p_get_i2c_master(adap->fe, DIBX000_I2C_INTERFACE_TUNER, 1); |
| 316 | return dvb_attach(mt2266_attach, adap->fe, tun_i2c, |
Joe Perches | 1ebcad7 | 2009-07-02 15:57:09 -0300 | [diff] [blame] | 317 | &stk7700d_mt2266_config[adap->id]) == NULL ? -ENODEV : 0; |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 318 | } |
| 319 | |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 320 | /* STK7700-PH: Digital/Analog Hybrid Tuner, e.h. Cinergy HT USB HE */ |
Harvey Harrison | b1721d0 | 2008-04-25 19:03:08 -0700 | [diff] [blame] | 321 | static struct dibx000_agc_config xc3028_agc_config = { |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 322 | BAND_VHF | BAND_UHF, /* band_caps */ |
| 323 | |
| 324 | /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=0, |
| 325 | * P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0, |
| 326 | * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */ |
| 327 | (0 << 15) | (0 << 14) | (0 << 11) | (0 << 10) | (0 << 9) | (0 << 8) | |
| 328 | (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0), /* setup */ |
| 329 | |
| 330 | 712, /* inv_gain */ |
| 331 | 21, /* time_stabiliz */ |
| 332 | |
| 333 | 0, /* alpha_level */ |
| 334 | 118, /* thlock */ |
| 335 | |
| 336 | 0, /* wbd_inv */ |
| 337 | 2867, /* wbd_ref */ |
| 338 | 0, /* wbd_sel */ |
| 339 | 2, /* wbd_alpha */ |
| 340 | |
| 341 | 0, /* agc1_max */ |
| 342 | 0, /* agc1_min */ |
| 343 | 39718, /* agc2_max */ |
| 344 | 9930, /* agc2_min */ |
| 345 | 0, /* agc1_pt1 */ |
| 346 | 0, /* agc1_pt2 */ |
| 347 | 0, /* agc1_pt3 */ |
| 348 | 0, /* agc1_slope1 */ |
| 349 | 0, /* agc1_slope2 */ |
| 350 | 0, /* agc2_pt1 */ |
| 351 | 128, /* agc2_pt2 */ |
| 352 | 29, /* agc2_slope1 */ |
| 353 | 29, /* agc2_slope2 */ |
| 354 | |
| 355 | 17, /* alpha_mant */ |
| 356 | 27, /* alpha_exp */ |
| 357 | 23, /* beta_mant */ |
| 358 | 51, /* beta_exp */ |
| 359 | |
| 360 | 1, /* perform_agc_softsplit */ |
| 361 | }; |
| 362 | |
| 363 | /* PLL Configuration for COFDM BW_MHz = 8.00 with external clock = 30.00 */ |
Harvey Harrison | b1721d0 | 2008-04-25 19:03:08 -0700 | [diff] [blame] | 364 | static struct dibx000_bandwidth_config xc3028_bw_config = { |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 365 | 60000, 30000, /* internal, sampling */ |
| 366 | 1, 8, 3, 1, 0, /* pll_cfg: prediv, ratio, range, reset, bypass */ |
| 367 | 0, 0, 1, 1, 0, /* misc: refdiv, bypclk_div, IO_CLK_en_core, ADClkSrc, |
| 368 | modulo */ |
| 369 | (3 << 14) | (1 << 12) | (524 << 0), /* sad_cfg: refsel, sel, freq_15k */ |
| 370 | (1 << 25) | 5816102, /* ifreq = 5.200000 MHz */ |
| 371 | 20452225, /* timf */ |
| 372 | 30000000, /* xtal_hz */ |
| 373 | }; |
| 374 | |
| 375 | static struct dib7000p_config stk7700ph_dib7700_xc3028_config = { |
| 376 | .output_mpeg2_in_188_bytes = 1, |
| 377 | .tuner_is_baseband = 1, |
| 378 | |
| 379 | .agc_config_count = 1, |
| 380 | .agc = &xc3028_agc_config, |
| 381 | .bw = &xc3028_bw_config, |
| 382 | |
| 383 | .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS, |
| 384 | .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES, |
| 385 | .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS, |
| 386 | }; |
| 387 | |
Michael Krufky | d7cba04 | 2008-09-12 13:31:45 -0300 | [diff] [blame] | 388 | static int stk7700ph_xc3028_callback(void *ptr, int component, |
| 389 | int command, int arg) |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 390 | { |
| 391 | struct dvb_usb_adapter *adap = ptr; |
| 392 | |
| 393 | switch (command) { |
| 394 | case XC2028_TUNER_RESET: |
| 395 | /* Send the tuner in then out of reset */ |
| 396 | dib7000p_set_gpio(adap->fe, 8, 0, 0); msleep(10); |
| 397 | dib7000p_set_gpio(adap->fe, 8, 0, 1); |
| 398 | break; |
| 399 | case XC2028_RESET_CLK: |
| 400 | break; |
| 401 | default: |
| 402 | err("%s: unknown command %d, arg %d\n", __func__, |
| 403 | command, arg); |
| 404 | return -EINVAL; |
| 405 | } |
| 406 | return 0; |
| 407 | } |
| 408 | |
| 409 | static struct xc2028_ctrl stk7700ph_xc3028_ctrl = { |
| 410 | .fname = XC2028_DEFAULT_FIRMWARE, |
| 411 | .max_len = 64, |
| 412 | .demod = XC3028_FE_DIBCOM52, |
| 413 | }; |
| 414 | |
| 415 | static struct xc2028_config stk7700ph_xc3028_config = { |
| 416 | .i2c_addr = 0x61, |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 417 | .ctrl = &stk7700ph_xc3028_ctrl, |
| 418 | }; |
| 419 | |
| 420 | static int stk7700ph_frontend_attach(struct dvb_usb_adapter *adap) |
| 421 | { |
| 422 | struct usb_device_descriptor *desc = &adap->dev->udev->descriptor; |
| 423 | |
Al Viro | da5ee48 | 2008-05-21 00:31:21 -0300 | [diff] [blame] | 424 | if (desc->idVendor == cpu_to_le16(USB_VID_PINNACLE) && |
| 425 | desc->idProduct == cpu_to_le16(USB_PID_PINNACLE_EXPRESSCARD_320CX)) |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 426 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); |
| 427 | else |
| 428 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); |
| 429 | msleep(20); |
| 430 | dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); |
| 431 | dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); |
| 432 | dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); |
| 433 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); |
| 434 | msleep(10); |
| 435 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); |
| 436 | msleep(20); |
| 437 | dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); |
| 438 | msleep(10); |
| 439 | |
Devin Heitmueller | 83c4fdf | 2009-01-21 01:55:45 -0300 | [diff] [blame] | 440 | if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18, |
| 441 | &stk7700ph_dib7700_xc3028_config) != 0) { |
| 442 | err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n", |
| 443 | __func__); |
| 444 | return -ENODEV; |
| 445 | } |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 446 | |
| 447 | adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, |
| 448 | &stk7700ph_dib7700_xc3028_config); |
| 449 | |
| 450 | return adap->fe == NULL ? -ENODEV : 0; |
| 451 | } |
| 452 | |
| 453 | static int stk7700ph_tuner_attach(struct dvb_usb_adapter *adap) |
| 454 | { |
| 455 | struct i2c_adapter *tun_i2c; |
| 456 | |
| 457 | tun_i2c = dib7000p_get_i2c_master(adap->fe, |
| 458 | DIBX000_I2C_INTERFACE_TUNER, 1); |
| 459 | |
| 460 | stk7700ph_xc3028_config.i2c_adap = tun_i2c; |
Michael Krufky | d7cba04 | 2008-09-12 13:31:45 -0300 | [diff] [blame] | 461 | |
| 462 | /* FIXME: generalize & move to common area */ |
| 463 | adap->fe->callback = stk7700ph_xc3028_callback; |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 464 | |
| 465 | return dvb_attach(xc2028_attach, adap->fe, &stk7700ph_xc3028_config) |
| 466 | == NULL ? -ENODEV : 0; |
| 467 | } |
| 468 | |
Devin Heitmueller | 4b330be | 2008-12-01 06:51:14 -0300 | [diff] [blame] | 469 | #define DEFAULT_RC_INTERVAL 50 |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 470 | |
| 471 | static u8 rc_request[] = { REQUEST_POLL_RC, 0 }; |
| 472 | |
Patrick Boettcher | 58e6f95 | 2008-03-29 21:37:01 -0300 | [diff] [blame] | 473 | /* Number of keypresses to ignore before start repeating */ |
Devin Heitmueller | 4b330be | 2008-12-01 06:51:14 -0300 | [diff] [blame] | 474 | #define RC_REPEAT_DELAY 6 |
Patrick Boettcher | 58e6f95 | 2008-03-29 21:37:01 -0300 | [diff] [blame] | 475 | |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 476 | /* |
| 477 | * This function is used only when firmware is < 1.20 version. Newer |
| 478 | * firmwares use bulk mode, with functions implemented at dib0700_core, |
| 479 | * at dib0700_rc_urb_completion() |
| 480 | */ |
| 481 | static int dib0700_rc_query_old_firmware(struct dvb_usb_device *d) |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 482 | { |
| 483 | u8 key[4]; |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 484 | u32 keycode; |
| 485 | u8 toggle; |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 486 | int i; |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 487 | struct dib0700_state *st = d->priv; |
Devin Heitmueller | 6a20710 | 2010-01-04 02:43:19 -0300 | [diff] [blame] | 488 | |
Devin Heitmueller | 6a20710 | 2010-01-04 02:43:19 -0300 | [diff] [blame] | 489 | if (st->fw_version >= 0x10200) { |
| 490 | /* For 1.20 firmware , We need to keep the RC polling |
| 491 | callback so we can reuse the input device setup in |
| 492 | dvb-usb-remote.c. However, the actual work is being done |
| 493 | in the bulk URB completion handler. */ |
| 494 | return 0; |
| 495 | } |
| 496 | |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 497 | i = dib0700_ctrl_rd(d, rc_request, 2, key, 4); |
| 498 | if (i <= 0) { |
Janne Grunau | 034d65e | 2007-07-31 08:48:40 -0300 | [diff] [blame] | 499 | err("RC Query Failed"); |
Janne Grunau | 89f4267 | 2007-07-31 19:45:13 -0300 | [diff] [blame] | 500 | return -1; |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 501 | } |
Patrick Boettcher | 58e6f95 | 2008-03-29 21:37:01 -0300 | [diff] [blame] | 502 | |
| 503 | /* losing half of KEY_0 events from Philipps rc5 remotes.. */ |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 504 | if (key[0] == 0 && key[1] == 0 && key[2] == 0 && key[3] == 0) |
| 505 | return 0; |
Patrick Boettcher | 58e6f95 | 2008-03-29 21:37:01 -0300 | [diff] [blame] | 506 | |
| 507 | /* info("%d: %2X %2X %2X %2X",dvb_usb_dib0700_ir_proto,(int)key[3-2],(int)key[3-3],(int)key[3-1],(int)key[3]); */ |
| 508 | |
| 509 | dib0700_rc_setup(d); /* reset ir sensor data to prevent false events */ |
| 510 | |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 511 | d->last_event = 0; |
Mauro Carvalho Chehab | 0ffd1ab | 2010-08-01 09:37:23 -0300 | [diff] [blame] | 512 | switch (d->props.rc.core.protocol) { |
| 513 | case IR_TYPE_NEC: |
Patrick Boettcher | 58e6f95 | 2008-03-29 21:37:01 -0300 | [diff] [blame] | 514 | /* NEC protocol sends repeat code as 0 0 0 FF */ |
| 515 | if ((key[3-2] == 0x00) && (key[3-3] == 0x00) && |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 516 | (key[3] == 0xff)) |
| 517 | keycode = d->last_event; |
| 518 | else { |
| 519 | keycode = key[3-2] << 8 | key[3-3]; |
| 520 | d->last_event = keycode; |
Patrick Boettcher | 58e6f95 | 2008-03-29 21:37:01 -0300 | [diff] [blame] | 521 | } |
Patrick Boettcher | 58e6f95 | 2008-03-29 21:37:01 -0300 | [diff] [blame] | 522 | |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 523 | ir_keydown(d->rc_input_dev, keycode, 0); |
| 524 | break; |
| 525 | default: |
| 526 | /* RC-5 protocol changes toggle bit on new keypress */ |
| 527 | keycode = key[3-2] << 8 | key[3-3]; |
| 528 | toggle = key[3-1]; |
| 529 | ir_keydown(d->rc_input_dev, keycode, toggle); |
| 530 | |
Patrick Boettcher | 58e6f95 | 2008-03-29 21:37:01 -0300 | [diff] [blame] | 531 | break; |
| 532 | } |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 533 | return 0; |
| 534 | } |
| 535 | |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 536 | /* STK7700P: Hauppauge Nova-T Stick, AVerMedia Volar */ |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 537 | static struct dibx000_agc_config stk7700p_7000m_mt2060_agc_config = { |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 538 | BAND_UHF | BAND_VHF, |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 539 | |
| 540 | /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=5, P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, |
| 541 | * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */ |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 542 | (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8) |
| 543 | | (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0), |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 544 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 545 | 712, |
| 546 | 41, |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 547 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 548 | 0, |
| 549 | 118, |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 550 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 551 | 0, |
| 552 | 4095, |
| 553 | 0, |
| 554 | 0, |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 555 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 556 | 42598, |
| 557 | 17694, |
| 558 | 45875, |
| 559 | 2621, |
| 560 | 0, |
| 561 | 76, |
| 562 | 139, |
| 563 | 52, |
| 564 | 59, |
| 565 | 107, |
| 566 | 172, |
| 567 | 57, |
| 568 | 70, |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 569 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 570 | 21, |
| 571 | 25, |
| 572 | 28, |
| 573 | 48, |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 574 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 575 | 1, |
| 576 | { 0, |
| 577 | 107, |
| 578 | 51800, |
| 579 | 24700 |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 580 | }, |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 581 | }; |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 582 | |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 583 | static struct dibx000_agc_config stk7700p_7000p_mt2060_agc_config = { |
| 584 | BAND_UHF | BAND_VHF, |
| 585 | |
| 586 | /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=5, P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, |
| 587 | * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=2, P_agc_write=0 */ |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 588 | (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8) |
| 589 | | (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0), |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 590 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 591 | 712, |
| 592 | 41, |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 593 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 594 | 0, |
| 595 | 118, |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 596 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 597 | 0, |
| 598 | 4095, |
| 599 | 0, |
| 600 | 0, |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 601 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 602 | 42598, |
| 603 | 16384, |
| 604 | 42598, |
| 605 | 0, |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 606 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 607 | 0, |
| 608 | 137, |
| 609 | 255, |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 610 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 611 | 0, |
| 612 | 255, |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 613 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 614 | 0, |
| 615 | 0, |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 616 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 617 | 0, |
| 618 | 41, |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 619 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 620 | 15, |
| 621 | 25, |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 622 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 623 | 28, |
| 624 | 48, |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 625 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 626 | 0, |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 627 | }; |
| 628 | |
| 629 | static struct dibx000_bandwidth_config stk7700p_pll_config = { |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 630 | 60000, 30000, |
| 631 | 1, 8, 3, 1, 0, |
| 632 | 0, 0, 1, 1, 0, |
| 633 | (3 << 14) | (1 << 12) | (524 << 0), |
| 634 | 60258167, |
| 635 | 20452225, |
| 636 | 30000000, |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 637 | }; |
| 638 | |
| 639 | static struct dib7000m_config stk7700p_dib7000m_config = { |
| 640 | .dvbt_mode = 1, |
| 641 | .output_mpeg2_in_188_bytes = 1, |
| 642 | .quartz_direct = 1, |
| 643 | |
| 644 | .agc_config_count = 1, |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 645 | .agc = &stk7700p_7000m_mt2060_agc_config, |
| 646 | .bw = &stk7700p_pll_config, |
| 647 | |
| 648 | .gpio_dir = DIB7000M_GPIO_DEFAULT_DIRECTIONS, |
| 649 | .gpio_val = DIB7000M_GPIO_DEFAULT_VALUES, |
| 650 | .gpio_pwm_pos = DIB7000M_GPIO_DEFAULT_PWM_POS, |
| 651 | }; |
| 652 | |
| 653 | static struct dib7000p_config stk7700p_dib7000p_config = { |
| 654 | .output_mpeg2_in_188_bytes = 1, |
| 655 | |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 656 | .agc_config_count = 1, |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 657 | .agc = &stk7700p_7000p_mt2060_agc_config, |
| 658 | .bw = &stk7700p_pll_config, |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 659 | |
| 660 | .gpio_dir = DIB7000M_GPIO_DEFAULT_DIRECTIONS, |
| 661 | .gpio_val = DIB7000M_GPIO_DEFAULT_VALUES, |
| 662 | .gpio_pwm_pos = DIB7000M_GPIO_DEFAULT_PWM_POS, |
| 663 | }; |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 664 | |
| 665 | static int stk7700p_frontend_attach(struct dvb_usb_adapter *adap) |
| 666 | { |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 667 | struct dib0700_state *st = adap->dev->priv; |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 668 | /* unless there is no real power management in DVB - we leave the device on GPIO6 */ |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 669 | |
| 670 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); |
| 671 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); msleep(50); |
| 672 | |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 673 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); msleep(10); |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 674 | dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); |
| 675 | |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 676 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); msleep(10); |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 677 | dib0700_ctrl_clock(adap->dev, 72, 1); |
| 678 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); msleep(100); |
| 679 | |
| 680 | dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 681 | |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 682 | st->mt2060_if1[0] = 1220; |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 683 | |
| 684 | if (dib7000pc_detection(&adap->dev->i2c_adap)) { |
| 685 | adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 18, &stk7700p_dib7000p_config); |
| 686 | st->is_dib7000pc = 1; |
| 687 | } else |
| 688 | adap->fe = dvb_attach(dib7000m_attach, &adap->dev->i2c_adap, 18, &stk7700p_dib7000m_config); |
| 689 | |
| 690 | return adap->fe == NULL ? -ENODEV : 0; |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 691 | } |
| 692 | |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 693 | static struct mt2060_config stk7700p_mt2060_config = { |
| 694 | 0x60 |
| 695 | }; |
| 696 | |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 697 | static int stk7700p_tuner_attach(struct dvb_usb_adapter *adap) |
| 698 | { |
Olivier DANET | c52344f | 2008-01-25 06:50:07 -0300 | [diff] [blame] | 699 | struct i2c_adapter *prim_i2c = &adap->dev->i2c_adap; |
Patrick Boettcher | 69ea31e | 2006-10-17 18:28:14 -0300 | [diff] [blame] | 700 | struct dib0700_state *st = adap->dev->priv; |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 701 | struct i2c_adapter *tun_i2c; |
Olivier DANET | c52344f | 2008-01-25 06:50:07 -0300 | [diff] [blame] | 702 | s8 a; |
| 703 | int if1=1220; |
Al Viro | da5ee48 | 2008-05-21 00:31:21 -0300 | [diff] [blame] | 704 | if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) && |
| 705 | adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_STICK)) { |
Olivier DANET | c52344f | 2008-01-25 06:50:07 -0300 | [diff] [blame] | 706 | if (!eeprom_read(prim_i2c,0x58,&a)) if1=1220+a; |
| 707 | } |
Patrick Boettcher | a75763f | 2006-10-18 08:34:16 -0300 | [diff] [blame] | 708 | if (st->is_dib7000pc) |
| 709 | tun_i2c = dib7000p_get_i2c_master(adap->fe, DIBX000_I2C_INTERFACE_TUNER, 1); |
| 710 | else |
| 711 | tun_i2c = dib7000m_get_i2c_master(adap->fe, DIBX000_I2C_INTERFACE_TUNER, 1); |
| 712 | |
| 713 | return dvb_attach(mt2060_attach, adap->fe, tun_i2c, &stk7700p_mt2060_config, |
Olivier DANET | c52344f | 2008-01-25 06:50:07 -0300 | [diff] [blame] | 714 | if1) == NULL ? -ENODEV : 0; |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 715 | } |
| 716 | |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 717 | /* DIB7070 generic */ |
| 718 | static struct dibx000_agc_config dib7070_agc_config = { |
| 719 | BAND_UHF | BAND_VHF | BAND_LBAND | BAND_SBAND, |
| 720 | /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=5, P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, |
| 721 | * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, P_agc_write=0 */ |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 722 | (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8) |
| 723 | | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0), |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 724 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 725 | 600, |
| 726 | 10, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 727 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 728 | 0, |
| 729 | 118, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 730 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 731 | 0, |
| 732 | 3530, |
| 733 | 1, |
| 734 | 5, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 735 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 736 | 65535, |
| 737 | 0, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 738 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 739 | 65535, |
| 740 | 0, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 741 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 742 | 0, |
| 743 | 40, |
| 744 | 183, |
| 745 | 206, |
| 746 | 255, |
| 747 | 72, |
| 748 | 152, |
| 749 | 88, |
| 750 | 90, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 751 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 752 | 17, |
| 753 | 27, |
| 754 | 23, |
| 755 | 51, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 756 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 757 | 0, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 758 | }; |
| 759 | |
| 760 | static int dib7070_tuner_reset(struct dvb_frontend *fe, int onoff) |
| 761 | { |
Patrick Boettcher | 7e5ce65 | 2009-08-03 13:43:40 -0300 | [diff] [blame] | 762 | deb_info("reset: %d", onoff); |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 763 | return dib7000p_set_gpio(fe, 8, 0, !onoff); |
| 764 | } |
| 765 | |
| 766 | static int dib7070_tuner_sleep(struct dvb_frontend *fe, int onoff) |
| 767 | { |
Patrick Boettcher | 7e5ce65 | 2009-08-03 13:43:40 -0300 | [diff] [blame] | 768 | deb_info("sleep: %d", onoff); |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 769 | return dib7000p_set_gpio(fe, 9, 0, onoff); |
| 770 | } |
| 771 | |
| 772 | static struct dib0070_config dib7070p_dib0070_config[2] = { |
| 773 | { |
| 774 | .i2c_address = DEFAULT_DIB0070_I2C_ADDRESS, |
| 775 | .reset = dib7070_tuner_reset, |
| 776 | .sleep = dib7070_tuner_sleep, |
| 777 | .clock_khz = 12000, |
Patrick Boettcher | 7e5ce65 | 2009-08-03 13:43:40 -0300 | [diff] [blame] | 778 | .clock_pad_drive = 4, |
| 779 | .charge_pump = 2, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 780 | }, { |
| 781 | .i2c_address = DEFAULT_DIB0070_I2C_ADDRESS, |
| 782 | .reset = dib7070_tuner_reset, |
| 783 | .sleep = dib7070_tuner_sleep, |
| 784 | .clock_khz = 12000, |
Patrick Boettcher | 7e5ce65 | 2009-08-03 13:43:40 -0300 | [diff] [blame] | 785 | .charge_pump = 2, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 786 | } |
| 787 | }; |
| 788 | |
Olivier Grenie | d300bd6 | 2009-09-15 06:55:35 -0300 | [diff] [blame] | 789 | static struct dib0070_config dib7770p_dib0070_config = { |
| 790 | .i2c_address = DEFAULT_DIB0070_I2C_ADDRESS, |
| 791 | .reset = dib7070_tuner_reset, |
| 792 | .sleep = dib7070_tuner_sleep, |
| 793 | .clock_khz = 12000, |
| 794 | .clock_pad_drive = 0, |
| 795 | .flip_chip = 1, |
Olivier Grenie | eac1fe1 | 2009-09-23 13:41:27 -0300 | [diff] [blame] | 796 | .charge_pump = 2, |
Olivier Grenie | d300bd6 | 2009-09-15 06:55:35 -0300 | [diff] [blame] | 797 | }; |
| 798 | |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 799 | static int dib7070_set_param_override(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep) |
| 800 | { |
| 801 | struct dvb_usb_adapter *adap = fe->dvb->priv; |
| 802 | struct dib0700_adapter_state *state = adap->priv; |
| 803 | |
| 804 | u16 offset; |
| 805 | u8 band = BAND_OF_FREQUENCY(fep->frequency/1000); |
| 806 | switch (band) { |
| 807 | case BAND_VHF: offset = 950; break; |
| 808 | case BAND_UHF: |
| 809 | default: offset = 550; break; |
| 810 | } |
| 811 | deb_info("WBD for DiB7000P: %d\n", offset + dib0070_wbd_offset(fe)); |
| 812 | dib7000p_set_wbd_ref(fe, offset + dib0070_wbd_offset(fe)); |
| 813 | return state->set_param_save(fe, fep); |
| 814 | } |
| 815 | |
Olivier Grenie | d300bd6 | 2009-09-15 06:55:35 -0300 | [diff] [blame] | 816 | static int dib7770_set_param_override(struct dvb_frontend *fe, |
| 817 | struct dvb_frontend_parameters *fep) |
| 818 | { |
| 819 | struct dvb_usb_adapter *adap = fe->dvb->priv; |
| 820 | struct dib0700_adapter_state *state = adap->priv; |
| 821 | |
| 822 | u16 offset; |
| 823 | u8 band = BAND_OF_FREQUENCY(fep->frequency/1000); |
| 824 | switch (band) { |
| 825 | case BAND_VHF: |
| 826 | dib7000p_set_gpio(fe, 0, 0, 1); |
| 827 | offset = 850; |
| 828 | break; |
| 829 | case BAND_UHF: |
| 830 | default: |
| 831 | dib7000p_set_gpio(fe, 0, 0, 0); |
| 832 | offset = 250; |
| 833 | break; |
| 834 | } |
| 835 | deb_info("WBD for DiB7000P: %d\n", offset + dib0070_wbd_offset(fe)); |
| 836 | dib7000p_set_wbd_ref(fe, offset + dib0070_wbd_offset(fe)); |
| 837 | return state->set_param_save(fe, fep); |
| 838 | } |
| 839 | |
| 840 | static int dib7770p_tuner_attach(struct dvb_usb_adapter *adap) |
| 841 | { |
| 842 | struct dib0700_adapter_state *st = adap->priv; |
| 843 | struct i2c_adapter *tun_i2c = dib7000p_get_i2c_master(adap->fe, |
| 844 | DIBX000_I2C_INTERFACE_TUNER, 1); |
| 845 | |
| 846 | if (dvb_attach(dib0070_attach, adap->fe, tun_i2c, |
| 847 | &dib7770p_dib0070_config) == NULL) |
| 848 | return -ENODEV; |
| 849 | |
| 850 | st->set_param_save = adap->fe->ops.tuner_ops.set_params; |
| 851 | adap->fe->ops.tuner_ops.set_params = dib7770_set_param_override; |
| 852 | return 0; |
| 853 | } |
| 854 | |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 855 | static int dib7070p_tuner_attach(struct dvb_usb_adapter *adap) |
| 856 | { |
| 857 | struct dib0700_adapter_state *st = adap->priv; |
| 858 | struct i2c_adapter *tun_i2c = dib7000p_get_i2c_master(adap->fe, DIBX000_I2C_INTERFACE_TUNER, 1); |
| 859 | |
| 860 | if (adap->id == 0) { |
| 861 | if (dvb_attach(dib0070_attach, adap->fe, tun_i2c, &dib7070p_dib0070_config[0]) == NULL) |
| 862 | return -ENODEV; |
| 863 | } else { |
| 864 | if (dvb_attach(dib0070_attach, adap->fe, tun_i2c, &dib7070p_dib0070_config[1]) == NULL) |
| 865 | return -ENODEV; |
| 866 | } |
| 867 | |
| 868 | st->set_param_save = adap->fe->ops.tuner_ops.set_params; |
| 869 | adap->fe->ops.tuner_ops.set_params = dib7070_set_param_override; |
| 870 | return 0; |
| 871 | } |
| 872 | |
Olivier Grenie | f8731f4 | 2009-09-18 04:08:43 -0300 | [diff] [blame] | 873 | static int stk70x0p_pid_filter(struct dvb_usb_adapter *adapter, int index, u16 pid, int onoff) |
| 874 | { |
| 875 | return dib7000p_pid_filter(adapter->fe, index, pid, onoff); |
| 876 | } |
| 877 | |
| 878 | static int stk70x0p_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff) |
| 879 | { |
| 880 | return dib7000p_pid_filter_ctrl(adapter->fe, onoff); |
| 881 | } |
| 882 | |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 883 | static struct dibx000_bandwidth_config dib7070_bw_config_12_mhz = { |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 884 | 60000, 15000, |
| 885 | 1, 20, 3, 1, 0, |
| 886 | 0, 0, 1, 1, 2, |
| 887 | (3 << 14) | (1 << 12) | (524 << 0), |
| 888 | (0 << 25) | 0, |
| 889 | 20452225, |
| 890 | 12000000, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 891 | }; |
| 892 | |
| 893 | static struct dib7000p_config dib7070p_dib7000p_config = { |
| 894 | .output_mpeg2_in_188_bytes = 1, |
| 895 | |
| 896 | .agc_config_count = 1, |
| 897 | .agc = &dib7070_agc_config, |
| 898 | .bw = &dib7070_bw_config_12_mhz, |
Patrick Boettcher | 3cb2c39 | 2008-01-25 07:25:20 -0300 | [diff] [blame] | 899 | .tuner_is_baseband = 1, |
| 900 | .spur_protect = 1, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 901 | |
| 902 | .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS, |
| 903 | .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES, |
| 904 | .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS, |
| 905 | |
| 906 | .hostbus_diversity = 1, |
| 907 | }; |
| 908 | |
| 909 | /* STK7070P */ |
| 910 | static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap) |
| 911 | { |
Al Viro | da5ee48 | 2008-05-21 00:31:21 -0300 | [diff] [blame] | 912 | struct usb_device_descriptor *p = &adap->dev->udev->descriptor; |
| 913 | if (p->idVendor == cpu_to_le16(USB_VID_PINNACLE) && |
| 914 | p->idProduct == cpu_to_le16(USB_PID_PINNACLE_PCTV72E)) |
| 915 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 916 | else |
Al Viro | da5ee48 | 2008-05-21 00:31:21 -0300 | [diff] [blame] | 917 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 918 | msleep(10); |
| 919 | dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); |
| 920 | dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); |
| 921 | dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); |
| 922 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); |
| 923 | |
| 924 | dib0700_ctrl_clock(adap->dev, 72, 1); |
| 925 | |
| 926 | msleep(10); |
| 927 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); |
| 928 | msleep(10); |
| 929 | dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); |
| 930 | |
Devin Heitmueller | 83c4fdf | 2009-01-21 01:55:45 -0300 | [diff] [blame] | 931 | if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 1, 18, |
| 932 | &dib7070p_dib7000p_config) != 0) { |
| 933 | err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n", |
| 934 | __func__); |
| 935 | return -ENODEV; |
| 936 | } |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 937 | |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 938 | adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, |
| 939 | &dib7070p_dib7000p_config); |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 940 | return adap->fe == NULL ? -ENODEV : 0; |
| 941 | } |
| 942 | |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 943 | /* DIB807x generic */ |
| 944 | static struct dibx000_agc_config dib807x_agc_config[2] = { |
| 945 | { |
| 946 | BAND_VHF, |
| 947 | /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, |
| 948 | * P_agc_freq_pwm_div=1, P_agc_inv_pwm1=0, |
| 949 | * P_agc_inv_pwm2=0,P_agc_inh_dc_rv_est=0, |
| 950 | * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, |
| 951 | * P_agc_write=0 */ |
| 952 | (0 << 15) | (0 << 14) | (7 << 11) | (0 << 10) | (0 << 9) | |
| 953 | (0 << 8) | (3 << 5) | (0 << 4) | (5 << 1) | |
| 954 | (0 << 0), /* setup*/ |
| 955 | |
| 956 | 600, /* inv_gain*/ |
| 957 | 10, /* time_stabiliz*/ |
| 958 | |
| 959 | 0, /* alpha_level*/ |
| 960 | 118, /* thlock*/ |
| 961 | |
| 962 | 0, /* wbd_inv*/ |
| 963 | 3530, /* wbd_ref*/ |
| 964 | 1, /* wbd_sel*/ |
| 965 | 5, /* wbd_alpha*/ |
| 966 | |
| 967 | 65535, /* agc1_max*/ |
| 968 | 0, /* agc1_min*/ |
| 969 | |
| 970 | 65535, /* agc2_max*/ |
| 971 | 0, /* agc2_min*/ |
| 972 | |
| 973 | 0, /* agc1_pt1*/ |
| 974 | 40, /* agc1_pt2*/ |
| 975 | 183, /* agc1_pt3*/ |
| 976 | 206, /* agc1_slope1*/ |
| 977 | 255, /* agc1_slope2*/ |
| 978 | 72, /* agc2_pt1*/ |
| 979 | 152, /* agc2_pt2*/ |
| 980 | 88, /* agc2_slope1*/ |
| 981 | 90, /* agc2_slope2*/ |
| 982 | |
| 983 | 17, /* alpha_mant*/ |
| 984 | 27, /* alpha_exp*/ |
| 985 | 23, /* beta_mant*/ |
| 986 | 51, /* beta_exp*/ |
| 987 | |
| 988 | 0, /* perform_agc_softsplit*/ |
| 989 | }, { |
| 990 | BAND_UHF, |
| 991 | /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, |
| 992 | * P_agc_freq_pwm_div=1, P_agc_inv_pwm1=0, |
| 993 | * P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0, |
| 994 | * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, |
| 995 | * P_agc_write=0 */ |
| 996 | (0 << 15) | (0 << 14) | (1 << 11) | (0 << 10) | (0 << 9) | |
| 997 | (0 << 8) | (3 << 5) | (0 << 4) | (5 << 1) | |
| 998 | (0 << 0), /* setup */ |
| 999 | |
| 1000 | 600, /* inv_gain*/ |
| 1001 | 10, /* time_stabiliz*/ |
| 1002 | |
| 1003 | 0, /* alpha_level*/ |
| 1004 | 118, /* thlock*/ |
| 1005 | |
| 1006 | 0, /* wbd_inv*/ |
| 1007 | 3530, /* wbd_ref*/ |
| 1008 | 1, /* wbd_sel*/ |
| 1009 | 5, /* wbd_alpha*/ |
| 1010 | |
| 1011 | 65535, /* agc1_max*/ |
| 1012 | 0, /* agc1_min*/ |
| 1013 | |
| 1014 | 65535, /* agc2_max*/ |
| 1015 | 0, /* agc2_min*/ |
| 1016 | |
| 1017 | 0, /* agc1_pt1*/ |
| 1018 | 40, /* agc1_pt2*/ |
| 1019 | 183, /* agc1_pt3*/ |
| 1020 | 206, /* agc1_slope1*/ |
| 1021 | 255, /* agc1_slope2*/ |
| 1022 | 72, /* agc2_pt1*/ |
| 1023 | 152, /* agc2_pt2*/ |
| 1024 | 88, /* agc2_slope1*/ |
| 1025 | 90, /* agc2_slope2*/ |
| 1026 | |
| 1027 | 17, /* alpha_mant*/ |
| 1028 | 27, /* alpha_exp*/ |
| 1029 | 23, /* beta_mant*/ |
| 1030 | 51, /* beta_exp*/ |
| 1031 | |
| 1032 | 0, /* perform_agc_softsplit*/ |
| 1033 | } |
| 1034 | }; |
| 1035 | |
| 1036 | static struct dibx000_bandwidth_config dib807x_bw_config_12_mhz = { |
| 1037 | 60000, 15000, /* internal, sampling*/ |
| 1038 | 1, 20, 3, 1, 0, /* pll_cfg: prediv, ratio, range, reset, bypass*/ |
| 1039 | 0, 0, 1, 1, 2, /* misc: refdiv, bypclk_div, IO_CLK_en_core, |
| 1040 | ADClkSrc, modulo */ |
| 1041 | (3 << 14) | (1 << 12) | (599 << 0), /* sad_cfg: refsel, sel, freq_15k*/ |
| 1042 | (0 << 25) | 0, /* ifreq = 0.000000 MHz*/ |
| 1043 | 18179755, /* timf*/ |
| 1044 | 12000000, /* xtal_hz*/ |
| 1045 | }; |
| 1046 | |
| 1047 | static struct dib8000_config dib807x_dib8000_config[2] = { |
| 1048 | { |
| 1049 | .output_mpeg2_in_188_bytes = 1, |
| 1050 | |
| 1051 | .agc_config_count = 2, |
| 1052 | .agc = dib807x_agc_config, |
| 1053 | .pll = &dib807x_bw_config_12_mhz, |
| 1054 | .tuner_is_baseband = 1, |
| 1055 | |
| 1056 | .gpio_dir = DIB8000_GPIO_DEFAULT_DIRECTIONS, |
| 1057 | .gpio_val = DIB8000_GPIO_DEFAULT_VALUES, |
| 1058 | .gpio_pwm_pos = DIB8000_GPIO_DEFAULT_PWM_POS, |
| 1059 | |
| 1060 | .hostbus_diversity = 1, |
| 1061 | .div_cfg = 1, |
| 1062 | .agc_control = &dib0070_ctrl_agc_filter, |
| 1063 | .output_mode = OUTMODE_MPEG2_FIFO, |
| 1064 | .drives = 0x2d98, |
| 1065 | }, { |
| 1066 | .output_mpeg2_in_188_bytes = 1, |
| 1067 | |
| 1068 | .agc_config_count = 2, |
| 1069 | .agc = dib807x_agc_config, |
| 1070 | .pll = &dib807x_bw_config_12_mhz, |
| 1071 | .tuner_is_baseband = 1, |
| 1072 | |
| 1073 | .gpio_dir = DIB8000_GPIO_DEFAULT_DIRECTIONS, |
| 1074 | .gpio_val = DIB8000_GPIO_DEFAULT_VALUES, |
| 1075 | .gpio_pwm_pos = DIB8000_GPIO_DEFAULT_PWM_POS, |
| 1076 | |
| 1077 | .hostbus_diversity = 1, |
| 1078 | .agc_control = &dib0070_ctrl_agc_filter, |
| 1079 | .output_mode = OUTMODE_MPEG2_FIFO, |
| 1080 | .drives = 0x2d98, |
| 1081 | } |
| 1082 | }; |
| 1083 | |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1084 | static int dib80xx_tuner_reset(struct dvb_frontend *fe, int onoff) |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 1085 | { |
| 1086 | return dib8000_set_gpio(fe, 5, 0, !onoff); |
| 1087 | } |
| 1088 | |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1089 | static int dib80xx_tuner_sleep(struct dvb_frontend *fe, int onoff) |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 1090 | { |
| 1091 | return dib8000_set_gpio(fe, 0, 0, onoff); |
| 1092 | } |
| 1093 | |
| 1094 | static const struct dib0070_wbd_gain_cfg dib8070_wbd_gain_cfg[] = { |
| 1095 | { 240, 7}, |
| 1096 | { 0xffff, 6}, |
| 1097 | }; |
| 1098 | |
| 1099 | static struct dib0070_config dib807x_dib0070_config[2] = { |
| 1100 | { |
| 1101 | .i2c_address = DEFAULT_DIB0070_I2C_ADDRESS, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1102 | .reset = dib80xx_tuner_reset, |
| 1103 | .sleep = dib80xx_tuner_sleep, |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 1104 | .clock_khz = 12000, |
| 1105 | .clock_pad_drive = 4, |
| 1106 | .vga_filter = 1, |
| 1107 | .force_crystal_mode = 1, |
| 1108 | .enable_third_order_filter = 1, |
| 1109 | .charge_pump = 0, |
| 1110 | .wbd_gain = dib8070_wbd_gain_cfg, |
| 1111 | .osc_buffer_state = 0, |
| 1112 | .freq_offset_khz_uhf = -100, |
| 1113 | .freq_offset_khz_vhf = -100, |
| 1114 | }, { |
| 1115 | .i2c_address = DEFAULT_DIB0070_I2C_ADDRESS, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1116 | .reset = dib80xx_tuner_reset, |
| 1117 | .sleep = dib80xx_tuner_sleep, |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 1118 | .clock_khz = 12000, |
| 1119 | .clock_pad_drive = 2, |
| 1120 | .vga_filter = 1, |
| 1121 | .force_crystal_mode = 1, |
| 1122 | .enable_third_order_filter = 1, |
| 1123 | .charge_pump = 0, |
| 1124 | .wbd_gain = dib8070_wbd_gain_cfg, |
| 1125 | .osc_buffer_state = 0, |
| 1126 | .freq_offset_khz_uhf = -25, |
| 1127 | .freq_offset_khz_vhf = -25, |
| 1128 | } |
| 1129 | }; |
| 1130 | |
| 1131 | static int dib807x_set_param_override(struct dvb_frontend *fe, |
| 1132 | struct dvb_frontend_parameters *fep) |
| 1133 | { |
| 1134 | struct dvb_usb_adapter *adap = fe->dvb->priv; |
| 1135 | struct dib0700_adapter_state *state = adap->priv; |
| 1136 | |
| 1137 | u16 offset = dib0070_wbd_offset(fe); |
| 1138 | u8 band = BAND_OF_FREQUENCY(fep->frequency/1000); |
| 1139 | switch (band) { |
| 1140 | case BAND_VHF: |
| 1141 | offset += 750; |
| 1142 | break; |
| 1143 | case BAND_UHF: /* fall-thru wanted */ |
| 1144 | default: |
| 1145 | offset += 250; break; |
| 1146 | } |
| 1147 | deb_info("WBD for DiB8000: %d\n", offset); |
| 1148 | dib8000_set_wbd_ref(fe, offset); |
| 1149 | |
| 1150 | return state->set_param_save(fe, fep); |
| 1151 | } |
| 1152 | |
| 1153 | static int dib807x_tuner_attach(struct dvb_usb_adapter *adap) |
| 1154 | { |
| 1155 | struct dib0700_adapter_state *st = adap->priv; |
| 1156 | struct i2c_adapter *tun_i2c = dib8000_get_i2c_master(adap->fe, |
| 1157 | DIBX000_I2C_INTERFACE_TUNER, 1); |
| 1158 | |
| 1159 | if (adap->id == 0) { |
| 1160 | if (dvb_attach(dib0070_attach, adap->fe, tun_i2c, |
| 1161 | &dib807x_dib0070_config[0]) == NULL) |
| 1162 | return -ENODEV; |
| 1163 | } else { |
| 1164 | if (dvb_attach(dib0070_attach, adap->fe, tun_i2c, |
| 1165 | &dib807x_dib0070_config[1]) == NULL) |
| 1166 | return -ENODEV; |
| 1167 | } |
| 1168 | |
| 1169 | st->set_param_save = adap->fe->ops.tuner_ops.set_params; |
| 1170 | adap->fe->ops.tuner_ops.set_params = dib807x_set_param_override; |
| 1171 | return 0; |
| 1172 | } |
| 1173 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1174 | static int stk80xx_pid_filter(struct dvb_usb_adapter *adapter, int index, |
| 1175 | u16 pid, int onoff) |
Olivier Grenie | f8731f4 | 2009-09-18 04:08:43 -0300 | [diff] [blame] | 1176 | { |
| 1177 | return dib8000_pid_filter(adapter->fe, index, pid, onoff); |
| 1178 | } |
| 1179 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1180 | static int stk80xx_pid_filter_ctrl(struct dvb_usb_adapter *adapter, |
| 1181 | int onoff) |
Olivier Grenie | f8731f4 | 2009-09-18 04:08:43 -0300 | [diff] [blame] | 1182 | { |
| 1183 | return dib8000_pid_filter_ctrl(adapter->fe, onoff); |
| 1184 | } |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 1185 | |
| 1186 | /* STK807x */ |
| 1187 | static int stk807x_frontend_attach(struct dvb_usb_adapter *adap) |
| 1188 | { |
| 1189 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); |
| 1190 | msleep(10); |
| 1191 | dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); |
| 1192 | dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); |
| 1193 | dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); |
| 1194 | |
| 1195 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); |
| 1196 | |
| 1197 | dib0700_ctrl_clock(adap->dev, 72, 1); |
| 1198 | |
| 1199 | msleep(10); |
| 1200 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); |
| 1201 | msleep(10); |
| 1202 | dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); |
| 1203 | |
| 1204 | dib8000_i2c_enumeration(&adap->dev->i2c_adap, 1, 18, |
| 1205 | 0x80); |
| 1206 | |
| 1207 | adap->fe = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x80, |
| 1208 | &dib807x_dib8000_config[0]); |
| 1209 | |
| 1210 | return adap->fe == NULL ? -ENODEV : 0; |
| 1211 | } |
| 1212 | |
| 1213 | /* STK807xPVR */ |
| 1214 | static int stk807xpvr_frontend_attach0(struct dvb_usb_adapter *adap) |
| 1215 | { |
| 1216 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); |
| 1217 | msleep(30); |
| 1218 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); |
| 1219 | msleep(500); |
| 1220 | dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); |
| 1221 | dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); |
| 1222 | dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); |
| 1223 | |
| 1224 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); |
| 1225 | |
| 1226 | dib0700_ctrl_clock(adap->dev, 72, 1); |
| 1227 | |
| 1228 | msleep(10); |
| 1229 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); |
| 1230 | msleep(10); |
| 1231 | dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); |
| 1232 | |
| 1233 | /* initialize IC 0 */ |
Olivier Grenie | 9542f50 | 2009-12-07 08:09:04 -0300 | [diff] [blame] | 1234 | dib8000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x22, 0x80); |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 1235 | |
| 1236 | adap->fe = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x80, |
| 1237 | &dib807x_dib8000_config[0]); |
| 1238 | |
| 1239 | return adap->fe == NULL ? -ENODEV : 0; |
| 1240 | } |
| 1241 | |
| 1242 | static int stk807xpvr_frontend_attach1(struct dvb_usb_adapter *adap) |
| 1243 | { |
| 1244 | /* initialize IC 1 */ |
Olivier Grenie | 9542f50 | 2009-12-07 08:09:04 -0300 | [diff] [blame] | 1245 | dib8000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x12, 0x82); |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 1246 | |
| 1247 | adap->fe = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x82, |
| 1248 | &dib807x_dib8000_config[1]); |
| 1249 | |
| 1250 | return adap->fe == NULL ? -ENODEV : 0; |
| 1251 | } |
| 1252 | |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1253 | /* STK8096GP */ |
| 1254 | struct dibx000_agc_config dib8090_agc_config[2] = { |
| 1255 | { |
| 1256 | BAND_UHF | BAND_VHF | BAND_LBAND | BAND_SBAND, |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1257 | /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1, |
| 1258 | * P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0, |
| 1259 | * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, P_agc_write=0 */ |
| 1260 | (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8) |
| 1261 | | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0), |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1262 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1263 | 787, |
| 1264 | 10, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1265 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1266 | 0, |
| 1267 | 118, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1268 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1269 | 0, |
| 1270 | 3530, |
| 1271 | 1, |
| 1272 | 5, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1273 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1274 | 65535, |
| 1275 | 0, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1276 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1277 | 65535, |
| 1278 | 0, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1279 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1280 | 0, |
| 1281 | 32, |
| 1282 | 114, |
| 1283 | 143, |
| 1284 | 144, |
| 1285 | 114, |
| 1286 | 227, |
| 1287 | 116, |
| 1288 | 117, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1289 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1290 | 28, |
| 1291 | 26, |
| 1292 | 31, |
| 1293 | 51, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1294 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1295 | 0, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1296 | }, |
| 1297 | { |
| 1298 | BAND_CBAND, |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1299 | /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=1, |
| 1300 | * P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0, |
| 1301 | * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, P_agc_write=0 */ |
| 1302 | (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | (0 << 8) |
| 1303 | | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0), |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1304 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1305 | 787, |
| 1306 | 10, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1307 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1308 | 0, |
| 1309 | 118, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1310 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1311 | 0, |
| 1312 | 3530, |
| 1313 | 1, |
| 1314 | 5, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1315 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1316 | 0, |
| 1317 | 0, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1318 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1319 | 65535, |
| 1320 | 0, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1321 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1322 | 0, |
| 1323 | 32, |
| 1324 | 114, |
| 1325 | 143, |
| 1326 | 144, |
| 1327 | 114, |
| 1328 | 227, |
| 1329 | 116, |
| 1330 | 117, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1331 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1332 | 28, |
| 1333 | 26, |
| 1334 | 31, |
| 1335 | 51, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1336 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1337 | 0, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1338 | } |
| 1339 | }; |
| 1340 | |
| 1341 | static struct dibx000_bandwidth_config dib8090_pll_config_12mhz = { |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1342 | 54000, 13500, |
| 1343 | 1, 18, 3, 1, 0, |
| 1344 | 0, 0, 1, 1, 2, |
| 1345 | (3 << 14) | (1 << 12) | (599 << 0), |
| 1346 | (0 << 25) | 0, |
| 1347 | 20199727, |
| 1348 | 12000000, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1349 | }; |
| 1350 | |
| 1351 | static int dib8090_get_adc_power(struct dvb_frontend *fe) |
| 1352 | { |
| 1353 | return dib8000_get_adc_power(fe, 1); |
| 1354 | } |
| 1355 | |
| 1356 | static struct dib8000_config dib809x_dib8000_config = { |
| 1357 | .output_mpeg2_in_188_bytes = 1, |
| 1358 | |
| 1359 | .agc_config_count = 2, |
| 1360 | .agc = dib8090_agc_config, |
| 1361 | .agc_control = dib0090_dcc_freq, |
| 1362 | .pll = &dib8090_pll_config_12mhz, |
| 1363 | .tuner_is_baseband = 1, |
| 1364 | |
| 1365 | .gpio_dir = DIB8000_GPIO_DEFAULT_DIRECTIONS, |
| 1366 | .gpio_val = DIB8000_GPIO_DEFAULT_VALUES, |
| 1367 | .gpio_pwm_pos = DIB8000_GPIO_DEFAULT_PWM_POS, |
| 1368 | |
| 1369 | .hostbus_diversity = 1, |
| 1370 | .div_cfg = 0x31, |
| 1371 | .output_mode = OUTMODE_MPEG2_FIFO, |
| 1372 | .drives = 0x2d98, |
| 1373 | .diversity_delay = 144, |
| 1374 | .refclksel = 3, |
| 1375 | }; |
| 1376 | |
| 1377 | static struct dib0090_config dib809x_dib0090_config = { |
| 1378 | .io.pll_bypass = 1, |
| 1379 | .io.pll_range = 1, |
| 1380 | .io.pll_prediv = 1, |
| 1381 | .io.pll_loopdiv = 20, |
| 1382 | .io.adc_clock_ratio = 8, |
| 1383 | .io.pll_int_loop_filt = 0, |
| 1384 | .io.clock_khz = 12000, |
| 1385 | .reset = dib80xx_tuner_reset, |
| 1386 | .sleep = dib80xx_tuner_sleep, |
| 1387 | .clkouttobamse = 1, |
| 1388 | .analog_output = 1, |
| 1389 | .i2c_address = DEFAULT_DIB0090_I2C_ADDRESS, |
| 1390 | .wbd_vhf_offset = 100, |
| 1391 | .wbd_cband_offset = 450, |
| 1392 | .use_pwm_agc = 1, |
| 1393 | .clkoutdrive = 1, |
| 1394 | .get_adc_power = dib8090_get_adc_power, |
| 1395 | .freq_offset_khz_uhf = 0, |
| 1396 | .freq_offset_khz_vhf = -143, |
| 1397 | }; |
| 1398 | |
| 1399 | static int dib8096_set_param_override(struct dvb_frontend *fe, |
| 1400 | struct dvb_frontend_parameters *fep) |
| 1401 | { |
| 1402 | struct dvb_usb_adapter *adap = fe->dvb->priv; |
| 1403 | struct dib0700_adapter_state *state = adap->priv; |
| 1404 | u8 band = BAND_OF_FREQUENCY(fep->frequency/1000); |
| 1405 | u16 offset; |
| 1406 | int ret = 0; |
| 1407 | enum frontend_tune_state tune_state = CT_SHUTDOWN; |
| 1408 | u16 ltgain, rf_gain_limit; |
| 1409 | |
| 1410 | ret = state->set_param_save(fe, fep); |
| 1411 | if (ret < 0) |
| 1412 | return ret; |
| 1413 | |
| 1414 | switch (band) { |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1415 | case BAND_VHF: |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1416 | offset = 100; |
| 1417 | break; |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1418 | case BAND_UHF: |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1419 | offset = 550; |
| 1420 | break; |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1421 | default: |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1422 | offset = 0; |
| 1423 | break; |
| 1424 | } |
| 1425 | offset += (dib0090_get_wbd_offset(fe) * 8 * 18 / 33 + 1) / 2; |
| 1426 | dib8000_set_wbd_ref(fe, offset); |
| 1427 | |
| 1428 | |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1429 | if (band == BAND_CBAND) { |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1430 | deb_info("tuning in CBAND - soft-AGC startup\n"); |
| 1431 | /* TODO specific wbd target for dib0090 - needed for startup ? */ |
| 1432 | dib0090_set_tune_state(fe, CT_AGC_START); |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1433 | do { |
| 1434 | ret = dib0090_gain_control(fe); |
| 1435 | msleep(ret); |
| 1436 | tune_state = dib0090_get_tune_state(fe); |
| 1437 | if (tune_state == CT_AGC_STEP_0) |
| 1438 | dib8000_set_gpio(fe, 6, 0, 1); |
| 1439 | else if (tune_state == CT_AGC_STEP_1) { |
| 1440 | dib0090_get_current_gain(fe, NULL, NULL, &rf_gain_limit, <gain); |
| 1441 | if (rf_gain_limit == 0) |
| 1442 | dib8000_set_gpio(fe, 6, 0, 0); |
| 1443 | } |
| 1444 | } while (tune_state < CT_AGC_STOP); |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1445 | dib0090_pwm_gain_reset(fe); |
| 1446 | dib8000_pwm_agc_reset(fe); |
| 1447 | dib8000_set_tune_state(fe, CT_DEMOD_START); |
Olivier Grenie | 9c78303 | 2009-12-07 07:49:40 -0300 | [diff] [blame] | 1448 | } else { |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1449 | deb_info("not tuning in CBAND - standard AGC startup\n"); |
| 1450 | dib0090_pwm_gain_reset(fe); |
| 1451 | } |
| 1452 | |
| 1453 | return 0; |
| 1454 | } |
| 1455 | |
| 1456 | static int dib809x_tuner_attach(struct dvb_usb_adapter *adap) |
| 1457 | { |
| 1458 | struct dib0700_adapter_state *st = adap->priv; |
| 1459 | struct i2c_adapter *tun_i2c = dib8000_get_i2c_master(adap->fe, DIBX000_I2C_INTERFACE_TUNER, 1); |
| 1460 | |
| 1461 | if (dvb_attach(dib0090_register, adap->fe, tun_i2c, &dib809x_dib0090_config) == NULL) |
| 1462 | return -ENODEV; |
| 1463 | |
| 1464 | st->set_param_save = adap->fe->ops.tuner_ops.set_params; |
| 1465 | adap->fe->ops.tuner_ops.set_params = dib8096_set_param_override; |
| 1466 | return 0; |
| 1467 | } |
| 1468 | |
| 1469 | static int stk809x_frontend_attach(struct dvb_usb_adapter *adap) |
| 1470 | { |
| 1471 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); |
| 1472 | msleep(10); |
| 1473 | dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); |
| 1474 | dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); |
| 1475 | dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); |
| 1476 | |
| 1477 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); |
| 1478 | |
| 1479 | dib0700_ctrl_clock(adap->dev, 72, 1); |
| 1480 | |
| 1481 | msleep(10); |
| 1482 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); |
| 1483 | msleep(10); |
| 1484 | dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); |
| 1485 | |
| 1486 | dib8000_i2c_enumeration(&adap->dev->i2c_adap, 1, 18, 0x80); |
| 1487 | |
| 1488 | adap->fe = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x80, &dib809x_dib8000_config); |
| 1489 | |
| 1490 | return adap->fe == NULL ? -ENODEV : 0; |
| 1491 | } |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 1492 | |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 1493 | /* STK7070PD */ |
| 1494 | static struct dib7000p_config stk7070pd_dib7000p_config[2] = { |
| 1495 | { |
| 1496 | .output_mpeg2_in_188_bytes = 1, |
| 1497 | |
| 1498 | .agc_config_count = 1, |
| 1499 | .agc = &dib7070_agc_config, |
| 1500 | .bw = &dib7070_bw_config_12_mhz, |
Patrick Boettcher | 3cb2c39 | 2008-01-25 07:25:20 -0300 | [diff] [blame] | 1501 | .tuner_is_baseband = 1, |
| 1502 | .spur_protect = 1, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 1503 | |
| 1504 | .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS, |
| 1505 | .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES, |
| 1506 | .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS, |
| 1507 | |
| 1508 | .hostbus_diversity = 1, |
| 1509 | }, { |
| 1510 | .output_mpeg2_in_188_bytes = 1, |
| 1511 | |
| 1512 | .agc_config_count = 1, |
| 1513 | .agc = &dib7070_agc_config, |
| 1514 | .bw = &dib7070_bw_config_12_mhz, |
Patrick Boettcher | 3cb2c39 | 2008-01-25 07:25:20 -0300 | [diff] [blame] | 1515 | .tuner_is_baseband = 1, |
| 1516 | .spur_protect = 1, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 1517 | |
| 1518 | .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS, |
| 1519 | .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES, |
| 1520 | .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS, |
| 1521 | |
| 1522 | .hostbus_diversity = 1, |
| 1523 | } |
| 1524 | }; |
| 1525 | |
| 1526 | static int stk7070pd_frontend_attach0(struct dvb_usb_adapter *adap) |
| 1527 | { |
| 1528 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); |
| 1529 | msleep(10); |
| 1530 | dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); |
| 1531 | dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); |
| 1532 | dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); |
| 1533 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); |
| 1534 | |
| 1535 | dib0700_ctrl_clock(adap->dev, 72, 1); |
| 1536 | |
| 1537 | msleep(10); |
| 1538 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); |
| 1539 | msleep(10); |
| 1540 | dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); |
| 1541 | |
Devin Heitmueller | 83c4fdf | 2009-01-21 01:55:45 -0300 | [diff] [blame] | 1542 | if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 2, 18, |
| 1543 | stk7070pd_dib7000p_config) != 0) { |
| 1544 | err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n", |
| 1545 | __func__); |
| 1546 | return -ENODEV; |
| 1547 | } |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 1548 | |
| 1549 | adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, &stk7070pd_dib7000p_config[0]); |
| 1550 | return adap->fe == NULL ? -ENODEV : 0; |
| 1551 | } |
| 1552 | |
| 1553 | static int stk7070pd_frontend_attach1(struct dvb_usb_adapter *adap) |
| 1554 | { |
| 1555 | adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x82, &stk7070pd_dib7000p_config[1]); |
| 1556 | return adap->fe == NULL ? -ENODEV : 0; |
| 1557 | } |
| 1558 | |
Devin Heitmueller | cb22cb5 | 2008-09-08 05:42:42 -0300 | [diff] [blame] | 1559 | /* S5H1411 */ |
| 1560 | static struct s5h1411_config pinnacle_801e_config = { |
| 1561 | .output_mode = S5H1411_PARALLEL_OUTPUT, |
| 1562 | .gpio = S5H1411_GPIO_OFF, |
| 1563 | .mpeg_timing = S5H1411_MPEGTIMING_NONCONTINOUS_NONINVERTING_CLOCK, |
| 1564 | .qam_if = S5H1411_IF_44000, |
| 1565 | .vsb_if = S5H1411_IF_44000, |
| 1566 | .inversion = S5H1411_INVERSION_OFF, |
| 1567 | .status_mode = S5H1411_DEMODLOCKING |
| 1568 | }; |
| 1569 | |
| 1570 | /* Pinnacle PCTV HD Pro 801e GPIOs map: |
| 1571 | GPIO0 - currently unknown |
| 1572 | GPIO1 - xc5000 tuner reset |
| 1573 | GPIO2 - CX25843 sleep |
| 1574 | GPIO3 - currently unknown |
| 1575 | GPIO4 - currently unknown |
| 1576 | GPIO6 - currently unknown |
| 1577 | GPIO7 - currently unknown |
| 1578 | GPIO9 - currently unknown |
| 1579 | GPIO10 - CX25843 reset |
| 1580 | */ |
| 1581 | static int s5h1411_frontend_attach(struct dvb_usb_adapter *adap) |
| 1582 | { |
| 1583 | struct dib0700_state *st = adap->dev->priv; |
| 1584 | |
| 1585 | /* Make use of the new i2c functions from FW 1.20 */ |
| 1586 | st->fw_use_new_i2c_api = 1; |
| 1587 | |
| 1588 | /* The s5h1411 requires the dib0700 to not be in master mode */ |
| 1589 | st->disable_streaming_master_mode = 1; |
| 1590 | |
| 1591 | /* All msleep values taken from Windows USB trace */ |
| 1592 | dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 0); |
| 1593 | dib0700_set_gpio(adap->dev, GPIO3, GPIO_OUT, 0); |
| 1594 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); |
| 1595 | msleep(400); |
| 1596 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); |
| 1597 | msleep(60); |
| 1598 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); |
| 1599 | msleep(30); |
| 1600 | dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); |
| 1601 | dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); |
| 1602 | dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); |
| 1603 | dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1); |
| 1604 | dib0700_set_gpio(adap->dev, GPIO2, GPIO_OUT, 0); |
| 1605 | msleep(30); |
| 1606 | |
| 1607 | /* Put the CX25843 to sleep for now since we're in digital mode */ |
| 1608 | dib0700_set_gpio(adap->dev, GPIO2, GPIO_OUT, 1); |
| 1609 | |
| 1610 | /* GPIOs are initialized, do the attach */ |
| 1611 | adap->fe = dvb_attach(s5h1411_attach, &pinnacle_801e_config, |
| 1612 | &adap->dev->i2c_adap); |
| 1613 | return adap->fe == NULL ? -ENODEV : 0; |
| 1614 | } |
| 1615 | |
Michael Krufky | 767f3b3 | 2008-09-25 09:47:07 -0300 | [diff] [blame] | 1616 | static int dib0700_xc5000_tuner_callback(void *priv, int component, |
| 1617 | int command, int arg) |
Devin Heitmueller | cb22cb5 | 2008-09-08 05:42:42 -0300 | [diff] [blame] | 1618 | { |
| 1619 | struct dvb_usb_adapter *adap = priv; |
| 1620 | |
Devin Heitmueller | 79025a9 | 2008-10-06 12:07:48 -0300 | [diff] [blame] | 1621 | if (command == XC5000_TUNER_RESET) { |
| 1622 | /* Reset the tuner */ |
| 1623 | dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 0); |
Devin Heitmueller | f0f4633 | 2009-05-04 21:57:41 -0300 | [diff] [blame] | 1624 | msleep(10); |
Devin Heitmueller | 79025a9 | 2008-10-06 12:07:48 -0300 | [diff] [blame] | 1625 | dib0700_set_gpio(adap->dev, GPIO1, GPIO_OUT, 1); |
Devin Heitmueller | f0f4633 | 2009-05-04 21:57:41 -0300 | [diff] [blame] | 1626 | msleep(10); |
Devin Heitmueller | 79025a9 | 2008-10-06 12:07:48 -0300 | [diff] [blame] | 1627 | } else { |
| 1628 | err("xc5000: unknown tuner callback command: %d\n", command); |
| 1629 | return -EINVAL; |
| 1630 | } |
Devin Heitmueller | cb22cb5 | 2008-09-08 05:42:42 -0300 | [diff] [blame] | 1631 | |
| 1632 | return 0; |
| 1633 | } |
| 1634 | |
| 1635 | static struct xc5000_config s5h1411_xc5000_tunerconfig = { |
| 1636 | .i2c_address = 0x64, |
| 1637 | .if_khz = 5380, |
Devin Heitmueller | cb22cb5 | 2008-09-08 05:42:42 -0300 | [diff] [blame] | 1638 | }; |
| 1639 | |
| 1640 | static int xc5000_tuner_attach(struct dvb_usb_adapter *adap) |
| 1641 | { |
Devin Heitmueller | 79025a9 | 2008-10-06 12:07:48 -0300 | [diff] [blame] | 1642 | /* FIXME: generalize & move to common area */ |
| 1643 | adap->fe->callback = dib0700_xc5000_tuner_callback; |
| 1644 | |
Devin Heitmueller | cb22cb5 | 2008-09-08 05:42:42 -0300 | [diff] [blame] | 1645 | return dvb_attach(xc5000_attach, adap->fe, &adap->dev->i2c_adap, |
Michael Krufky | 767f3b3 | 2008-09-25 09:47:07 -0300 | [diff] [blame] | 1646 | &s5h1411_xc5000_tunerconfig) |
Devin Heitmueller | cb22cb5 | 2008-09-08 05:42:42 -0300 | [diff] [blame] | 1647 | == NULL ? -ENODEV : 0; |
| 1648 | } |
| 1649 | |
Michael Krufky | ce904bc | 2009-01-19 01:12:55 -0300 | [diff] [blame] | 1650 | static struct lgdt3305_config hcw_lgdt3305_config = { |
| 1651 | .i2c_addr = 0x0e, |
| 1652 | .mpeg_mode = LGDT3305_MPEG_PARALLEL, |
| 1653 | .tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE, |
| 1654 | .tpvalid_polarity = LGDT3305_TP_VALID_LOW, |
| 1655 | .deny_i2c_rptr = 0, |
| 1656 | .spectral_inversion = 1, |
| 1657 | .qam_if_khz = 6000, |
| 1658 | .vsb_if_khz = 6000, |
| 1659 | .usref_8vsb = 0x0500, |
| 1660 | }; |
| 1661 | |
| 1662 | static struct mxl5007t_config hcw_mxl5007t_config = { |
| 1663 | .xtal_freq_hz = MxL_XTAL_25_MHZ, |
| 1664 | .if_freq_hz = MxL_IF_6_MHZ, |
| 1665 | .invert_if = 1, |
| 1666 | }; |
| 1667 | |
| 1668 | /* TIGER-ATSC map: |
| 1669 | GPIO0 - LNA_CTR (H: LNA power enabled, L: LNA power disabled) |
| 1670 | GPIO1 - ANT_SEL (H: VPA, L: MCX) |
| 1671 | GPIO4 - SCL2 |
| 1672 | GPIO6 - EN_TUNER |
| 1673 | GPIO7 - SDA2 |
| 1674 | GPIO10 - DEM_RST |
| 1675 | |
| 1676 | MXL is behind LG's i2c repeater. LG is on SCL2/SDA2 gpios on the DIB |
| 1677 | */ |
| 1678 | static int lgdt3305_frontend_attach(struct dvb_usb_adapter *adap) |
| 1679 | { |
| 1680 | struct dib0700_state *st = adap->dev->priv; |
| 1681 | |
| 1682 | /* Make use of the new i2c functions from FW 1.20 */ |
| 1683 | st->fw_use_new_i2c_api = 1; |
| 1684 | |
| 1685 | st->disable_streaming_master_mode = 1; |
| 1686 | |
| 1687 | /* fe power enable */ |
| 1688 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); |
| 1689 | msleep(30); |
| 1690 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); |
| 1691 | msleep(30); |
| 1692 | |
| 1693 | /* demod reset */ |
| 1694 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); |
| 1695 | msleep(30); |
| 1696 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); |
| 1697 | msleep(30); |
| 1698 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); |
| 1699 | msleep(30); |
| 1700 | |
| 1701 | adap->fe = dvb_attach(lgdt3305_attach, |
| 1702 | &hcw_lgdt3305_config, |
| 1703 | &adap->dev->i2c_adap); |
| 1704 | |
| 1705 | return adap->fe == NULL ? -ENODEV : 0; |
| 1706 | } |
| 1707 | |
| 1708 | static int mxl5007t_tuner_attach(struct dvb_usb_adapter *adap) |
| 1709 | { |
| 1710 | return dvb_attach(mxl5007t_attach, adap->fe, |
| 1711 | &adap->dev->i2c_adap, 0x60, |
| 1712 | &hcw_mxl5007t_config) == NULL ? -ENODEV : 0; |
| 1713 | } |
| 1714 | |
| 1715 | |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 1716 | /* DVB-USB and USB stuff follows */ |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 1717 | struct usb_device_id dib0700_usb_id_table[] = { |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 1718 | /* 0 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK7700P) }, |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 1719 | { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK7700P_PC) }, |
| 1720 | { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_500) }, |
| 1721 | { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_500_2) }, |
| 1722 | { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_STICK) }, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 1723 | /* 5 */ { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_VOLAR) }, |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 1724 | { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_VIDEOMATE_U500) }, |
| 1725 | { USB_DEVICE(USB_VID_UNIWILL, USB_PID_UNIWILL_STK7700P) }, |
| 1726 | { USB_DEVICE(USB_VID_LEADTEK, USB_PID_WINFAST_DTV_DONGLE_STK7700P) }, |
| 1727 | { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_STICK_2) }, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 1728 | /* 10 */{ USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_VOLAR_2) }, |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 1729 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV2000E) }, |
| 1730 | { USB_DEVICE(USB_VID_TERRATEC, |
| 1731 | USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY) }, |
| 1732 | { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_TD_STICK) }, |
| 1733 | { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK7700D) }, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 1734 | /* 15 */{ USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK7070P) }, |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 1735 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV_DVB_T_FLASH) }, |
| 1736 | { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK7070PD) }, |
| 1737 | { USB_DEVICE(USB_VID_PINNACLE, |
| 1738 | USB_PID_PINNACLE_PCTV_DUAL_DIVERSITY_DVB_T) }, |
| 1739 | { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_VIDEOMATE_U500_PC) }, |
Joachim Steiger | fa3b877 | 2007-10-08 20:08:46 -0300 | [diff] [blame] | 1740 | /* 20 */{ USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_EXPRESS) }, |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 1741 | { USB_DEVICE(USB_VID_GIGABYTE, USB_PID_GIGABYTE_U7000) }, |
| 1742 | { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ARTEC_T14BR) }, |
| 1743 | { USB_DEVICE(USB_VID_ASUS, USB_PID_ASUS_U3000) }, |
| 1744 | { USB_DEVICE(USB_VID_ASUS, USB_PID_ASUS_U3100) }, |
| 1745 | /* 25 */{ USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_STICK_3) }, |
| 1746 | { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_MYTV_T) }, |
| 1747 | { USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_HT_USB_XE) }, |
| 1748 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_EXPRESSCARD_320CX) }, |
| 1749 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV72E) }, |
| 1750 | /* 30 */{ USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV73E) }, |
| 1751 | { USB_DEVICE(USB_VID_YUAN, USB_PID_YUAN_EC372S) }, |
| 1752 | { USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_HT_EXPRESS) }, |
Alexander Simon | dc88807 | 2008-03-29 21:37:54 -0300 | [diff] [blame] | 1753 | { USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_XXS) }, |
Darryl Green | 5da4e2c | 2008-03-29 21:47:43 -0300 | [diff] [blame] | 1754 | { USB_DEVICE(USB_VID_LEADTEK, USB_PID_WINFAST_DTV_DONGLE_STK7700P_2) }, |
Michael Krufky | af2a887 | 2008-09-03 17:12:24 -0300 | [diff] [blame] | 1755 | /* 35 */{ USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_TD_STICK_52009) }, |
Michael Krufky | 9a0c04a | 2008-09-03 17:12:24 -0300 | [diff] [blame] | 1756 | { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_500_3) }, |
Finn Thain | 17a370b | 2008-09-06 13:42:47 -0300 | [diff] [blame] | 1757 | { USB_DEVICE(USB_VID_GIGABYTE, USB_PID_GIGABYTE_U8000) }, |
Daniel Oliveira Nascimento | 8751aaa | 2008-09-07 12:39:44 -0300 | [diff] [blame] | 1758 | { USB_DEVICE(USB_VID_YUAN, USB_PID_YUAN_STK7700PH) }, |
Albert Comerma | 5769743 | 2008-09-07 12:43:33 -0300 | [diff] [blame] | 1759 | { USB_DEVICE(USB_VID_ASUS, USB_PID_ASUS_U3000H) }, |
Devin Heitmueller | cb22cb5 | 2008-09-08 05:42:42 -0300 | [diff] [blame] | 1760 | /* 40 */{ USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV801E) }, |
Devin Heitmueller | d2fc3bf | 2008-09-25 06:22:23 -0300 | [diff] [blame] | 1761 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV801E_SE) }, |
Yusuf Altin | bb1b082 | 2009-01-08 07:58:45 -0300 | [diff] [blame] | 1762 | { USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_EXPRESS) }, |
Nicolas Fournier | db4b2d1 | 2009-01-13 07:15:25 -0300 | [diff] [blame] | 1763 | { USB_DEVICE(USB_VID_TERRATEC, |
| 1764 | USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY_2) }, |
sebastian.blanes@gmail.com | 0a6e1ed | 2009-02-24 14:51:43 -0300 | [diff] [blame] | 1765 | { USB_DEVICE(USB_VID_SONY, USB_PID_SONY_PLAYTV) }, |
Pascal Terjan | 9abb6e6 | 2009-02-26 10:31:41 -0300 | [diff] [blame] | 1766 | /* 45 */{ USB_DEVICE(USB_VID_YUAN, USB_PID_YUAN_PD378S) }, |
Michael Krufky | ce904bc | 2009-01-19 01:12:55 -0300 | [diff] [blame] | 1767 | { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_TIGER_ATSC) }, |
| 1768 | { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_TIGER_ATSC_B210) }, |
Xoan Loureiro | 16ba1ee | 2009-03-29 08:43:36 -0300 | [diff] [blame] | 1769 | { USB_DEVICE(USB_VID_YUAN, USB_PID_YUAN_MC770) }, |
Klaus Flittner | 919a548 | 2009-03-29 09:12:06 -0300 | [diff] [blame] | 1770 | { USB_DEVICE(USB_VID_ELGATO, USB_PID_ELGATO_EYETV_DTT) }, |
Armin Schenker | 513846e | 2009-04-20 11:57:49 -0300 | [diff] [blame] | 1771 | /* 50 */{ USB_DEVICE(USB_VID_ELGATO, USB_PID_ELGATO_EYETV_DTT_Dlx) }, |
tomas petr | f0f4ae7 | 2009-05-20 05:28:05 -0300 | [diff] [blame] | 1772 | { USB_DEVICE(USB_VID_LEADTEK, USB_PID_WINFAST_DTV_DONGLE_H) }, |
Patrick Boettcher | a9b8fe3 | 2009-05-20 05:35:02 -0300 | [diff] [blame] | 1773 | { USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_T3) }, |
| 1774 | { USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_T5) }, |
Pete Hildebrandt | c53d83c | 2009-08-05 11:46:38 -0300 | [diff] [blame] | 1775 | { USB_DEVICE(USB_VID_YUAN, USB_PID_YUAN_STK7700D) }, |
Olivier Grenie | 74b76f2 | 2009-09-02 08:19:19 -0300 | [diff] [blame] | 1776 | /* 55 */{ USB_DEVICE(USB_VID_YUAN, USB_PID_YUAN_STK7700D_2) }, |
| 1777 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV73A) }, |
Patrick Boettcher | e414753 | 2009-11-30 13:52:57 -0300 | [diff] [blame] | 1778 | { USB_DEVICE(USB_VID_PCTV, USB_PID_PINNACLE_PCTV73ESE) }, |
| 1779 | { USB_DEVICE(USB_VID_PCTV, USB_PID_PINNACLE_PCTV282E) }, |
Olivier Grenie | d300bd6 | 2009-09-15 06:55:35 -0300 | [diff] [blame] | 1780 | { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK7770P) }, |
Patrick Boettcher | db48138 | 2009-09-15 07:16:51 -0300 | [diff] [blame] | 1781 | /* 60 */{ USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_XXS_2) }, |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 1782 | { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK807XPVR) }, |
| 1783 | { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK807XP) }, |
Mauro Carvalho Chehab | 3bfb317 | 2010-09-03 10:50:24 -0300 | [diff] [blame^] | 1784 | { USB_DEVICE_VER(USB_VID_PIXELVIEW, USB_PID_PIXELVIEW_SBTVD, 0x000, 0x3f00) }, |
S?rgio Fortier | 8a378e8 | 2009-09-28 04:19:21 -0300 | [diff] [blame] | 1785 | { USB_DEVICE(USB_VID_EVOLUTEPC, USB_PID_TVWAY_PLUS) }, |
Patrick Boettcher | 20232c4 | 2009-12-01 12:08:56 -0300 | [diff] [blame] | 1786 | /* 65 */{ USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV73ESE) }, |
Patrick Boettcher | e414753 | 2009-11-30 13:52:57 -0300 | [diff] [blame] | 1787 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV282E) }, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 1788 | { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_STK8096GP) }, |
Michael Müller | 84e2f03 | 2010-04-26 22:18:57 -0300 | [diff] [blame] | 1789 | { USB_DEVICE(USB_VID_ELGATO, USB_PID_ELGATO_EYETV_DIVERSITY) }, |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 1790 | { 0 } /* Terminating entry */ |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 1791 | }; |
| 1792 | MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table); |
| 1793 | |
| 1794 | #define DIB0700_DEFAULT_DEVICE_PROPERTIES \ |
| 1795 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, \ |
| 1796 | .usb_ctrl = DEVICE_SPECIFIC, \ |
Devin Heitmueller | bdc203e | 2008-09-06 13:45:27 -0300 | [diff] [blame] | 1797 | .firmware = "dvb-usb-dib0700-1.20.fw", \ |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 1798 | .download_firmware = dib0700_download_firmware, \ |
Patrick Boettcher | 6958eff | 2006-09-19 12:51:40 -0300 | [diff] [blame] | 1799 | .no_reconnect = 1, \ |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 1800 | .size_of_priv = sizeof(struct dib0700_state), \ |
Patrick Boettcher | 6958eff | 2006-09-19 12:51:40 -0300 | [diff] [blame] | 1801 | .i2c_algo = &dib0700_i2c_algo, \ |
| 1802 | .identify_state = dib0700_identify_state |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 1803 | |
| 1804 | #define DIB0700_DEFAULT_STREAMING_CONFIG(ep) \ |
| 1805 | .streaming_ctrl = dib0700_streaming_ctrl, \ |
| 1806 | .stream = { \ |
| 1807 | .type = USB_BULK, \ |
| 1808 | .count = 4, \ |
| 1809 | .endpoint = ep, \ |
| 1810 | .u = { \ |
| 1811 | .bulk = { \ |
| 1812 | .buffersize = 39480, \ |
| 1813 | } \ |
| 1814 | } \ |
| 1815 | } |
| 1816 | |
| 1817 | struct dvb_usb_device_properties dib0700_devices[] = { |
| 1818 | { |
| 1819 | DIB0700_DEFAULT_DEVICE_PROPERTIES, |
| 1820 | |
| 1821 | .num_adapters = 1, |
| 1822 | .adapter = { |
| 1823 | { |
Olivier Grenie | f8731f4 | 2009-09-18 04:08:43 -0300 | [diff] [blame] | 1824 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 1825 | .pid_filter_count = 32, |
| 1826 | .pid_filter = stk70x0p_pid_filter, |
| 1827 | .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 1828 | .frontend_attach = stk7700p_frontend_attach, |
| 1829 | .tuner_attach = stk7700p_tuner_attach, |
| 1830 | |
| 1831 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
| 1832 | }, |
| 1833 | }, |
| 1834 | |
dominik | 67053a4 | 2007-11-10 19:23:31 -0300 | [diff] [blame] | 1835 | .num_device_descs = 8, |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 1836 | .devices = { |
| 1837 | { "DiBcom STK7700P reference design", |
Tomi Koivulahti | 49a1376 | 2006-10-19 07:27:19 -0300 | [diff] [blame] | 1838 | { &dib0700_usb_id_table[0], &dib0700_usb_id_table[1] }, |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 1839 | { NULL }, |
| 1840 | }, |
| 1841 | { "Hauppauge Nova-T Stick", |
Stefan Traby | f9aeba4 | 2006-11-12 13:02:51 -0300 | [diff] [blame] | 1842 | { &dib0700_usb_id_table[4], &dib0700_usb_id_table[9], NULL }, |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 1843 | { NULL }, |
| 1844 | }, |
Tomi Koivulahti | 49a1376 | 2006-10-19 07:27:19 -0300 | [diff] [blame] | 1845 | { "AVerMedia AVerTV DVB-T Volar", |
Jose Carlos Garcia Sogo | ced8fec | 2006-11-14 05:01:47 -0300 | [diff] [blame] | 1846 | { &dib0700_usb_id_table[5], &dib0700_usb_id_table[10] }, |
Tomi Koivulahti | 49a1376 | 2006-10-19 07:27:19 -0300 | [diff] [blame] | 1847 | { NULL }, |
| 1848 | }, |
| 1849 | { "Compro Videomate U500", |
Patrick Boettcher | 1f8ca4b | 2007-07-30 14:24:37 -0300 | [diff] [blame] | 1850 | { &dib0700_usb_id_table[6], &dib0700_usb_id_table[19] }, |
Tomi Koivulahti | 49a1376 | 2006-10-19 07:27:19 -0300 | [diff] [blame] | 1851 | { NULL }, |
Henning Schroeer | 0ce215e | 2006-10-19 07:58:22 -0300 | [diff] [blame] | 1852 | }, |
| 1853 | { "Uniwill STK7700P based (Hama and others)", |
| 1854 | { &dib0700_usb_id_table[7], NULL }, |
| 1855 | { NULL }, |
Michael Krufky | 8637a87 | 2006-11-08 16:47:32 -0300 | [diff] [blame] | 1856 | }, |
| 1857 | { "Leadtek Winfast DTV Dongle (STK7700P based)", |
Patrick Boettcher | 1e13c8f | 2009-09-19 05:24:40 -0300 | [diff] [blame] | 1858 | { &dib0700_usb_id_table[8], &dib0700_usb_id_table[34] }, |
Michael Krufky | 8637a87 | 2006-11-08 16:47:32 -0300 | [diff] [blame] | 1859 | { NULL }, |
Joachim Steiger | fa3b877 | 2007-10-08 20:08:46 -0300 | [diff] [blame] | 1860 | }, |
| 1861 | { "AVerMedia AVerTV DVB-T Express", |
| 1862 | { &dib0700_usb_id_table[20] }, |
| 1863 | { NULL }, |
dominik | 67053a4 | 2007-11-10 19:23:31 -0300 | [diff] [blame] | 1864 | }, |
dominik | 67053a4 | 2007-11-10 19:23:31 -0300 | [diff] [blame] | 1865 | { "Gigabyte U7000", |
| 1866 | { &dib0700_usb_id_table[21], NULL }, |
| 1867 | { NULL }, |
Tomi Koivulahti | 49a1376 | 2006-10-19 07:27:19 -0300 | [diff] [blame] | 1868 | } |
Darren Salt | b1139e3 | 2007-08-18 18:05:31 -0300 | [diff] [blame] | 1869 | }, |
| 1870 | |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 1871 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1872 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 1873 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
Mauro Carvalho Chehab | 0ffd1ab | 2010-08-01 09:37:23 -0300 | [diff] [blame] | 1874 | .rc_query = dib0700_rc_query_old_firmware, |
| 1875 | .rc_props = { |
| 1876 | .allowed_protos = IR_TYPE_RC5 | |
| 1877 | IR_TYPE_RC6 | |
| 1878 | IR_TYPE_NEC, |
| 1879 | .change_protocol = dib0700_change_protocol, |
| 1880 | }, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1881 | }, |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 1882 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
| 1883 | |
| 1884 | .num_adapters = 2, |
| 1885 | .adapter = { |
| 1886 | { |
| 1887 | .frontend_attach = bristol_frontend_attach, |
| 1888 | .tuner_attach = bristol_tuner_attach, |
| 1889 | |
| 1890 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
| 1891 | }, { |
| 1892 | .frontend_attach = bristol_frontend_attach, |
| 1893 | .tuner_attach = bristol_tuner_attach, |
| 1894 | |
| 1895 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), |
| 1896 | } |
| 1897 | }, |
| 1898 | |
| 1899 | .num_device_descs = 1, |
| 1900 | .devices = { |
| 1901 | { "Hauppauge Nova-T 500 Dual DVB-T", |
Tomi Koivulahti | 49a1376 | 2006-10-19 07:27:19 -0300 | [diff] [blame] | 1902 | { &dib0700_usb_id_table[2], &dib0700_usb_id_table[3], NULL }, |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 1903 | { NULL }, |
| 1904 | }, |
Janne Grunau | 82f3d55 | 2007-07-30 13:50:28 -0300 | [diff] [blame] | 1905 | }, |
| 1906 | |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 1907 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1908 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 1909 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
Mauro Carvalho Chehab | 0ffd1ab | 2010-08-01 09:37:23 -0300 | [diff] [blame] | 1910 | .rc_query = dib0700_rc_query_old_firmware, |
| 1911 | .rc_props = { |
| 1912 | .allowed_protos = IR_TYPE_RC5 | |
| 1913 | IR_TYPE_RC6 | |
| 1914 | IR_TYPE_NEC, |
| 1915 | .change_protocol = dib0700_change_protocol, |
| 1916 | }, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1917 | }, |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 1918 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
| 1919 | |
| 1920 | .num_adapters = 2, |
| 1921 | .adapter = { |
| 1922 | { |
Olivier Grenie | f8731f4 | 2009-09-18 04:08:43 -0300 | [diff] [blame] | 1923 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 1924 | .pid_filter_count = 32, |
| 1925 | .pid_filter = stk70x0p_pid_filter, |
| 1926 | .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 1927 | .frontend_attach = stk7700d_frontend_attach, |
| 1928 | .tuner_attach = stk7700d_tuner_attach, |
| 1929 | |
| 1930 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
| 1931 | }, { |
Olivier Grenie | f8731f4 | 2009-09-18 04:08:43 -0300 | [diff] [blame] | 1932 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 1933 | .pid_filter_count = 32, |
| 1934 | .pid_filter = stk70x0p_pid_filter, |
| 1935 | .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 1936 | .frontend_attach = stk7700d_frontend_attach, |
| 1937 | .tuner_attach = stk7700d_tuner_attach, |
| 1938 | |
| 1939 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), |
| 1940 | } |
| 1941 | }, |
| 1942 | |
James A Webb | 200e861 | 2009-08-04 02:38:05 -0300 | [diff] [blame] | 1943 | .num_device_descs = 5, |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 1944 | .devices = { |
| 1945 | { "Pinnacle PCTV 2000e", |
| 1946 | { &dib0700_usb_id_table[11], NULL }, |
| 1947 | { NULL }, |
| 1948 | }, |
| 1949 | { "Terratec Cinergy DT XS Diversity", |
| 1950 | { &dib0700_usb_id_table[12], NULL }, |
| 1951 | { NULL }, |
| 1952 | }, |
Darren Salt | faebb91 | 2007-08-18 18:04:00 -0300 | [diff] [blame] | 1953 | { "Hauppauge Nova-TD Stick/Elgato Eye-TV Diversity", |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 1954 | { &dib0700_usb_id_table[13], NULL }, |
| 1955 | { NULL }, |
| 1956 | }, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 1957 | { "DiBcom STK7700D reference design", |
Patrick Boettcher | b6884a1 | 2007-07-27 10:08:51 -0300 | [diff] [blame] | 1958 | { &dib0700_usb_id_table[14], NULL }, |
| 1959 | { NULL }, |
Yusuf Altin | bb1b082 | 2009-01-08 07:58:45 -0300 | [diff] [blame] | 1960 | }, |
James A Webb | 200e861 | 2009-08-04 02:38:05 -0300 | [diff] [blame] | 1961 | { "YUAN High-Tech DiBcom STK7700D", |
| 1962 | { &dib0700_usb_id_table[55], NULL }, |
| 1963 | { NULL }, |
| 1964 | }, |
Yusuf Altin | bb1b082 | 2009-01-08 07:58:45 -0300 | [diff] [blame] | 1965 | |
Olivier DANET | 54d75eb | 2007-07-25 14:42:54 -0300 | [diff] [blame] | 1966 | }, |
Janne Grunau | 82f3d55 | 2007-07-30 13:50:28 -0300 | [diff] [blame] | 1967 | |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 1968 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1969 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 1970 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
Mauro Carvalho Chehab | 0ffd1ab | 2010-08-01 09:37:23 -0300 | [diff] [blame] | 1971 | .rc_query = dib0700_rc_query_old_firmware, |
| 1972 | .rc_props = { |
| 1973 | .allowed_protos = IR_TYPE_RC5 | |
| 1974 | IR_TYPE_RC6 | |
| 1975 | IR_TYPE_NEC, |
| 1976 | .change_protocol = dib0700_change_protocol, |
| 1977 | }, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1978 | }, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 1979 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
| 1980 | |
| 1981 | .num_adapters = 1, |
| 1982 | .adapter = { |
| 1983 | { |
Olivier Grenie | f8731f4 | 2009-09-18 04:08:43 -0300 | [diff] [blame] | 1984 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 1985 | .pid_filter_count = 32, |
| 1986 | .pid_filter = stk70x0p_pid_filter, |
| 1987 | .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, |
Daniel Gimpelevich | 132c318 | 2008-01-25 06:02:42 -0300 | [diff] [blame] | 1988 | .frontend_attach = stk7700P2_frontend_attach, |
| 1989 | .tuner_attach = stk7700d_tuner_attach, |
| 1990 | |
| 1991 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
| 1992 | }, |
| 1993 | }, |
| 1994 | |
Yusuf Altin | bb1b082 | 2009-01-08 07:58:45 -0300 | [diff] [blame] | 1995 | .num_device_descs = 3, |
Daniel Gimpelevich | 132c318 | 2008-01-25 06:02:42 -0300 | [diff] [blame] | 1996 | .devices = { |
| 1997 | { "ASUS My Cinema U3000 Mini DVBT Tuner", |
| 1998 | { &dib0700_usb_id_table[23], NULL }, |
| 1999 | { NULL }, |
| 2000 | }, |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 2001 | { "Yuan EC372S", |
| 2002 | { &dib0700_usb_id_table[31], NULL }, |
| 2003 | { NULL }, |
Yusuf Altin | bb1b082 | 2009-01-08 07:58:45 -0300 | [diff] [blame] | 2004 | }, |
| 2005 | { "Terratec Cinergy T Express", |
| 2006 | { &dib0700_usb_id_table[42], NULL }, |
| 2007 | { NULL }, |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 2008 | } |
Chris Rankin | 48aa739 | 2008-09-25 06:52:24 -0300 | [diff] [blame] | 2009 | }, |
| 2010 | |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2011 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2012 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 2013 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2014 | .module_name = "dib0700", |
Mauro Carvalho Chehab | 0ffd1ab | 2010-08-01 09:37:23 -0300 | [diff] [blame] | 2015 | .rc_query = dib0700_rc_query_old_firmware, |
| 2016 | .rc_props = { |
| 2017 | .allowed_protos = IR_TYPE_RC5 | |
| 2018 | IR_TYPE_RC6 | |
| 2019 | IR_TYPE_NEC, |
| 2020 | .change_protocol = dib0700_change_protocol, |
| 2021 | }, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2022 | }, |
Daniel Gimpelevich | 132c318 | 2008-01-25 06:02:42 -0300 | [diff] [blame] | 2023 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
| 2024 | |
| 2025 | .num_adapters = 1, |
| 2026 | .adapter = { |
| 2027 | { |
Olivier Grenie | f8731f4 | 2009-09-18 04:08:43 -0300 | [diff] [blame] | 2028 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 2029 | .pid_filter_count = 32, |
| 2030 | .pid_filter = stk70x0p_pid_filter, |
| 2031 | .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 2032 | .frontend_attach = stk7070p_frontend_attach, |
| 2033 | .tuner_attach = dib7070p_tuner_attach, |
| 2034 | |
| 2035 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
| 2036 | |
| 2037 | .size_of_priv = sizeof(struct dib0700_adapter_state), |
| 2038 | }, |
| 2039 | }, |
| 2040 | |
Patrick Boettcher | 1e13c8f | 2009-09-19 05:24:40 -0300 | [diff] [blame] | 2041 | .num_device_descs = 11, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 2042 | .devices = { |
| 2043 | { "DiBcom STK7070P reference design", |
| 2044 | { &dib0700_usb_id_table[15], NULL }, |
| 2045 | { NULL }, |
| 2046 | }, |
| 2047 | { "Pinnacle PCTV DVB-T Flash Stick", |
| 2048 | { &dib0700_usb_id_table[16], NULL }, |
| 2049 | { NULL }, |
| 2050 | }, |
Yousef Lamlum | 7999a81 | 2008-01-25 05:51:48 -0300 | [diff] [blame] | 2051 | { "Artec T14BR DVB-T", |
| 2052 | { &dib0700_usb_id_table[22], NULL }, |
| 2053 | { NULL }, |
Daniel Gimpelevich | 132c318 | 2008-01-25 06:02:42 -0300 | [diff] [blame] | 2054 | }, |
| 2055 | { "ASUS My Cinema U3100 Mini DVBT Tuner", |
| 2056 | { &dib0700_usb_id_table[24], NULL }, |
| 2057 | { NULL }, |
| 2058 | }, |
Tim Taubert | c7637b1 | 2008-01-25 06:16:36 -0300 | [diff] [blame] | 2059 | { "Hauppauge Nova-T Stick", |
| 2060 | { &dib0700_usb_id_table[25], NULL }, |
| 2061 | { NULL }, |
| 2062 | }, |
Darren Salt | 13b83b5 | 2008-01-25 06:20:02 -0300 | [diff] [blame] | 2063 | { "Hauppauge Nova-T MyTV.t", |
| 2064 | { &dib0700_usb_id_table[26], NULL }, |
| 2065 | { NULL }, |
| 2066 | }, |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 2067 | { "Pinnacle PCTV 72e", |
| 2068 | { &dib0700_usb_id_table[29], NULL }, |
| 2069 | { NULL }, |
| 2070 | }, |
| 2071 | { "Pinnacle PCTV 73e", |
| 2072 | { &dib0700_usb_id_table[30], NULL }, |
| 2073 | { NULL }, |
| 2074 | }, |
Klaus Flittner | 919a548 | 2009-03-29 09:12:06 -0300 | [diff] [blame] | 2075 | { "Elgato EyeTV DTT", |
| 2076 | { &dib0700_usb_id_table[49], NULL }, |
| 2077 | { NULL }, |
| 2078 | }, |
Pascal Terjan | 9abb6e6 | 2009-02-26 10:31:41 -0300 | [diff] [blame] | 2079 | { "Yuan PD378S", |
| 2080 | { &dib0700_usb_id_table[45], NULL }, |
| 2081 | { NULL }, |
| 2082 | }, |
Armin Schenker | 513846e | 2009-04-20 11:57:49 -0300 | [diff] [blame] | 2083 | { "Elgato EyeTV Dtt Dlx PD378S", |
| 2084 | { &dib0700_usb_id_table[50], NULL }, |
| 2085 | { NULL }, |
| 2086 | }, |
Tim Taubert | c7637b1 | 2008-01-25 06:16:36 -0300 | [diff] [blame] | 2087 | }, |
| 2088 | |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2089 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2090 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 2091 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2092 | .module_name = "dib0700", |
Mauro Carvalho Chehab | 0ffd1ab | 2010-08-01 09:37:23 -0300 | [diff] [blame] | 2093 | .rc_query = dib0700_rc_query_old_firmware, |
| 2094 | .rc_props = { |
| 2095 | .allowed_protos = IR_TYPE_RC5 | |
| 2096 | IR_TYPE_RC6 | |
| 2097 | IR_TYPE_NEC, |
| 2098 | .change_protocol = dib0700_change_protocol, |
| 2099 | }, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2100 | }, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 2101 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
| 2102 | |
Olivier Grenie | 74b76f2 | 2009-09-02 08:19:19 -0300 | [diff] [blame] | 2103 | .num_adapters = 1, |
| 2104 | .adapter = { |
| 2105 | { |
Mauro Carvalho Chehab | 648732f | 2009-11-04 12:11:43 -0200 | [diff] [blame] | 2106 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 2107 | .pid_filter_count = 32, |
| 2108 | .pid_filter = stk70x0p_pid_filter, |
| 2109 | .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, |
Olivier Grenie | 74b76f2 | 2009-09-02 08:19:19 -0300 | [diff] [blame] | 2110 | .frontend_attach = stk7070p_frontend_attach, |
| 2111 | .tuner_attach = dib7070p_tuner_attach, |
| 2112 | |
| 2113 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
| 2114 | |
| 2115 | .size_of_priv = sizeof(struct dib0700_adapter_state), |
| 2116 | }, |
| 2117 | }, |
| 2118 | |
Patrick Boettcher | 20232c4 | 2009-12-01 12:08:56 -0300 | [diff] [blame] | 2119 | .num_device_descs = 3, |
Olivier Grenie | 74b76f2 | 2009-09-02 08:19:19 -0300 | [diff] [blame] | 2120 | .devices = { |
| 2121 | { "Pinnacle PCTV 73A", |
| 2122 | { &dib0700_usb_id_table[56], NULL }, |
| 2123 | { NULL }, |
| 2124 | }, |
| 2125 | { "Pinnacle PCTV 73e SE", |
Patrick Boettcher | 20232c4 | 2009-12-01 12:08:56 -0300 | [diff] [blame] | 2126 | { &dib0700_usb_id_table[57], &dib0700_usb_id_table[65], NULL }, |
Olivier Grenie | 74b76f2 | 2009-09-02 08:19:19 -0300 | [diff] [blame] | 2127 | { NULL }, |
| 2128 | }, |
| 2129 | { "Pinnacle PCTV 282e", |
Patrick Boettcher | 20232c4 | 2009-12-01 12:08:56 -0300 | [diff] [blame] | 2130 | { &dib0700_usb_id_table[58], &dib0700_usb_id_table[66], NULL }, |
Olivier Grenie | 74b76f2 | 2009-09-02 08:19:19 -0300 | [diff] [blame] | 2131 | { NULL }, |
| 2132 | }, |
| 2133 | }, |
| 2134 | |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2135 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2136 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 2137 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2138 | .module_name = "dib0700", |
Mauro Carvalho Chehab | 0ffd1ab | 2010-08-01 09:37:23 -0300 | [diff] [blame] | 2139 | .rc_query = dib0700_rc_query_old_firmware, |
| 2140 | .rc_props = { |
| 2141 | .allowed_protos = IR_TYPE_RC5 | |
| 2142 | IR_TYPE_RC6 | |
| 2143 | IR_TYPE_NEC, |
| 2144 | .change_protocol = dib0700_change_protocol, |
| 2145 | }, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2146 | }, |
Olivier Grenie | 74b76f2 | 2009-09-02 08:19:19 -0300 | [diff] [blame] | 2147 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
| 2148 | |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 2149 | .num_adapters = 2, |
| 2150 | .adapter = { |
| 2151 | { |
Olivier Grenie | f8731f4 | 2009-09-18 04:08:43 -0300 | [diff] [blame] | 2152 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 2153 | .pid_filter_count = 32, |
| 2154 | .pid_filter = stk70x0p_pid_filter, |
| 2155 | .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 2156 | .frontend_attach = stk7070pd_frontend_attach0, |
| 2157 | .tuner_attach = dib7070p_tuner_attach, |
| 2158 | |
| 2159 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
| 2160 | |
| 2161 | .size_of_priv = sizeof(struct dib0700_adapter_state), |
| 2162 | }, { |
Olivier Grenie | f8731f4 | 2009-09-18 04:08:43 -0300 | [diff] [blame] | 2163 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 2164 | .pid_filter_count = 32, |
| 2165 | .pid_filter = stk70x0p_pid_filter, |
| 2166 | .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 2167 | .frontend_attach = stk7070pd_frontend_attach1, |
| 2168 | .tuner_attach = dib7070p_tuner_attach, |
| 2169 | |
| 2170 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), |
| 2171 | |
| 2172 | .size_of_priv = sizeof(struct dib0700_adapter_state), |
| 2173 | } |
| 2174 | }, |
| 2175 | |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 2176 | .num_device_descs = 6, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 2177 | .devices = { |
| 2178 | { "DiBcom STK7070PD reference design", |
| 2179 | { &dib0700_usb_id_table[17], NULL }, |
| 2180 | { NULL }, |
| 2181 | }, |
| 2182 | { "Pinnacle PCTV Dual DVB-T Diversity Stick", |
| 2183 | { &dib0700_usb_id_table[18], NULL }, |
| 2184 | { NULL }, |
Michael Krufky | d01eb2d | 2008-07-03 23:43:36 -0300 | [diff] [blame] | 2185 | }, |
| 2186 | { "Hauppauge Nova-TD Stick (52009)", |
| 2187 | { &dib0700_usb_id_table[35], NULL }, |
| 2188 | { NULL }, |
Michael Krufky | 9a0c04a | 2008-09-03 17:12:24 -0300 | [diff] [blame] | 2189 | }, |
| 2190 | { "Hauppauge Nova-TD-500 (84xxx)", |
| 2191 | { &dib0700_usb_id_table[36], NULL }, |
| 2192 | { NULL }, |
Nicolas Fournier | db4b2d1 | 2009-01-13 07:15:25 -0300 | [diff] [blame] | 2193 | }, |
Patrick Boettcher | a9b8fe3 | 2009-05-20 05:35:02 -0300 | [diff] [blame] | 2194 | { "Terratec Cinergy DT USB XS Diversity/ T5", |
| 2195 | { &dib0700_usb_id_table[43], |
| 2196 | &dib0700_usb_id_table[53], NULL}, |
Nicolas Fournier | db4b2d1 | 2009-01-13 07:15:25 -0300 | [diff] [blame] | 2197 | { NULL }, |
sebastian.blanes@gmail.com | 0a6e1ed | 2009-02-24 14:51:43 -0300 | [diff] [blame] | 2198 | }, |
| 2199 | { "Sony PlayTV", |
| 2200 | { &dib0700_usb_id_table[44], NULL }, |
| 2201 | { NULL }, |
Michael Müller | 84e2f03 | 2010-04-26 22:18:57 -0300 | [diff] [blame] | 2202 | }, |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 2203 | }, |
| 2204 | |
| 2205 | .rc.core = { |
| 2206 | .rc_interval = DEFAULT_RC_INTERVAL, |
| 2207 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
| 2208 | .module_name = "dib0700", |
Mauro Carvalho Chehab | 0ffd1ab | 2010-08-01 09:37:23 -0300 | [diff] [blame] | 2209 | .rc_query = dib0700_rc_query_old_firmware, |
| 2210 | .rc_props = { |
| 2211 | .allowed_protos = IR_TYPE_RC5 | |
| 2212 | IR_TYPE_RC6 | |
| 2213 | IR_TYPE_NEC, |
| 2214 | .change_protocol = dib0700_change_protocol, |
| 2215 | }, |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 2216 | }, |
| 2217 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
| 2218 | |
| 2219 | .num_adapters = 2, |
| 2220 | .adapter = { |
| 2221 | { |
| 2222 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 2223 | .pid_filter_count = 32, |
| 2224 | .pid_filter = stk70x0p_pid_filter, |
| 2225 | .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, |
| 2226 | .frontend_attach = stk7070pd_frontend_attach0, |
| 2227 | .tuner_attach = dib7070p_tuner_attach, |
| 2228 | |
| 2229 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
| 2230 | |
| 2231 | .size_of_priv = sizeof(struct dib0700_adapter_state), |
| 2232 | }, { |
| 2233 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 2234 | .pid_filter_count = 32, |
| 2235 | .pid_filter = stk70x0p_pid_filter, |
| 2236 | .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, |
| 2237 | .frontend_attach = stk7070pd_frontend_attach1, |
| 2238 | .tuner_attach = dib7070p_tuner_attach, |
| 2239 | |
| 2240 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), |
| 2241 | |
| 2242 | .size_of_priv = sizeof(struct dib0700_adapter_state), |
| 2243 | } |
| 2244 | }, |
| 2245 | |
| 2246 | .num_device_descs = 1, |
| 2247 | .devices = { |
Michael Müller | 84e2f03 | 2010-04-26 22:18:57 -0300 | [diff] [blame] | 2248 | { "Elgato EyeTV Diversity", |
| 2249 | { &dib0700_usb_id_table[68], NULL }, |
| 2250 | { NULL }, |
| 2251 | }, |
Arne Luehrs | c985a8d | 2009-01-21 01:37:20 -0300 | [diff] [blame] | 2252 | }, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2253 | |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2254 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2255 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 2256 | .rc_codes = RC_MAP_DIB0700_NEC_TABLE, |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2257 | .module_name = "dib0700", |
Mauro Carvalho Chehab | 0ffd1ab | 2010-08-01 09:37:23 -0300 | [diff] [blame] | 2258 | .rc_query = dib0700_rc_query_old_firmware, |
| 2259 | .rc_props = { |
| 2260 | .allowed_protos = IR_TYPE_RC5 | |
| 2261 | IR_TYPE_RC6 | |
| 2262 | IR_TYPE_NEC, |
| 2263 | .change_protocol = dib0700_change_protocol, |
| 2264 | }, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2265 | }, |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 2266 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
| 2267 | |
| 2268 | .num_adapters = 1, |
| 2269 | .adapter = { |
| 2270 | { |
Olivier Grenie | f8731f4 | 2009-09-18 04:08:43 -0300 | [diff] [blame] | 2271 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 2272 | .pid_filter_count = 32, |
| 2273 | .pid_filter = stk70x0p_pid_filter, |
| 2274 | .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 2275 | .frontend_attach = stk7700ph_frontend_attach, |
| 2276 | .tuner_attach = stk7700ph_tuner_attach, |
| 2277 | |
| 2278 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
| 2279 | |
| 2280 | .size_of_priv = sizeof(struct |
| 2281 | dib0700_adapter_state), |
| 2282 | }, |
| 2283 | }, |
| 2284 | |
Pete Hildebrandt | c53d83c | 2009-08-05 11:46:38 -0300 | [diff] [blame] | 2285 | .num_device_descs = 9, |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 2286 | .devices = { |
| 2287 | { "Terratec Cinergy HT USB XE", |
| 2288 | { &dib0700_usb_id_table[27], NULL }, |
| 2289 | { NULL }, |
| 2290 | }, |
| 2291 | { "Pinnacle Expresscard 320cx", |
| 2292 | { &dib0700_usb_id_table[28], NULL }, |
| 2293 | { NULL }, |
| 2294 | }, |
| 2295 | { "Terratec Cinergy HT Express", |
| 2296 | { &dib0700_usb_id_table[32], NULL }, |
| 2297 | { NULL }, |
| 2298 | }, |
Finn Thain | 17a370b | 2008-09-06 13:42:47 -0300 | [diff] [blame] | 2299 | { "Gigabyte U8000-RH", |
| 2300 | { &dib0700_usb_id_table[37], NULL }, |
| 2301 | { NULL }, |
| 2302 | }, |
Daniel Oliveira Nascimento | 8751aaa | 2008-09-07 12:39:44 -0300 | [diff] [blame] | 2303 | { "YUAN High-Tech STK7700PH", |
| 2304 | { &dib0700_usb_id_table[38], NULL }, |
| 2305 | { NULL }, |
| 2306 | }, |
Albert Comerma | 5769743 | 2008-09-07 12:43:33 -0300 | [diff] [blame] | 2307 | { "Asus My Cinema-U3000Hybrid", |
| 2308 | { &dib0700_usb_id_table[39], NULL }, |
| 2309 | { NULL }, |
| 2310 | }, |
Xoan Loureiro | 16ba1ee | 2009-03-29 08:43:36 -0300 | [diff] [blame] | 2311 | { "YUAN High-Tech MC770", |
| 2312 | { &dib0700_usb_id_table[48], NULL }, |
| 2313 | { NULL }, |
| 2314 | }, |
tomas petr | f0f4ae7 | 2009-05-20 05:28:05 -0300 | [diff] [blame] | 2315 | { "Leadtek WinFast DTV Dongle H", |
| 2316 | { &dib0700_usb_id_table[51], NULL }, |
| 2317 | { NULL }, |
| 2318 | }, |
Pete Hildebrandt | c53d83c | 2009-08-05 11:46:38 -0300 | [diff] [blame] | 2319 | { "YUAN High-Tech STK7700D", |
| 2320 | { &dib0700_usb_id_table[54], NULL }, |
| 2321 | { NULL }, |
| 2322 | }, |
Albert Comerma | 6ca8f0b | 2008-03-29 21:35:57 -0300 | [diff] [blame] | 2323 | }, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2324 | |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2325 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2326 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 2327 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2328 | .module_name = "dib0700", |
Mauro Carvalho Chehab | 0ffd1ab | 2010-08-01 09:37:23 -0300 | [diff] [blame] | 2329 | .rc_query = dib0700_rc_query_old_firmware, |
| 2330 | .rc_props = { |
| 2331 | .allowed_protos = IR_TYPE_RC5 | |
| 2332 | IR_TYPE_RC6 | |
| 2333 | IR_TYPE_NEC, |
| 2334 | .change_protocol = dib0700_change_protocol, |
| 2335 | }, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2336 | }, |
Devin Heitmueller | cb22cb5 | 2008-09-08 05:42:42 -0300 | [diff] [blame] | 2337 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
| 2338 | .num_adapters = 1, |
| 2339 | .adapter = { |
| 2340 | { |
| 2341 | .frontend_attach = s5h1411_frontend_attach, |
| 2342 | .tuner_attach = xc5000_tuner_attach, |
| 2343 | |
| 2344 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
| 2345 | |
| 2346 | .size_of_priv = sizeof(struct |
| 2347 | dib0700_adapter_state), |
| 2348 | }, |
| 2349 | }, |
| 2350 | |
Devin Heitmueller | d2fc3bf | 2008-09-25 06:22:23 -0300 | [diff] [blame] | 2351 | .num_device_descs = 2, |
Devin Heitmueller | cb22cb5 | 2008-09-08 05:42:42 -0300 | [diff] [blame] | 2352 | .devices = { |
| 2353 | { "Pinnacle PCTV HD Pro USB Stick", |
| 2354 | { &dib0700_usb_id_table[40], NULL }, |
| 2355 | { NULL }, |
| 2356 | }, |
Devin Heitmueller | d2fc3bf | 2008-09-25 06:22:23 -0300 | [diff] [blame] | 2357 | { "Pinnacle PCTV HD USB Stick", |
| 2358 | { &dib0700_usb_id_table[41], NULL }, |
| 2359 | { NULL }, |
| 2360 | }, |
Devin Heitmueller | cb22cb5 | 2008-09-08 05:42:42 -0300 | [diff] [blame] | 2361 | }, |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2362 | |
| 2363 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2364 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 2365 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2366 | .module_name = "dib0700", |
Mauro Carvalho Chehab | 0ffd1ab | 2010-08-01 09:37:23 -0300 | [diff] [blame] | 2367 | .rc_query = dib0700_rc_query_old_firmware, |
| 2368 | .rc_props = { |
| 2369 | .allowed_protos = IR_TYPE_RC5 | |
| 2370 | IR_TYPE_RC6 | |
| 2371 | IR_TYPE_NEC, |
| 2372 | .change_protocol = dib0700_change_protocol, |
| 2373 | }, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2374 | }, |
Michael Krufky | ce904bc | 2009-01-19 01:12:55 -0300 | [diff] [blame] | 2375 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
| 2376 | .num_adapters = 1, |
| 2377 | .adapter = { |
| 2378 | { |
| 2379 | .frontend_attach = lgdt3305_frontend_attach, |
| 2380 | .tuner_attach = mxl5007t_tuner_attach, |
| 2381 | |
| 2382 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
| 2383 | |
| 2384 | .size_of_priv = sizeof(struct |
| 2385 | dib0700_adapter_state), |
| 2386 | }, |
| 2387 | }, |
| 2388 | |
| 2389 | .num_device_descs = 2, |
| 2390 | .devices = { |
| 2391 | { "Hauppauge ATSC MiniCard (B200)", |
| 2392 | { &dib0700_usb_id_table[46], NULL }, |
| 2393 | { NULL }, |
| 2394 | }, |
| 2395 | { "Hauppauge ATSC MiniCard (B210)", |
| 2396 | { &dib0700_usb_id_table[47], NULL }, |
| 2397 | { NULL }, |
| 2398 | }, |
| 2399 | }, |
Olivier Grenie | d300bd6 | 2009-09-15 06:55:35 -0300 | [diff] [blame] | 2400 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
| 2401 | |
| 2402 | .num_adapters = 1, |
| 2403 | .adapter = { |
| 2404 | { |
Olivier Grenie | f8731f4 | 2009-09-18 04:08:43 -0300 | [diff] [blame] | 2405 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 2406 | .pid_filter_count = 32, |
| 2407 | .pid_filter = stk70x0p_pid_filter, |
| 2408 | .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, |
Olivier Grenie | d300bd6 | 2009-09-15 06:55:35 -0300 | [diff] [blame] | 2409 | .frontend_attach = stk7070p_frontend_attach, |
| 2410 | .tuner_attach = dib7770p_tuner_attach, |
| 2411 | |
| 2412 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
| 2413 | |
| 2414 | .size_of_priv = |
Patrick Boettcher | db48138 | 2009-09-15 07:16:51 -0300 | [diff] [blame] | 2415 | sizeof(struct dib0700_adapter_state), |
Olivier Grenie | d300bd6 | 2009-09-15 06:55:35 -0300 | [diff] [blame] | 2416 | }, |
| 2417 | }, |
| 2418 | |
Patrick Boettcher | db48138 | 2009-09-15 07:16:51 -0300 | [diff] [blame] | 2419 | .num_device_descs = 2, |
Olivier Grenie | d300bd6 | 2009-09-15 06:55:35 -0300 | [diff] [blame] | 2420 | .devices = { |
| 2421 | { "DiBcom STK7770P reference design", |
| 2422 | { &dib0700_usb_id_table[59], NULL }, |
| 2423 | { NULL }, |
| 2424 | }, |
Patrick Boettcher | 1e13c8f | 2009-09-19 05:24:40 -0300 | [diff] [blame] | 2425 | { "Terratec Cinergy T USB XXS (HD)/ T3", |
| 2426 | { &dib0700_usb_id_table[33], |
| 2427 | &dib0700_usb_id_table[52], |
| 2428 | &dib0700_usb_id_table[60], NULL}, |
Patrick Boettcher | db48138 | 2009-09-15 07:16:51 -0300 | [diff] [blame] | 2429 | { NULL }, |
| 2430 | }, |
Olivier Grenie | d300bd6 | 2009-09-15 06:55:35 -0300 | [diff] [blame] | 2431 | }, |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2432 | |
| 2433 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2434 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 2435 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2436 | .module_name = "dib0700", |
Mauro Carvalho Chehab | 0ffd1ab | 2010-08-01 09:37:23 -0300 | [diff] [blame] | 2437 | .rc_query = dib0700_rc_query_old_firmware, |
| 2438 | .rc_props = { |
| 2439 | .allowed_protos = IR_TYPE_RC5 | |
| 2440 | IR_TYPE_RC6 | |
| 2441 | IR_TYPE_NEC, |
| 2442 | .change_protocol = dib0700_change_protocol, |
| 2443 | }, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2444 | }, |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 2445 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
| 2446 | .num_adapters = 1, |
| 2447 | .adapter = { |
| 2448 | { |
Olivier Grenie | f8731f4 | 2009-09-18 04:08:43 -0300 | [diff] [blame] | 2449 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 2450 | .pid_filter_count = 32, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 2451 | .pid_filter = stk80xx_pid_filter, |
| 2452 | .pid_filter_ctrl = stk80xx_pid_filter_ctrl, |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 2453 | .frontend_attach = stk807x_frontend_attach, |
| 2454 | .tuner_attach = dib807x_tuner_attach, |
| 2455 | |
| 2456 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
| 2457 | |
| 2458 | .size_of_priv = |
| 2459 | sizeof(struct dib0700_adapter_state), |
| 2460 | }, |
| 2461 | }, |
| 2462 | |
S?rgio Fortier | 8a378e8 | 2009-09-28 04:19:21 -0300 | [diff] [blame] | 2463 | .num_device_descs = 3, |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 2464 | .devices = { |
| 2465 | { "DiBcom STK807xP reference design", |
| 2466 | { &dib0700_usb_id_table[62], NULL }, |
| 2467 | { NULL }, |
| 2468 | }, |
Mauro Carvalho Chehab | aaeab30 | 2009-09-16 09:18:26 -0300 | [diff] [blame] | 2469 | { "Prolink Pixelview SBTVD", |
| 2470 | { &dib0700_usb_id_table[63], NULL }, |
| 2471 | { NULL }, |
| 2472 | }, |
S?rgio Fortier | 8a378e8 | 2009-09-28 04:19:21 -0300 | [diff] [blame] | 2473 | { "EvolutePC TVWay+", |
| 2474 | { &dib0700_usb_id_table[64], NULL }, |
| 2475 | { NULL }, |
| 2476 | }, |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 2477 | }, |
| 2478 | |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2479 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2480 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 2481 | .rc_codes = RC_MAP_DIB0700_NEC_TABLE, |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2482 | .module_name = "dib0700", |
Mauro Carvalho Chehab | 0ffd1ab | 2010-08-01 09:37:23 -0300 | [diff] [blame] | 2483 | .rc_query = dib0700_rc_query_old_firmware, |
| 2484 | .rc_props = { |
| 2485 | .allowed_protos = IR_TYPE_RC5 | |
| 2486 | IR_TYPE_RC6 | |
| 2487 | IR_TYPE_NEC, |
| 2488 | .change_protocol = dib0700_change_protocol, |
| 2489 | }, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2490 | }, |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 2491 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
| 2492 | .num_adapters = 2, |
| 2493 | .adapter = { |
| 2494 | { |
Olivier Grenie | f8731f4 | 2009-09-18 04:08:43 -0300 | [diff] [blame] | 2495 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 2496 | .pid_filter_count = 32, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 2497 | .pid_filter = stk80xx_pid_filter, |
| 2498 | .pid_filter_ctrl = stk80xx_pid_filter_ctrl, |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 2499 | .frontend_attach = stk807xpvr_frontend_attach0, |
| 2500 | .tuner_attach = dib807x_tuner_attach, |
| 2501 | |
| 2502 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
| 2503 | |
| 2504 | .size_of_priv = |
| 2505 | sizeof(struct dib0700_adapter_state), |
| 2506 | }, |
| 2507 | { |
Olivier Grenie | f8731f4 | 2009-09-18 04:08:43 -0300 | [diff] [blame] | 2508 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 2509 | .pid_filter_count = 32, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 2510 | .pid_filter = stk80xx_pid_filter, |
| 2511 | .pid_filter_ctrl = stk80xx_pid_filter_ctrl, |
Patrick Boettcher | ba3fe3a | 2009-09-16 09:51:30 -0300 | [diff] [blame] | 2512 | .frontend_attach = stk807xpvr_frontend_attach1, |
| 2513 | .tuner_attach = dib807x_tuner_attach, |
| 2514 | |
| 2515 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), |
| 2516 | |
| 2517 | .size_of_priv = |
| 2518 | sizeof(struct dib0700_adapter_state), |
| 2519 | }, |
| 2520 | }, |
| 2521 | |
| 2522 | .num_device_descs = 1, |
| 2523 | .devices = { |
| 2524 | { "DiBcom STK807xPVR reference design", |
| 2525 | { &dib0700_usb_id_table[61], NULL }, |
| 2526 | { NULL }, |
| 2527 | }, |
| 2528 | }, |
| 2529 | |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2530 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2531 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 2532 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2533 | .module_name = "dib0700", |
Mauro Carvalho Chehab | 0ffd1ab | 2010-08-01 09:37:23 -0300 | [diff] [blame] | 2534 | .rc_query = dib0700_rc_query_old_firmware, |
| 2535 | .rc_props = { |
| 2536 | .allowed_protos = IR_TYPE_RC5 | |
| 2537 | IR_TYPE_RC6 | |
| 2538 | IR_TYPE_NEC, |
| 2539 | .change_protocol = dib0700_change_protocol, |
| 2540 | }, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2541 | }, |
Olivier Grenie | 03245a5 | 2009-12-04 13:27:57 -0300 | [diff] [blame] | 2542 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
| 2543 | .num_adapters = 1, |
| 2544 | .adapter = { |
| 2545 | { |
| 2546 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
| 2547 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 2548 | .pid_filter_count = 32, |
| 2549 | .pid_filter = stk80xx_pid_filter, |
| 2550 | .pid_filter_ctrl = stk80xx_pid_filter_ctrl, |
| 2551 | .frontend_attach = stk809x_frontend_attach, |
| 2552 | .tuner_attach = dib809x_tuner_attach, |
| 2553 | |
| 2554 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
| 2555 | |
| 2556 | .size_of_priv = |
| 2557 | sizeof(struct dib0700_adapter_state), |
| 2558 | }, |
| 2559 | }, |
| 2560 | |
| 2561 | .num_device_descs = 1, |
| 2562 | .devices = { |
| 2563 | { "DiBcom STK8096GP reference design", |
| 2564 | { &dib0700_usb_id_table[67], NULL }, |
| 2565 | { NULL }, |
| 2566 | }, |
| 2567 | }, |
| 2568 | |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2569 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2570 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 5af935c | 2010-08-01 08:02:35 -0300 | [diff] [blame] | 2571 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, |
Mauro Carvalho Chehab | 72b3931 | 2010-07-31 22:56:00 -0300 | [diff] [blame] | 2572 | .module_name = "dib0700", |
Mauro Carvalho Chehab | 0ffd1ab | 2010-08-01 09:37:23 -0300 | [diff] [blame] | 2573 | .rc_query = dib0700_rc_query_old_firmware, |
| 2574 | .rc_props = { |
| 2575 | .allowed_protos = IR_TYPE_RC5 | |
| 2576 | IR_TYPE_RC6 | |
| 2577 | IR_TYPE_NEC, |
| 2578 | .change_protocol = dib0700_change_protocol, |
| 2579 | }, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2580 | }, |
Patrick Boettcher | 01373a5 | 2007-07-30 12:49:04 -0300 | [diff] [blame] | 2581 | }, |
Patrick Boettcher | b7f5491 | 2006-09-19 12:51:37 -0300 | [diff] [blame] | 2582 | }; |
| 2583 | |
| 2584 | int dib0700_device_count = ARRAY_SIZE(dib0700_devices); |