diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-30 03:08:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-30 03:08:53 -0400 |
commit | 664a41b8a91bf78a01a751e15175e0008977685a (patch) | |
tree | d9dc15c83400ad2dfb430ff27ae3e7fdc9395856 /drivers/media/dvb/dvb-usb | |
parent | 983236b5741e557451f3ed4ec5ebf1f62a5b2c15 (diff) | |
parent | ee2ce3a0b43d14d792d34cf88e7bc2091096744b (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (430 commits)
[media] ir-mce_kbd-decoder: include module.h for its facilities
[media] ov5642: include module.h for its facilities
[media] em28xx: Fix DVB-C maxsize for em2884
[media] tda18271c2dd: Fix saw filter configuration for DVB-C @6MHz
[media] v4l: mt9v032: Fix Bayer pattern
[media] V4L: mt9m111: rewrite set_pixfmt
[media] V4L: mt9m111: fix missing return value check mt9m111_reg_clear
[media] V4L: initial driver for ov5642 CMOS sensor
[media] V4L: sh_mobile_ceu_camera: fix Oops when USERPTR mapping fails
[media] V4L: soc-camera: remove soc-camera bus and devices on it
[media] V4L: soc-camera: un-export the soc-camera bus
[media] V4L: sh_mobile_csi2: switch away from using the soc-camera bus notifier
[media] V4L: add media bus configuration subdev operations
[media] V4L: soc-camera: group struct field initialisations together
[media] V4L: soc-camera: remove now unused soc-camera specific PM hooks
[media] V4L: pxa-camera: switch to using standard PM hooks
[media] NetUP Dual DVB-T/C CI RF: force card hardware revision by module param
[media] Don't OOPS if videobuf_dvb_get_frontend return NULL
[media] NetUP Dual DVB-T/C CI RF: load firmware according card revision
[media] omap3isp: Support configurable HS/VS polarities
...
Fix up conflicts:
- arch/arm/mach-omap2/board-rx51-peripherals.c:
cleanup regulator supply definitions in mach-omap2
vs
OMAP3: RX-51: define vdds_csib regulator supply
- drivers/staging/tm6000/tm6000-alsa.c (trivial)
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r-- | drivers/media/dvb/dvb-usb/Kconfig | 1 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/af9015.c | 135 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/af9015.h | 1 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/anysee.c | 69 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/anysee.h | 16 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/dib0700_devices.c | 188 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 3 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb.h | 2 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/gp8psk.h | 3 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/technisat-usb2.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/vp7045.h | 3 |
11 files changed, 301 insertions, 124 deletions
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index e85304c59a2b..5d73dec8ac07 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig | |||
@@ -81,6 +81,7 @@ config DVB_USB_DIB0700 | |||
81 | select MEDIA_TUNER_MT2266 if !MEDIA_TUNER_CUSTOMISE | 81 | select MEDIA_TUNER_MT2266 if !MEDIA_TUNER_CUSTOMISE |
82 | select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMISE | 82 | select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMISE |
83 | select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMISE | 83 | select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMISE |
84 | select MEDIA_TUNER_XC4000 if !MEDIA_TUNER_CUSTOMISE | ||
84 | select MEDIA_TUNER_MXL5007T if !MEDIA_TUNER_CUSTOMISE | 85 | select MEDIA_TUNER_MXL5007T if !MEDIA_TUNER_CUSTOMISE |
85 | help | 86 | help |
86 | Support for USB2.0/1.1 DVB receivers based on the DiB0700 USB bridge. The | 87 | Support for USB2.0/1.1 DVB receivers based on the DiB0700 USB bridge. The |
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index 100ebc37e99e..d7ad05fc383b 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c | |||
@@ -91,7 +91,6 @@ static int af9015_rw_udev(struct usb_device *udev, struct req_t *req) | |||
91 | case GET_CONFIG: | 91 | case GET_CONFIG: |
92 | case READ_MEMORY: | 92 | case READ_MEMORY: |
93 | case RECONNECT_USB: | 93 | case RECONNECT_USB: |
94 | case GET_IR_CODE: | ||
95 | write = 0; | 94 | write = 0; |
96 | break; | 95 | break; |
97 | case READ_I2C: | 96 | case READ_I2C: |
@@ -164,13 +163,6 @@ static int af9015_rw_udev(struct usb_device *udev, struct req_t *req) | |||
164 | deb_xfer("<<< "); | 163 | deb_xfer("<<< "); |
165 | debug_dump(buf, act_len, deb_xfer); | 164 | debug_dump(buf, act_len, deb_xfer); |
166 | 165 | ||
167 | /* remote controller query status is 1 if remote code is not received */ | ||
168 | if (req->cmd == GET_IR_CODE && buf[1] == 1) { | ||
169 | buf[1] = 0; /* clear command "error" status */ | ||
170 | memset(&buf[2], 0, req->data_len); | ||
171 | buf[3] = 1; /* no remote code received mark */ | ||
172 | } | ||
173 | |||
174 | /* check status */ | 166 | /* check status */ |
175 | if (buf[1]) { | 167 | if (buf[1]) { |
176 | err("command failed:%d", buf[1]); | 168 | err("command failed:%d", buf[1]); |
@@ -292,6 +284,10 @@ Due to that the only way to select correct tuner is use demodulator I2C-gate. | |||
292 | } | 284 | } |
293 | 285 | ||
294 | if (num > i + 1 && (msg[i+1].flags & I2C_M_RD)) { | 286 | if (num > i + 1 && (msg[i+1].flags & I2C_M_RD)) { |
287 | if (msg[i].len > 3 || msg[i+1].len > 61) { | ||
288 | ret = -EOPNOTSUPP; | ||
289 | goto error; | ||
290 | } | ||
295 | if (msg[i].addr == | 291 | if (msg[i].addr == |
296 | af9015_af9013_config[0].demod_address) | 292 | af9015_af9013_config[0].demod_address) |
297 | req.cmd = READ_MEMORY; | 293 | req.cmd = READ_MEMORY; |
@@ -306,12 +302,16 @@ Due to that the only way to select correct tuner is use demodulator I2C-gate. | |||
306 | ret = af9015_ctrl_msg(d, &req); | 302 | ret = af9015_ctrl_msg(d, &req); |
307 | i += 2; | 303 | i += 2; |
308 | } else if (msg[i].flags & I2C_M_RD) { | 304 | } else if (msg[i].flags & I2C_M_RD) { |
309 | ret = -EINVAL; | 305 | if (msg[i].len > 61) { |
306 | ret = -EOPNOTSUPP; | ||
307 | goto error; | ||
308 | } | ||
310 | if (msg[i].addr == | 309 | if (msg[i].addr == |
311 | af9015_af9013_config[0].demod_address) | 310 | af9015_af9013_config[0].demod_address) { |
311 | ret = -EINVAL; | ||
312 | goto error; | 312 | goto error; |
313 | else | 313 | } |
314 | req.cmd = READ_I2C; | 314 | req.cmd = READ_I2C; |
315 | req.i2c_addr = msg[i].addr; | 315 | req.i2c_addr = msg[i].addr; |
316 | req.addr = addr; | 316 | req.addr = addr; |
317 | req.mbox = mbox; | 317 | req.mbox = mbox; |
@@ -321,6 +321,10 @@ Due to that the only way to select correct tuner is use demodulator I2C-gate. | |||
321 | ret = af9015_ctrl_msg(d, &req); | 321 | ret = af9015_ctrl_msg(d, &req); |
322 | i += 1; | 322 | i += 1; |
323 | } else { | 323 | } else { |
324 | if (msg[i].len > 21) { | ||
325 | ret = -EOPNOTSUPP; | ||
326 | goto error; | ||
327 | } | ||
324 | if (msg[i].addr == | 328 | if (msg[i].addr == |
325 | af9015_af9013_config[0].demod_address) | 329 | af9015_af9013_config[0].demod_address) |
326 | req.cmd = WRITE_MEMORY; | 330 | req.cmd = WRITE_MEMORY; |
@@ -735,6 +739,7 @@ static const struct af9015_rc_setup af9015_rc_setup_hashes[] = { | |||
735 | { 0xb8feb708, RC_MAP_MSI_DIGIVOX_II }, | 739 | { 0xb8feb708, RC_MAP_MSI_DIGIVOX_II }, |
736 | { 0xa3703d00, RC_MAP_ALINK_DTU_M }, | 740 | { 0xa3703d00, RC_MAP_ALINK_DTU_M }, |
737 | { 0x9b7dc64e, RC_MAP_TOTAL_MEDIA_IN_HAND }, /* MYGICTV U718 */ | 741 | { 0x9b7dc64e, RC_MAP_TOTAL_MEDIA_IN_HAND }, /* MYGICTV U718 */ |
742 | { 0x5d49e3db, RC_MAP_DIGITTRADE }, /* LC-Power LC-USB-DVBT */ | ||
738 | { } | 743 | { } |
739 | }; | 744 | }; |
740 | 745 | ||
@@ -749,6 +754,8 @@ static const struct af9015_rc_setup af9015_rc_setup_usbids[] = { | |||
749 | RC_MAP_AZUREWAVE_AD_TU700 }, | 754 | RC_MAP_AZUREWAVE_AD_TU700 }, |
750 | { (USB_VID_MSI_2 << 16) + USB_PID_MSI_DIGI_VOX_MINI_III, | 755 | { (USB_VID_MSI_2 << 16) + USB_PID_MSI_DIGI_VOX_MINI_III, |
751 | RC_MAP_MSI_DIGIVOX_III }, | 756 | RC_MAP_MSI_DIGIVOX_III }, |
757 | { (USB_VID_MSI_2 << 16) + USB_PID_MSI_DIGIVOX_DUO, | ||
758 | RC_MAP_MSI_DIGIVOX_III }, | ||
752 | { (USB_VID_LEADTEK << 16) + USB_PID_WINFAST_DTV_DONGLE_GOLD, | 759 | { (USB_VID_LEADTEK << 16) + USB_PID_WINFAST_DTV_DONGLE_GOLD, |
753 | RC_MAP_LEADTEK_Y04G0051 }, | 760 | RC_MAP_LEADTEK_Y04G0051 }, |
754 | { (USB_VID_AVERMEDIA << 16) + USB_PID_AVERMEDIA_VOLAR_X, | 761 | { (USB_VID_AVERMEDIA << 16) + USB_PID_AVERMEDIA_VOLAR_X, |
@@ -759,6 +766,8 @@ static const struct af9015_rc_setup af9015_rc_setup_usbids[] = { | |||
759 | RC_MAP_DIGITALNOW_TINYTWIN }, | 766 | RC_MAP_DIGITALNOW_TINYTWIN }, |
760 | { (USB_VID_GTEK << 16) + USB_PID_TINYTWIN_3, | 767 | { (USB_VID_GTEK << 16) + USB_PID_TINYTWIN_3, |
761 | RC_MAP_DIGITALNOW_TINYTWIN }, | 768 | RC_MAP_DIGITALNOW_TINYTWIN }, |
769 | { (USB_VID_KWORLD_2 << 16) + USB_PID_SVEON_STV22, | ||
770 | RC_MAP_MSI_DIGIVOX_III }, | ||
762 | { } | 771 | { } |
763 | }; | 772 | }; |
764 | 773 | ||
@@ -1082,44 +1091,11 @@ error: | |||
1082 | return ret; | 1091 | return ret; |
1083 | } | 1092 | } |
1084 | 1093 | ||
1085 | /* init 2nd I2C adapter */ | ||
1086 | static int af9015_i2c_init(struct dvb_usb_device *d) | ||
1087 | { | ||
1088 | int ret; | ||
1089 | struct af9015_state *state = d->priv; | ||
1090 | deb_info("%s:\n", __func__); | ||
1091 | |||
1092 | strncpy(state->i2c_adap.name, d->desc->name, | ||
1093 | sizeof(state->i2c_adap.name)); | ||
1094 | state->i2c_adap.algo = d->props.i2c_algo; | ||
1095 | state->i2c_adap.algo_data = NULL; | ||
1096 | state->i2c_adap.dev.parent = &d->udev->dev; | ||
1097 | |||
1098 | i2c_set_adapdata(&state->i2c_adap, d); | ||
1099 | |||
1100 | ret = i2c_add_adapter(&state->i2c_adap); | ||
1101 | if (ret < 0) | ||
1102 | err("could not add i2c adapter"); | ||
1103 | |||
1104 | return ret; | ||
1105 | } | ||
1106 | |||
1107 | static int af9015_af9013_frontend_attach(struct dvb_usb_adapter *adap) | 1094 | static int af9015_af9013_frontend_attach(struct dvb_usb_adapter *adap) |
1108 | { | 1095 | { |
1109 | int ret; | 1096 | int ret; |
1110 | struct af9015_state *state = adap->dev->priv; | ||
1111 | struct i2c_adapter *i2c_adap; | ||
1112 | |||
1113 | if (adap->id == 0) { | ||
1114 | /* select I2C adapter */ | ||
1115 | i2c_adap = &adap->dev->i2c_adap; | ||
1116 | |||
1117 | deb_info("%s: init I2C\n", __func__); | ||
1118 | ret = af9015_i2c_init(adap->dev); | ||
1119 | } else { | ||
1120 | /* select I2C adapter */ | ||
1121 | i2c_adap = &state->i2c_adap; | ||
1122 | 1097 | ||
1098 | if (adap->id == 1) { | ||
1123 | /* copy firmware to 2nd demodulator */ | 1099 | /* copy firmware to 2nd demodulator */ |
1124 | if (af9015_config.dual_mode) { | 1100 | if (af9015_config.dual_mode) { |
1125 | ret = af9015_copy_firmware(adap->dev); | 1101 | ret = af9015_copy_firmware(adap->dev); |
@@ -1136,7 +1112,7 @@ static int af9015_af9013_frontend_attach(struct dvb_usb_adapter *adap) | |||
1136 | 1112 | ||
1137 | /* attach demodulator */ | 1113 | /* attach demodulator */ |
1138 | adap->fe = dvb_attach(af9013_attach, &af9015_af9013_config[adap->id], | 1114 | adap->fe = dvb_attach(af9013_attach, &af9015_af9013_config[adap->id], |
1139 | i2c_adap); | 1115 | &adap->dev->i2c_adap); |
1140 | 1116 | ||
1141 | return adap->fe == NULL ? -ENODEV : 0; | 1117 | return adap->fe == NULL ? -ENODEV : 0; |
1142 | } | 1118 | } |
@@ -1206,57 +1182,56 @@ static struct mxl5007t_config af9015_mxl5007t_config = { | |||
1206 | 1182 | ||
1207 | static int af9015_tuner_attach(struct dvb_usb_adapter *adap) | 1183 | static int af9015_tuner_attach(struct dvb_usb_adapter *adap) |
1208 | { | 1184 | { |
1209 | struct af9015_state *state = adap->dev->priv; | ||
1210 | struct i2c_adapter *i2c_adap; | ||
1211 | int ret; | 1185 | int ret; |
1212 | deb_info("%s:\n", __func__); | 1186 | deb_info("%s:\n", __func__); |
1213 | 1187 | ||
1214 | /* select I2C adapter */ | ||
1215 | if (adap->id == 0) | ||
1216 | i2c_adap = &adap->dev->i2c_adap; | ||
1217 | else | ||
1218 | i2c_adap = &state->i2c_adap; | ||
1219 | |||
1220 | switch (af9015_af9013_config[adap->id].tuner) { | 1188 | switch (af9015_af9013_config[adap->id].tuner) { |
1221 | case AF9013_TUNER_MT2060: | 1189 | case AF9013_TUNER_MT2060: |
1222 | case AF9013_TUNER_MT2060_2: | 1190 | case AF9013_TUNER_MT2060_2: |
1223 | ret = dvb_attach(mt2060_attach, adap->fe, i2c_adap, | 1191 | ret = dvb_attach(mt2060_attach, adap->fe, &adap->dev->i2c_adap, |
1224 | &af9015_mt2060_config, | 1192 | &af9015_mt2060_config, |
1225 | af9015_config.mt2060_if1[adap->id]) | 1193 | af9015_config.mt2060_if1[adap->id]) |
1226 | == NULL ? -ENODEV : 0; | 1194 | == NULL ? -ENODEV : 0; |
1227 | break; | 1195 | break; |
1228 | case AF9013_TUNER_QT1010: | 1196 | case AF9013_TUNER_QT1010: |
1229 | case AF9013_TUNER_QT1010A: | 1197 | case AF9013_TUNER_QT1010A: |
1230 | ret = dvb_attach(qt1010_attach, adap->fe, i2c_adap, | 1198 | ret = dvb_attach(qt1010_attach, adap->fe, &adap->dev->i2c_adap, |
1231 | &af9015_qt1010_config) == NULL ? -ENODEV : 0; | 1199 | &af9015_qt1010_config) == NULL ? -ENODEV : 0; |
1232 | break; | 1200 | break; |
1233 | case AF9013_TUNER_TDA18271: | 1201 | case AF9013_TUNER_TDA18271: |
1234 | ret = dvb_attach(tda18271_attach, adap->fe, 0xc0, i2c_adap, | 1202 | ret = dvb_attach(tda18271_attach, adap->fe, 0xc0, |
1203 | &adap->dev->i2c_adap, | ||
1235 | &af9015_tda18271_config) == NULL ? -ENODEV : 0; | 1204 | &af9015_tda18271_config) == NULL ? -ENODEV : 0; |
1236 | break; | 1205 | break; |
1237 | case AF9013_TUNER_TDA18218: | 1206 | case AF9013_TUNER_TDA18218: |
1238 | ret = dvb_attach(tda18218_attach, adap->fe, i2c_adap, | 1207 | ret = dvb_attach(tda18218_attach, adap->fe, |
1208 | &adap->dev->i2c_adap, | ||
1239 | &af9015_tda18218_config) == NULL ? -ENODEV : 0; | 1209 | &af9015_tda18218_config) == NULL ? -ENODEV : 0; |
1240 | break; | 1210 | break; |
1241 | case AF9013_TUNER_MXL5003D: | 1211 | case AF9013_TUNER_MXL5003D: |
1242 | ret = dvb_attach(mxl5005s_attach, adap->fe, i2c_adap, | 1212 | ret = dvb_attach(mxl5005s_attach, adap->fe, |
1213 | &adap->dev->i2c_adap, | ||
1243 | &af9015_mxl5003_config) == NULL ? -ENODEV : 0; | 1214 | &af9015_mxl5003_config) == NULL ? -ENODEV : 0; |
1244 | break; | 1215 | break; |
1245 | case AF9013_TUNER_MXL5005D: | 1216 | case AF9013_TUNER_MXL5005D: |
1246 | case AF9013_TUNER_MXL5005R: | 1217 | case AF9013_TUNER_MXL5005R: |
1247 | ret = dvb_attach(mxl5005s_attach, adap->fe, i2c_adap, | 1218 | ret = dvb_attach(mxl5005s_attach, adap->fe, |
1219 | &adap->dev->i2c_adap, | ||
1248 | &af9015_mxl5005_config) == NULL ? -ENODEV : 0; | 1220 | &af9015_mxl5005_config) == NULL ? -ENODEV : 0; |
1249 | break; | 1221 | break; |
1250 | case AF9013_TUNER_ENV77H11D5: | 1222 | case AF9013_TUNER_ENV77H11D5: |
1251 | ret = dvb_attach(dvb_pll_attach, adap->fe, 0xc0, i2c_adap, | 1223 | ret = dvb_attach(dvb_pll_attach, adap->fe, 0xc0, |
1224 | &adap->dev->i2c_adap, | ||
1252 | DVB_PLL_TDA665X) == NULL ? -ENODEV : 0; | 1225 | DVB_PLL_TDA665X) == NULL ? -ENODEV : 0; |
1253 | break; | 1226 | break; |
1254 | case AF9013_TUNER_MC44S803: | 1227 | case AF9013_TUNER_MC44S803: |
1255 | ret = dvb_attach(mc44s803_attach, adap->fe, i2c_adap, | 1228 | ret = dvb_attach(mc44s803_attach, adap->fe, |
1229 | &adap->dev->i2c_adap, | ||
1256 | &af9015_mc44s803_config) == NULL ? -ENODEV : 0; | 1230 | &af9015_mc44s803_config) == NULL ? -ENODEV : 0; |
1257 | break; | 1231 | break; |
1258 | case AF9013_TUNER_MXL5007T: | 1232 | case AF9013_TUNER_MXL5007T: |
1259 | ret = dvb_attach(mxl5007t_attach, adap->fe, i2c_adap, | 1233 | ret = dvb_attach(mxl5007t_attach, adap->fe, |
1234 | &adap->dev->i2c_adap, | ||
1260 | 0xc0, &af9015_mxl5007t_config) == NULL ? -ENODEV : 0; | 1235 | 0xc0, &af9015_mxl5007t_config) == NULL ? -ENODEV : 0; |
1261 | break; | 1236 | break; |
1262 | case AF9013_TUNER_UNKNOWN: | 1237 | case AF9013_TUNER_UNKNOWN: |
@@ -1309,6 +1284,7 @@ static struct usb_device_id af9015_usb_table[] = { | |||
1309 | USB_PID_TERRATEC_CINERGY_T_STICK_DUAL_RC)}, | 1284 | USB_PID_TERRATEC_CINERGY_T_STICK_DUAL_RC)}, |
1310 | /* 35 */{USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A850T)}, | 1285 | /* 35 */{USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A850T)}, |
1311 | {USB_DEVICE(USB_VID_GTEK, USB_PID_TINYTWIN_3)}, | 1286 | {USB_DEVICE(USB_VID_GTEK, USB_PID_TINYTWIN_3)}, |
1287 | {USB_DEVICE(USB_VID_KWORLD_2, USB_PID_SVEON_STV22)}, | ||
1312 | {0}, | 1288 | {0}, |
1313 | }; | 1289 | }; |
1314 | MODULE_DEVICE_TABLE(usb, af9015_usb_table); | 1290 | MODULE_DEVICE_TABLE(usb, af9015_usb_table); |
@@ -1502,7 +1478,7 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1502 | 1478 | ||
1503 | .i2c_algo = &af9015_i2c_algo, | 1479 | .i2c_algo = &af9015_i2c_algo, |
1504 | 1480 | ||
1505 | .num_device_descs = 9, /* check max from dvb-usb.h */ | 1481 | .num_device_descs = 10, /* check max from dvb-usb.h */ |
1506 | .devices = { | 1482 | .devices = { |
1507 | { | 1483 | { |
1508 | .name = "Xtensions XD-380", | 1484 | .name = "Xtensions XD-380", |
@@ -1554,6 +1530,11 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1554 | .cold_ids = {&af9015_usb_table[20], NULL}, | 1530 | .cold_ids = {&af9015_usb_table[20], NULL}, |
1555 | .warm_ids = {NULL}, | 1531 | .warm_ids = {NULL}, |
1556 | }, | 1532 | }, |
1533 | { | ||
1534 | .name = "Sveon STV22 Dual USB DVB-T Tuner HDTV", | ||
1535 | .cold_ids = {&af9015_usb_table[37], NULL}, | ||
1536 | .warm_ids = {NULL}, | ||
1537 | }, | ||
1557 | } | 1538 | } |
1558 | }, { | 1539 | }, { |
1559 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, | 1540 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
@@ -1704,33 +1685,11 @@ static int af9015_usb_probe(struct usb_interface *intf, | |||
1704 | return ret; | 1685 | return ret; |
1705 | } | 1686 | } |
1706 | 1687 | ||
1707 | static void af9015_i2c_exit(struct dvb_usb_device *d) | ||
1708 | { | ||
1709 | struct af9015_state *state = d->priv; | ||
1710 | deb_info("%s:\n", __func__); | ||
1711 | |||
1712 | /* remove 2nd I2C adapter */ | ||
1713 | if (d->state & DVB_USB_STATE_I2C) | ||
1714 | i2c_del_adapter(&state->i2c_adap); | ||
1715 | } | ||
1716 | |||
1717 | static void af9015_usb_device_exit(struct usb_interface *intf) | ||
1718 | { | ||
1719 | struct dvb_usb_device *d = usb_get_intfdata(intf); | ||
1720 | deb_info("%s:\n", __func__); | ||
1721 | |||
1722 | /* remove 2nd I2C adapter */ | ||
1723 | if (d != NULL && d->desc != NULL) | ||
1724 | af9015_i2c_exit(d); | ||
1725 | |||
1726 | dvb_usb_device_exit(intf); | ||
1727 | } | ||
1728 | |||
1729 | /* usb specific object needed to register this driver with the usb subsystem */ | 1688 | /* usb specific object needed to register this driver with the usb subsystem */ |
1730 | static struct usb_driver af9015_usb_driver = { | 1689 | static struct usb_driver af9015_usb_driver = { |
1731 | .name = "dvb_usb_af9015", | 1690 | .name = "dvb_usb_af9015", |
1732 | .probe = af9015_usb_probe, | 1691 | .probe = af9015_usb_probe, |
1733 | .disconnect = af9015_usb_device_exit, | 1692 | .disconnect = dvb_usb_device_exit, |
1734 | .id_table = af9015_usb_table, | 1693 | .id_table = af9015_usb_table, |
1735 | }; | 1694 | }; |
1736 | 1695 | ||
diff --git a/drivers/media/dvb/dvb-usb/af9015.h b/drivers/media/dvb/dvb-usb/af9015.h index beb3004f00ba..6252ea6c1904 100644 --- a/drivers/media/dvb/dvb-usb/af9015.h +++ b/drivers/media/dvb/dvb-usb/af9015.h | |||
@@ -99,7 +99,6 @@ enum af9015_ir_mode { | |||
99 | }; | 99 | }; |
100 | 100 | ||
101 | struct af9015_state { | 101 | struct af9015_state { |
102 | struct i2c_adapter i2c_adap; /* I2C adapter for 2nd FE */ | ||
103 | u8 rc_repeat; | 102 | u8 rc_repeat; |
104 | u32 rc_keycode; | 103 | u32 rc_keycode; |
105 | u8 rc_last[4]; | 104 | u8 rc_last[4]; |
diff --git a/drivers/media/dvb/dvb-usb/anysee.c b/drivers/media/dvb/dvb-usb/anysee.c index 7c327b54308e..2cbf19a52e38 100644 --- a/drivers/media/dvb/dvb-usb/anysee.c +++ b/drivers/media/dvb/dvb-usb/anysee.c | |||
@@ -347,15 +347,17 @@ static struct isl6423_config anysee_isl6423_config = { | |||
347 | * PCB: ? | 347 | * PCB: ? |
348 | * parts: DNOS404ZH102A(MT352, DTT7579(?)) | 348 | * parts: DNOS404ZH102A(MT352, DTT7579(?)) |
349 | * | 349 | * |
350 | * E30 VID=04b4 PID=861f HW=2 FW=2.1 Product=???????? | 350 | * E30 VID=04b4 PID=861f HW=2 FW=2.1 "anysee-T(LP)" |
351 | * PCB: ? | 351 | * PCB: PCB 507T (rev1.61) |
352 | * parts: DNOS404ZH103A(ZL10353, DTT7579(?)) | 352 | * parts: DNOS404ZH103A(ZL10353, DTT7579(?)) |
353 | * OEA=0a OEB=00 OEC=00 OED=ff OEE=00 | ||
354 | * IOA=45 IOB=ff IOC=00 IOD=ff IOE=00 | ||
353 | * | 355 | * |
354 | * E30 Plus VID=04b4 PID=861f HW=6 FW=1.0 "anysee" | 356 | * E30 Plus VID=04b4 PID=861f HW=6 FW=1.0 "anysee" |
355 | * PCB: 507CD (rev1.1) | 357 | * PCB: 507CD (rev1.1) |
356 | * parts: DNOS404ZH103A(ZL10353, DTT7579(?)), CST56I01 | 358 | * parts: DNOS404ZH103A(ZL10353, DTT7579(?)), CST56I01 |
357 | * OEA=80 OEB=00 OEC=00 OED=ff OEF=fe | 359 | * OEA=80 OEB=00 OEC=00 OED=ff OEE=fe |
358 | * IOA=4f IOB=ff IOC=00 IOD=06 IOF=01 | 360 | * IOA=4f IOB=ff IOC=00 IOD=06 IOE=01 |
359 | * IOD[0] ZL10353 1=enabled | 361 | * IOD[0] ZL10353 1=enabled |
360 | * IOA[7] TS 0=enabled | 362 | * IOA[7] TS 0=enabled |
361 | * tuner is not behind ZL10353 I2C-gate (no care if gate disabled or not) | 363 | * tuner is not behind ZL10353 I2C-gate (no care if gate disabled or not) |
@@ -363,30 +365,30 @@ static struct isl6423_config anysee_isl6423_config = { | |||
363 | * E30 C Plus VID=04b4 PID=861f HW=10 FW=1.0 "anysee-DC(LP)" | 365 | * E30 C Plus VID=04b4 PID=861f HW=10 FW=1.0 "anysee-DC(LP)" |
364 | * PCB: 507DC (rev0.2) | 366 | * PCB: 507DC (rev0.2) |
365 | * parts: TDA10023, DTOS403IH102B TM, CST56I01 | 367 | * parts: TDA10023, DTOS403IH102B TM, CST56I01 |
366 | * OEA=80 OEB=00 OEC=00 OED=ff OEF=fe | 368 | * OEA=80 OEB=00 OEC=00 OED=ff OEE=fe |
367 | * IOA=4f IOB=ff IOC=00 IOD=26 IOF=01 | 369 | * IOA=4f IOB=ff IOC=00 IOD=26 IOE=01 |
368 | * IOD[0] TDA10023 1=enabled | 370 | * IOD[0] TDA10023 1=enabled |
369 | * | 371 | * |
370 | * E30 S2 Plus VID=04b4 PID=861f HW=11 FW=0.1 "anysee-S2(LP)" | 372 | * E30 S2 Plus VID=04b4 PID=861f HW=11 FW=0.1 "anysee-S2(LP)" |
371 | * PCB: 507SI (rev2.1) | 373 | * PCB: 507SI (rev2.1) |
372 | * parts: BS2N10WCC01(CX24116, CX24118), ISL6423, TDA8024 | 374 | * parts: BS2N10WCC01(CX24116, CX24118), ISL6423, TDA8024 |
373 | * OEA=80 OEB=00 OEC=ff OED=ff OEF=fe | 375 | * OEA=80 OEB=00 OEC=ff OED=ff OEE=fe |
374 | * IOA=4d IOB=ff IOC=00 IOD=26 IOF=01 | 376 | * IOA=4d IOB=ff IOC=00 IOD=26 IOE=01 |
375 | * IOD[0] CX24116 1=enabled | 377 | * IOD[0] CX24116 1=enabled |
376 | * | 378 | * |
377 | * E30 C Plus VID=1c73 PID=861f HW=15 FW=1.2 "anysee-FA(LP)" | 379 | * E30 C Plus VID=1c73 PID=861f HW=15 FW=1.2 "anysee-FA(LP)" |
378 | * PCB: 507FA (rev0.4) | 380 | * PCB: 507FA (rev0.4) |
379 | * parts: TDA10023, DTOS403IH102B TM, TDA8024 | 381 | * parts: TDA10023, DTOS403IH102B TM, TDA8024 |
380 | * OEA=80 OEB=00 OEC=ff OED=ff OEF=ff | 382 | * OEA=80 OEB=00 OEC=ff OED=ff OEE=ff |
381 | * IOA=4d IOB=ff IOC=00 IOD=00 IOF=c0 | 383 | * IOA=4d IOB=ff IOC=00 IOD=00 IOE=c0 |
382 | * IOD[5] TDA10023 1=enabled | 384 | * IOD[5] TDA10023 1=enabled |
383 | * IOE[0] tuner 1=enabled | 385 | * IOE[0] tuner 1=enabled |
384 | * | 386 | * |
385 | * E30 Combo Plus VID=1c73 PID=861f HW=15 FW=1.2 "anysee-FA(LP)" | 387 | * E30 Combo Plus VID=1c73 PID=861f HW=15 FW=1.2 "anysee-FA(LP)" |
386 | * PCB: 507FA (rev1.1) | 388 | * PCB: 507FA (rev1.1) |
387 | * parts: ZL10353, TDA10023, DTOS403IH102B TM, TDA8024 | 389 | * parts: ZL10353, TDA10023, DTOS403IH102B TM, TDA8024 |
388 | * OEA=80 OEB=00 OEC=ff OED=ff OEF=ff | 390 | * OEA=80 OEB=00 OEC=ff OED=ff OEE=ff |
389 | * IOA=4d IOB=ff IOC=00 IOD=00 IOF=c0 | 391 | * IOA=4d IOB=ff IOC=00 IOD=00 IOE=c0 |
390 | * DVB-C: | 392 | * DVB-C: |
391 | * IOD[5] TDA10023 1=enabled | 393 | * IOD[5] TDA10023 1=enabled |
392 | * IOE[0] tuner 1=enabled | 394 | * IOE[0] tuner 1=enabled |
@@ -398,8 +400,8 @@ static struct isl6423_config anysee_isl6423_config = { | |||
398 | * E7 TC VID=1c73 PID=861f HW=18 FW=0.7 AMTCI=0.5 "anysee-E7TC(LP)" | 400 | * E7 TC VID=1c73 PID=861f HW=18 FW=0.7 AMTCI=0.5 "anysee-E7TC(LP)" |
399 | * PCB: 508TC (rev0.6) | 401 | * PCB: 508TC (rev0.6) |
400 | * parts: ZL10353, TDA10023, DNOD44CDH086A(TDA18212) | 402 | * parts: ZL10353, TDA10023, DNOD44CDH086A(TDA18212) |
401 | * OEA=80 OEB=00 OEC=03 OED=f7 OEF=ff | 403 | * OEA=80 OEB=00 OEC=03 OED=f7 OEE=ff |
402 | * IOA=4d IOB=00 IOC=cc IOD=48 IOF=e4 | 404 | * IOA=4d IOB=00 IOC=cc IOD=48 IOE=e4 |
403 | * IOA[7] TS 1=enabled | 405 | * IOA[7] TS 1=enabled |
404 | * IOE[4] TDA18212 1=enabled | 406 | * IOE[4] TDA18212 1=enabled |
405 | * DVB-C: | 407 | * DVB-C: |
@@ -414,11 +416,34 @@ static struct isl6423_config anysee_isl6423_config = { | |||
414 | * E7 S2 VID=1c73 PID=861f HW=19 FW=0.4 AMTCI=0.5 "anysee-E7S2(LP)" | 416 | * E7 S2 VID=1c73 PID=861f HW=19 FW=0.4 AMTCI=0.5 "anysee-E7S2(LP)" |
415 | * PCB: 508S2 (rev0.7) | 417 | * PCB: 508S2 (rev0.7) |
416 | * parts: DNBU10512IST(STV0903, STV6110), ISL6423 | 418 | * parts: DNBU10512IST(STV0903, STV6110), ISL6423 |
417 | * OEA=80 OEB=00 OEC=03 OED=f7 OEF=ff | 419 | * OEA=80 OEB=00 OEC=03 OED=f7 OEE=ff |
418 | * IOA=4d IOB=00 IOC=c4 IOD=08 IOF=e4 | 420 | * IOA=4d IOB=00 IOC=c4 IOD=08 IOE=e4 |
419 | * IOA[7] TS 1=enabled | 421 | * IOA[7] TS 1=enabled |
420 | * IOE[5] STV0903 1=enabled | 422 | * IOE[5] STV0903 1=enabled |
421 | * | 423 | * |
424 | * E7 PTC VID=1c73 PID=861f HW=21 FW=0.1 AMTCI=?? "anysee-E7PTC(LP)" | ||
425 | * PCB: 508PTC (rev0.5) | ||
426 | * parts: ZL10353, TDA10023, DNOD44CDH086A(TDA18212) | ||
427 | * OEA=80 OEB=00 OEC=03 OED=f7 OEE=ff | ||
428 | * IOA=4d IOB=00 IOC=cc IOD=48 IOE=e4 | ||
429 | * IOA[7] TS 1=enabled | ||
430 | * IOE[4] TDA18212 1=enabled | ||
431 | * DVB-C: | ||
432 | * IOD[6] ZL10353 0=disabled | ||
433 | * IOD[5] TDA10023 1=enabled | ||
434 | * IOE[0] IF 1=enabled | ||
435 | * DVB-T: | ||
436 | * IOD[5] TDA10023 0=disabled | ||
437 | * IOD[6] ZL10353 1=enabled | ||
438 | * IOE[0] IF 0=enabled | ||
439 | * | ||
440 | * E7 S2 VID=1c73 PID=861f HW=22 FW=0.1 AMTCI=?? "anysee-E7PS2(LP)" | ||
441 | * PCB: 508PS2 (rev0.4) | ||
442 | * parts: DNBU10512IST(STV0903, STV6110), ISL6423 | ||
443 | * OEA=80 OEB=00 OEC=03 OED=f7 OEE=ff | ||
444 | * IOA=4d IOB=00 IOC=c4 IOD=08 IOE=e4 | ||
445 | * IOA[7] TS 1=enabled | ||
446 | * IOE[5] STV0903 1=enabled | ||
422 | */ | 447 | */ |
423 | 448 | ||
424 | static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | 449 | static int anysee_frontend_attach(struct dvb_usb_adapter *adap) |
@@ -459,7 +484,7 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
459 | state->hw = hw_info[0]; | 484 | state->hw = hw_info[0]; |
460 | 485 | ||
461 | switch (state->hw) { | 486 | switch (state->hw) { |
462 | case ANYSEE_HW_02: /* 2 */ | 487 | case ANYSEE_HW_507T: /* 2 */ |
463 | /* E30 */ | 488 | /* E30 */ |
464 | 489 | ||
465 | /* attach demod */ | 490 | /* attach demod */ |
@@ -593,7 +618,9 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
593 | 618 | ||
594 | break; | 619 | break; |
595 | case ANYSEE_HW_508TC: /* 18 */ | 620 | case ANYSEE_HW_508TC: /* 18 */ |
621 | case ANYSEE_HW_508PTC: /* 21 */ | ||
596 | /* E7 TC */ | 622 | /* E7 TC */ |
623 | /* E7 PTC */ | ||
597 | 624 | ||
598 | /* enable transport stream on IOA[7] */ | 625 | /* enable transport stream on IOA[7] */ |
599 | ret = anysee_wr_reg_mask(adap->dev, REG_IOA, (1 << 7), 0x80); | 626 | ret = anysee_wr_reg_mask(adap->dev, REG_IOA, (1 << 7), 0x80); |
@@ -650,7 +677,9 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
650 | 677 | ||
651 | break; | 678 | break; |
652 | case ANYSEE_HW_508S2: /* 19 */ | 679 | case ANYSEE_HW_508S2: /* 19 */ |
680 | case ANYSEE_HW_508PS2: /* 22 */ | ||
653 | /* E7 S2 */ | 681 | /* E7 S2 */ |
682 | /* E7 PS2 */ | ||
654 | 683 | ||
655 | /* enable transport stream on IOA[7] */ | 684 | /* enable transport stream on IOA[7] */ |
656 | ret = anysee_wr_reg_mask(adap->dev, REG_IOA, (1 << 7), 0x80); | 685 | ret = anysee_wr_reg_mask(adap->dev, REG_IOA, (1 << 7), 0x80); |
@@ -687,7 +716,7 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap) | |||
687 | deb_info("%s:\n", __func__); | 716 | deb_info("%s:\n", __func__); |
688 | 717 | ||
689 | switch (state->hw) { | 718 | switch (state->hw) { |
690 | case ANYSEE_HW_02: /* 2 */ | 719 | case ANYSEE_HW_507T: /* 2 */ |
691 | /* E30 */ | 720 | /* E30 */ |
692 | 721 | ||
693 | /* attach tuner */ | 722 | /* attach tuner */ |
@@ -762,7 +791,9 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap) | |||
762 | 791 | ||
763 | break; | 792 | break; |
764 | case ANYSEE_HW_508TC: /* 18 */ | 793 | case ANYSEE_HW_508TC: /* 18 */ |
794 | case ANYSEE_HW_508PTC: /* 21 */ | ||
765 | /* E7 TC */ | 795 | /* E7 TC */ |
796 | /* E7 PTC */ | ||
766 | 797 | ||
767 | /* enable tuner on IOE[4] */ | 798 | /* enable tuner on IOE[4] */ |
768 | ret = anysee_wr_reg_mask(adap->dev, REG_IOE, (1 << 4), 0x10); | 799 | ret = anysee_wr_reg_mask(adap->dev, REG_IOE, (1 << 4), 0x10); |
@@ -775,7 +806,9 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap) | |||
775 | 806 | ||
776 | break; | 807 | break; |
777 | case ANYSEE_HW_508S2: /* 19 */ | 808 | case ANYSEE_HW_508S2: /* 19 */ |
809 | case ANYSEE_HW_508PS2: /* 22 */ | ||
778 | /* E7 S2 */ | 810 | /* E7 S2 */ |
811 | /* E7 PS2 */ | ||
779 | 812 | ||
780 | /* attach tuner */ | 813 | /* attach tuner */ |
781 | fe = dvb_attach(stv6110_attach, adap->fe, | 814 | fe = dvb_attach(stv6110_attach, adap->fe, |
diff --git a/drivers/media/dvb/dvb-usb/anysee.h b/drivers/media/dvb/dvb-usb/anysee.h index a7673aa1e007..ad6ccd1ea2d9 100644 --- a/drivers/media/dvb/dvb-usb/anysee.h +++ b/drivers/media/dvb/dvb-usb/anysee.h | |||
@@ -61,13 +61,15 @@ struct anysee_state { | |||
61 | u8 seq; | 61 | u8 seq; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | #define ANYSEE_HW_02 2 /* E30 */ | 64 | #define ANYSEE_HW_507T 2 /* E30 */ |
65 | #define ANYSEE_HW_507CD 6 /* E30 Plus */ | 65 | #define ANYSEE_HW_507CD 6 /* E30 Plus */ |
66 | #define ANYSEE_HW_507DC 10 /* E30 C Plus */ | 66 | #define ANYSEE_HW_507DC 10 /* E30 C Plus */ |
67 | #define ANYSEE_HW_507SI 11 /* E30 S2 Plus */ | 67 | #define ANYSEE_HW_507SI 11 /* E30 S2 Plus */ |
68 | #define ANYSEE_HW_507FA 15 /* E30 Combo Plus / E30 C Plus */ | 68 | #define ANYSEE_HW_507FA 15 /* E30 Combo Plus / E30 C Plus */ |
69 | #define ANYSEE_HW_508TC 18 /* E7 TC */ | 69 | #define ANYSEE_HW_508TC 18 /* E7 TC */ |
70 | #define ANYSEE_HW_508S2 19 /* E7 S2 */ | 70 | #define ANYSEE_HW_508S2 19 /* E7 S2 */ |
71 | #define ANYSEE_HW_508PTC 21 /* E7 PTC Plus */ | ||
72 | #define ANYSEE_HW_508PS2 22 /* E7 PS2 Plus */ | ||
71 | 73 | ||
72 | #define REG_IOA 0x80 /* Port A (bit addressable) */ | 74 | #define REG_IOA 0x80 /* Port A (bit addressable) */ |
73 | #define REG_IOB 0x90 /* Port B (bit addressable) */ | 75 | #define REG_IOB 0x90 /* Port B (bit addressable) */ |
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index c519ad5eb731..d0ea5b64f6b4 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include "mt2266.h" | 17 | #include "mt2266.h" |
18 | #include "tuner-xc2028.h" | 18 | #include "tuner-xc2028.h" |
19 | #include "xc5000.h" | 19 | #include "xc5000.h" |
20 | #include "xc4000.h" | ||
20 | #include "s5h1411.h" | 21 | #include "s5h1411.h" |
21 | #include "dib0070.h" | 22 | #include "dib0070.h" |
22 | #include "dib0090.h" | 23 | #include "dib0090.h" |
@@ -2655,6 +2656,156 @@ static int xc5000_tuner_attach(struct dvb_usb_adapter *adap) | |||
2655 | == NULL ? -ENODEV : 0; | 2656 | == NULL ? -ENODEV : 0; |
2656 | } | 2657 | } |
2657 | 2658 | ||
2659 | static int dib0700_xc4000_tuner_callback(void *priv, int component, | ||
2660 | int command, int arg) | ||
2661 | { | ||
2662 | struct dvb_usb_adapter *adap = priv; | ||
2663 | |||
2664 | if (command == XC4000_TUNER_RESET) { | ||
2665 | /* Reset the tuner */ | ||
2666 | dib7000p_set_gpio(adap->fe, 8, 0, 0); | ||
2667 | msleep(10); | ||
2668 | dib7000p_set_gpio(adap->fe, 8, 0, 1); | ||
2669 | } else { | ||
2670 | err("xc4000: unknown tuner callback command: %d\n", command); | ||
2671 | return -EINVAL; | ||
2672 | } | ||
2673 | |||
2674 | return 0; | ||
2675 | } | ||
2676 | |||
2677 | static struct dibx000_agc_config stk7700p_7000p_xc4000_agc_config = { | ||
2678 | .band_caps = BAND_UHF | BAND_VHF, | ||
2679 | .setup = 0x64, | ||
2680 | .inv_gain = 0x02c8, | ||
2681 | .time_stabiliz = 0x15, | ||
2682 | .alpha_level = 0x00, | ||
2683 | .thlock = 0x76, | ||
2684 | .wbd_inv = 0x01, | ||
2685 | .wbd_ref = 0x0b33, | ||
2686 | .wbd_sel = 0x00, | ||
2687 | .wbd_alpha = 0x02, | ||
2688 | .agc1_max = 0x00, | ||
2689 | .agc1_min = 0x00, | ||
2690 | .agc2_max = 0x9b26, | ||
2691 | .agc2_min = 0x26ca, | ||
2692 | .agc1_pt1 = 0x00, | ||
2693 | .agc1_pt2 = 0x00, | ||
2694 | .agc1_pt3 = 0x00, | ||
2695 | .agc1_slope1 = 0x00, | ||
2696 | .agc1_slope2 = 0x00, | ||
2697 | .agc2_pt1 = 0x00, | ||
2698 | .agc2_pt2 = 0x80, | ||
2699 | .agc2_slope1 = 0x1d, | ||
2700 | .agc2_slope2 = 0x1d, | ||
2701 | .alpha_mant = 0x11, | ||
2702 | .alpha_exp = 0x1b, | ||
2703 | .beta_mant = 0x17, | ||
2704 | .beta_exp = 0x33, | ||
2705 | .perform_agc_softsplit = 0x00, | ||
2706 | }; | ||
2707 | |||
2708 | static struct dibx000_bandwidth_config stk7700p_xc4000_pll_config = { | ||
2709 | 60000, 30000, /* internal, sampling */ | ||
2710 | 1, 8, 3, 1, 0, /* pll_cfg: prediv, ratio, range, reset, bypass */ | ||
2711 | 0, 0, 1, 1, 0, /* misc: refdiv, bypclk_div, IO_CLK_en_core, */ | ||
2712 | /* ADClkSrc, modulo */ | ||
2713 | (3 << 14) | (1 << 12) | 524, /* sad_cfg: refsel, sel, freq_15k */ | ||
2714 | 39370534, /* ifreq */ | ||
2715 | 20452225, /* timf */ | ||
2716 | 30000000 /* xtal */ | ||
2717 | }; | ||
2718 | |||
2719 | /* FIXME: none of these inputs are validated yet */ | ||
2720 | static struct dib7000p_config pctv_340e_config = { | ||
2721 | .output_mpeg2_in_188_bytes = 1, | ||
2722 | |||
2723 | .agc_config_count = 1, | ||
2724 | .agc = &stk7700p_7000p_xc4000_agc_config, | ||
2725 | .bw = &stk7700p_xc4000_pll_config, | ||
2726 | |||
2727 | .gpio_dir = DIB7000M_GPIO_DEFAULT_DIRECTIONS, | ||
2728 | .gpio_val = DIB7000M_GPIO_DEFAULT_VALUES, | ||
2729 | .gpio_pwm_pos = DIB7000M_GPIO_DEFAULT_PWM_POS, | ||
2730 | }; | ||
2731 | |||
2732 | /* PCTV 340e GPIOs map: | ||
2733 | dib0700: | ||
2734 | GPIO2 - CX25843 sleep | ||
2735 | GPIO3 - CS5340 reset | ||
2736 | GPIO5 - IRD | ||
2737 | GPIO6 - Power Supply | ||
2738 | GPIO8 - LNA (1=off 0=on) | ||
2739 | GPIO10 - CX25843 reset | ||
2740 | dib7000: | ||
2741 | GPIO8 - xc4000 reset | ||
2742 | */ | ||
2743 | static int pctv340e_frontend_attach(struct dvb_usb_adapter *adap) | ||
2744 | { | ||
2745 | struct dib0700_state *st = adap->dev->priv; | ||
2746 | |||
2747 | /* Power Supply on */ | ||
2748 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); | ||
2749 | msleep(50); | ||
2750 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); | ||
2751 | msleep(100); /* Allow power supply to settle before probing */ | ||
2752 | |||
2753 | /* cx25843 reset */ | ||
2754 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0); | ||
2755 | msleep(1); /* cx25843 datasheet say 350us required */ | ||
2756 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); | ||
2757 | |||
2758 | /* LNA off for now */ | ||
2759 | dib0700_set_gpio(adap->dev, GPIO8, GPIO_OUT, 1); | ||
2760 | |||
2761 | /* Put the CX25843 to sleep for now since we're in digital mode */ | ||
2762 | dib0700_set_gpio(adap->dev, GPIO2, GPIO_OUT, 1); | ||
2763 | |||
2764 | /* FIXME: not verified yet */ | ||
2765 | dib0700_ctrl_clock(adap->dev, 72, 1); | ||
2766 | |||
2767 | msleep(500); | ||
2768 | |||
2769 | if (dib7000pc_detection(&adap->dev->i2c_adap) == 0) { | ||
2770 | /* Demodulator not found for some reason? */ | ||
2771 | return -ENODEV; | ||
2772 | } | ||
2773 | |||
2774 | adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x12, | ||
2775 | &pctv_340e_config); | ||
2776 | st->is_dib7000pc = 1; | ||
2777 | |||
2778 | return adap->fe == NULL ? -ENODEV : 0; | ||
2779 | } | ||
2780 | |||
2781 | static struct xc4000_config dib7000p_xc4000_tunerconfig = { | ||
2782 | .i2c_address = 0x61, | ||
2783 | .default_pm = 1, | ||
2784 | .dvb_amplitude = 0, | ||
2785 | .set_smoothedcvbs = 0, | ||
2786 | .if_khz = 5400 | ||
2787 | }; | ||
2788 | |||
2789 | static int xc4000_tuner_attach(struct dvb_usb_adapter *adap) | ||
2790 | { | ||
2791 | struct i2c_adapter *tun_i2c; | ||
2792 | |||
2793 | /* The xc4000 is not on the main i2c bus */ | ||
2794 | tun_i2c = dib7000p_get_i2c_master(adap->fe, | ||
2795 | DIBX000_I2C_INTERFACE_TUNER, 1); | ||
2796 | if (tun_i2c == NULL) { | ||
2797 | printk(KERN_ERR "Could not reach tuner i2c bus\n"); | ||
2798 | return 0; | ||
2799 | } | ||
2800 | |||
2801 | /* Setup the reset callback */ | ||
2802 | adap->fe->callback = dib0700_xc4000_tuner_callback; | ||
2803 | |||
2804 | return dvb_attach(xc4000_attach, adap->fe, tun_i2c, | ||
2805 | &dib7000p_xc4000_tunerconfig) | ||
2806 | == NULL ? -ENODEV : 0; | ||
2807 | } | ||
2808 | |||
2658 | static struct lgdt3305_config hcw_lgdt3305_config = { | 2809 | static struct lgdt3305_config hcw_lgdt3305_config = { |
2659 | .i2c_addr = 0x0e, | 2810 | .i2c_addr = 0x0e, |
2660 | .mpeg_mode = LGDT3305_MPEG_PARALLEL, | 2811 | .mpeg_mode = LGDT3305_MPEG_PARALLEL, |
@@ -2802,6 +2953,8 @@ struct usb_device_id dib0700_usb_id_table[] = { | |||
2802 | { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_TFE7090PVR) }, | 2953 | { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_TFE7090PVR) }, |
2803 | { USB_DEVICE(USB_VID_TECHNISAT, USB_PID_TECHNISAT_AIRSTAR_TELESTICK_2) }, | 2954 | { USB_DEVICE(USB_VID_TECHNISAT, USB_PID_TECHNISAT_AIRSTAR_TELESTICK_2) }, |
2804 | /* 75 */{ USB_DEVICE(USB_VID_MEDION, USB_PID_CREATIX_CTX1921) }, | 2955 | /* 75 */{ USB_DEVICE(USB_VID_MEDION, USB_PID_CREATIX_CTX1921) }, |
2956 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV340E) }, | ||
2957 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV340E_SE) }, | ||
2805 | { 0 } /* Terminating entry */ | 2958 | { 0 } /* Terminating entry */ |
2806 | }; | 2959 | }; |
2807 | MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table); | 2960 | MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table); |
@@ -3772,6 +3925,41 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3772 | RC_TYPE_NEC, | 3925 | RC_TYPE_NEC, |
3773 | .change_protocol = dib0700_change_protocol, | 3926 | .change_protocol = dib0700_change_protocol, |
3774 | }, | 3927 | }, |
3928 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | ||
3929 | .num_adapters = 1, | ||
3930 | .adapter = { | ||
3931 | { | ||
3932 | .frontend_attach = pctv340e_frontend_attach, | ||
3933 | .tuner_attach = xc4000_tuner_attach, | ||
3934 | |||
3935 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | ||
3936 | |||
3937 | .size_of_priv = sizeof(struct | ||
3938 | dib0700_adapter_state), | ||
3939 | }, | ||
3940 | }, | ||
3941 | |||
3942 | .num_device_descs = 2, | ||
3943 | .devices = { | ||
3944 | { "Pinnacle PCTV 340e HD Pro USB Stick", | ||
3945 | { &dib0700_usb_id_table[76], NULL }, | ||
3946 | { NULL }, | ||
3947 | }, | ||
3948 | { "Pinnacle PCTV Hybrid Stick Solo", | ||
3949 | { &dib0700_usb_id_table[77], NULL }, | ||
3950 | { NULL }, | ||
3951 | }, | ||
3952 | }, | ||
3953 | .rc.core = { | ||
3954 | .rc_interval = DEFAULT_RC_INTERVAL, | ||
3955 | .rc_codes = RC_MAP_DIB0700_RC5_TABLE, | ||
3956 | .module_name = "dib0700", | ||
3957 | .rc_query = dib0700_rc_query_old_firmware, | ||
3958 | .allowed_protos = RC_TYPE_RC5 | | ||
3959 | RC_TYPE_RC6 | | ||
3960 | RC_TYPE_NEC, | ||
3961 | .change_protocol = dib0700_change_protocol, | ||
3962 | }, | ||
3775 | }, | 3963 | }, |
3776 | }; | 3964 | }; |
3777 | 3965 | ||
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h index 21b15495d2d7..2a79b8fb3e8d 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h | |||
@@ -230,6 +230,8 @@ | |||
230 | #define USB_PID_PINNACLE_PCTV310E 0x3211 | 230 | #define USB_PID_PINNACLE_PCTV310E 0x3211 |
231 | #define USB_PID_PINNACLE_PCTV801E 0x023a | 231 | #define USB_PID_PINNACLE_PCTV801E 0x023a |
232 | #define USB_PID_PINNACLE_PCTV801E_SE 0x023b | 232 | #define USB_PID_PINNACLE_PCTV801E_SE 0x023b |
233 | #define USB_PID_PINNACLE_PCTV340E 0x023d | ||
234 | #define USB_PID_PINNACLE_PCTV340E_SE 0x023e | ||
233 | #define USB_PID_PINNACLE_PCTV73A 0x0243 | 235 | #define USB_PID_PINNACLE_PCTV73A 0x0243 |
234 | #define USB_PID_PINNACLE_PCTV73ESE 0x0245 | 236 | #define USB_PID_PINNACLE_PCTV73ESE 0x0245 |
235 | #define USB_PID_PINNACLE_PCTV74E 0x0246 | 237 | #define USB_PID_PINNACLE_PCTV74E 0x0246 |
@@ -313,6 +315,7 @@ | |||
313 | #define USB_PID_FRIIO_WHITE 0x0001 | 315 | #define USB_PID_FRIIO_WHITE 0x0001 |
314 | #define USB_PID_TVWAY_PLUS 0x0002 | 316 | #define USB_PID_TVWAY_PLUS 0x0002 |
315 | #define USB_PID_SVEON_STV20 0xe39d | 317 | #define USB_PID_SVEON_STV20 0xe39d |
318 | #define USB_PID_SVEON_STV22 0xe401 | ||
316 | #define USB_PID_AZUREWAVE_AZ6027 0x3275 | 319 | #define USB_PID_AZUREWAVE_AZ6027 0x3275 |
317 | #define USB_PID_TERRATEC_DVBS2CI_V1 0x10a4 | 320 | #define USB_PID_TERRATEC_DVBS2CI_V1 0x10a4 |
318 | #define USB_PID_TERRATEC_DVBS2CI_V2 0x10ac | 321 | #define USB_PID_TERRATEC_DVBS2CI_V2 0x10ac |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h index 76a80968482a..7d35d078342b 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb.h | |||
@@ -85,7 +85,7 @@ static inline u8 rc5_data(struct rc_map_table *key) | |||
85 | return key->scancode & 0xff; | 85 | return key->scancode & 0xff; |
86 | } | 86 | } |
87 | 87 | ||
88 | static inline u8 rc5_scan(struct rc_map_table *key) | 88 | static inline u16 rc5_scan(struct rc_map_table *key) |
89 | { | 89 | { |
90 | return key->scancode & 0xffff; | 90 | return key->scancode & 0xffff; |
91 | } | 91 | } |
diff --git a/drivers/media/dvb/dvb-usb/gp8psk.h b/drivers/media/dvb/dvb-usb/gp8psk.h index 831749a518cb..ed32b9da4843 100644 --- a/drivers/media/dvb/dvb-usb/gp8psk.h +++ b/drivers/media/dvb/dvb-usb/gp8psk.h | |||
@@ -78,9 +78,6 @@ extern int dvb_usb_gp8psk_debug; | |||
78 | #define ADV_MOD_DVB_BPSK 9 /* DVB-S BPSK */ | 78 | #define ADV_MOD_DVB_BPSK 9 /* DVB-S BPSK */ |
79 | 79 | ||
80 | #define GET_USB_SPEED 0x07 | 80 | #define GET_USB_SPEED 0x07 |
81 | #define USB_SPEED_LOW 0 | ||
82 | #define USB_SPEED_FULL 1 | ||
83 | #define USB_SPEED_HIGH 2 | ||
84 | 81 | ||
85 | #define RESET_FX2 0x13 | 82 | #define RESET_FX2 0x13 |
86 | 83 | ||
diff --git a/drivers/media/dvb/dvb-usb/technisat-usb2.c b/drivers/media/dvb/dvb-usb/technisat-usb2.c index 08f8842ad280..473b95ed4d52 100644 --- a/drivers/media/dvb/dvb-usb/technisat-usb2.c +++ b/drivers/media/dvb/dvb-usb/technisat-usb2.c | |||
@@ -765,10 +765,8 @@ static void technisat_usb2_disconnect(struct usb_interface *intf) | |||
765 | /* work and stuff was only created when the device is is hot-state */ | 765 | /* work and stuff was only created when the device is is hot-state */ |
766 | if (dev != NULL) { | 766 | if (dev != NULL) { |
767 | struct technisat_usb2_state *state = dev->priv; | 767 | struct technisat_usb2_state *state = dev->priv; |
768 | if (state != NULL) { | 768 | if (state != NULL) |
769 | cancel_delayed_work_sync(&state->green_led_work); | 769 | cancel_delayed_work_sync(&state->green_led_work); |
770 | flush_scheduled_work(); | ||
771 | } | ||
772 | } | 770 | } |
773 | 771 | ||
774 | dvb_usb_device_exit(intf); | 772 | dvb_usb_device_exit(intf); |
diff --git a/drivers/media/dvb/dvb-usb/vp7045.h b/drivers/media/dvb/dvb-usb/vp7045.h index 969688f85267..cf5ec46f8bb1 100644 --- a/drivers/media/dvb/dvb-usb/vp7045.h +++ b/drivers/media/dvb/dvb-usb/vp7045.h | |||
@@ -36,9 +36,6 @@ | |||
36 | #define Tuner_Power_OFF 0 | 36 | #define Tuner_Power_OFF 0 |
37 | 37 | ||
38 | #define GET_USB_SPEED 0x07 | 38 | #define GET_USB_SPEED 0x07 |
39 | #define USB_SPEED_LOW 0 | ||
40 | #define USB_SPEED_FULL 1 | ||
41 | #define USB_SPEED_HIGH 2 | ||
42 | 39 | ||
43 | #define LOCK_TUNER_COMMAND 0x09 | 40 | #define LOCK_TUNER_COMMAND 0x09 |
44 | 41 | ||