aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/af9015.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/dvb-usb/af9015.c')
-rw-r--r--drivers/media/dvb/dvb-usb/af9015.c492
1 files changed, 373 insertions, 119 deletions
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c
index 56cbd3636c31..282a43d648df 100644
--- a/drivers/media/dvb/dvb-usb/af9015.c
+++ b/drivers/media/dvb/dvb-usb/af9015.c
@@ -50,14 +50,14 @@ static int af9015_properties_count = ARRAY_SIZE(af9015_properties);
50 50
51static struct af9013_config af9015_af9013_config[] = { 51static struct af9013_config af9015_af9013_config[] = {
52 { 52 {
53 .demod_address = AF9015_I2C_DEMOD, 53 .i2c_addr = AF9015_I2C_DEMOD,
54 .output_mode = AF9013_OUTPUT_MODE_USB, 54 .ts_mode = AF9013_TS_USB,
55 .api_version = { 0, 1, 9, 0 }, 55 .api_version = { 0, 1, 9, 0 },
56 .gpio[0] = AF9013_GPIO_HI, 56 .gpio[0] = AF9013_GPIO_HI,
57 .gpio[3] = AF9013_GPIO_TUNER_ON, 57 .gpio[3] = AF9013_GPIO_TUNER_ON,
58 58
59 }, { 59 }, {
60 .output_mode = AF9013_OUTPUT_MODE_SERIAL, 60 .ts_mode = AF9013_TS_SERIAL,
61 .api_version = { 0, 1, 9, 0 }, 61 .api_version = { 0, 1, 9, 0 },
62 .gpio[0] = AF9013_GPIO_TUNER_ON, 62 .gpio[0] = AF9013_GPIO_TUNER_ON,
63 .gpio[1] = AF9013_GPIO_LO, 63 .gpio[1] = AF9013_GPIO_LO,
@@ -216,8 +216,8 @@ static int af9015_write_reg_i2c(struct dvb_usb_device *d, u8 addr, u16 reg,
216{ 216{
217 struct req_t req = {WRITE_I2C, addr, reg, 1, 1, 1, &val}; 217 struct req_t req = {WRITE_I2C, addr, reg, 1, 1, 1, &val};
218 218
219 if (addr == af9015_af9013_config[0].demod_address || 219 if (addr == af9015_af9013_config[0].i2c_addr ||
220 addr == af9015_af9013_config[1].demod_address) 220 addr == af9015_af9013_config[1].i2c_addr)
221 req.addr_len = 3; 221 req.addr_len = 3;
222 222
223 return af9015_ctrl_msg(d, &req); 223 return af9015_ctrl_msg(d, &req);
@@ -228,8 +228,8 @@ static int af9015_read_reg_i2c(struct dvb_usb_device *d, u8 addr, u16 reg,
228{ 228{
229 struct req_t req = {READ_I2C, addr, reg, 0, 1, 1, val}; 229 struct req_t req = {READ_I2C, addr, reg, 0, 1, 1, val};
230 230
231 if (addr == af9015_af9013_config[0].demod_address || 231 if (addr == af9015_af9013_config[0].i2c_addr ||
232 addr == af9015_af9013_config[1].demod_address) 232 addr == af9015_af9013_config[1].i2c_addr)
233 req.addr_len = 3; 233 req.addr_len = 3;
234 234
235 return af9015_ctrl_msg(d, &req); 235 return af9015_ctrl_msg(d, &req);
@@ -271,8 +271,8 @@ Due to that the only way to select correct tuner is use demodulator I2C-gate.
271 return -EAGAIN; 271 return -EAGAIN;
272 272
273 while (i < num) { 273 while (i < num) {
274 if (msg[i].addr == af9015_af9013_config[0].demod_address || 274 if (msg[i].addr == af9015_af9013_config[0].i2c_addr ||
275 msg[i].addr == af9015_af9013_config[1].demod_address) { 275 msg[i].addr == af9015_af9013_config[1].i2c_addr) {
276 addr = msg[i].buf[0] << 8; 276 addr = msg[i].buf[0] << 8;
277 addr += msg[i].buf[1]; 277 addr += msg[i].buf[1];
278 mbox = msg[i].buf[2]; 278 mbox = msg[i].buf[2];
@@ -288,8 +288,7 @@ Due to that the only way to select correct tuner is use demodulator I2C-gate.
288 ret = -EOPNOTSUPP; 288 ret = -EOPNOTSUPP;
289 goto error; 289 goto error;
290 } 290 }
291 if (msg[i].addr == 291 if (msg[i].addr == af9015_af9013_config[0].i2c_addr)
292 af9015_af9013_config[0].demod_address)
293 req.cmd = READ_MEMORY; 292 req.cmd = READ_MEMORY;
294 else 293 else
295 req.cmd = READ_I2C; 294 req.cmd = READ_I2C;
@@ -307,7 +306,7 @@ Due to that the only way to select correct tuner is use demodulator I2C-gate.
307 goto error; 306 goto error;
308 } 307 }
309 if (msg[i].addr == 308 if (msg[i].addr ==
310 af9015_af9013_config[0].demod_address) { 309 af9015_af9013_config[0].i2c_addr) {
311 ret = -EINVAL; 310 ret = -EINVAL;
312 goto error; 311 goto error;
313 } 312 }
@@ -325,8 +324,7 @@ Due to that the only way to select correct tuner is use demodulator I2C-gate.
325 ret = -EOPNOTSUPP; 324 ret = -EOPNOTSUPP;
326 goto error; 325 goto error;
327 } 326 }
328 if (msg[i].addr == 327 if (msg[i].addr == af9015_af9013_config[0].i2c_addr)
329 af9015_af9013_config[0].demod_address)
330 req.cmd = WRITE_MEMORY; 328 req.cmd = WRITE_MEMORY;
331 else 329 else
332 req.cmd = WRITE_I2C; 330 req.cmd = WRITE_I2C;
@@ -508,7 +506,7 @@ static int af9015_copy_firmware(struct dvb_usb_device *d)
508 msleep(100); 506 msleep(100);
509 507
510 ret = af9015_read_reg_i2c(d, 508 ret = af9015_read_reg_i2c(d,
511 af9015_af9013_config[1].demod_address, 0x98be, &val); 509 af9015_af9013_config[1].i2c_addr, 0x98be, &val);
512 if (ret) 510 if (ret)
513 goto error; 511 goto error;
514 else 512 else
@@ -536,7 +534,7 @@ static int af9015_copy_firmware(struct dvb_usb_device *d)
536 goto error; 534 goto error;
537 535
538 /* request boot firmware */ 536 /* request boot firmware */
539 ret = af9015_write_reg_i2c(d, af9015_af9013_config[1].demod_address, 537 ret = af9015_write_reg_i2c(d, af9015_af9013_config[1].i2c_addr,
540 0xe205, 1); 538 0xe205, 1);
541 deb_info("%s: firmware boot cmd status:%d\n", __func__, ret); 539 deb_info("%s: firmware boot cmd status:%d\n", __func__, ret);
542 if (ret) 540 if (ret)
@@ -547,7 +545,7 @@ static int af9015_copy_firmware(struct dvb_usb_device *d)
547 545
548 /* check firmware status */ 546 /* check firmware status */
549 ret = af9015_read_reg_i2c(d, 547 ret = af9015_read_reg_i2c(d,
550 af9015_af9013_config[1].demod_address, 0x98be, &val); 548 af9015_af9013_config[1].i2c_addr, 0x98be, &val);
551 deb_info("%s: firmware status cmd status:%d fw status:%02x\n", 549 deb_info("%s: firmware status cmd status:%d fw status:%02x\n",
552 __func__, ret, val); 550 __func__, ret, val);
553 if (ret) 551 if (ret)
@@ -840,7 +838,7 @@ static int af9015_read_config(struct usb_device *udev)
840 if (ret) 838 if (ret)
841 goto error; 839 goto error;
842 840
843 deb_info("%s: IR mode:%d\n", __func__, val); 841 deb_info("%s: IR mode=%d\n", __func__, val);
844 for (i = 0; i < af9015_properties_count; i++) { 842 for (i = 0; i < af9015_properties_count; i++) {
845 if (val == AF9015_IR_MODE_DISABLED) 843 if (val == AF9015_IR_MODE_DISABLED)
846 af9015_properties[i].rc.core.rc_codes = NULL; 844 af9015_properties[i].rc.core.rc_codes = NULL;
@@ -854,7 +852,7 @@ static int af9015_read_config(struct usb_device *udev)
854 if (ret) 852 if (ret)
855 goto error; 853 goto error;
856 af9015_config.dual_mode = val; 854 af9015_config.dual_mode = val;
857 deb_info("%s: TS mode:%d\n", __func__, af9015_config.dual_mode); 855 deb_info("%s: TS mode=%d\n", __func__, af9015_config.dual_mode);
858 856
859 /* Set adapter0 buffer size according to USB port speed, adapter1 buffer 857 /* Set adapter0 buffer size according to USB port speed, adapter1 buffer
860 size can be static because it is enabled only USB2.0 */ 858 size can be static because it is enabled only USB2.0 */
@@ -878,7 +876,7 @@ static int af9015_read_config(struct usb_device *udev)
878 ret = af9015_rw_udev(udev, &req); 876 ret = af9015_rw_udev(udev, &req);
879 if (ret) 877 if (ret)
880 goto error; 878 goto error;
881 af9015_af9013_config[1].demod_address = val; 879 af9015_af9013_config[1].i2c_addr = val;
882 880
883 /* enable 2nd adapter */ 881 /* enable 2nd adapter */
884 for (i = 0; i < af9015_properties_count; i++) 882 for (i = 0; i < af9015_properties_count; i++)
@@ -900,34 +898,38 @@ static int af9015_read_config(struct usb_device *udev)
900 goto error; 898 goto error;
901 switch (val) { 899 switch (val) {
902 case 0: 900 case 0:
903 af9015_af9013_config[i].adc_clock = 28800; 901 af9015_af9013_config[i].clock = 28800000;
904 break; 902 break;
905 case 1: 903 case 1:
906 af9015_af9013_config[i].adc_clock = 20480; 904 af9015_af9013_config[i].clock = 20480000;
907 break; 905 break;
908 case 2: 906 case 2:
909 af9015_af9013_config[i].adc_clock = 28000; 907 af9015_af9013_config[i].clock = 28000000;
910 break; 908 break;
911 case 3: 909 case 3:
912 af9015_af9013_config[i].adc_clock = 25000; 910 af9015_af9013_config[i].clock = 25000000;
913 break; 911 break;
914 }; 912 };
915 deb_info("%s: [%d] xtal:%d set adc_clock:%d\n", __func__, i, 913 deb_info("%s: [%d] xtal=%d set clock=%d\n", __func__, i,
916 val, af9015_af9013_config[i].adc_clock); 914 val, af9015_af9013_config[i].clock);
917 915
918 /* tuner IF */ 916 /* IF frequency */
919 req.addr = AF9015_EEPROM_IF1H + offset; 917 req.addr = AF9015_EEPROM_IF1H + offset;
920 ret = af9015_rw_udev(udev, &req); 918 ret = af9015_rw_udev(udev, &req);
921 if (ret) 919 if (ret)
922 goto error; 920 goto error;
923 af9015_af9013_config[i].tuner_if = val << 8; 921
922 af9015_af9013_config[i].if_frequency = val << 8;
923
924 req.addr = AF9015_EEPROM_IF1L + offset; 924 req.addr = AF9015_EEPROM_IF1L + offset;
925 ret = af9015_rw_udev(udev, &req); 925 ret = af9015_rw_udev(udev, &req);
926 if (ret) 926 if (ret)
927 goto error; 927 goto error;
928 af9015_af9013_config[i].tuner_if += val; 928
929 deb_info("%s: [%d] IF1:%d\n", __func__, i, 929 af9015_af9013_config[i].if_frequency += val;
930 af9015_af9013_config[0].tuner_if); 930 af9015_af9013_config[i].if_frequency *= 1000;
931 deb_info("%s: [%d] IF frequency=%d\n", __func__, i,
932 af9015_af9013_config[0].if_frequency);
931 933
932 /* MT2060 IF1 */ 934 /* MT2060 IF1 */
933 req.addr = AF9015_EEPROM_MT2060_IF1H + offset; 935 req.addr = AF9015_EEPROM_MT2060_IF1H + offset;
@@ -940,7 +942,7 @@ static int af9015_read_config(struct usb_device *udev)
940 if (ret) 942 if (ret)
941 goto error; 943 goto error;
942 af9015_config.mt2060_if1[i] += val; 944 af9015_config.mt2060_if1[i] += val;
943 deb_info("%s: [%d] MT2060 IF1:%d\n", __func__, i, 945 deb_info("%s: [%d] MT2060 IF1=%d\n", __func__, i,
944 af9015_config.mt2060_if1[i]); 946 af9015_config.mt2060_if1[i]);
945 947
946 /* tuner */ 948 /* tuner */
@@ -957,30 +959,30 @@ static int af9015_read_config(struct usb_device *udev)
957 case AF9013_TUNER_TDA18271: 959 case AF9013_TUNER_TDA18271:
958 case AF9013_TUNER_QT1010A: 960 case AF9013_TUNER_QT1010A:
959 case AF9013_TUNER_TDA18218: 961 case AF9013_TUNER_TDA18218:
960 af9015_af9013_config[i].rf_spec_inv = 1; 962 af9015_af9013_config[i].spec_inv = 1;
961 break; 963 break;
962 case AF9013_TUNER_MXL5003D: 964 case AF9013_TUNER_MXL5003D:
963 case AF9013_TUNER_MXL5005D: 965 case AF9013_TUNER_MXL5005D:
964 case AF9013_TUNER_MXL5005R: 966 case AF9013_TUNER_MXL5005R:
965 case AF9013_TUNER_MXL5007T: 967 case AF9013_TUNER_MXL5007T:
966 af9015_af9013_config[i].rf_spec_inv = 0; 968 af9015_af9013_config[i].spec_inv = 0;
967 break; 969 break;
968 case AF9013_TUNER_MC44S803: 970 case AF9013_TUNER_MC44S803:
969 af9015_af9013_config[i].gpio[1] = AF9013_GPIO_LO; 971 af9015_af9013_config[i].gpio[1] = AF9013_GPIO_LO;
970 af9015_af9013_config[i].rf_spec_inv = 1; 972 af9015_af9013_config[i].spec_inv = 1;
971 break; 973 break;
972 default: 974 default:
973 warn("tuner id:%d not supported, please report!", val); 975 warn("tuner id=%d not supported, please report!", val);
974 return -ENODEV; 976 return -ENODEV;
975 }; 977 };
976 978
977 af9015_af9013_config[i].tuner = val; 979 af9015_af9013_config[i].tuner = val;
978 deb_info("%s: [%d] tuner id:%d\n", __func__, i, val); 980 deb_info("%s: [%d] tuner id=%d\n", __func__, i, val);
979 } 981 }
980 982
981error: 983error:
982 if (ret) 984 if (ret)
983 err("eeprom read failed:%d", ret); 985 err("eeprom read failed=%d", ret);
984 986
985 /* AverMedia AVerTV Volar Black HD (A850) device have bad EEPROM 987 /* AverMedia AVerTV Volar Black HD (A850) device have bad EEPROM
986 content :-( Override some wrong values here. Ditto for the 988 content :-( Override some wrong values here. Ditto for the
@@ -998,7 +1000,7 @@ error:
998 af9015_properties[i].num_adapters = 1; 1000 af9015_properties[i].num_adapters = 1;
999 1001
1000 /* set correct IF */ 1002 /* set correct IF */
1001 af9015_af9013_config[0].tuner_if = 4570; 1003 af9015_af9013_config[0].if_frequency = 4570000;
1002 } 1004 }
1003 1005
1004 return ret; 1006 return ret;
@@ -1093,9 +1095,79 @@ error:
1093 return ret; 1095 return ret;
1094} 1096}
1095 1097
1098/* override demod callbacks for resource locking */
1099static int af9015_af9013_set_frontend(struct dvb_frontend *fe)
1100{
1101 int ret;
1102 struct dvb_usb_adapter *adap = fe->dvb->priv;
1103 struct af9015_state *priv = adap->dev->priv;
1104
1105 if (mutex_lock_interruptible(&adap->dev->usb_mutex))
1106 return -EAGAIN;
1107
1108 ret = priv->set_frontend[adap->id](fe);
1109
1110 mutex_unlock(&adap->dev->usb_mutex);
1111
1112 return ret;
1113}
1114
1115/* override demod callbacks for resource locking */
1116static int af9015_af9013_read_status(struct dvb_frontend *fe,
1117 fe_status_t *status)
1118{
1119 int ret;
1120 struct dvb_usb_adapter *adap = fe->dvb->priv;
1121 struct af9015_state *priv = adap->dev->priv;
1122
1123 if (mutex_lock_interruptible(&adap->dev->usb_mutex))
1124 return -EAGAIN;
1125
1126 ret = priv->read_status[adap->id](fe, status);
1127
1128 mutex_unlock(&adap->dev->usb_mutex);
1129
1130 return ret;
1131}
1132
1133/* override demod callbacks for resource locking */
1134static int af9015_af9013_init(struct dvb_frontend *fe)
1135{
1136 int ret;
1137 struct dvb_usb_adapter *adap = fe->dvb->priv;
1138 struct af9015_state *priv = adap->dev->priv;
1139
1140 if (mutex_lock_interruptible(&adap->dev->usb_mutex))
1141 return -EAGAIN;
1142
1143 ret = priv->init[adap->id](fe);
1144
1145 mutex_unlock(&adap->dev->usb_mutex);
1146
1147 return ret;
1148}
1149
1150/* override demod callbacks for resource locking */
1151static int af9015_af9013_sleep(struct dvb_frontend *fe)
1152{
1153 int ret;
1154 struct dvb_usb_adapter *adap = fe->dvb->priv;
1155 struct af9015_state *priv = adap->dev->priv;
1156
1157 if (mutex_lock_interruptible(&adap->dev->usb_mutex))
1158 return -EAGAIN;
1159
1160 ret = priv->sleep[adap->id](fe);
1161
1162 mutex_unlock(&adap->dev->usb_mutex);
1163
1164 return ret;
1165}
1166
1096static int af9015_af9013_frontend_attach(struct dvb_usb_adapter *adap) 1167static int af9015_af9013_frontend_attach(struct dvb_usb_adapter *adap)
1097{ 1168{
1098 int ret; 1169 int ret;
1170 struct af9015_state *state = adap->dev->priv;
1099 1171
1100 if (adap->id == 1) { 1172 if (adap->id == 1) {
1101 /* copy firmware to 2nd demodulator */ 1173 /* copy firmware to 2nd demodulator */
@@ -1116,6 +1188,32 @@ static int af9015_af9013_frontend_attach(struct dvb_usb_adapter *adap)
1116 adap->fe_adap[0].fe = dvb_attach(af9013_attach, &af9015_af9013_config[adap->id], 1188 adap->fe_adap[0].fe = dvb_attach(af9013_attach, &af9015_af9013_config[adap->id],
1117 &adap->dev->i2c_adap); 1189 &adap->dev->i2c_adap);
1118 1190
1191 /*
1192 * AF9015 firmware does not like if it gets interrupted by I2C adapter
1193 * request on some critical phases. During normal operation I2C adapter
1194 * is used only 2nd demodulator and tuner on dual tuner devices.
1195 * Override demodulator callbacks and use mutex for limit access to
1196 * those "critical" paths to keep AF9015 happy.
1197 * Note: we abuse unused usb_mutex here.
1198 */
1199 if (adap->fe_adap[0].fe) {
1200 state->set_frontend[adap->id] =
1201 adap->fe_adap[0].fe->ops.set_frontend;
1202 adap->fe_adap[0].fe->ops.set_frontend =
1203 af9015_af9013_set_frontend;
1204
1205 state->read_status[adap->id] =
1206 adap->fe_adap[0].fe->ops.read_status;
1207 adap->fe_adap[0].fe->ops.read_status =
1208 af9015_af9013_read_status;
1209
1210 state->init[adap->id] = adap->fe_adap[0].fe->ops.init;
1211 adap->fe_adap[0].fe->ops.init = af9015_af9013_init;
1212
1213 state->sleep[adap->id] = adap->fe_adap[0].fe->ops.sleep;
1214 adap->fe_adap[0].fe->ops.sleep = af9015_af9013_sleep;
1215 }
1216
1119 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; 1217 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0;
1120} 1218}
1121 1219
@@ -1245,49 +1343,112 @@ static int af9015_tuner_attach(struct dvb_usb_adapter *adap)
1245 return ret; 1343 return ret;
1246} 1344}
1247 1345
1346enum af9015_usb_table_entry {
1347 AFATECH_9015,
1348 AFATECH_9016,
1349 WINFAST_DTV_GOLD,
1350 PINNACLE_PCTV_71E,
1351 KWORLD_PLUSTV_399U,
1352 TINYTWIN,
1353 AZUREWAVE_TU700,
1354 TERRATEC_AF9015,
1355 KWORLD_PLUSTV_PC160,
1356 AVERTV_VOLAR_X,
1357 XTENSIONS_380U,
1358 MSI_DIGIVOX_DUO,
1359 AVERTV_VOLAR_X_REV2,
1360 TELESTAR_STARSTICK_2,
1361 AVERMEDIA_A309_USB,
1362 MSI_DIGIVOX_MINI_III,
1363 KWORLD_E396,
1364 KWORLD_E39B,
1365 KWORLD_E395,
1366 TREKSTOR_DVBT,
1367 AVERTV_A850,
1368 AVERTV_A805,
1369 CONCEPTRONIC_CTVDIGRCU,
1370 KWORLD_MC810,
1371 GENIUS_TVGO_DVB_T03,
1372 KWORLD_399U_2,
1373 KWORLD_PC160_T,
1374 SVEON_STV20,
1375 TINYTWIN_2,
1376 WINFAST_DTV2000DS,
1377 KWORLD_UB383_T,
1378 KWORLD_E39A,
1379 AVERMEDIA_A815M,
1380 CINERGY_T_STICK_RC,
1381 CINERGY_T_DUAL_RC,
1382 AVERTV_A850T,
1383 TINYTWIN_3,
1384 SVEON_STV22,
1385};
1386
1248static struct usb_device_id af9015_usb_table[] = { 1387static struct usb_device_id af9015_usb_table[] = {
1249/* 0 */{USB_DEVICE(USB_VID_AFATECH, USB_PID_AFATECH_AF9015_9015)}, 1388 [AFATECH_9015] =
1250 {USB_DEVICE(USB_VID_AFATECH, USB_PID_AFATECH_AF9015_9016)}, 1389 {USB_DEVICE(USB_VID_AFATECH, USB_PID_AFATECH_AF9015_9015)},
1251 {USB_DEVICE(USB_VID_LEADTEK, USB_PID_WINFAST_DTV_DONGLE_GOLD)}, 1390 [AFATECH_9016] =
1252 {USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV71E)}, 1391 {USB_DEVICE(USB_VID_AFATECH, USB_PID_AFATECH_AF9015_9016)},
1253 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_399U)}, 1392 [WINFAST_DTV_GOLD] =
1254/* 5 */{USB_DEVICE(USB_VID_VISIONPLUS, 1393 {USB_DEVICE(USB_VID_LEADTEK, USB_PID_WINFAST_DTV_DONGLE_GOLD)},
1255 USB_PID_TINYTWIN)}, 1394 [PINNACLE_PCTV_71E] =
1256 {USB_DEVICE(USB_VID_VISIONPLUS, 1395 {USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV71E)},
1257 USB_PID_AZUREWAVE_AD_TU700)}, 1396 [KWORLD_PLUSTV_399U] =
1258 {USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_USB_XE_REV2)}, 1397 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_399U)},
1259 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_PC160_2T)}, 1398 [TINYTWIN] = {USB_DEVICE(USB_VID_VISIONPLUS, USB_PID_TINYTWIN)},
1260 {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_VOLAR_X)}, 1399 [AZUREWAVE_TU700] =
1261/* 10 */{USB_DEVICE(USB_VID_XTENSIONS, USB_PID_XTENSIONS_XD_380)}, 1400 {USB_DEVICE(USB_VID_VISIONPLUS, USB_PID_AZUREWAVE_AD_TU700)},
1262 {USB_DEVICE(USB_VID_MSI_2, USB_PID_MSI_DIGIVOX_DUO)}, 1401 [TERRATEC_AF9015] = {USB_DEVICE(USB_VID_TERRATEC,
1263 {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_VOLAR_X_2)}, 1402 USB_PID_TERRATEC_CINERGY_T_USB_XE_REV2)},
1264 {USB_DEVICE(USB_VID_TELESTAR, USB_PID_TELESTAR_STARSTICK_2)}, 1403 [KWORLD_PLUSTV_PC160] =
1265 {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A309)}, 1404 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_PC160_2T)},
1266/* 15 */{USB_DEVICE(USB_VID_MSI_2, USB_PID_MSI_DIGI_VOX_MINI_III)}, 1405 [AVERTV_VOLAR_X] =
1267 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_395U)}, 1406 {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_VOLAR_X)},
1268 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_395U_2)}, 1407 [XTENSIONS_380U] =
1269 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_395U_3)}, 1408 {USB_DEVICE(USB_VID_XTENSIONS, USB_PID_XTENSIONS_XD_380)},
1270 {USB_DEVICE(USB_VID_AFATECH, USB_PID_TREKSTOR_DVBT)}, 1409 [MSI_DIGIVOX_DUO] =
1271/* 20 */{USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A850)}, 1410 {USB_DEVICE(USB_VID_MSI_2, USB_PID_MSI_DIGIVOX_DUO)},
1272 {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A805)}, 1411 [AVERTV_VOLAR_X_REV2] =
1273 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_CONCEPTRONIC_CTVDIGRCU)}, 1412 {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_VOLAR_X_2)},
1274 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_MC810)}, 1413 [TELESTAR_STARSTICK_2] =
1275 {USB_DEVICE(USB_VID_KYE, USB_PID_GENIUS_TVGO_DVB_T03)}, 1414 {USB_DEVICE(USB_VID_TELESTAR, USB_PID_TELESTAR_STARSTICK_2)},
1276/* 25 */{USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_399U_2)}, 1415 [AVERMEDIA_A309_USB] =
1277 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_PC160_T)}, 1416 {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A309)},
1278 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_SVEON_STV20)}, 1417 [MSI_DIGIVOX_MINI_III] =
1279 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_TINYTWIN_2)}, 1418 {USB_DEVICE(USB_VID_MSI_2, USB_PID_MSI_DIGI_VOX_MINI_III)},
1280 {USB_DEVICE(USB_VID_LEADTEK, USB_PID_WINFAST_DTV2000DS)}, 1419 [KWORLD_E396] = {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_395U)},
1281/* 30 */{USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_UB383_T)}, 1420 [KWORLD_E39B] = {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_395U_2)},
1282 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_395U_4)}, 1421 [KWORLD_E395] = {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_395U_3)},
1283 {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A815M)}, 1422 [TREKSTOR_DVBT] = {USB_DEVICE(USB_VID_AFATECH, USB_PID_TREKSTOR_DVBT)},
1284 {USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_STICK_RC)}, 1423 [AVERTV_A850] = {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A850)},
1285 {USB_DEVICE(USB_VID_TERRATEC, 1424 [AVERTV_A805] = {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A805)},
1286 USB_PID_TERRATEC_CINERGY_T_STICK_DUAL_RC)}, 1425 [CONCEPTRONIC_CTVDIGRCU] =
1287/* 35 */{USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A850T)}, 1426 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_CONCEPTRONIC_CTVDIGRCU)},
1288 {USB_DEVICE(USB_VID_GTEK, USB_PID_TINYTWIN_3)}, 1427 [KWORLD_MC810] = {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_MC810)},
1289 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_SVEON_STV22)}, 1428 [GENIUS_TVGO_DVB_T03] =
1290 {0}, 1429 {USB_DEVICE(USB_VID_KYE, USB_PID_GENIUS_TVGO_DVB_T03)},
1430 [KWORLD_399U_2] = {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_399U_2)},
1431 [KWORLD_PC160_T] =
1432 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_PC160_T)},
1433 [SVEON_STV20] = {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_SVEON_STV20)},
1434 [TINYTWIN_2] = {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_TINYTWIN_2)},
1435 [WINFAST_DTV2000DS] =
1436 {USB_DEVICE(USB_VID_LEADTEK, USB_PID_WINFAST_DTV2000DS)},
1437 [KWORLD_UB383_T] =
1438 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_UB383_T)},
1439 [KWORLD_E39A] =
1440 {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_395U_4)},
1441 [AVERMEDIA_A815M] =
1442 {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A815M)},
1443 [CINERGY_T_STICK_RC] = {USB_DEVICE(USB_VID_TERRATEC,
1444 USB_PID_TERRATEC_CINERGY_T_STICK_RC)},
1445 [CINERGY_T_DUAL_RC] = {USB_DEVICE(USB_VID_TERRATEC,
1446 USB_PID_TERRATEC_CINERGY_T_STICK_DUAL_RC)},
1447 [AVERTV_A850T] =
1448 {USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A850T)},
1449 [TINYTWIN_3] = {USB_DEVICE(USB_VID_GTEK, USB_PID_TINYTWIN_3)},
1450 [SVEON_STV22] = {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_SVEON_STV22)},
1451 { }
1291}; 1452};
1292MODULE_DEVICE_TABLE(usb, af9015_usb_table); 1453MODULE_DEVICE_TABLE(usb, af9015_usb_table);
1293 1454
@@ -1362,68 +1523,104 @@ static struct dvb_usb_device_properties af9015_properties[] = {
1362 .devices = { 1523 .devices = {
1363 { 1524 {
1364 .name = "Afatech AF9015 DVB-T USB2.0 stick", 1525 .name = "Afatech AF9015 DVB-T USB2.0 stick",
1365 .cold_ids = {&af9015_usb_table[0], 1526 .cold_ids = {
1366 &af9015_usb_table[1], NULL}, 1527 &af9015_usb_table[AFATECH_9015],
1528 &af9015_usb_table[AFATECH_9016],
1529 NULL
1530 },
1367 .warm_ids = {NULL}, 1531 .warm_ids = {NULL},
1368 }, 1532 },
1369 { 1533 {
1370 .name = "Leadtek WinFast DTV Dongle Gold", 1534 .name = "Leadtek WinFast DTV Dongle Gold",
1371 .cold_ids = {&af9015_usb_table[2], NULL}, 1535 .cold_ids = {
1536 &af9015_usb_table[WINFAST_DTV_GOLD],
1537 NULL
1538 },
1372 .warm_ids = {NULL}, 1539 .warm_ids = {NULL},
1373 }, 1540 },
1374 { 1541 {
1375 .name = "Pinnacle PCTV 71e", 1542 .name = "Pinnacle PCTV 71e",
1376 .cold_ids = {&af9015_usb_table[3], NULL}, 1543 .cold_ids = {
1544 &af9015_usb_table[PINNACLE_PCTV_71E],
1545 NULL
1546 },
1377 .warm_ids = {NULL}, 1547 .warm_ids = {NULL},
1378 }, 1548 },
1379 { 1549 {
1380 .name = "KWorld PlusTV Dual DVB-T Stick " \ 1550 .name = "KWorld PlusTV Dual DVB-T Stick " \
1381 "(DVB-T 399U)", 1551 "(DVB-T 399U)",
1382 .cold_ids = {&af9015_usb_table[4], 1552 .cold_ids = {
1383 &af9015_usb_table[25], NULL}, 1553 &af9015_usb_table[KWORLD_PLUSTV_399U],
1554 &af9015_usb_table[KWORLD_399U_2],
1555 NULL
1556 },
1384 .warm_ids = {NULL}, 1557 .warm_ids = {NULL},
1385 }, 1558 },
1386 { 1559 {
1387 .name = "DigitalNow TinyTwin DVB-T Receiver", 1560 .name = "DigitalNow TinyTwin DVB-T Receiver",
1388 .cold_ids = {&af9015_usb_table[5], 1561 .cold_ids = {
1389 &af9015_usb_table[28], 1562 &af9015_usb_table[TINYTWIN],
1390 &af9015_usb_table[36], NULL}, 1563 &af9015_usb_table[TINYTWIN_2],
1564 &af9015_usb_table[TINYTWIN_3],
1565 NULL
1566 },
1391 .warm_ids = {NULL}, 1567 .warm_ids = {NULL},
1392 }, 1568 },
1393 { 1569 {
1394 .name = "TwinHan AzureWave AD-TU700(704J)", 1570 .name = "TwinHan AzureWave AD-TU700(704J)",
1395 .cold_ids = {&af9015_usb_table[6], NULL}, 1571 .cold_ids = {
1572 &af9015_usb_table[AZUREWAVE_TU700],
1573 NULL
1574 },
1396 .warm_ids = {NULL}, 1575 .warm_ids = {NULL},
1397 }, 1576 },
1398 { 1577 {
1399 .name = "TerraTec Cinergy T USB XE", 1578 .name = "TerraTec Cinergy T USB XE",
1400 .cold_ids = {&af9015_usb_table[7], NULL}, 1579 .cold_ids = {
1580 &af9015_usb_table[TERRATEC_AF9015],
1581 NULL
1582 },
1401 .warm_ids = {NULL}, 1583 .warm_ids = {NULL},
1402 }, 1584 },
1403 { 1585 {
1404 .name = "KWorld PlusTV Dual DVB-T PCI " \ 1586 .name = "KWorld PlusTV Dual DVB-T PCI " \
1405 "(DVB-T PC160-2T)", 1587 "(DVB-T PC160-2T)",
1406 .cold_ids = {&af9015_usb_table[8], NULL}, 1588 .cold_ids = {
1589 &af9015_usb_table[KWORLD_PLUSTV_PC160],
1590 NULL
1591 },
1407 .warm_ids = {NULL}, 1592 .warm_ids = {NULL},
1408 }, 1593 },
1409 { 1594 {
1410 .name = "AVerMedia AVerTV DVB-T Volar X", 1595 .name = "AVerMedia AVerTV DVB-T Volar X",
1411 .cold_ids = {&af9015_usb_table[9], NULL}, 1596 .cold_ids = {
1597 &af9015_usb_table[AVERTV_VOLAR_X],
1598 NULL
1599 },
1412 .warm_ids = {NULL}, 1600 .warm_ids = {NULL},
1413 }, 1601 },
1414 { 1602 {
1415 .name = "TerraTec Cinergy T Stick RC", 1603 .name = "TerraTec Cinergy T Stick RC",
1416 .cold_ids = {&af9015_usb_table[33], NULL}, 1604 .cold_ids = {
1605 &af9015_usb_table[CINERGY_T_STICK_RC],
1606 NULL
1607 },
1417 .warm_ids = {NULL}, 1608 .warm_ids = {NULL},
1418 }, 1609 },
1419 { 1610 {
1420 .name = "TerraTec Cinergy T Stick Dual RC", 1611 .name = "TerraTec Cinergy T Stick Dual RC",
1421 .cold_ids = {&af9015_usb_table[34], NULL}, 1612 .cold_ids = {
1613 &af9015_usb_table[CINERGY_T_DUAL_RC],
1614 NULL
1615 },
1422 .warm_ids = {NULL}, 1616 .warm_ids = {NULL},
1423 }, 1617 },
1424 { 1618 {
1425 .name = "AverMedia AVerTV Red HD+ (A850T)", 1619 .name = "AverMedia AVerTV Red HD+ (A850T)",
1426 .cold_ids = {&af9015_usb_table[35], NULL}, 1620 .cold_ids = {
1621 &af9015_usb_table[AVERTV_A850T],
1622 NULL
1623 },
1427 .warm_ids = {NULL}, 1624 .warm_ids = {NULL},
1428 }, 1625 },
1429 } 1626 }
@@ -1496,57 +1693,87 @@ static struct dvb_usb_device_properties af9015_properties[] = {
1496 .devices = { 1693 .devices = {
1497 { 1694 {
1498 .name = "Xtensions XD-380", 1695 .name = "Xtensions XD-380",
1499 .cold_ids = {&af9015_usb_table[10], NULL}, 1696 .cold_ids = {
1697 &af9015_usb_table[XTENSIONS_380U],
1698 NULL
1699 },
1500 .warm_ids = {NULL}, 1700 .warm_ids = {NULL},
1501 }, 1701 },
1502 { 1702 {
1503 .name = "MSI DIGIVOX Duo", 1703 .name = "MSI DIGIVOX Duo",
1504 .cold_ids = {&af9015_usb_table[11], NULL}, 1704 .cold_ids = {
1705 &af9015_usb_table[MSI_DIGIVOX_DUO],
1706 NULL
1707 },
1505 .warm_ids = {NULL}, 1708 .warm_ids = {NULL},
1506 }, 1709 },
1507 { 1710 {
1508 .name = "Fujitsu-Siemens Slim Mobile USB DVB-T", 1711 .name = "Fujitsu-Siemens Slim Mobile USB DVB-T",
1509 .cold_ids = {&af9015_usb_table[12], NULL}, 1712 .cold_ids = {
1713 &af9015_usb_table[AVERTV_VOLAR_X_REV2],
1714 NULL
1715 },
1510 .warm_ids = {NULL}, 1716 .warm_ids = {NULL},
1511 }, 1717 },
1512 { 1718 {
1513 .name = "Telestar Starstick 2", 1719 .name = "Telestar Starstick 2",
1514 .cold_ids = {&af9015_usb_table[13], NULL}, 1720 .cold_ids = {
1721 &af9015_usb_table[TELESTAR_STARSTICK_2],
1722 NULL
1723 },
1515 .warm_ids = {NULL}, 1724 .warm_ids = {NULL},
1516 }, 1725 },
1517 { 1726 {
1518 .name = "AVerMedia A309", 1727 .name = "AVerMedia A309",
1519 .cold_ids = {&af9015_usb_table[14], NULL}, 1728 .cold_ids = {
1729 &af9015_usb_table[AVERMEDIA_A309_USB],
1730 NULL
1731 },
1520 .warm_ids = {NULL}, 1732 .warm_ids = {NULL},
1521 }, 1733 },
1522 { 1734 {
1523 .name = "MSI Digi VOX mini III", 1735 .name = "MSI Digi VOX mini III",
1524 .cold_ids = {&af9015_usb_table[15], NULL}, 1736 .cold_ids = {
1737 &af9015_usb_table[MSI_DIGIVOX_MINI_III],
1738 NULL
1739 },
1525 .warm_ids = {NULL}, 1740 .warm_ids = {NULL},
1526 }, 1741 },
1527 { 1742 {
1528 .name = "KWorld USB DVB-T TV Stick II " \ 1743 .name = "KWorld USB DVB-T TV Stick II " \
1529 "(VS-DVB-T 395U)", 1744 "(VS-DVB-T 395U)",
1530 .cold_ids = {&af9015_usb_table[16], 1745 .cold_ids = {
1531 &af9015_usb_table[17], 1746 &af9015_usb_table[KWORLD_E396],
1532 &af9015_usb_table[18], 1747 &af9015_usb_table[KWORLD_E39B],
1533 &af9015_usb_table[31], NULL}, 1748 &af9015_usb_table[KWORLD_E395],
1749 &af9015_usb_table[KWORLD_E39A],
1750 NULL
1751 },
1534 .warm_ids = {NULL}, 1752 .warm_ids = {NULL},
1535 }, 1753 },
1536 { 1754 {
1537 .name = "TrekStor DVB-T USB Stick", 1755 .name = "TrekStor DVB-T USB Stick",
1538 .cold_ids = {&af9015_usb_table[19], NULL}, 1756 .cold_ids = {
1757 &af9015_usb_table[TREKSTOR_DVBT],
1758 NULL
1759 },
1539 .warm_ids = {NULL}, 1760 .warm_ids = {NULL},
1540 }, 1761 },
1541 { 1762 {
1542 .name = "AverMedia AVerTV Volar Black HD " \ 1763 .name = "AverMedia AVerTV Volar Black HD " \
1543 "(A850)", 1764 "(A850)",
1544 .cold_ids = {&af9015_usb_table[20], NULL}, 1765 .cold_ids = {
1766 &af9015_usb_table[AVERTV_A850],
1767 NULL
1768 },
1545 .warm_ids = {NULL}, 1769 .warm_ids = {NULL},
1546 }, 1770 },
1547 { 1771 {
1548 .name = "Sveon STV22 Dual USB DVB-T Tuner HDTV", 1772 .name = "Sveon STV22 Dual USB DVB-T Tuner HDTV",
1549 .cold_ids = {&af9015_usb_table[37], NULL}, 1773 .cold_ids = {
1774 &af9015_usb_table[SVEON_STV22],
1775 NULL
1776 },
1550 .warm_ids = {NULL}, 1777 .warm_ids = {NULL},
1551 }, 1778 },
1552 } 1779 }
@@ -1619,50 +1846,77 @@ static struct dvb_usb_device_properties af9015_properties[] = {
1619 .devices = { 1846 .devices = {
1620 { 1847 {
1621 .name = "AverMedia AVerTV Volar GPS 805 (A805)", 1848 .name = "AverMedia AVerTV Volar GPS 805 (A805)",
1622 .cold_ids = {&af9015_usb_table[21], NULL}, 1849 .cold_ids = {
1850 &af9015_usb_table[AVERTV_A805],
1851 NULL
1852 },
1623 .warm_ids = {NULL}, 1853 .warm_ids = {NULL},
1624 }, 1854 },
1625 { 1855 {
1626 .name = "Conceptronic USB2.0 DVB-T CTVDIGRCU " \ 1856 .name = "Conceptronic USB2.0 DVB-T CTVDIGRCU " \
1627 "V3.0", 1857 "V3.0",
1628 .cold_ids = {&af9015_usb_table[22], NULL}, 1858 .cold_ids = {
1859 &af9015_usb_table[CONCEPTRONIC_CTVDIGRCU],
1860 NULL
1861 },
1629 .warm_ids = {NULL}, 1862 .warm_ids = {NULL},
1630 }, 1863 },
1631 { 1864 {
1632 .name = "KWorld Digial MC-810", 1865 .name = "KWorld Digial MC-810",
1633 .cold_ids = {&af9015_usb_table[23], NULL}, 1866 .cold_ids = {
1867 &af9015_usb_table[KWORLD_MC810],
1868 NULL
1869 },
1634 .warm_ids = {NULL}, 1870 .warm_ids = {NULL},
1635 }, 1871 },
1636 { 1872 {
1637 .name = "Genius TVGo DVB-T03", 1873 .name = "Genius TVGo DVB-T03",
1638 .cold_ids = {&af9015_usb_table[24], NULL}, 1874 .cold_ids = {
1875 &af9015_usb_table[GENIUS_TVGO_DVB_T03],
1876 NULL
1877 },
1639 .warm_ids = {NULL}, 1878 .warm_ids = {NULL},
1640 }, 1879 },
1641 { 1880 {
1642 .name = "KWorld PlusTV DVB-T PCI Pro Card " \ 1881 .name = "KWorld PlusTV DVB-T PCI Pro Card " \
1643 "(DVB-T PC160-T)", 1882 "(DVB-T PC160-T)",
1644 .cold_ids = {&af9015_usb_table[26], NULL}, 1883 .cold_ids = {
1884 &af9015_usb_table[KWORLD_PC160_T],
1885 NULL
1886 },
1645 .warm_ids = {NULL}, 1887 .warm_ids = {NULL},
1646 }, 1888 },
1647 { 1889 {
1648 .name = "Sveon STV20 Tuner USB DVB-T HDTV", 1890 .name = "Sveon STV20 Tuner USB DVB-T HDTV",
1649 .cold_ids = {&af9015_usb_table[27], NULL}, 1891 .cold_ids = {
1892 &af9015_usb_table[SVEON_STV20],
1893 NULL
1894 },
1650 .warm_ids = {NULL}, 1895 .warm_ids = {NULL},
1651 }, 1896 },
1652 { 1897 {
1653 .name = "Leadtek WinFast DTV2000DS", 1898 .name = "Leadtek WinFast DTV2000DS",
1654 .cold_ids = {&af9015_usb_table[29], NULL}, 1899 .cold_ids = {
1900 &af9015_usb_table[WINFAST_DTV2000DS],
1901 NULL
1902 },
1655 .warm_ids = {NULL}, 1903 .warm_ids = {NULL},
1656 }, 1904 },
1657 { 1905 {
1658 .name = "KWorld USB DVB-T Stick Mobile " \ 1906 .name = "KWorld USB DVB-T Stick Mobile " \
1659 "(UB383-T)", 1907 "(UB383-T)",
1660 .cold_ids = {&af9015_usb_table[30], NULL}, 1908 .cold_ids = {
1909 &af9015_usb_table[KWORLD_UB383_T],
1910 NULL
1911 },
1661 .warm_ids = {NULL}, 1912 .warm_ids = {NULL},
1662 }, 1913 },
1663 { 1914 {
1664 .name = "AverMedia AVerTV Volar M (A815Mac)", 1915 .name = "AverMedia AVerTV Volar M (A815Mac)",
1665 .cold_ids = {&af9015_usb_table[32], NULL}, 1916 .cold_ids = {
1917 &af9015_usb_table[AVERMEDIA_A815M],
1918 NULL
1919 },
1666 .warm_ids = {NULL}, 1920 .warm_ids = {NULL},
1667 }, 1921 },
1668 } 1922 }