diff options
author | Michael Krufky <mkrufky@kernellabs.com> | 2011-09-06 08:31:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-09-06 13:21:42 -0400 |
commit | 77eed219fed5a913f59329cc846420fdeab0150f (patch) | |
tree | abcbcb0a970fb7b81efb11e229151adce78e166b /drivers | |
parent | 4c66c9205c0788e18eb09d482461aa2f551ee046 (diff) |
[media] dvb-usb: refactor MFE code for individual streaming config per frontend
refactor MFE code to allow for individual streaming configuration
for each frontend
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
37 files changed, 857 insertions, 508 deletions
diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a800.c index b95a95e17840..2aef3c89e9fa 100644 --- a/drivers/media/dvb/dvb-usb/a800.c +++ b/drivers/media/dvb/dvb-usb/a800.c | |||
@@ -127,6 +127,8 @@ static struct dvb_usb_device_properties a800_properties = { | |||
127 | .num_adapters = 1, | 127 | .num_adapters = 1, |
128 | .adapter = { | 128 | .adapter = { |
129 | { | 129 | { |
130 | .num_frontends = 1, | ||
131 | .fe = {{ | ||
130 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 132 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
131 | .pid_filter_count = 32, | 133 | .pid_filter_count = 32, |
132 | .streaming_ctrl = dibusb2_0_streaming_ctrl, | 134 | .streaming_ctrl = dibusb2_0_streaming_ctrl, |
@@ -147,7 +149,7 @@ static struct dvb_usb_device_properties a800_properties = { | |||
147 | } | 149 | } |
148 | } | 150 | } |
149 | }, | 151 | }, |
150 | 152 | }}, | |
151 | .size_of_priv = sizeof(struct dibusb_state), | 153 | .size_of_priv = sizeof(struct dibusb_state), |
152 | }, | 154 | }, |
153 | }, | 155 | }, |
diff --git a/drivers/media/dvb/dvb-usb/af9005.c b/drivers/media/dvb/dvb-usb/af9005.c index 753b86eafa25..0cf692c2ebdf 100644 --- a/drivers/media/dvb/dvb-usb/af9005.c +++ b/drivers/media/dvb/dvb-usb/af9005.c | |||
@@ -815,7 +815,7 @@ static int af9005_frontend_attach(struct dvb_usb_adapter *adap) | |||
815 | debug_dump(buf, 8, printk); | 815 | debug_dump(buf, 8, printk); |
816 | } | 816 | } |
817 | } | 817 | } |
818 | adap->fe[0] = af9005_fe_attach(adap->dev); | 818 | adap->fe_adap[0].fe = af9005_fe_attach(adap->dev); |
819 | return 0; | 819 | return 0; |
820 | } | 820 | } |
821 | 821 | ||
@@ -999,6 +999,8 @@ static struct dvb_usb_device_properties af9005_properties = { | |||
999 | .num_adapters = 1, | 999 | .num_adapters = 1, |
1000 | .adapter = { | 1000 | .adapter = { |
1001 | { | 1001 | { |
1002 | .num_frontends = 1, | ||
1003 | .fe = {{ | ||
1002 | .caps = | 1004 | .caps = |
1003 | DVB_USB_ADAP_HAS_PID_FILTER | | 1005 | DVB_USB_ADAP_HAS_PID_FILTER | |
1004 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 1006 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
@@ -1018,6 +1020,7 @@ static struct dvb_usb_device_properties af9005_properties = { | |||
1018 | } | 1020 | } |
1019 | } | 1021 | } |
1020 | }, | 1022 | }, |
1023 | }}, | ||
1021 | } | 1024 | } |
1022 | }, | 1025 | }, |
1023 | .power_ctrl = af9005_power_ctrl, | 1026 | .power_ctrl = af9005_power_ctrl, |
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index b816600d641c..c6c275bac08e 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c | |||
@@ -861,13 +861,13 @@ static int af9015_read_config(struct usb_device *udev) | |||
861 | for (i = 0; i < af9015_properties_count; i++) { | 861 | for (i = 0; i < af9015_properties_count; i++) { |
862 | /* USB1.1 set smaller buffersize and disable 2nd adapter */ | 862 | /* USB1.1 set smaller buffersize and disable 2nd adapter */ |
863 | if (udev->speed == USB_SPEED_FULL) { | 863 | if (udev->speed == USB_SPEED_FULL) { |
864 | af9015_properties[i].adapter[0].stream.u.bulk.buffersize | 864 | af9015_properties[i].adapter[0].fe[0].stream.u.bulk.buffersize |
865 | = TS_USB11_FRAME_SIZE; | 865 | = TS_USB11_FRAME_SIZE; |
866 | /* disable 2nd adapter because we don't have | 866 | /* disable 2nd adapter because we don't have |
867 | PID-filters */ | 867 | PID-filters */ |
868 | af9015_config.dual_mode = 0; | 868 | af9015_config.dual_mode = 0; |
869 | } else { | 869 | } else { |
870 | af9015_properties[i].adapter[0].stream.u.bulk.buffersize | 870 | af9015_properties[i].adapter[0].fe[0].stream.u.bulk.buffersize |
871 | = TS_USB20_FRAME_SIZE; | 871 | = TS_USB20_FRAME_SIZE; |
872 | } | 872 | } |
873 | } | 873 | } |
@@ -1113,10 +1113,10 @@ static int af9015_af9013_frontend_attach(struct dvb_usb_adapter *adap) | |||
1113 | } | 1113 | } |
1114 | 1114 | ||
1115 | /* attach demodulator */ | 1115 | /* attach demodulator */ |
1116 | adap->fe[0] = dvb_attach(af9013_attach, &af9015_af9013_config[adap->id], | 1116 | adap->fe_adap[0].fe = dvb_attach(af9013_attach, &af9015_af9013_config[adap->id], |
1117 | &adap->dev->i2c_adap); | 1117 | &adap->dev->i2c_adap); |
1118 | 1118 | ||
1119 | return adap->fe[0] == NULL ? -ENODEV : 0; | 1119 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
1120 | } | 1120 | } |
1121 | 1121 | ||
1122 | static struct mt2060_config af9015_mt2060_config = { | 1122 | static struct mt2060_config af9015_mt2060_config = { |
@@ -1190,49 +1190,49 @@ static int af9015_tuner_attach(struct dvb_usb_adapter *adap) | |||
1190 | switch (af9015_af9013_config[adap->id].tuner) { | 1190 | switch (af9015_af9013_config[adap->id].tuner) { |
1191 | case AF9013_TUNER_MT2060: | 1191 | case AF9013_TUNER_MT2060: |
1192 | case AF9013_TUNER_MT2060_2: | 1192 | case AF9013_TUNER_MT2060_2: |
1193 | ret = dvb_attach(mt2060_attach, adap->fe[0], &adap->dev->i2c_adap, | 1193 | ret = dvb_attach(mt2060_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, |
1194 | &af9015_mt2060_config, | 1194 | &af9015_mt2060_config, |
1195 | af9015_config.mt2060_if1[adap->id]) | 1195 | af9015_config.mt2060_if1[adap->id]) |
1196 | == NULL ? -ENODEV : 0; | 1196 | == NULL ? -ENODEV : 0; |
1197 | break; | 1197 | break; |
1198 | case AF9013_TUNER_QT1010: | 1198 | case AF9013_TUNER_QT1010: |
1199 | case AF9013_TUNER_QT1010A: | 1199 | case AF9013_TUNER_QT1010A: |
1200 | ret = dvb_attach(qt1010_attach, adap->fe[0], &adap->dev->i2c_adap, | 1200 | ret = dvb_attach(qt1010_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, |
1201 | &af9015_qt1010_config) == NULL ? -ENODEV : 0; | 1201 | &af9015_qt1010_config) == NULL ? -ENODEV : 0; |
1202 | break; | 1202 | break; |
1203 | case AF9013_TUNER_TDA18271: | 1203 | case AF9013_TUNER_TDA18271: |
1204 | ret = dvb_attach(tda18271_attach, adap->fe[0], 0xc0, | 1204 | ret = dvb_attach(tda18271_attach, adap->fe_adap[0].fe, 0xc0, |
1205 | &adap->dev->i2c_adap, | 1205 | &adap->dev->i2c_adap, |
1206 | &af9015_tda18271_config) == NULL ? -ENODEV : 0; | 1206 | &af9015_tda18271_config) == NULL ? -ENODEV : 0; |
1207 | break; | 1207 | break; |
1208 | case AF9013_TUNER_TDA18218: | 1208 | case AF9013_TUNER_TDA18218: |
1209 | ret = dvb_attach(tda18218_attach, adap->fe[0], | 1209 | ret = dvb_attach(tda18218_attach, adap->fe_adap[0].fe, |
1210 | &adap->dev->i2c_adap, | 1210 | &adap->dev->i2c_adap, |
1211 | &af9015_tda18218_config) == NULL ? -ENODEV : 0; | 1211 | &af9015_tda18218_config) == NULL ? -ENODEV : 0; |
1212 | break; | 1212 | break; |
1213 | case AF9013_TUNER_MXL5003D: | 1213 | case AF9013_TUNER_MXL5003D: |
1214 | ret = dvb_attach(mxl5005s_attach, adap->fe[0], | 1214 | ret = dvb_attach(mxl5005s_attach, adap->fe_adap[0].fe, |
1215 | &adap->dev->i2c_adap, | 1215 | &adap->dev->i2c_adap, |
1216 | &af9015_mxl5003_config) == NULL ? -ENODEV : 0; | 1216 | &af9015_mxl5003_config) == NULL ? -ENODEV : 0; |
1217 | break; | 1217 | break; |
1218 | case AF9013_TUNER_MXL5005D: | 1218 | case AF9013_TUNER_MXL5005D: |
1219 | case AF9013_TUNER_MXL5005R: | 1219 | case AF9013_TUNER_MXL5005R: |
1220 | ret = dvb_attach(mxl5005s_attach, adap->fe[0], | 1220 | ret = dvb_attach(mxl5005s_attach, adap->fe_adap[0].fe, |
1221 | &adap->dev->i2c_adap, | 1221 | &adap->dev->i2c_adap, |
1222 | &af9015_mxl5005_config) == NULL ? -ENODEV : 0; | 1222 | &af9015_mxl5005_config) == NULL ? -ENODEV : 0; |
1223 | break; | 1223 | break; |
1224 | case AF9013_TUNER_ENV77H11D5: | 1224 | case AF9013_TUNER_ENV77H11D5: |
1225 | ret = dvb_attach(dvb_pll_attach, adap->fe[0], 0xc0, | 1225 | ret = dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0xc0, |
1226 | &adap->dev->i2c_adap, | 1226 | &adap->dev->i2c_adap, |
1227 | DVB_PLL_TDA665X) == NULL ? -ENODEV : 0; | 1227 | DVB_PLL_TDA665X) == NULL ? -ENODEV : 0; |
1228 | break; | 1228 | break; |
1229 | case AF9013_TUNER_MC44S803: | 1229 | case AF9013_TUNER_MC44S803: |
1230 | ret = dvb_attach(mc44s803_attach, adap->fe[0], | 1230 | ret = dvb_attach(mc44s803_attach, adap->fe_adap[0].fe, |
1231 | &adap->dev->i2c_adap, | 1231 | &adap->dev->i2c_adap, |
1232 | &af9015_mc44s803_config) == NULL ? -ENODEV : 0; | 1232 | &af9015_mc44s803_config) == NULL ? -ENODEV : 0; |
1233 | break; | 1233 | break; |
1234 | case AF9013_TUNER_MXL5007T: | 1234 | case AF9013_TUNER_MXL5007T: |
1235 | ret = dvb_attach(mxl5007t_attach, adap->fe[0], | 1235 | ret = dvb_attach(mxl5007t_attach, adap->fe_adap[0].fe, |
1236 | &adap->dev->i2c_adap, | 1236 | &adap->dev->i2c_adap, |
1237 | 0xc0, &af9015_mxl5007t_config) == NULL ? -ENODEV : 0; | 1237 | 0xc0, &af9015_mxl5007t_config) == NULL ? -ENODEV : 0; |
1238 | break; | 1238 | break; |
@@ -1306,6 +1306,8 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1306 | .num_adapters = 2, | 1306 | .num_adapters = 2, |
1307 | .adapter = { | 1307 | .adapter = { |
1308 | { | 1308 | { |
1309 | .num_frontends = 1, | ||
1310 | .fe = {{ | ||
1309 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 1311 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
1310 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 1312 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
1311 | 1313 | ||
@@ -1321,8 +1323,11 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1321 | .count = 6, | 1323 | .count = 6, |
1322 | .endpoint = 0x84, | 1324 | .endpoint = 0x84, |
1323 | }, | 1325 | }, |
1326 | }}, | ||
1324 | }, | 1327 | }, |
1325 | { | 1328 | { |
1329 | .num_frontends = 1, | ||
1330 | .fe = {{ | ||
1326 | .frontend_attach = | 1331 | .frontend_attach = |
1327 | af9015_af9013_frontend_attach, | 1332 | af9015_af9013_frontend_attach, |
1328 | .tuner_attach = af9015_tuner_attach, | 1333 | .tuner_attach = af9015_tuner_attach, |
@@ -1337,6 +1342,7 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1337 | } | 1342 | } |
1338 | } | 1343 | } |
1339 | }, | 1344 | }, |
1345 | }}, | ||
1340 | } | 1346 | } |
1341 | }, | 1347 | }, |
1342 | 1348 | ||
@@ -1434,6 +1440,8 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1434 | .num_adapters = 2, | 1440 | .num_adapters = 2, |
1435 | .adapter = { | 1441 | .adapter = { |
1436 | { | 1442 | { |
1443 | .num_frontends = 1, | ||
1444 | .fe = {{ | ||
1437 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 1445 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
1438 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 1446 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
1439 | 1447 | ||
@@ -1449,8 +1457,11 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1449 | .count = 6, | 1457 | .count = 6, |
1450 | .endpoint = 0x84, | 1458 | .endpoint = 0x84, |
1451 | }, | 1459 | }, |
1460 | }}, | ||
1452 | }, | 1461 | }, |
1453 | { | 1462 | { |
1463 | .num_frontends = 1, | ||
1464 | .fe = {{ | ||
1454 | .frontend_attach = | 1465 | .frontend_attach = |
1455 | af9015_af9013_frontend_attach, | 1466 | af9015_af9013_frontend_attach, |
1456 | .tuner_attach = af9015_tuner_attach, | 1467 | .tuner_attach = af9015_tuner_attach, |
@@ -1465,6 +1476,7 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1465 | } | 1476 | } |
1466 | } | 1477 | } |
1467 | }, | 1478 | }, |
1479 | }}, | ||
1468 | } | 1480 | } |
1469 | }, | 1481 | }, |
1470 | 1482 | ||
@@ -1551,6 +1563,8 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1551 | .num_adapters = 2, | 1563 | .num_adapters = 2, |
1552 | .adapter = { | 1564 | .adapter = { |
1553 | { | 1565 | { |
1566 | .num_frontends = 1, | ||
1567 | .fe = {{ | ||
1554 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 1568 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
1555 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 1569 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
1556 | 1570 | ||
@@ -1566,8 +1580,11 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1566 | .count = 6, | 1580 | .count = 6, |
1567 | .endpoint = 0x84, | 1581 | .endpoint = 0x84, |
1568 | }, | 1582 | }, |
1583 | }}, | ||
1569 | }, | 1584 | }, |
1570 | { | 1585 | { |
1586 | .num_frontends = 1, | ||
1587 | .fe = {{ | ||
1571 | .frontend_attach = | 1588 | .frontend_attach = |
1572 | af9015_af9013_frontend_attach, | 1589 | af9015_af9013_frontend_attach, |
1573 | .tuner_attach = af9015_tuner_attach, | 1590 | .tuner_attach = af9015_tuner_attach, |
@@ -1582,6 +1599,7 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1582 | } | 1599 | } |
1583 | } | 1600 | } |
1584 | }, | 1601 | }, |
1602 | }}, | ||
1585 | } | 1603 | } |
1586 | }, | 1604 | }, |
1587 | 1605 | ||
diff --git a/drivers/media/dvb/dvb-usb/anysee.c b/drivers/media/dvb/dvb-usb/anysee.c index d4d2420155b4..5f2278b73ee9 100644 --- a/drivers/media/dvb/dvb-usb/anysee.c +++ b/drivers/media/dvb/dvb-usb/anysee.c | |||
@@ -575,7 +575,7 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
575 | }; | 575 | }; |
576 | 576 | ||
577 | /* detect hardware only once */ | 577 | /* detect hardware only once */ |
578 | if (adap->fe[0] == NULL) { | 578 | if (adap->fe_adap[0].fe == NULL) { |
579 | /* Check which hardware we have. | 579 | /* Check which hardware we have. |
580 | * We must do this call two times to get reliable values (hw bug). | 580 | * We must do this call two times to get reliable values (hw bug). |
581 | */ | 581 | */ |
@@ -595,7 +595,7 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
595 | } | 595 | } |
596 | 596 | ||
597 | /* set current frondend ID for devices having two frondends */ | 597 | /* set current frondend ID for devices having two frondends */ |
598 | if (adap->fe[0]) | 598 | if (adap->fe_adap[0].fe) |
599 | state->fe_id++; | 599 | state->fe_id++; |
600 | 600 | ||
601 | switch (state->hw) { | 601 | switch (state->hw) { |
@@ -606,13 +606,13 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
606 | break; | 606 | break; |
607 | 607 | ||
608 | /* attach demod */ | 608 | /* attach demod */ |
609 | adap->fe[0] = dvb_attach(mt352_attach, &anysee_mt352_config, | 609 | adap->fe_adap[0].fe = dvb_attach(mt352_attach, &anysee_mt352_config, |
610 | &adap->dev->i2c_adap); | 610 | &adap->dev->i2c_adap); |
611 | if (adap->fe[0]) | 611 | if (adap->fe_adap[0].fe) |
612 | break; | 612 | break; |
613 | 613 | ||
614 | /* attach demod */ | 614 | /* attach demod */ |
615 | adap->fe[0] = dvb_attach(zl10353_attach, &anysee_zl10353_config, | 615 | adap->fe_adap[0].fe = dvb_attach(zl10353_attach, &anysee_zl10353_config, |
616 | &adap->dev->i2c_adap); | 616 | &adap->dev->i2c_adap); |
617 | 617 | ||
618 | break; | 618 | break; |
@@ -633,7 +633,7 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
633 | goto error; | 633 | goto error; |
634 | 634 | ||
635 | /* attach demod */ | 635 | /* attach demod */ |
636 | adap->fe[0] = dvb_attach(zl10353_attach, | 636 | adap->fe_adap[0].fe = dvb_attach(zl10353_attach, |
637 | &anysee_zl10353_config, &adap->dev->i2c_adap); | 637 | &anysee_zl10353_config, &adap->dev->i2c_adap); |
638 | 638 | ||
639 | break; | 639 | break; |
@@ -649,7 +649,7 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
649 | goto error; | 649 | goto error; |
650 | 650 | ||
651 | /* attach demod */ | 651 | /* attach demod */ |
652 | adap->fe[0] = dvb_attach(tda10023_attach, | 652 | adap->fe_adap[0].fe = dvb_attach(tda10023_attach, |
653 | &anysee_tda10023_config, &adap->dev->i2c_adap, 0x48); | 653 | &anysee_tda10023_config, &adap->dev->i2c_adap, 0x48); |
654 | 654 | ||
655 | break; | 655 | break; |
@@ -665,7 +665,7 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
665 | goto error; | 665 | goto error; |
666 | 666 | ||
667 | /* attach demod */ | 667 | /* attach demod */ |
668 | adap->fe[0] = dvb_attach(cx24116_attach, &anysee_cx24116_config, | 668 | adap->fe_adap[0].fe = dvb_attach(cx24116_attach, &anysee_cx24116_config, |
669 | &adap->dev->i2c_adap); | 669 | &adap->dev->i2c_adap); |
670 | 670 | ||
671 | break; | 671 | break; |
@@ -707,13 +707,13 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
707 | /* attach demod */ | 707 | /* attach demod */ |
708 | if (tmp == 0xc7) { | 708 | if (tmp == 0xc7) { |
709 | /* TDA18212 config */ | 709 | /* TDA18212 config */ |
710 | adap->fe[state->fe_id] = dvb_attach( | 710 | adap->fe_adap[state->fe_id].fe = dvb_attach( |
711 | tda10023_attach, | 711 | tda10023_attach, |
712 | &anysee_tda10023_tda18212_config, | 712 | &anysee_tda10023_tda18212_config, |
713 | &adap->dev->i2c_adap, 0x48); | 713 | &adap->dev->i2c_adap, 0x48); |
714 | } else { | 714 | } else { |
715 | /* PLL config */ | 715 | /* PLL config */ |
716 | adap->fe[state->fe_id] = dvb_attach( | 716 | adap->fe_adap[state->fe_id].fe = dvb_attach( |
717 | tda10023_attach, | 717 | tda10023_attach, |
718 | &anysee_tda10023_config, | 718 | &anysee_tda10023_config, |
719 | &adap->dev->i2c_adap, 0x48); | 719 | &adap->dev->i2c_adap, 0x48); |
@@ -734,13 +734,13 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
734 | /* attach demod */ | 734 | /* attach demod */ |
735 | if (tmp == 0xc7) { | 735 | if (tmp == 0xc7) { |
736 | /* TDA18212 config */ | 736 | /* TDA18212 config */ |
737 | adap->fe[state->fe_id] = dvb_attach( | 737 | adap->fe_adap[state->fe_id].fe = dvb_attach( |
738 | zl10353_attach, | 738 | zl10353_attach, |
739 | &anysee_zl10353_tda18212_config2, | 739 | &anysee_zl10353_tda18212_config2, |
740 | &adap->dev->i2c_adap); | 740 | &adap->dev->i2c_adap); |
741 | } else { | 741 | } else { |
742 | /* PLL config */ | 742 | /* PLL config */ |
743 | adap->fe[state->fe_id] = dvb_attach( | 743 | adap->fe_adap[state->fe_id].fe = dvb_attach( |
744 | zl10353_attach, | 744 | zl10353_attach, |
745 | &anysee_zl10353_config, | 745 | &anysee_zl10353_config, |
746 | &adap->dev->i2c_adap); | 746 | &adap->dev->i2c_adap); |
@@ -772,7 +772,7 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
772 | goto error; | 772 | goto error; |
773 | 773 | ||
774 | /* attach demod */ | 774 | /* attach demod */ |
775 | adap->fe[state->fe_id] = dvb_attach(tda10023_attach, | 775 | adap->fe_adap[state->fe_id].fe = dvb_attach(tda10023_attach, |
776 | &anysee_tda10023_tda18212_config, | 776 | &anysee_tda10023_tda18212_config, |
777 | &adap->dev->i2c_adap, 0x48); | 777 | &adap->dev->i2c_adap, 0x48); |
778 | } else { | 778 | } else { |
@@ -789,7 +789,7 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
789 | goto error; | 789 | goto error; |
790 | 790 | ||
791 | /* attach demod */ | 791 | /* attach demod */ |
792 | adap->fe[state->fe_id] = dvb_attach(zl10353_attach, | 792 | adap->fe_adap[state->fe_id].fe = dvb_attach(zl10353_attach, |
793 | &anysee_zl10353_tda18212_config, | 793 | &anysee_zl10353_tda18212_config, |
794 | &adap->dev->i2c_adap); | 794 | &adap->dev->i2c_adap); |
795 | } | 795 | } |
@@ -814,13 +814,13 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap) | |||
814 | goto error; | 814 | goto error; |
815 | 815 | ||
816 | /* attach demod */ | 816 | /* attach demod */ |
817 | adap->fe[0] = dvb_attach(stv0900_attach, &anysee_stv0900_config, | 817 | adap->fe_adap[0].fe = dvb_attach(stv0900_attach, &anysee_stv0900_config, |
818 | &adap->dev->i2c_adap, 0); | 818 | &adap->dev->i2c_adap, 0); |
819 | 819 | ||
820 | break; | 820 | break; |
821 | } | 821 | } |
822 | 822 | ||
823 | if (!adap->fe[0]) { | 823 | if (!adap->fe_adap[0].fe) { |
824 | /* we have no frontend :-( */ | 824 | /* we have no frontend :-( */ |
825 | ret = -ENODEV; | 825 | ret = -ENODEV; |
826 | err("Unsupported Anysee version. " \ | 826 | err("Unsupported Anysee version. " \ |
@@ -842,7 +842,7 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap) | |||
842 | /* E30 */ | 842 | /* E30 */ |
843 | 843 | ||
844 | /* attach tuner */ | 844 | /* attach tuner */ |
845 | fe = dvb_attach(dvb_pll_attach, adap->fe[0], (0xc2 >> 1), | 845 | fe = dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, (0xc2 >> 1), |
846 | NULL, DVB_PLL_THOMSON_DTT7579); | 846 | NULL, DVB_PLL_THOMSON_DTT7579); |
847 | 847 | ||
848 | break; | 848 | break; |
@@ -850,7 +850,7 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap) | |||
850 | /* E30 Plus */ | 850 | /* E30 Plus */ |
851 | 851 | ||
852 | /* attach tuner */ | 852 | /* attach tuner */ |
853 | fe = dvb_attach(dvb_pll_attach, adap->fe[0], (0xc2 >> 1), | 853 | fe = dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, (0xc2 >> 1), |
854 | &adap->dev->i2c_adap, DVB_PLL_THOMSON_DTT7579); | 854 | &adap->dev->i2c_adap, DVB_PLL_THOMSON_DTT7579); |
855 | 855 | ||
856 | break; | 856 | break; |
@@ -858,7 +858,7 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap) | |||
858 | /* E30 C Plus */ | 858 | /* E30 C Plus */ |
859 | 859 | ||
860 | /* attach tuner */ | 860 | /* attach tuner */ |
861 | fe = dvb_attach(dvb_pll_attach, adap->fe[0], (0xc0 >> 1), | 861 | fe = dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, (0xc0 >> 1), |
862 | &adap->dev->i2c_adap, DVB_PLL_SAMSUNG_DTOS403IH102A); | 862 | &adap->dev->i2c_adap, DVB_PLL_SAMSUNG_DTOS403IH102A); |
863 | 863 | ||
864 | break; | 864 | break; |
@@ -866,7 +866,7 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap) | |||
866 | /* E30 S2 Plus */ | 866 | /* E30 S2 Plus */ |
867 | 867 | ||
868 | /* attach LNB controller */ | 868 | /* attach LNB controller */ |
869 | fe = dvb_attach(isl6423_attach, adap->fe[0], | 869 | fe = dvb_attach(isl6423_attach, adap->fe_adap[0].fe, |
870 | &adap->dev->i2c_adap, &anysee_isl6423_config); | 870 | &adap->dev->i2c_adap, &anysee_isl6423_config); |
871 | 871 | ||
872 | break; | 872 | break; |
@@ -883,7 +883,7 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap) | |||
883 | goto error; | 883 | goto error; |
884 | 884 | ||
885 | /* attach tuner */ | 885 | /* attach tuner */ |
886 | fe = dvb_attach(tda18212_attach, adap->fe[state->fe_id], | 886 | fe = dvb_attach(tda18212_attach, adap->fe_adap[state->fe_id].fe, |
887 | &adap->dev->i2c_adap, &anysee_tda18212_config); | 887 | &adap->dev->i2c_adap, &anysee_tda18212_config); |
888 | if (fe) | 888 | if (fe) |
889 | break; | 889 | break; |
@@ -894,7 +894,7 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap) | |||
894 | goto error; | 894 | goto error; |
895 | 895 | ||
896 | /* attach tuner */ | 896 | /* attach tuner */ |
897 | fe = dvb_attach(dvb_pll_attach, adap->fe[state->fe_id], | 897 | fe = dvb_attach(dvb_pll_attach, adap->fe_adap[state->fe_id].fe, |
898 | (0xc0 >> 1), &adap->dev->i2c_adap, | 898 | (0xc0 >> 1), &adap->dev->i2c_adap, |
899 | DVB_PLL_SAMSUNG_DTOS403IH102A); | 899 | DVB_PLL_SAMSUNG_DTOS403IH102A); |
900 | 900 | ||
@@ -910,7 +910,7 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap) | |||
910 | goto error; | 910 | goto error; |
911 | 911 | ||
912 | /* attach tuner */ | 912 | /* attach tuner */ |
913 | fe = dvb_attach(tda18212_attach, adap->fe[state->fe_id], | 913 | fe = dvb_attach(tda18212_attach, adap->fe_adap[state->fe_id].fe, |
914 | &adap->dev->i2c_adap, &anysee_tda18212_config); | 914 | &adap->dev->i2c_adap, &anysee_tda18212_config); |
915 | 915 | ||
916 | break; | 916 | break; |
@@ -920,12 +920,12 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap) | |||
920 | /* E7 PS2 */ | 920 | /* E7 PS2 */ |
921 | 921 | ||
922 | /* attach tuner */ | 922 | /* attach tuner */ |
923 | fe = dvb_attach(stv6110_attach, adap->fe[0], | 923 | fe = dvb_attach(stv6110_attach, adap->fe_adap[0].fe, |
924 | &anysee_stv6110_config, &adap->dev->i2c_adap); | 924 | &anysee_stv6110_config, &adap->dev->i2c_adap); |
925 | 925 | ||
926 | if (fe) { | 926 | if (fe) { |
927 | /* attach LNB controller */ | 927 | /* attach LNB controller */ |
928 | fe = dvb_attach(isl6423_attach, adap->fe[0], | 928 | fe = dvb_attach(isl6423_attach, adap->fe_adap[0].fe, |
929 | &adap->dev->i2c_adap, &anysee_isl6423_config); | 929 | &adap->dev->i2c_adap, &anysee_isl6423_config); |
930 | } | 930 | } |
931 | 931 | ||
@@ -1027,8 +1027,9 @@ static struct dvb_usb_device_properties anysee_properties = { | |||
1027 | .num_adapters = 1, | 1027 | .num_adapters = 1, |
1028 | .adapter = { | 1028 | .adapter = { |
1029 | { | 1029 | { |
1030 | .num_frontends = 2, | 1030 | .num_frontends = 2, |
1031 | .frontend_ctrl = anysee_frontend_ctrl, | 1031 | .frontend_ctrl = anysee_frontend_ctrl, |
1032 | .fe = {{ | ||
1032 | .streaming_ctrl = anysee_streaming_ctrl, | 1033 | .streaming_ctrl = anysee_streaming_ctrl, |
1033 | .frontend_attach = anysee_frontend_attach, | 1034 | .frontend_attach = anysee_frontend_attach, |
1034 | .tuner_attach = anysee_tuner_attach, | 1035 | .tuner_attach = anysee_tuner_attach, |
@@ -1042,6 +1043,21 @@ static struct dvb_usb_device_properties anysee_properties = { | |||
1042 | } | 1043 | } |
1043 | } | 1044 | } |
1044 | }, | 1045 | }, |
1046 | }, { | ||
1047 | .streaming_ctrl = anysee_streaming_ctrl, | ||
1048 | .frontend_attach = anysee_frontend_attach, | ||
1049 | .tuner_attach = anysee_tuner_attach, | ||
1050 | .stream = { | ||
1051 | .type = USB_BULK, | ||
1052 | .count = 8, | ||
1053 | .endpoint = 0x82, | ||
1054 | .u = { | ||
1055 | .bulk = { | ||
1056 | .buffersize = (16*512), | ||
1057 | } | ||
1058 | } | ||
1059 | }, | ||
1060 | }}, | ||
1045 | } | 1061 | } |
1046 | }, | 1062 | }, |
1047 | 1063 | ||
diff --git a/drivers/media/dvb/dvb-usb/au6610.c b/drivers/media/dvb/dvb-usb/au6610.c index ebe6e1ffc319..b77994967b9b 100644 --- a/drivers/media/dvb/dvb-usb/au6610.c +++ b/drivers/media/dvb/dvb-usb/au6610.c | |||
@@ -140,9 +140,9 @@ static struct zl10353_config au6610_zl10353_config = { | |||
140 | 140 | ||
141 | static int au6610_zl10353_frontend_attach(struct dvb_usb_adapter *adap) | 141 | static int au6610_zl10353_frontend_attach(struct dvb_usb_adapter *adap) |
142 | { | 142 | { |
143 | adap->fe[0] = dvb_attach(zl10353_attach, &au6610_zl10353_config, | 143 | adap->fe_adap[0].fe = dvb_attach(zl10353_attach, &au6610_zl10353_config, |
144 | &adap->dev->i2c_adap); | 144 | &adap->dev->i2c_adap); |
145 | if (adap->fe[0] == NULL) | 145 | if (adap->fe_adap[0].fe == NULL) |
146 | return -ENODEV; | 146 | return -ENODEV; |
147 | 147 | ||
148 | return 0; | 148 | return 0; |
@@ -155,7 +155,7 @@ static struct qt1010_config au6610_qt1010_config = { | |||
155 | static int au6610_qt1010_tuner_attach(struct dvb_usb_adapter *adap) | 155 | static int au6610_qt1010_tuner_attach(struct dvb_usb_adapter *adap) |
156 | { | 156 | { |
157 | return dvb_attach(qt1010_attach, | 157 | return dvb_attach(qt1010_attach, |
158 | adap->fe[0], &adap->dev->i2c_adap, | 158 | adap->fe_adap[0].fe, &adap->dev->i2c_adap, |
159 | &au6610_qt1010_config) == NULL ? -ENODEV : 0; | 159 | &au6610_qt1010_config) == NULL ? -ENODEV : 0; |
160 | } | 160 | } |
161 | 161 | ||
@@ -204,6 +204,8 @@ static struct dvb_usb_device_properties au6610_properties = { | |||
204 | .num_adapters = 1, | 204 | .num_adapters = 1, |
205 | .adapter = { | 205 | .adapter = { |
206 | { | 206 | { |
207 | .num_frontends = 1, | ||
208 | .fe = {{ | ||
207 | .frontend_attach = au6610_zl10353_frontend_attach, | 209 | .frontend_attach = au6610_zl10353_frontend_attach, |
208 | .tuner_attach = au6610_qt1010_tuner_attach, | 210 | .tuner_attach = au6610_qt1010_tuner_attach, |
209 | 211 | ||
@@ -219,6 +221,7 @@ static struct dvb_usb_device_properties au6610_properties = { | |||
219 | } | 221 | } |
220 | } | 222 | } |
221 | }, | 223 | }, |
224 | }}, | ||
222 | } | 225 | } |
223 | }, | 226 | }, |
224 | 227 | ||
diff --git a/drivers/media/dvb/dvb-usb/az6027.c b/drivers/media/dvb/dvb-usb/az6027.c index d59430c48158..82c5f45e3053 100644 --- a/drivers/media/dvb/dvb-usb/az6027.c +++ b/drivers/media/dvb/dvb-usb/az6027.c | |||
@@ -910,16 +910,16 @@ static int az6027_frontend_attach(struct dvb_usb_adapter *adap) | |||
910 | az6027_frontend_reset(adap); | 910 | az6027_frontend_reset(adap); |
911 | 911 | ||
912 | deb_info("adap = %p, dev = %p\n", adap, adap->dev); | 912 | deb_info("adap = %p, dev = %p\n", adap, adap->dev); |
913 | adap->fe[0] = stb0899_attach(&az6027_stb0899_config, &adap->dev->i2c_adap); | 913 | adap->fe_adap[0].fe = stb0899_attach(&az6027_stb0899_config, &adap->dev->i2c_adap); |
914 | 914 | ||
915 | if (adap->fe[0]) { | 915 | if (adap->fe_adap[0].fe) { |
916 | deb_info("found STB0899 DVB-S/DVB-S2 frontend @0x%02x", az6027_stb0899_config.demod_address); | 916 | deb_info("found STB0899 DVB-S/DVB-S2 frontend @0x%02x", az6027_stb0899_config.demod_address); |
917 | if (stb6100_attach(adap->fe[0], &az6027_stb6100_config, &adap->dev->i2c_adap)) { | 917 | if (stb6100_attach(adap->fe_adap[0].fe, &az6027_stb6100_config, &adap->dev->i2c_adap)) { |
918 | deb_info("found STB6100 DVB-S/DVB-S2 frontend @0x%02x", az6027_stb6100_config.tuner_address); | 918 | deb_info("found STB6100 DVB-S/DVB-S2 frontend @0x%02x", az6027_stb6100_config.tuner_address); |
919 | adap->fe[0]->ops.set_voltage = az6027_set_voltage; | 919 | adap->fe_adap[0].fe->ops.set_voltage = az6027_set_voltage; |
920 | az6027_ci_init(adap); | 920 | az6027_ci_init(adap); |
921 | } else { | 921 | } else { |
922 | adap->fe[0] = NULL; | 922 | adap->fe_adap[0].fe = NULL; |
923 | } | 923 | } |
924 | } else | 924 | } else |
925 | warn("no front-end attached\n"); | 925 | warn("no front-end attached\n"); |
@@ -1106,6 +1106,8 @@ static struct dvb_usb_device_properties az6027_properties = { | |||
1106 | .num_adapters = 1, | 1106 | .num_adapters = 1, |
1107 | .adapter = { | 1107 | .adapter = { |
1108 | { | 1108 | { |
1109 | .num_frontends = 1, | ||
1110 | .fe = {{ | ||
1109 | .streaming_ctrl = az6027_streaming_ctrl, | 1111 | .streaming_ctrl = az6027_streaming_ctrl, |
1110 | .frontend_attach = az6027_frontend_attach, | 1112 | .frontend_attach = az6027_frontend_attach, |
1111 | 1113 | ||
@@ -1120,6 +1122,7 @@ static struct dvb_usb_device_properties az6027_properties = { | |||
1120 | } | 1122 | } |
1121 | } | 1123 | } |
1122 | }, | 1124 | }, |
1125 | }}, | ||
1123 | } | 1126 | } |
1124 | }, | 1127 | }, |
1125 | /* | 1128 | /* |
diff --git a/drivers/media/dvb/dvb-usb/ce6230.c b/drivers/media/dvb/dvb-usb/ce6230.c index 5655ce411d70..57afb5a9157e 100644 --- a/drivers/media/dvb/dvb-usb/ce6230.c +++ b/drivers/media/dvb/dvb-usb/ce6230.c | |||
@@ -186,9 +186,9 @@ static struct zl10353_config ce6230_zl10353_config = { | |||
186 | static int ce6230_zl10353_frontend_attach(struct dvb_usb_adapter *adap) | 186 | static int ce6230_zl10353_frontend_attach(struct dvb_usb_adapter *adap) |
187 | { | 187 | { |
188 | deb_info("%s:\n", __func__); | 188 | deb_info("%s:\n", __func__); |
189 | adap->fe[0] = dvb_attach(zl10353_attach, &ce6230_zl10353_config, | 189 | adap->fe_adap[0].fe = dvb_attach(zl10353_attach, &ce6230_zl10353_config, |
190 | &adap->dev->i2c_adap); | 190 | &adap->dev->i2c_adap); |
191 | if (adap->fe[0] == NULL) | 191 | if (adap->fe_adap[0].fe == NULL) |
192 | return -ENODEV; | 192 | return -ENODEV; |
193 | return 0; | 193 | return 0; |
194 | } | 194 | } |
@@ -214,7 +214,7 @@ static int ce6230_mxl5003s_tuner_attach(struct dvb_usb_adapter *adap) | |||
214 | { | 214 | { |
215 | int ret; | 215 | int ret; |
216 | deb_info("%s:\n", __func__); | 216 | deb_info("%s:\n", __func__); |
217 | ret = dvb_attach(mxl5005s_attach, adap->fe[0], &adap->dev->i2c_adap, | 217 | ret = dvb_attach(mxl5005s_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, |
218 | &ce6230_mxl5003s_config) == NULL ? -ENODEV : 0; | 218 | &ce6230_mxl5003s_config) == NULL ? -ENODEV : 0; |
219 | return ret; | 219 | return ret; |
220 | } | 220 | } |
@@ -273,6 +273,8 @@ static struct dvb_usb_device_properties ce6230_properties = { | |||
273 | .num_adapters = 1, | 273 | .num_adapters = 1, |
274 | .adapter = { | 274 | .adapter = { |
275 | { | 275 | { |
276 | .num_frontends = 1, | ||
277 | .fe = {{ | ||
276 | .frontend_attach = ce6230_zl10353_frontend_attach, | 278 | .frontend_attach = ce6230_zl10353_frontend_attach, |
277 | .tuner_attach = ce6230_mxl5003s_tuner_attach, | 279 | .tuner_attach = ce6230_mxl5003s_tuner_attach, |
278 | .stream = { | 280 | .stream = { |
@@ -285,6 +287,7 @@ static struct dvb_usb_device_properties ce6230_properties = { | |||
285 | } | 287 | } |
286 | } | 288 | } |
287 | }, | 289 | }, |
290 | }}, | ||
288 | } | 291 | } |
289 | }, | 292 | }, |
290 | 293 | ||
diff --git a/drivers/media/dvb/dvb-usb/cinergyT2-core.c b/drivers/media/dvb/dvb-usb/cinergyT2-core.c index 0dd42bdbe285..f9d905002ec9 100644 --- a/drivers/media/dvb/dvb-usb/cinergyT2-core.c +++ b/drivers/media/dvb/dvb-usb/cinergyT2-core.c | |||
@@ -69,7 +69,7 @@ static int cinergyt2_frontend_attach(struct dvb_usb_adapter *adap) | |||
69 | char state[3]; | 69 | char state[3]; |
70 | int ret; | 70 | int ret; |
71 | 71 | ||
72 | adap->fe[0] = cinergyt2_fe_attach(adap->dev); | 72 | adap->fe_adap[0].fe = cinergyt2_fe_attach(adap->dev); |
73 | 73 | ||
74 | ret = dvb_usb_generic_rw(adap->dev, query, sizeof(query), state, | 74 | ret = dvb_usb_generic_rw(adap->dev, query, sizeof(query), state, |
75 | sizeof(state), 0); | 75 | sizeof(state), 0); |
@@ -198,6 +198,8 @@ static struct dvb_usb_device_properties cinergyt2_properties = { | |||
198 | .num_adapters = 1, | 198 | .num_adapters = 1, |
199 | .adapter = { | 199 | .adapter = { |
200 | { | 200 | { |
201 | .num_frontends = 1, | ||
202 | .fe = {{ | ||
201 | .streaming_ctrl = cinergyt2_streaming_ctrl, | 203 | .streaming_ctrl = cinergyt2_streaming_ctrl, |
202 | .frontend_attach = cinergyt2_frontend_attach, | 204 | .frontend_attach = cinergyt2_frontend_attach, |
203 | 205 | ||
@@ -212,6 +214,7 @@ static struct dvb_usb_device_properties cinergyt2_properties = { | |||
212 | } | 214 | } |
213 | } | 215 | } |
214 | }, | 216 | }, |
217 | }}, | ||
215 | } | 218 | } |
216 | }, | 219 | }, |
217 | 220 | ||
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c index a76f431d6a26..7f610da8cca8 100644 --- a/drivers/media/dvb/dvb-usb/cxusb.c +++ b/drivers/media/dvb/dvb-usb/cxusb.c | |||
@@ -347,7 +347,7 @@ static void cxusb_d680_dmb_drain_message(struct dvb_usb_device *d) | |||
347 | 347 | ||
348 | static void cxusb_d680_dmb_drain_video(struct dvb_usb_device *d) | 348 | static void cxusb_d680_dmb_drain_video(struct dvb_usb_device *d) |
349 | { | 349 | { |
350 | struct usb_data_stream_properties *p = &d->props.adapter[0].stream; | 350 | struct usb_data_stream_properties *p = &d->props.adapter[0].fe[0].stream; |
351 | const int timeout = 100; | 351 | const int timeout = 100; |
352 | const int junk_len = p->u.bulk.buffersize; | 352 | const int junk_len = p->u.bulk.buffersize; |
353 | u8 *junk; | 353 | u8 *junk; |
@@ -725,7 +725,7 @@ static struct max2165_config mygica_d689_max2165_cfg = { | |||
725 | /* Callbacks for DVB USB */ | 725 | /* Callbacks for DVB USB */ |
726 | static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap) | 726 | static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap) |
727 | { | 727 | { |
728 | dvb_attach(simple_tuner_attach, adap->fe[0], | 728 | dvb_attach(simple_tuner_attach, adap->fe_adap[0].fe, |
729 | &adap->dev->i2c_adap, 0x61, | 729 | &adap->dev->i2c_adap, 0x61, |
730 | TUNER_PHILIPS_FMD1216ME_MK3); | 730 | TUNER_PHILIPS_FMD1216ME_MK3); |
731 | return 0; | 731 | return 0; |
@@ -733,27 +733,27 @@ static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap) | |||
733 | 733 | ||
734 | static int cxusb_dee1601_tuner_attach(struct dvb_usb_adapter *adap) | 734 | static int cxusb_dee1601_tuner_attach(struct dvb_usb_adapter *adap) |
735 | { | 735 | { |
736 | dvb_attach(dvb_pll_attach, adap->fe[0], 0x61, | 736 | dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x61, |
737 | NULL, DVB_PLL_THOMSON_DTT7579); | 737 | NULL, DVB_PLL_THOMSON_DTT7579); |
738 | return 0; | 738 | return 0; |
739 | } | 739 | } |
740 | 740 | ||
741 | static int cxusb_lgz201_tuner_attach(struct dvb_usb_adapter *adap) | 741 | static int cxusb_lgz201_tuner_attach(struct dvb_usb_adapter *adap) |
742 | { | 742 | { |
743 | dvb_attach(dvb_pll_attach, adap->fe[0], 0x61, NULL, DVB_PLL_LG_Z201); | 743 | dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x61, NULL, DVB_PLL_LG_Z201); |
744 | return 0; | 744 | return 0; |
745 | } | 745 | } |
746 | 746 | ||
747 | static int cxusb_dtt7579_tuner_attach(struct dvb_usb_adapter *adap) | 747 | static int cxusb_dtt7579_tuner_attach(struct dvb_usb_adapter *adap) |
748 | { | 748 | { |
749 | dvb_attach(dvb_pll_attach, adap->fe[0], 0x60, | 749 | dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, |
750 | NULL, DVB_PLL_THOMSON_DTT7579); | 750 | NULL, DVB_PLL_THOMSON_DTT7579); |
751 | return 0; | 751 | return 0; |
752 | } | 752 | } |
753 | 753 | ||
754 | static int cxusb_lgh064f_tuner_attach(struct dvb_usb_adapter *adap) | 754 | static int cxusb_lgh064f_tuner_attach(struct dvb_usb_adapter *adap) |
755 | { | 755 | { |
756 | dvb_attach(simple_tuner_attach, adap->fe[0], | 756 | dvb_attach(simple_tuner_attach, adap->fe_adap[0].fe, |
757 | &adap->dev->i2c_adap, 0x61, TUNER_LG_TDVS_H06XF); | 757 | &adap->dev->i2c_adap, 0x61, TUNER_LG_TDVS_H06XF); |
758 | return 0; | 758 | return 0; |
759 | } | 759 | } |
@@ -795,9 +795,9 @@ static int cxusb_dvico_xc3028_tuner_attach(struct dvb_usb_adapter *adap) | |||
795 | }; | 795 | }; |
796 | 796 | ||
797 | /* FIXME: generalize & move to common area */ | 797 | /* FIXME: generalize & move to common area */ |
798 | adap->fe[0]->callback = dvico_bluebird_xc2028_callback; | 798 | adap->fe_adap[0].fe->callback = dvico_bluebird_xc2028_callback; |
799 | 799 | ||
800 | fe = dvb_attach(xc2028_attach, adap->fe[0], &cfg); | 800 | fe = dvb_attach(xc2028_attach, adap->fe_adap[0].fe, &cfg); |
801 | if (fe == NULL || fe->ops.tuner_ops.set_config == NULL) | 801 | if (fe == NULL || fe->ops.tuner_ops.set_config == NULL) |
802 | return -EIO; | 802 | return -EIO; |
803 | 803 | ||
@@ -808,7 +808,7 @@ static int cxusb_dvico_xc3028_tuner_attach(struct dvb_usb_adapter *adap) | |||
808 | 808 | ||
809 | static int cxusb_mxl5003s_tuner_attach(struct dvb_usb_adapter *adap) | 809 | static int cxusb_mxl5003s_tuner_attach(struct dvb_usb_adapter *adap) |
810 | { | 810 | { |
811 | dvb_attach(mxl5005s_attach, adap->fe[0], | 811 | dvb_attach(mxl5005s_attach, adap->fe_adap[0].fe, |
812 | &adap->dev->i2c_adap, &aver_a868r_tuner); | 812 | &adap->dev->i2c_adap, &aver_a868r_tuner); |
813 | return 0; | 813 | return 0; |
814 | } | 814 | } |
@@ -816,7 +816,7 @@ static int cxusb_mxl5003s_tuner_attach(struct dvb_usb_adapter *adap) | |||
816 | static int cxusb_d680_dmb_tuner_attach(struct dvb_usb_adapter *adap) | 816 | static int cxusb_d680_dmb_tuner_attach(struct dvb_usb_adapter *adap) |
817 | { | 817 | { |
818 | struct dvb_frontend *fe; | 818 | struct dvb_frontend *fe; |
819 | fe = dvb_attach(mxl5005s_attach, adap->fe[0], | 819 | fe = dvb_attach(mxl5005s_attach, adap->fe_adap[0].fe, |
820 | &adap->dev->i2c_adap, &d680_dmb_tuner); | 820 | &adap->dev->i2c_adap, &d680_dmb_tuner); |
821 | return (fe == NULL) ? -EIO : 0; | 821 | return (fe == NULL) ? -EIO : 0; |
822 | } | 822 | } |
@@ -824,7 +824,7 @@ static int cxusb_d680_dmb_tuner_attach(struct dvb_usb_adapter *adap) | |||
824 | static int cxusb_mygica_d689_tuner_attach(struct dvb_usb_adapter *adap) | 824 | static int cxusb_mygica_d689_tuner_attach(struct dvb_usb_adapter *adap) |
825 | { | 825 | { |
826 | struct dvb_frontend *fe; | 826 | struct dvb_frontend *fe; |
827 | fe = dvb_attach(max2165_attach, adap->fe[0], | 827 | fe = dvb_attach(max2165_attach, adap->fe_adap[0].fe, |
828 | &adap->dev->i2c_adap, &mygica_d689_max2165_cfg); | 828 | &adap->dev->i2c_adap, &mygica_d689_max2165_cfg); |
829 | return (fe == NULL) ? -EIO : 0; | 829 | return (fe == NULL) ? -EIO : 0; |
830 | } | 830 | } |
@@ -837,7 +837,7 @@ static int cxusb_cx22702_frontend_attach(struct dvb_usb_adapter *adap) | |||
837 | 837 | ||
838 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, &b, 1); | 838 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, &b, 1); |
839 | 839 | ||
840 | if ((adap->fe[0] = dvb_attach(cx22702_attach, &cxusb_cx22702_config, | 840 | if ((adap->fe_adap[0].fe = dvb_attach(cx22702_attach, &cxusb_cx22702_config, |
841 | &adap->dev->i2c_adap)) != NULL) | 841 | &adap->dev->i2c_adap)) != NULL) |
842 | return 0; | 842 | return 0; |
843 | 843 | ||
@@ -851,7 +851,7 @@ static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_adapter *adap) | |||
851 | 851 | ||
852 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); | 852 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); |
853 | 853 | ||
854 | if ((adap->fe[0] = dvb_attach(lgdt330x_attach, &cxusb_lgdt3303_config, | 854 | if ((adap->fe_adap[0].fe = dvb_attach(lgdt330x_attach, &cxusb_lgdt3303_config, |
855 | &adap->dev->i2c_adap)) != NULL) | 855 | &adap->dev->i2c_adap)) != NULL) |
856 | return 0; | 856 | return 0; |
857 | 857 | ||
@@ -860,9 +860,9 @@ static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_adapter *adap) | |||
860 | 860 | ||
861 | static int cxusb_aver_lgdt3303_frontend_attach(struct dvb_usb_adapter *adap) | 861 | static int cxusb_aver_lgdt3303_frontend_attach(struct dvb_usb_adapter *adap) |
862 | { | 862 | { |
863 | adap->fe[0] = dvb_attach(lgdt330x_attach, &cxusb_aver_lgdt3303_config, | 863 | adap->fe_adap[0].fe = dvb_attach(lgdt330x_attach, &cxusb_aver_lgdt3303_config, |
864 | &adap->dev->i2c_adap); | 864 | &adap->dev->i2c_adap); |
865 | if (adap->fe[0] != NULL) | 865 | if (adap->fe_adap[0].fe != NULL) |
866 | return 0; | 866 | return 0; |
867 | 867 | ||
868 | return -EIO; | 868 | return -EIO; |
@@ -876,7 +876,7 @@ static int cxusb_mt352_frontend_attach(struct dvb_usb_adapter *adap) | |||
876 | 876 | ||
877 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); | 877 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); |
878 | 878 | ||
879 | if ((adap->fe[0] = dvb_attach(mt352_attach, &cxusb_mt352_config, | 879 | if ((adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_mt352_config, |
880 | &adap->dev->i2c_adap)) != NULL) | 880 | &adap->dev->i2c_adap)) != NULL) |
881 | return 0; | 881 | return 0; |
882 | 882 | ||
@@ -890,9 +890,9 @@ static int cxusb_dee1601_frontend_attach(struct dvb_usb_adapter *adap) | |||
890 | 890 | ||
891 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); | 891 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); |
892 | 892 | ||
893 | if (((adap->fe[0] = dvb_attach(mt352_attach, &cxusb_dee1601_config, | 893 | if (((adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_dee1601_config, |
894 | &adap->dev->i2c_adap)) != NULL) || | 894 | &adap->dev->i2c_adap)) != NULL) || |
895 | ((adap->fe[0] = dvb_attach(zl10353_attach, | 895 | ((adap->fe_adap[0].fe = dvb_attach(zl10353_attach, |
896 | &cxusb_zl10353_dee1601_config, | 896 | &cxusb_zl10353_dee1601_config, |
897 | &adap->dev->i2c_adap)) != NULL)) | 897 | &adap->dev->i2c_adap)) != NULL)) |
898 | return 0; | 898 | return 0; |
@@ -917,7 +917,7 @@ static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap) | |||
917 | cxusb_bluebird_gpio_pulse(adap->dev, 0x01, 1); | 917 | cxusb_bluebird_gpio_pulse(adap->dev, 0x01, 1); |
918 | cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1); | 918 | cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1); |
919 | 919 | ||
920 | if ((adap->fe[0] = dvb_attach(zl10353_attach, | 920 | if ((adap->fe_adap[0].fe = dvb_attach(zl10353_attach, |
921 | &cxusb_zl10353_xc3028_config_no_i2c_gate, | 921 | &cxusb_zl10353_xc3028_config_no_i2c_gate, |
922 | &adap->dev->i2c_adap)) == NULL) | 922 | &adap->dev->i2c_adap)) == NULL) |
923 | return -EIO; | 923 | return -EIO; |
@@ -1031,9 +1031,9 @@ static int cxusb_dualdig4_rev2_frontend_attach(struct dvb_usb_adapter *adap) | |||
1031 | return -ENODEV; | 1031 | return -ENODEV; |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | adap->fe[0] = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, | 1034 | adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, |
1035 | &cxusb_dualdig4_rev2_config); | 1035 | &cxusb_dualdig4_rev2_config); |
1036 | if (adap->fe[0] == NULL) | 1036 | if (adap->fe_adap[0].fe == NULL) |
1037 | return -EIO; | 1037 | return -EIO; |
1038 | 1038 | ||
1039 | return 0; | 1039 | return 0; |
@@ -1084,15 +1084,15 @@ static int cxusb_dualdig4_rev2_tuner_attach(struct dvb_usb_adapter *adap) | |||
1084 | { | 1084 | { |
1085 | struct dib0700_adapter_state *st = adap->priv; | 1085 | struct dib0700_adapter_state *st = adap->priv; |
1086 | struct i2c_adapter *tun_i2c = | 1086 | struct i2c_adapter *tun_i2c = |
1087 | dib7000p_get_i2c_master(adap->fe[0], | 1087 | dib7000p_get_i2c_master(adap->fe_adap[0].fe, |
1088 | DIBX000_I2C_INTERFACE_TUNER, 1); | 1088 | DIBX000_I2C_INTERFACE_TUNER, 1); |
1089 | 1089 | ||
1090 | if (dvb_attach(dib0070_attach, adap->fe[0], tun_i2c, | 1090 | if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, |
1091 | &dib7070p_dib0070_config) == NULL) | 1091 | &dib7070p_dib0070_config) == NULL) |
1092 | return -ENODEV; | 1092 | return -ENODEV; |
1093 | 1093 | ||
1094 | st->set_param_save = adap->fe[0]->ops.tuner_ops.set_params; | 1094 | st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; |
1095 | adap->fe[0]->ops.tuner_ops.set_params = dib7070_set_param_override; | 1095 | adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7070_set_param_override; |
1096 | return 0; | 1096 | return 0; |
1097 | } | 1097 | } |
1098 | 1098 | ||
@@ -1108,12 +1108,12 @@ static int cxusb_nano2_frontend_attach(struct dvb_usb_adapter *adap) | |||
1108 | cxusb_bluebird_gpio_pulse(adap->dev, 0x01, 1); | 1108 | cxusb_bluebird_gpio_pulse(adap->dev, 0x01, 1); |
1109 | cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1); | 1109 | cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1); |
1110 | 1110 | ||
1111 | if ((adap->fe[0] = dvb_attach(zl10353_attach, | 1111 | if ((adap->fe_adap[0].fe = dvb_attach(zl10353_attach, |
1112 | &cxusb_zl10353_xc3028_config, | 1112 | &cxusb_zl10353_xc3028_config, |
1113 | &adap->dev->i2c_adap)) != NULL) | 1113 | &adap->dev->i2c_adap)) != NULL) |
1114 | return 0; | 1114 | return 0; |
1115 | 1115 | ||
1116 | if ((adap->fe[0] = dvb_attach(mt352_attach, | 1116 | if ((adap->fe_adap[0].fe = dvb_attach(mt352_attach, |
1117 | &cxusb_mt352_xc3028_config, | 1117 | &cxusb_mt352_xc3028_config, |
1118 | &adap->dev->i2c_adap)) != NULL) | 1118 | &adap->dev->i2c_adap)) != NULL) |
1119 | return 0; | 1119 | return 0; |
@@ -1150,7 +1150,7 @@ static int cxusb_d680_dmb_frontend_attach(struct dvb_usb_adapter *adap) | |||
1150 | usb_clear_halt(d->udev, | 1150 | usb_clear_halt(d->udev, |
1151 | usb_rcvbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); | 1151 | usb_rcvbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); |
1152 | usb_clear_halt(d->udev, | 1152 | usb_clear_halt(d->udev, |
1153 | usb_rcvbulkpipe(d->udev, d->props.adapter[0].stream.endpoint)); | 1153 | usb_rcvbulkpipe(d->udev, d->props.adapter[0].fe[0].stream.endpoint)); |
1154 | 1154 | ||
1155 | /* Drain USB pipes to avoid hang after reboot */ | 1155 | /* Drain USB pipes to avoid hang after reboot */ |
1156 | for (n = 0; n < 5; n++) { | 1156 | for (n = 0; n < 5; n++) { |
@@ -1172,8 +1172,8 @@ static int cxusb_d680_dmb_frontend_attach(struct dvb_usb_adapter *adap) | |||
1172 | msleep(100); | 1172 | msleep(100); |
1173 | 1173 | ||
1174 | /* Attach frontend */ | 1174 | /* Attach frontend */ |
1175 | adap->fe[0] = dvb_attach(lgs8gxx_attach, &d680_lgs8gl5_cfg, &d->i2c_adap); | 1175 | adap->fe_adap[0].fe = dvb_attach(lgs8gxx_attach, &d680_lgs8gl5_cfg, &d->i2c_adap); |
1176 | if (adap->fe[0] == NULL) | 1176 | if (adap->fe_adap[0].fe == NULL) |
1177 | return -EIO; | 1177 | return -EIO; |
1178 | 1178 | ||
1179 | return 0; | 1179 | return 0; |
@@ -1207,7 +1207,7 @@ static int cxusb_mygica_d689_frontend_attach(struct dvb_usb_adapter *adap) | |||
1207 | usb_clear_halt(d->udev, | 1207 | usb_clear_halt(d->udev, |
1208 | usb_rcvbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); | 1208 | usb_rcvbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); |
1209 | usb_clear_halt(d->udev, | 1209 | usb_clear_halt(d->udev, |
1210 | usb_rcvbulkpipe(d->udev, d->props.adapter[0].stream.endpoint)); | 1210 | usb_rcvbulkpipe(d->udev, d->props.adapter[0].fe[0].stream.endpoint)); |
1211 | 1211 | ||
1212 | 1212 | ||
1213 | /* Reset the tuner */ | 1213 | /* Reset the tuner */ |
@@ -1223,9 +1223,9 @@ static int cxusb_mygica_d689_frontend_attach(struct dvb_usb_adapter *adap) | |||
1223 | msleep(100); | 1223 | msleep(100); |
1224 | 1224 | ||
1225 | /* Attach frontend */ | 1225 | /* Attach frontend */ |
1226 | adap->fe[0] = dvb_attach(atbm8830_attach, &mygica_d689_atbm8830_cfg, | 1226 | adap->fe_adap[0].fe = dvb_attach(atbm8830_attach, &mygica_d689_atbm8830_cfg, |
1227 | &d->i2c_adap); | 1227 | &d->i2c_adap); |
1228 | if (adap->fe[0] == NULL) | 1228 | if (adap->fe_adap[0].fe == NULL) |
1229 | return -EIO; | 1229 | return -EIO; |
1230 | 1230 | ||
1231 | return 0; | 1231 | return 0; |
@@ -1383,6 +1383,8 @@ static struct dvb_usb_device_properties cxusb_medion_properties = { | |||
1383 | .num_adapters = 1, | 1383 | .num_adapters = 1, |
1384 | .adapter = { | 1384 | .adapter = { |
1385 | { | 1385 | { |
1386 | .num_frontends = 1, | ||
1387 | .fe = {{ | ||
1386 | .streaming_ctrl = cxusb_streaming_ctrl, | 1388 | .streaming_ctrl = cxusb_streaming_ctrl, |
1387 | .frontend_attach = cxusb_cx22702_frontend_attach, | 1389 | .frontend_attach = cxusb_cx22702_frontend_attach, |
1388 | .tuner_attach = cxusb_fmd1216me_tuner_attach, | 1390 | .tuner_attach = cxusb_fmd1216me_tuner_attach, |
@@ -1397,7 +1399,7 @@ static struct dvb_usb_device_properties cxusb_medion_properties = { | |||
1397 | } | 1399 | } |
1398 | } | 1400 | } |
1399 | }, | 1401 | }, |
1400 | 1402 | }}, | |
1401 | }, | 1403 | }, |
1402 | }, | 1404 | }, |
1403 | .power_ctrl = cxusb_power_ctrl, | 1405 | .power_ctrl = cxusb_power_ctrl, |
@@ -1429,6 +1431,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_lgh064f_properties = { | |||
1429 | .num_adapters = 1, | 1431 | .num_adapters = 1, |
1430 | .adapter = { | 1432 | .adapter = { |
1431 | { | 1433 | { |
1434 | .num_frontends = 1, | ||
1435 | .fe = {{ | ||
1432 | .streaming_ctrl = cxusb_streaming_ctrl, | 1436 | .streaming_ctrl = cxusb_streaming_ctrl, |
1433 | .frontend_attach = cxusb_lgdt3303_frontend_attach, | 1437 | .frontend_attach = cxusb_lgdt3303_frontend_attach, |
1434 | .tuner_attach = cxusb_lgh064f_tuner_attach, | 1438 | .tuner_attach = cxusb_lgh064f_tuner_attach, |
@@ -1444,6 +1448,7 @@ static struct dvb_usb_device_properties cxusb_bluebird_lgh064f_properties = { | |||
1444 | } | 1448 | } |
1445 | } | 1449 | } |
1446 | }, | 1450 | }, |
1451 | }}, | ||
1447 | }, | 1452 | }, |
1448 | }, | 1453 | }, |
1449 | 1454 | ||
@@ -1483,6 +1488,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_dee1601_properties = { | |||
1483 | .num_adapters = 1, | 1488 | .num_adapters = 1, |
1484 | .adapter = { | 1489 | .adapter = { |
1485 | { | 1490 | { |
1491 | .num_frontends = 1, | ||
1492 | .fe = {{ | ||
1486 | .streaming_ctrl = cxusb_streaming_ctrl, | 1493 | .streaming_ctrl = cxusb_streaming_ctrl, |
1487 | .frontend_attach = cxusb_dee1601_frontend_attach, | 1494 | .frontend_attach = cxusb_dee1601_frontend_attach, |
1488 | .tuner_attach = cxusb_dee1601_tuner_attach, | 1495 | .tuner_attach = cxusb_dee1601_tuner_attach, |
@@ -1497,6 +1504,7 @@ static struct dvb_usb_device_properties cxusb_bluebird_dee1601_properties = { | |||
1497 | } | 1504 | } |
1498 | } | 1505 | } |
1499 | }, | 1506 | }, |
1507 | }}, | ||
1500 | }, | 1508 | }, |
1501 | }, | 1509 | }, |
1502 | 1510 | ||
@@ -1544,6 +1552,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties = { | |||
1544 | .num_adapters = 2, | 1552 | .num_adapters = 2, |
1545 | .adapter = { | 1553 | .adapter = { |
1546 | { | 1554 | { |
1555 | .num_frontends = 1, | ||
1556 | .fe = {{ | ||
1547 | .streaming_ctrl = cxusb_streaming_ctrl, | 1557 | .streaming_ctrl = cxusb_streaming_ctrl, |
1548 | .frontend_attach = cxusb_mt352_frontend_attach, | 1558 | .frontend_attach = cxusb_mt352_frontend_attach, |
1549 | .tuner_attach = cxusb_lgz201_tuner_attach, | 1559 | .tuner_attach = cxusb_lgz201_tuner_attach, |
@@ -1559,6 +1569,7 @@ static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties = { | |||
1559 | } | 1569 | } |
1560 | } | 1570 | } |
1561 | }, | 1571 | }, |
1572 | }}, | ||
1562 | }, | 1573 | }, |
1563 | }, | 1574 | }, |
1564 | .power_ctrl = cxusb_bluebird_power_ctrl, | 1575 | .power_ctrl = cxusb_bluebird_power_ctrl, |
@@ -1596,6 +1607,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties = { | |||
1596 | .num_adapters = 1, | 1607 | .num_adapters = 1, |
1597 | .adapter = { | 1608 | .adapter = { |
1598 | { | 1609 | { |
1610 | .num_frontends = 1, | ||
1611 | .fe = {{ | ||
1599 | .streaming_ctrl = cxusb_streaming_ctrl, | 1612 | .streaming_ctrl = cxusb_streaming_ctrl, |
1600 | .frontend_attach = cxusb_mt352_frontend_attach, | 1613 | .frontend_attach = cxusb_mt352_frontend_attach, |
1601 | .tuner_attach = cxusb_dtt7579_tuner_attach, | 1614 | .tuner_attach = cxusb_dtt7579_tuner_attach, |
@@ -1611,6 +1624,7 @@ static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties = { | |||
1611 | } | 1624 | } |
1612 | } | 1625 | } |
1613 | }, | 1626 | }, |
1627 | }}, | ||
1614 | }, | 1628 | }, |
1615 | }, | 1629 | }, |
1616 | .power_ctrl = cxusb_bluebird_power_ctrl, | 1630 | .power_ctrl = cxusb_bluebird_power_ctrl, |
@@ -1645,6 +1659,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties = { | |||
1645 | .num_adapters = 1, | 1659 | .num_adapters = 1, |
1646 | .adapter = { | 1660 | .adapter = { |
1647 | { | 1661 | { |
1662 | .num_frontends = 1, | ||
1663 | .fe = {{ | ||
1648 | .streaming_ctrl = cxusb_streaming_ctrl, | 1664 | .streaming_ctrl = cxusb_streaming_ctrl, |
1649 | .frontend_attach = cxusb_dualdig4_frontend_attach, | 1665 | .frontend_attach = cxusb_dualdig4_frontend_attach, |
1650 | .tuner_attach = cxusb_dvico_xc3028_tuner_attach, | 1666 | .tuner_attach = cxusb_dvico_xc3028_tuner_attach, |
@@ -1659,6 +1675,7 @@ static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties = { | |||
1659 | } | 1675 | } |
1660 | } | 1676 | } |
1661 | }, | 1677 | }, |
1678 | }}, | ||
1662 | }, | 1679 | }, |
1663 | }, | 1680 | }, |
1664 | 1681 | ||
@@ -1695,6 +1712,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_properties = { | |||
1695 | .num_adapters = 1, | 1712 | .num_adapters = 1, |
1696 | .adapter = { | 1713 | .adapter = { |
1697 | { | 1714 | { |
1715 | .num_frontends = 1, | ||
1716 | .fe = {{ | ||
1698 | .streaming_ctrl = cxusb_streaming_ctrl, | 1717 | .streaming_ctrl = cxusb_streaming_ctrl, |
1699 | .frontend_attach = cxusb_nano2_frontend_attach, | 1718 | .frontend_attach = cxusb_nano2_frontend_attach, |
1700 | .tuner_attach = cxusb_dvico_xc3028_tuner_attach, | 1719 | .tuner_attach = cxusb_dvico_xc3028_tuner_attach, |
@@ -1709,6 +1728,7 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_properties = { | |||
1709 | } | 1728 | } |
1710 | } | 1729 | } |
1711 | }, | 1730 | }, |
1731 | }}, | ||
1712 | }, | 1732 | }, |
1713 | }, | 1733 | }, |
1714 | 1734 | ||
@@ -1747,6 +1767,8 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_needsfirmware_prope | |||
1747 | .num_adapters = 1, | 1767 | .num_adapters = 1, |
1748 | .adapter = { | 1768 | .adapter = { |
1749 | { | 1769 | { |
1770 | .num_frontends = 1, | ||
1771 | .fe = {{ | ||
1750 | .streaming_ctrl = cxusb_streaming_ctrl, | 1772 | .streaming_ctrl = cxusb_streaming_ctrl, |
1751 | .frontend_attach = cxusb_nano2_frontend_attach, | 1773 | .frontend_attach = cxusb_nano2_frontend_attach, |
1752 | .tuner_attach = cxusb_dvico_xc3028_tuner_attach, | 1774 | .tuner_attach = cxusb_dvico_xc3028_tuner_attach, |
@@ -1761,6 +1783,7 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_needsfirmware_prope | |||
1761 | } | 1783 | } |
1762 | } | 1784 | } |
1763 | }, | 1785 | }, |
1786 | }}, | ||
1764 | }, | 1787 | }, |
1765 | }, | 1788 | }, |
1766 | 1789 | ||
@@ -1796,6 +1819,8 @@ static struct dvb_usb_device_properties cxusb_aver_a868r_properties = { | |||
1796 | .num_adapters = 1, | 1819 | .num_adapters = 1, |
1797 | .adapter = { | 1820 | .adapter = { |
1798 | { | 1821 | { |
1822 | .num_frontends = 1, | ||
1823 | .fe = {{ | ||
1799 | .streaming_ctrl = cxusb_aver_streaming_ctrl, | 1824 | .streaming_ctrl = cxusb_aver_streaming_ctrl, |
1800 | .frontend_attach = cxusb_aver_lgdt3303_frontend_attach, | 1825 | .frontend_attach = cxusb_aver_lgdt3303_frontend_attach, |
1801 | .tuner_attach = cxusb_mxl5003s_tuner_attach, | 1826 | .tuner_attach = cxusb_mxl5003s_tuner_attach, |
@@ -1810,7 +1835,7 @@ static struct dvb_usb_device_properties cxusb_aver_a868r_properties = { | |||
1810 | } | 1835 | } |
1811 | } | 1836 | } |
1812 | }, | 1837 | }, |
1813 | 1838 | }}, | |
1814 | }, | 1839 | }, |
1815 | }, | 1840 | }, |
1816 | .power_ctrl = cxusb_aver_power_ctrl, | 1841 | .power_ctrl = cxusb_aver_power_ctrl, |
@@ -1839,10 +1864,12 @@ struct dvb_usb_device_properties cxusb_bluebird_dualdig4_rev2_properties = { | |||
1839 | .num_adapters = 1, | 1864 | .num_adapters = 1, |
1840 | .adapter = { | 1865 | .adapter = { |
1841 | { | 1866 | { |
1867 | .size_of_priv = sizeof(struct dib0700_adapter_state), | ||
1868 | .num_frontends = 1, | ||
1869 | .fe = {{ | ||
1842 | .streaming_ctrl = cxusb_streaming_ctrl, | 1870 | .streaming_ctrl = cxusb_streaming_ctrl, |
1843 | .frontend_attach = cxusb_dualdig4_rev2_frontend_attach, | 1871 | .frontend_attach = cxusb_dualdig4_rev2_frontend_attach, |
1844 | .tuner_attach = cxusb_dualdig4_rev2_tuner_attach, | 1872 | .tuner_attach = cxusb_dualdig4_rev2_tuner_attach, |
1845 | .size_of_priv = sizeof(struct dib0700_adapter_state), | ||
1846 | /* parameter for the MPEG2-data transfer */ | 1873 | /* parameter for the MPEG2-data transfer */ |
1847 | .stream = { | 1874 | .stream = { |
1848 | .type = USB_BULK, | 1875 | .type = USB_BULK, |
@@ -1854,6 +1881,7 @@ struct dvb_usb_device_properties cxusb_bluebird_dualdig4_rev2_properties = { | |||
1854 | } | 1881 | } |
1855 | } | 1882 | } |
1856 | }, | 1883 | }, |
1884 | }}, | ||
1857 | }, | 1885 | }, |
1858 | }, | 1886 | }, |
1859 | 1887 | ||
@@ -1889,6 +1917,8 @@ static struct dvb_usb_device_properties cxusb_d680_dmb_properties = { | |||
1889 | .num_adapters = 1, | 1917 | .num_adapters = 1, |
1890 | .adapter = { | 1918 | .adapter = { |
1891 | { | 1919 | { |
1920 | .num_frontends = 1, | ||
1921 | .fe = {{ | ||
1892 | .streaming_ctrl = cxusb_d680_dmb_streaming_ctrl, | 1922 | .streaming_ctrl = cxusb_d680_dmb_streaming_ctrl, |
1893 | .frontend_attach = cxusb_d680_dmb_frontend_attach, | 1923 | .frontend_attach = cxusb_d680_dmb_frontend_attach, |
1894 | .tuner_attach = cxusb_d680_dmb_tuner_attach, | 1924 | .tuner_attach = cxusb_d680_dmb_tuner_attach, |
@@ -1904,6 +1934,7 @@ static struct dvb_usb_device_properties cxusb_d680_dmb_properties = { | |||
1904 | } | 1934 | } |
1905 | } | 1935 | } |
1906 | }, | 1936 | }, |
1937 | }}, | ||
1907 | }, | 1938 | }, |
1908 | }, | 1939 | }, |
1909 | 1940 | ||
@@ -1940,6 +1971,8 @@ static struct dvb_usb_device_properties cxusb_mygica_d689_properties = { | |||
1940 | .num_adapters = 1, | 1971 | .num_adapters = 1, |
1941 | .adapter = { | 1972 | .adapter = { |
1942 | { | 1973 | { |
1974 | .num_frontends = 1, | ||
1975 | .fe = {{ | ||
1943 | .streaming_ctrl = cxusb_d680_dmb_streaming_ctrl, | 1976 | .streaming_ctrl = cxusb_d680_dmb_streaming_ctrl, |
1944 | .frontend_attach = cxusb_mygica_d689_frontend_attach, | 1977 | .frontend_attach = cxusb_mygica_d689_frontend_attach, |
1945 | .tuner_attach = cxusb_mygica_d689_tuner_attach, | 1978 | .tuner_attach = cxusb_mygica_d689_tuner_attach, |
@@ -1955,6 +1988,7 @@ static struct dvb_usb_device_properties cxusb_mygica_d689_properties = { | |||
1955 | } | 1988 | } |
1956 | } | 1989 | } |
1957 | }, | 1990 | }, |
1991 | }}, | ||
1958 | }, | 1992 | }, |
1959 | }, | 1993 | }, |
1960 | 1994 | ||
diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c index b693ed13602d..156cbfc9c79d 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_core.c +++ b/drivers/media/dvb/dvb-usb/dib0700_core.c | |||
@@ -528,13 +528,13 @@ int dib0700_download_firmware(struct usb_device *udev, const struct firmware *fw | |||
528 | for (adap_num = 0; adap_num < dib0700_devices[i].num_adapters; | 528 | for (adap_num = 0; adap_num < dib0700_devices[i].num_adapters; |
529 | adap_num++) { | 529 | adap_num++) { |
530 | if (fw_version >= 0x10201) { | 530 | if (fw_version >= 0x10201) { |
531 | dib0700_devices[i].adapter[adap_num].stream.u.bulk.buffersize = 188*nb_packet_buffer_size; | 531 | dib0700_devices[i].adapter[adap_num].fe[0].stream.u.bulk.buffersize = 188*nb_packet_buffer_size; |
532 | } else { | 532 | } else { |
533 | /* for fw version older than 1.20.1, | 533 | /* for fw version older than 1.20.1, |
534 | * the buffersize has to be n times 512 */ | 534 | * the buffersize has to be n times 512 */ |
535 | dib0700_devices[i].adapter[adap_num].stream.u.bulk.buffersize = ((188*nb_packet_buffer_size+188/2)/512)*512; | 535 | dib0700_devices[i].adapter[adap_num].fe[0].stream.u.bulk.buffersize = ((188*nb_packet_buffer_size+188/2)/512)*512; |
536 | if (dib0700_devices[i].adapter[adap_num].stream.u.bulk.buffersize < 512) | 536 | if (dib0700_devices[i].adapter[adap_num].fe[0].stream.u.bulk.buffersize < 512) |
537 | dib0700_devices[i].adapter[adap_num].stream.u.bulk.buffersize = 512; | 537 | dib0700_devices[i].adapter[adap_num].fe[0].stream.u.bulk.buffersize = 512; |
538 | } | 538 | } |
539 | } | 539 | } |
540 | } | 540 | } |
@@ -579,18 +579,18 @@ int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) | |||
579 | deb_info("modifying (%d) streaming state for %d\n", onoff, adap->id); | 579 | deb_info("modifying (%d) streaming state for %d\n", onoff, adap->id); |
580 | 580 | ||
581 | st->channel_state &= ~0x3; | 581 | st->channel_state &= ~0x3; |
582 | if ((adap->stream.props.endpoint != 2) | 582 | if ((adap->fe_adap[0].stream.props.endpoint != 2) |
583 | && (adap->stream.props.endpoint != 3)) { | 583 | && (adap->fe_adap[0].stream.props.endpoint != 3)) { |
584 | deb_info("the endpoint number (%i) is not correct, use the adapter id instead", adap->stream.props.endpoint); | 584 | deb_info("the endpoint number (%i) is not correct, use the adapter id instead", adap->fe_adap[0].stream.props.endpoint); |
585 | if (onoff) | 585 | if (onoff) |
586 | st->channel_state |= 1 << (adap->id); | 586 | st->channel_state |= 1 << (adap->id); |
587 | else | 587 | else |
588 | st->channel_state |= 1 << ~(adap->id); | 588 | st->channel_state |= 1 << ~(adap->id); |
589 | } else { | 589 | } else { |
590 | if (onoff) | 590 | if (onoff) |
591 | st->channel_state |= 1 << (adap->stream.props.endpoint-2); | 591 | st->channel_state |= 1 << (adap->fe_adap[0].stream.props.endpoint-2); |
592 | else | 592 | else |
593 | st->channel_state |= 1 << (3-adap->stream.props.endpoint); | 593 | st->channel_state |= 1 << (3-adap->fe_adap[0].stream.props.endpoint); |
594 | } | 594 | } |
595 | 595 | ||
596 | st->buf[2] |= st->channel_state; | 596 | st->buf[2] |= st->channel_state; |
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index 754f8ec77e05..3ed6203be437 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c | |||
@@ -101,7 +101,7 @@ static int bristol_frontend_attach(struct dvb_usb_adapter *adap) | |||
101 | } | 101 | } |
102 | } | 102 | } |
103 | st->mt2060_if1[adap->id] = 1220; | 103 | st->mt2060_if1[adap->id] = 1220; |
104 | return (adap->fe[0] = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, | 104 | return (adap->fe_adap[0].fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, |
105 | (10 + adap->id) << 1, &bristol_dib3000mc_config[adap->id])) == NULL ? -ENODEV : 0; | 105 | (10 + adap->id) << 1, &bristol_dib3000mc_config[adap->id])) == NULL ? -ENODEV : 0; |
106 | } | 106 | } |
107 | 107 | ||
@@ -118,14 +118,14 @@ static int eeprom_read(struct i2c_adapter *adap,u8 adrs,u8 *pval) | |||
118 | static int bristol_tuner_attach(struct dvb_usb_adapter *adap) | 118 | static int bristol_tuner_attach(struct dvb_usb_adapter *adap) |
119 | { | 119 | { |
120 | struct i2c_adapter *prim_i2c = &adap->dev->i2c_adap; | 120 | struct i2c_adapter *prim_i2c = &adap->dev->i2c_adap; |
121 | struct i2c_adapter *tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe[0], 1); | 121 | struct i2c_adapter *tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe_adap[0].fe, 1); |
122 | s8 a; | 122 | s8 a; |
123 | int if1=1220; | 123 | int if1=1220; |
124 | if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) && | 124 | if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) && |
125 | adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_500_2)) { | 125 | adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_500_2)) { |
126 | if (!eeprom_read(prim_i2c,0x59 + adap->id,&a)) if1=1220+a; | 126 | if (!eeprom_read(prim_i2c,0x59 + adap->id,&a)) if1=1220+a; |
127 | } | 127 | } |
128 | return dvb_attach(mt2060_attach,adap->fe[0], tun_i2c,&bristol_mt2060_config[adap->id], | 128 | return dvb_attach(mt2060_attach,adap->fe_adap[0].fe, tun_i2c,&bristol_mt2060_config[adap->id], |
129 | if1) == NULL ? -ENODEV : 0; | 129 | if1) == NULL ? -ENODEV : 0; |
130 | } | 130 | } |
131 | 131 | ||
@@ -279,10 +279,10 @@ static int stk7700P2_frontend_attach(struct dvb_usb_adapter *adap) | |||
279 | } | 279 | } |
280 | } | 280 | } |
281 | 281 | ||
282 | adap->fe[0] = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap,0x80+(adap->id << 1), | 282 | adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap,0x80+(adap->id << 1), |
283 | &stk7700d_dib7000p_mt2266_config[adap->id]); | 283 | &stk7700d_dib7000p_mt2266_config[adap->id]); |
284 | 284 | ||
285 | return adap->fe[0] == NULL ? -ENODEV : 0; | 285 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
286 | } | 286 | } |
287 | 287 | ||
288 | static int stk7700d_frontend_attach(struct dvb_usb_adapter *adap) | 288 | static int stk7700d_frontend_attach(struct dvb_usb_adapter *adap) |
@@ -306,17 +306,17 @@ static int stk7700d_frontend_attach(struct dvb_usb_adapter *adap) | |||
306 | } | 306 | } |
307 | } | 307 | } |
308 | 308 | ||
309 | adap->fe[0] = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap,0x80+(adap->id << 1), | 309 | adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap,0x80+(adap->id << 1), |
310 | &stk7700d_dib7000p_mt2266_config[adap->id]); | 310 | &stk7700d_dib7000p_mt2266_config[adap->id]); |
311 | 311 | ||
312 | return adap->fe[0] == NULL ? -ENODEV : 0; | 312 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
313 | } | 313 | } |
314 | 314 | ||
315 | static int stk7700d_tuner_attach(struct dvb_usb_adapter *adap) | 315 | static int stk7700d_tuner_attach(struct dvb_usb_adapter *adap) |
316 | { | 316 | { |
317 | struct i2c_adapter *tun_i2c; | 317 | struct i2c_adapter *tun_i2c; |
318 | tun_i2c = dib7000p_get_i2c_master(adap->fe[0], DIBX000_I2C_INTERFACE_TUNER, 1); | 318 | tun_i2c = dib7000p_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); |
319 | return dvb_attach(mt2266_attach, adap->fe[0], tun_i2c, | 319 | return dvb_attach(mt2266_attach, adap->fe_adap[0].fe, tun_i2c, |
320 | &stk7700d_mt2266_config[adap->id]) == NULL ? -ENODEV : 0; | 320 | &stk7700d_mt2266_config[adap->id]) == NULL ? -ENODEV : 0; |
321 | } | 321 | } |
322 | 322 | ||
@@ -396,8 +396,8 @@ static int stk7700ph_xc3028_callback(void *ptr, int component, | |||
396 | switch (command) { | 396 | switch (command) { |
397 | case XC2028_TUNER_RESET: | 397 | case XC2028_TUNER_RESET: |
398 | /* Send the tuner in then out of reset */ | 398 | /* Send the tuner in then out of reset */ |
399 | dib7000p_set_gpio(adap->fe[0], 8, 0, 0); msleep(10); | 399 | dib7000p_set_gpio(adap->fe_adap[0].fe, 8, 0, 0); msleep(10); |
400 | dib7000p_set_gpio(adap->fe[0], 8, 0, 1); | 400 | dib7000p_set_gpio(adap->fe_adap[0].fe, 8, 0, 1); |
401 | break; | 401 | break; |
402 | case XC2028_RESET_CLK: | 402 | case XC2028_RESET_CLK: |
403 | break; | 403 | break; |
@@ -447,25 +447,25 @@ static int stk7700ph_frontend_attach(struct dvb_usb_adapter *adap) | |||
447 | return -ENODEV; | 447 | return -ENODEV; |
448 | } | 448 | } |
449 | 449 | ||
450 | adap->fe[0] = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, | 450 | adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, |
451 | &stk7700ph_dib7700_xc3028_config); | 451 | &stk7700ph_dib7700_xc3028_config); |
452 | 452 | ||
453 | return adap->fe[0] == NULL ? -ENODEV : 0; | 453 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
454 | } | 454 | } |
455 | 455 | ||
456 | static int stk7700ph_tuner_attach(struct dvb_usb_adapter *adap) | 456 | static int stk7700ph_tuner_attach(struct dvb_usb_adapter *adap) |
457 | { | 457 | { |
458 | struct i2c_adapter *tun_i2c; | 458 | struct i2c_adapter *tun_i2c; |
459 | 459 | ||
460 | tun_i2c = dib7000p_get_i2c_master(adap->fe[0], | 460 | tun_i2c = dib7000p_get_i2c_master(adap->fe_adap[0].fe, |
461 | DIBX000_I2C_INTERFACE_TUNER, 1); | 461 | DIBX000_I2C_INTERFACE_TUNER, 1); |
462 | 462 | ||
463 | stk7700ph_xc3028_config.i2c_adap = tun_i2c; | 463 | stk7700ph_xc3028_config.i2c_adap = tun_i2c; |
464 | 464 | ||
465 | /* FIXME: generalize & move to common area */ | 465 | /* FIXME: generalize & move to common area */ |
466 | adap->fe[0]->callback = stk7700ph_xc3028_callback; | 466 | adap->fe_adap[0].fe->callback = stk7700ph_xc3028_callback; |
467 | 467 | ||
468 | return dvb_attach(xc2028_attach, adap->fe[0], &stk7700ph_xc3028_config) | 468 | return dvb_attach(xc2028_attach, adap->fe_adap[0].fe, &stk7700ph_xc3028_config) |
469 | == NULL ? -ENODEV : 0; | 469 | == NULL ? -ENODEV : 0; |
470 | } | 470 | } |
471 | 471 | ||
@@ -685,12 +685,12 @@ static int stk7700p_frontend_attach(struct dvb_usb_adapter *adap) | |||
685 | st->mt2060_if1[0] = 1220; | 685 | st->mt2060_if1[0] = 1220; |
686 | 686 | ||
687 | if (dib7000pc_detection(&adap->dev->i2c_adap)) { | 687 | if (dib7000pc_detection(&adap->dev->i2c_adap)) { |
688 | adap->fe[0] = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 18, &stk7700p_dib7000p_config); | 688 | adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 18, &stk7700p_dib7000p_config); |
689 | st->is_dib7000pc = 1; | 689 | st->is_dib7000pc = 1; |
690 | } else | 690 | } else |
691 | adap->fe[0] = dvb_attach(dib7000m_attach, &adap->dev->i2c_adap, 18, &stk7700p_dib7000m_config); | 691 | adap->fe_adap[0].fe = dvb_attach(dib7000m_attach, &adap->dev->i2c_adap, 18, &stk7700p_dib7000m_config); |
692 | 692 | ||
693 | return adap->fe[0] == NULL ? -ENODEV : 0; | 693 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
694 | } | 694 | } |
695 | 695 | ||
696 | static struct mt2060_config stk7700p_mt2060_config = { | 696 | static struct mt2060_config stk7700p_mt2060_config = { |
@@ -709,11 +709,11 @@ static int stk7700p_tuner_attach(struct dvb_usb_adapter *adap) | |||
709 | if (!eeprom_read(prim_i2c,0x58,&a)) if1=1220+a; | 709 | if (!eeprom_read(prim_i2c,0x58,&a)) if1=1220+a; |
710 | } | 710 | } |
711 | if (st->is_dib7000pc) | 711 | if (st->is_dib7000pc) |
712 | tun_i2c = dib7000p_get_i2c_master(adap->fe[0], DIBX000_I2C_INTERFACE_TUNER, 1); | 712 | tun_i2c = dib7000p_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); |
713 | else | 713 | else |
714 | tun_i2c = dib7000m_get_i2c_master(adap->fe[0], DIBX000_I2C_INTERFACE_TUNER, 1); | 714 | tun_i2c = dib7000m_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); |
715 | 715 | ||
716 | return dvb_attach(mt2060_attach, adap->fe[0], tun_i2c, &stk7700p_mt2060_config, | 716 | return dvb_attach(mt2060_attach, adap->fe_adap[0].fe, tun_i2c, &stk7700p_mt2060_config, |
717 | if1) == NULL ? -ENODEV : 0; | 717 | if1) == NULL ? -ENODEV : 0; |
718 | } | 718 | } |
719 | 719 | ||
@@ -843,33 +843,33 @@ static int dib7770_set_param_override(struct dvb_frontend *fe, | |||
843 | static int dib7770p_tuner_attach(struct dvb_usb_adapter *adap) | 843 | static int dib7770p_tuner_attach(struct dvb_usb_adapter *adap) |
844 | { | 844 | { |
845 | struct dib0700_adapter_state *st = adap->priv; | 845 | struct dib0700_adapter_state *st = adap->priv; |
846 | struct i2c_adapter *tun_i2c = dib7000p_get_i2c_master(adap->fe[0], | 846 | struct i2c_adapter *tun_i2c = dib7000p_get_i2c_master(adap->fe_adap[0].fe, |
847 | DIBX000_I2C_INTERFACE_TUNER, 1); | 847 | DIBX000_I2C_INTERFACE_TUNER, 1); |
848 | 848 | ||
849 | if (dvb_attach(dib0070_attach, adap->fe[0], tun_i2c, | 849 | if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, |
850 | &dib7770p_dib0070_config) == NULL) | 850 | &dib7770p_dib0070_config) == NULL) |
851 | return -ENODEV; | 851 | return -ENODEV; |
852 | 852 | ||
853 | st->set_param_save = adap->fe[0]->ops.tuner_ops.set_params; | 853 | st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; |
854 | adap->fe[0]->ops.tuner_ops.set_params = dib7770_set_param_override; | 854 | adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7770_set_param_override; |
855 | return 0; | 855 | return 0; |
856 | } | 856 | } |
857 | 857 | ||
858 | static int dib7070p_tuner_attach(struct dvb_usb_adapter *adap) | 858 | static int dib7070p_tuner_attach(struct dvb_usb_adapter *adap) |
859 | { | 859 | { |
860 | struct dib0700_adapter_state *st = adap->priv; | 860 | struct dib0700_adapter_state *st = adap->priv; |
861 | struct i2c_adapter *tun_i2c = dib7000p_get_i2c_master(adap->fe[0], DIBX000_I2C_INTERFACE_TUNER, 1); | 861 | struct i2c_adapter *tun_i2c = dib7000p_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); |
862 | 862 | ||
863 | if (adap->id == 0) { | 863 | if (adap->id == 0) { |
864 | if (dvb_attach(dib0070_attach, adap->fe[0], tun_i2c, &dib7070p_dib0070_config[0]) == NULL) | 864 | if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, &dib7070p_dib0070_config[0]) == NULL) |
865 | return -ENODEV; | 865 | return -ENODEV; |
866 | } else { | 866 | } else { |
867 | if (dvb_attach(dib0070_attach, adap->fe[0], tun_i2c, &dib7070p_dib0070_config[1]) == NULL) | 867 | if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, &dib7070p_dib0070_config[1]) == NULL) |
868 | return -ENODEV; | 868 | return -ENODEV; |
869 | } | 869 | } |
870 | 870 | ||
871 | st->set_param_save = adap->fe[0]->ops.tuner_ops.set_params; | 871 | st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; |
872 | adap->fe[0]->ops.tuner_ops.set_params = dib7070_set_param_override; | 872 | adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7070_set_param_override; |
873 | return 0; | 873 | return 0; |
874 | } | 874 | } |
875 | 875 | ||
@@ -878,26 +878,26 @@ static int stk7700p_pid_filter(struct dvb_usb_adapter *adapter, int index, | |||
878 | { | 878 | { |
879 | struct dib0700_state *st = adapter->dev->priv; | 879 | struct dib0700_state *st = adapter->dev->priv; |
880 | if (st->is_dib7000pc) | 880 | if (st->is_dib7000pc) |
881 | return dib7000p_pid_filter(adapter->fe[0], index, pid, onoff); | 881 | return dib7000p_pid_filter(adapter->fe_adap[0].fe, index, pid, onoff); |
882 | return dib7000m_pid_filter(adapter->fe[0], index, pid, onoff); | 882 | return dib7000m_pid_filter(adapter->fe_adap[0].fe, index, pid, onoff); |
883 | } | 883 | } |
884 | 884 | ||
885 | static int stk7700p_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff) | 885 | static int stk7700p_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff) |
886 | { | 886 | { |
887 | struct dib0700_state *st = adapter->dev->priv; | 887 | struct dib0700_state *st = adapter->dev->priv; |
888 | if (st->is_dib7000pc) | 888 | if (st->is_dib7000pc) |
889 | return dib7000p_pid_filter_ctrl(adapter->fe[0], onoff); | 889 | return dib7000p_pid_filter_ctrl(adapter->fe_adap[0].fe, onoff); |
890 | return dib7000m_pid_filter_ctrl(adapter->fe[0], onoff); | 890 | return dib7000m_pid_filter_ctrl(adapter->fe_adap[0].fe, onoff); |
891 | } | 891 | } |
892 | 892 | ||
893 | static int stk70x0p_pid_filter(struct dvb_usb_adapter *adapter, int index, u16 pid, int onoff) | 893 | static int stk70x0p_pid_filter(struct dvb_usb_adapter *adapter, int index, u16 pid, int onoff) |
894 | { | 894 | { |
895 | return dib7000p_pid_filter(adapter->fe[0], index, pid, onoff); | 895 | return dib7000p_pid_filter(adapter->fe_adap[0].fe, index, pid, onoff); |
896 | } | 896 | } |
897 | 897 | ||
898 | static int stk70x0p_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff) | 898 | static int stk70x0p_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff) |
899 | { | 899 | { |
900 | return dib7000p_pid_filter_ctrl(adapter->fe[0], onoff); | 900 | return dib7000p_pid_filter_ctrl(adapter->fe_adap[0].fe, onoff); |
901 | } | 901 | } |
902 | 902 | ||
903 | static struct dibx000_bandwidth_config dib7070_bw_config_12_mhz = { | 903 | static struct dibx000_bandwidth_config dib7070_bw_config_12_mhz = { |
@@ -955,9 +955,9 @@ static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap) | |||
955 | return -ENODEV; | 955 | return -ENODEV; |
956 | } | 956 | } |
957 | 957 | ||
958 | adap->fe[0] = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, | 958 | adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, |
959 | &dib7070p_dib7000p_config); | 959 | &dib7070p_dib7000p_config); |
960 | return adap->fe[0] == NULL ? -ENODEV : 0; | 960 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
961 | } | 961 | } |
962 | 962 | ||
963 | /* STK7770P */ | 963 | /* STK7770P */ |
@@ -1007,9 +1007,9 @@ static int stk7770p_frontend_attach(struct dvb_usb_adapter *adap) | |||
1007 | return -ENODEV; | 1007 | return -ENODEV; |
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | adap->fe[0] = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, | 1010 | adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, |
1011 | &dib7770p_dib7000p_config); | 1011 | &dib7770p_dib7000p_config); |
1012 | return adap->fe[0] == NULL ? -ENODEV : 0; | 1012 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
1013 | } | 1013 | } |
1014 | 1014 | ||
1015 | /* DIB807x generic */ | 1015 | /* DIB807x generic */ |
@@ -1225,34 +1225,34 @@ static int dib807x_set_param_override(struct dvb_frontend *fe, | |||
1225 | static int dib807x_tuner_attach(struct dvb_usb_adapter *adap) | 1225 | static int dib807x_tuner_attach(struct dvb_usb_adapter *adap) |
1226 | { | 1226 | { |
1227 | struct dib0700_adapter_state *st = adap->priv; | 1227 | struct dib0700_adapter_state *st = adap->priv; |
1228 | struct i2c_adapter *tun_i2c = dib8000_get_i2c_master(adap->fe[0], | 1228 | struct i2c_adapter *tun_i2c = dib8000_get_i2c_master(adap->fe_adap[0].fe, |
1229 | DIBX000_I2C_INTERFACE_TUNER, 1); | 1229 | DIBX000_I2C_INTERFACE_TUNER, 1); |
1230 | 1230 | ||
1231 | if (adap->id == 0) { | 1231 | if (adap->id == 0) { |
1232 | if (dvb_attach(dib0070_attach, adap->fe[0], tun_i2c, | 1232 | if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, |
1233 | &dib807x_dib0070_config[0]) == NULL) | 1233 | &dib807x_dib0070_config[0]) == NULL) |
1234 | return -ENODEV; | 1234 | return -ENODEV; |
1235 | } else { | 1235 | } else { |
1236 | if (dvb_attach(dib0070_attach, adap->fe[0], tun_i2c, | 1236 | if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, |
1237 | &dib807x_dib0070_config[1]) == NULL) | 1237 | &dib807x_dib0070_config[1]) == NULL) |
1238 | return -ENODEV; | 1238 | return -ENODEV; |
1239 | } | 1239 | } |
1240 | 1240 | ||
1241 | st->set_param_save = adap->fe[0]->ops.tuner_ops.set_params; | 1241 | st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; |
1242 | adap->fe[0]->ops.tuner_ops.set_params = dib807x_set_param_override; | 1242 | adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib807x_set_param_override; |
1243 | return 0; | 1243 | return 0; |
1244 | } | 1244 | } |
1245 | 1245 | ||
1246 | static int stk80xx_pid_filter(struct dvb_usb_adapter *adapter, int index, | 1246 | static int stk80xx_pid_filter(struct dvb_usb_adapter *adapter, int index, |
1247 | u16 pid, int onoff) | 1247 | u16 pid, int onoff) |
1248 | { | 1248 | { |
1249 | return dib8000_pid_filter(adapter->fe[0], index, pid, onoff); | 1249 | return dib8000_pid_filter(adapter->fe_adap[0].fe, index, pid, onoff); |
1250 | } | 1250 | } |
1251 | 1251 | ||
1252 | static int stk80xx_pid_filter_ctrl(struct dvb_usb_adapter *adapter, | 1252 | static int stk80xx_pid_filter_ctrl(struct dvb_usb_adapter *adapter, |
1253 | int onoff) | 1253 | int onoff) |
1254 | { | 1254 | { |
1255 | return dib8000_pid_filter_ctrl(adapter->fe[0], onoff); | 1255 | return dib8000_pid_filter_ctrl(adapter->fe_adap[0].fe, onoff); |
1256 | } | 1256 | } |
1257 | 1257 | ||
1258 | /* STK807x */ | 1258 | /* STK807x */ |
@@ -1276,10 +1276,10 @@ static int stk807x_frontend_attach(struct dvb_usb_adapter *adap) | |||
1276 | dib8000_i2c_enumeration(&adap->dev->i2c_adap, 1, 18, | 1276 | dib8000_i2c_enumeration(&adap->dev->i2c_adap, 1, 18, |
1277 | 0x80); | 1277 | 0x80); |
1278 | 1278 | ||
1279 | adap->fe[0] = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x80, | 1279 | adap->fe_adap[0].fe = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x80, |
1280 | &dib807x_dib8000_config[0]); | 1280 | &dib807x_dib8000_config[0]); |
1281 | 1281 | ||
1282 | return adap->fe[0] == NULL ? -ENODEV : 0; | 1282 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
1283 | } | 1283 | } |
1284 | 1284 | ||
1285 | /* STK807xPVR */ | 1285 | /* STK807xPVR */ |
@@ -1305,10 +1305,10 @@ static int stk807xpvr_frontend_attach0(struct dvb_usb_adapter *adap) | |||
1305 | /* initialize IC 0 */ | 1305 | /* initialize IC 0 */ |
1306 | dib8000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x22, 0x80); | 1306 | dib8000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x22, 0x80); |
1307 | 1307 | ||
1308 | adap->fe[0] = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x80, | 1308 | adap->fe_adap[0].fe = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x80, |
1309 | &dib807x_dib8000_config[0]); | 1309 | &dib807x_dib8000_config[0]); |
1310 | 1310 | ||
1311 | return adap->fe[0] == NULL ? -ENODEV : 0; | 1311 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
1312 | } | 1312 | } |
1313 | 1313 | ||
1314 | static int stk807xpvr_frontend_attach1(struct dvb_usb_adapter *adap) | 1314 | static int stk807xpvr_frontend_attach1(struct dvb_usb_adapter *adap) |
@@ -1316,10 +1316,10 @@ static int stk807xpvr_frontend_attach1(struct dvb_usb_adapter *adap) | |||
1316 | /* initialize IC 1 */ | 1316 | /* initialize IC 1 */ |
1317 | dib8000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x12, 0x82); | 1317 | dib8000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x12, 0x82); |
1318 | 1318 | ||
1319 | adap->fe[0] = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x82, | 1319 | adap->fe_adap[0].fe = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x82, |
1320 | &dib807x_dib8000_config[1]); | 1320 | &dib807x_dib8000_config[1]); |
1321 | 1321 | ||
1322 | return adap->fe[0] == NULL ? -ENODEV : 0; | 1322 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
1323 | } | 1323 | } |
1324 | 1324 | ||
1325 | /* STK8096GP */ | 1325 | /* STK8096GP */ |
@@ -1546,13 +1546,13 @@ static int dib8096_set_param_override(struct dvb_frontend *fe, | |||
1546 | static int dib809x_tuner_attach(struct dvb_usb_adapter *adap) | 1546 | static int dib809x_tuner_attach(struct dvb_usb_adapter *adap) |
1547 | { | 1547 | { |
1548 | struct dib0700_adapter_state *st = adap->priv; | 1548 | struct dib0700_adapter_state *st = adap->priv; |
1549 | struct i2c_adapter *tun_i2c = dib8000_get_i2c_master(adap->fe[0], DIBX000_I2C_INTERFACE_TUNER, 1); | 1549 | struct i2c_adapter *tun_i2c = dib8000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); |
1550 | 1550 | ||
1551 | if (dvb_attach(dib0090_register, adap->fe[0], tun_i2c, &dib809x_dib0090_config) == NULL) | 1551 | if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &dib809x_dib0090_config) == NULL) |
1552 | return -ENODEV; | 1552 | return -ENODEV; |
1553 | 1553 | ||
1554 | st->set_param_save = adap->fe[0]->ops.tuner_ops.set_params; | 1554 | st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; |
1555 | adap->fe[0]->ops.tuner_ops.set_params = dib8096_set_param_override; | 1555 | adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib8096_set_param_override; |
1556 | return 0; | 1556 | return 0; |
1557 | } | 1557 | } |
1558 | 1558 | ||
@@ -1575,30 +1575,30 @@ static int stk809x_frontend_attach(struct dvb_usb_adapter *adap) | |||
1575 | 1575 | ||
1576 | dib8000_i2c_enumeration(&adap->dev->i2c_adap, 1, 18, 0x80); | 1576 | dib8000_i2c_enumeration(&adap->dev->i2c_adap, 1, 18, 0x80); |
1577 | 1577 | ||
1578 | adap->fe[0] = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x80, &dib809x_dib8000_config[0]); | 1578 | adap->fe_adap[0].fe = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x80, &dib809x_dib8000_config[0]); |
1579 | 1579 | ||
1580 | return adap->fe[0] == NULL ? -ENODEV : 0; | 1580 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
1581 | } | 1581 | } |
1582 | 1582 | ||
1583 | static int nim8096md_tuner_attach(struct dvb_usb_adapter *adap) | 1583 | static int nim8096md_tuner_attach(struct dvb_usb_adapter *adap) |
1584 | { | 1584 | { |
1585 | struct dib0700_adapter_state *st = adap->priv; | 1585 | struct dib0700_adapter_state *st = adap->priv; |
1586 | struct i2c_adapter *tun_i2c; | 1586 | struct i2c_adapter *tun_i2c; |
1587 | struct dvb_frontend *fe_slave = dib8000_get_slave_frontend(adap->fe[0], 1); | 1587 | struct dvb_frontend *fe_slave = dib8000_get_slave_frontend(adap->fe_adap[0].fe, 1); |
1588 | 1588 | ||
1589 | if (fe_slave) { | 1589 | if (fe_slave) { |
1590 | tun_i2c = dib8000_get_i2c_master(fe_slave, DIBX000_I2C_INTERFACE_TUNER, 1); | 1590 | tun_i2c = dib8000_get_i2c_master(fe_slave, DIBX000_I2C_INTERFACE_TUNER, 1); |
1591 | if (dvb_attach(dib0090_register, fe_slave, tun_i2c, &dib809x_dib0090_config) == NULL) | 1591 | if (dvb_attach(dib0090_register, fe_slave, tun_i2c, &dib809x_dib0090_config) == NULL) |
1592 | return -ENODEV; | 1592 | return -ENODEV; |
1593 | fe_slave->dvb = adap->fe[0]->dvb; | 1593 | fe_slave->dvb = adap->fe_adap[0].fe->dvb; |
1594 | fe_slave->ops.tuner_ops.set_params = dib8096_set_param_override; | 1594 | fe_slave->ops.tuner_ops.set_params = dib8096_set_param_override; |
1595 | } | 1595 | } |
1596 | tun_i2c = dib8000_get_i2c_master(adap->fe[0], DIBX000_I2C_INTERFACE_TUNER, 1); | 1596 | tun_i2c = dib8000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_TUNER, 1); |
1597 | if (dvb_attach(dib0090_register, adap->fe[0], tun_i2c, &dib809x_dib0090_config) == NULL) | 1597 | if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &dib809x_dib0090_config) == NULL) |
1598 | return -ENODEV; | 1598 | return -ENODEV; |
1599 | 1599 | ||
1600 | st->set_param_save = adap->fe[0]->ops.tuner_ops.set_params; | 1600 | st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; |
1601 | adap->fe[0]->ops.tuner_ops.set_params = dib8096_set_param_override; | 1601 | adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib8096_set_param_override; |
1602 | 1602 | ||
1603 | return 0; | 1603 | return 0; |
1604 | } | 1604 | } |
@@ -1626,12 +1626,12 @@ static int nim8096md_frontend_attach(struct dvb_usb_adapter *adap) | |||
1626 | 1626 | ||
1627 | dib8000_i2c_enumeration(&adap->dev->i2c_adap, 2, 18, 0x80); | 1627 | dib8000_i2c_enumeration(&adap->dev->i2c_adap, 2, 18, 0x80); |
1628 | 1628 | ||
1629 | adap->fe[0] = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x80, &dib809x_dib8000_config[0]); | 1629 | adap->fe_adap[0].fe = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x80, &dib809x_dib8000_config[0]); |
1630 | if (adap->fe[0] == NULL) | 1630 | if (adap->fe_adap[0].fe == NULL) |
1631 | return -ENODEV; | 1631 | return -ENODEV; |
1632 | 1632 | ||
1633 | fe_slave = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x82, &dib809x_dib8000_config[1]); | 1633 | fe_slave = dvb_attach(dib8000_attach, &adap->dev->i2c_adap, 0x82, &dib809x_dib8000_config[1]); |
1634 | dib8000_set_slave_frontend(adap->fe[0], fe_slave); | 1634 | dib8000_set_slave_frontend(adap->fe_adap[0].fe, fe_slave); |
1635 | 1635 | ||
1636 | return fe_slave == NULL ? -ENODEV : 0; | 1636 | return fe_slave == NULL ? -ENODEV : 0; |
1637 | } | 1637 | } |
@@ -1639,12 +1639,12 @@ static int nim8096md_frontend_attach(struct dvb_usb_adapter *adap) | |||
1639 | /* STK9090M */ | 1639 | /* STK9090M */ |
1640 | static int dib90x0_pid_filter(struct dvb_usb_adapter *adapter, int index, u16 pid, int onoff) | 1640 | static int dib90x0_pid_filter(struct dvb_usb_adapter *adapter, int index, u16 pid, int onoff) |
1641 | { | 1641 | { |
1642 | return dib9000_fw_pid_filter(adapter->fe[0], index, pid, onoff); | 1642 | return dib9000_fw_pid_filter(adapter->fe_adap[0].fe, index, pid, onoff); |
1643 | } | 1643 | } |
1644 | 1644 | ||
1645 | static int dib90x0_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff) | 1645 | static int dib90x0_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff) |
1646 | { | 1646 | { |
1647 | return dib9000_fw_pid_filter_ctrl(adapter->fe[0], onoff); | 1647 | return dib9000_fw_pid_filter_ctrl(adapter->fe_adap[0].fe, onoff); |
1648 | } | 1648 | } |
1649 | 1649 | ||
1650 | static int dib90x0_tuner_reset(struct dvb_frontend *fe, int onoff) | 1650 | static int dib90x0_tuner_reset(struct dvb_frontend *fe, int onoff) |
@@ -1856,15 +1856,15 @@ static int stk9090m_frontend_attach(struct dvb_usb_adapter *adap) | |||
1856 | stk9090m_config.microcode_B_fe_size = state->frontend_firmware->size; | 1856 | stk9090m_config.microcode_B_fe_size = state->frontend_firmware->size; |
1857 | stk9090m_config.microcode_B_fe_buffer = state->frontend_firmware->data; | 1857 | stk9090m_config.microcode_B_fe_buffer = state->frontend_firmware->data; |
1858 | 1858 | ||
1859 | adap->fe[0] = dvb_attach(dib9000_attach, &adap->dev->i2c_adap, 0x80, &stk9090m_config); | 1859 | adap->fe_adap[0].fe = dvb_attach(dib9000_attach, &adap->dev->i2c_adap, 0x80, &stk9090m_config); |
1860 | 1860 | ||
1861 | return adap->fe[0] == NULL ? -ENODEV : 0; | 1861 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
1862 | } | 1862 | } |
1863 | 1863 | ||
1864 | static int dib9090_tuner_attach(struct dvb_usb_adapter *adap) | 1864 | static int dib9090_tuner_attach(struct dvb_usb_adapter *adap) |
1865 | { | 1865 | { |
1866 | struct dib0700_adapter_state *state = adap->priv; | 1866 | struct dib0700_adapter_state *state = adap->priv; |
1867 | struct i2c_adapter *i2c = dib9000_get_tuner_interface(adap->fe[0]); | 1867 | struct i2c_adapter *i2c = dib9000_get_tuner_interface(adap->fe_adap[0].fe); |
1868 | u16 data_dib190[10] = { | 1868 | u16 data_dib190[10] = { |
1869 | 1, 0x1374, | 1869 | 1, 0x1374, |
1870 | 2, 0x01a2, | 1870 | 2, 0x01a2, |
@@ -1873,13 +1873,13 @@ static int dib9090_tuner_attach(struct dvb_usb_adapter *adap) | |||
1873 | 8, 0x0486, | 1873 | 8, 0x0486, |
1874 | }; | 1874 | }; |
1875 | 1875 | ||
1876 | if (dvb_attach(dib0090_fw_register, adap->fe[0], i2c, &dib9090_dib0090_config) == NULL) | 1876 | if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &dib9090_dib0090_config) == NULL) |
1877 | return -ENODEV; | 1877 | return -ENODEV; |
1878 | i2c = dib9000_get_i2c_master(adap->fe[0], DIBX000_I2C_INTERFACE_GPIO_1_2, 0); | 1878 | i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0); |
1879 | if (dib01x0_pmu_update(i2c, data_dib190, 10) != 0) | 1879 | if (dib01x0_pmu_update(i2c, data_dib190, 10) != 0) |
1880 | return -ENODEV; | 1880 | return -ENODEV; |
1881 | dib0700_set_i2c_speed(adap->dev, 2000); | 1881 | dib0700_set_i2c_speed(adap->dev, 2000); |
1882 | if (dib9000_firmware_post_pll_init(adap->fe[0]) < 0) | 1882 | if (dib9000_firmware_post_pll_init(adap->fe_adap[0].fe) < 0) |
1883 | return -ENODEV; | 1883 | return -ENODEV; |
1884 | release_firmware(state->frontend_firmware); | 1884 | release_firmware(state->frontend_firmware); |
1885 | return 0; | 1885 | return 0; |
@@ -1925,16 +1925,16 @@ static int nim9090md_frontend_attach(struct dvb_usb_adapter *adap) | |||
1925 | nim9090md_config[1].microcode_B_fe_buffer = state->frontend_firmware->data; | 1925 | nim9090md_config[1].microcode_B_fe_buffer = state->frontend_firmware->data; |
1926 | 1926 | ||
1927 | dib9000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, 0x80); | 1927 | dib9000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, 0x80); |
1928 | adap->fe[0] = dvb_attach(dib9000_attach, &adap->dev->i2c_adap, 0x80, &nim9090md_config[0]); | 1928 | adap->fe_adap[0].fe = dvb_attach(dib9000_attach, &adap->dev->i2c_adap, 0x80, &nim9090md_config[0]); |
1929 | 1929 | ||
1930 | if (adap->fe[0] == NULL) | 1930 | if (adap->fe_adap[0].fe == NULL) |
1931 | return -ENODEV; | 1931 | return -ENODEV; |
1932 | 1932 | ||
1933 | i2c = dib9000_get_i2c_master(adap->fe[0], DIBX000_I2C_INTERFACE_GPIO_3_4, 0); | 1933 | i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_3_4, 0); |
1934 | dib9000_i2c_enumeration(i2c, 1, 0x12, 0x82); | 1934 | dib9000_i2c_enumeration(i2c, 1, 0x12, 0x82); |
1935 | 1935 | ||
1936 | fe_slave = dvb_attach(dib9000_attach, i2c, 0x82, &nim9090md_config[1]); | 1936 | fe_slave = dvb_attach(dib9000_attach, i2c, 0x82, &nim9090md_config[1]); |
1937 | dib9000_set_slave_frontend(adap->fe[0], fe_slave); | 1937 | dib9000_set_slave_frontend(adap->fe_adap[0].fe, fe_slave); |
1938 | 1938 | ||
1939 | return fe_slave == NULL ? -ENODEV : 0; | 1939 | return fe_slave == NULL ? -ENODEV : 0; |
1940 | } | 1940 | } |
@@ -1951,26 +1951,26 @@ static int nim9090md_tuner_attach(struct dvb_usb_adapter *adap) | |||
1951 | 0, 0x00ef, | 1951 | 0, 0x00ef, |
1952 | 8, 0x0406, | 1952 | 8, 0x0406, |
1953 | }; | 1953 | }; |
1954 | i2c = dib9000_get_tuner_interface(adap->fe[0]); | 1954 | i2c = dib9000_get_tuner_interface(adap->fe_adap[0].fe); |
1955 | if (dvb_attach(dib0090_fw_register, adap->fe[0], i2c, &nim9090md_dib0090_config[0]) == NULL) | 1955 | if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &nim9090md_dib0090_config[0]) == NULL) |
1956 | return -ENODEV; | 1956 | return -ENODEV; |
1957 | i2c = dib9000_get_i2c_master(adap->fe[0], DIBX000_I2C_INTERFACE_GPIO_1_2, 0); | 1957 | i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0); |
1958 | if (dib01x0_pmu_update(i2c, data_dib190, 10) < 0) | 1958 | if (dib01x0_pmu_update(i2c, data_dib190, 10) < 0) |
1959 | return -ENODEV; | 1959 | return -ENODEV; |
1960 | dib0700_set_i2c_speed(adap->dev, 2000); | 1960 | dib0700_set_i2c_speed(adap->dev, 2000); |
1961 | if (dib9000_firmware_post_pll_init(adap->fe[0]) < 0) | 1961 | if (dib9000_firmware_post_pll_init(adap->fe_adap[0].fe) < 0) |
1962 | return -ENODEV; | 1962 | return -ENODEV; |
1963 | 1963 | ||
1964 | fe_slave = dib9000_get_slave_frontend(adap->fe[0], 1); | 1964 | fe_slave = dib9000_get_slave_frontend(adap->fe_adap[0].fe, 1); |
1965 | if (fe_slave != NULL) { | 1965 | if (fe_slave != NULL) { |
1966 | i2c = dib9000_get_component_bus_interface(adap->fe[0]); | 1966 | i2c = dib9000_get_component_bus_interface(adap->fe_adap[0].fe); |
1967 | dib9000_set_i2c_adapter(fe_slave, i2c); | 1967 | dib9000_set_i2c_adapter(fe_slave, i2c); |
1968 | 1968 | ||
1969 | i2c = dib9000_get_tuner_interface(fe_slave); | 1969 | i2c = dib9000_get_tuner_interface(fe_slave); |
1970 | if (dvb_attach(dib0090_fw_register, fe_slave, i2c, &nim9090md_dib0090_config[1]) == NULL) | 1970 | if (dvb_attach(dib0090_fw_register, fe_slave, i2c, &nim9090md_dib0090_config[1]) == NULL) |
1971 | return -ENODEV; | 1971 | return -ENODEV; |
1972 | fe_slave->dvb = adap->fe[0]->dvb; | 1972 | fe_slave->dvb = adap->fe_adap[0].fe->dvb; |
1973 | dib9000_fw_set_component_bus_speed(adap->fe[0], 2000); | 1973 | dib9000_fw_set_component_bus_speed(adap->fe_adap[0].fe, 2000); |
1974 | if (dib9000_firmware_post_pll_init(fe_slave) < 0) | 1974 | if (dib9000_firmware_post_pll_init(fe_slave) < 0) |
1975 | return -ENODEV; | 1975 | return -ENODEV; |
1976 | } | 1976 | } |
@@ -2393,23 +2393,23 @@ static int nim7090_frontend_attach(struct dvb_usb_adapter *adap) | |||
2393 | err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n", __func__); | 2393 | err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n", __func__); |
2394 | return -ENODEV; | 2394 | return -ENODEV; |
2395 | } | 2395 | } |
2396 | adap->fe[0] = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, &nim7090_dib7000p_config); | 2396 | adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, &nim7090_dib7000p_config); |
2397 | 2397 | ||
2398 | return adap->fe[0] == NULL ? -ENODEV : 0; | 2398 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
2399 | } | 2399 | } |
2400 | 2400 | ||
2401 | static int nim7090_tuner_attach(struct dvb_usb_adapter *adap) | 2401 | static int nim7090_tuner_attach(struct dvb_usb_adapter *adap) |
2402 | { | 2402 | { |
2403 | struct dib0700_adapter_state *st = adap->priv; | 2403 | struct dib0700_adapter_state *st = adap->priv; |
2404 | struct i2c_adapter *tun_i2c = dib7090_get_i2c_tuner(adap->fe[0]); | 2404 | struct i2c_adapter *tun_i2c = dib7090_get_i2c_tuner(adap->fe_adap[0].fe); |
2405 | 2405 | ||
2406 | if (dvb_attach(dib0090_register, adap->fe[0], tun_i2c, &nim7090_dib0090_config) == NULL) | 2406 | if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &nim7090_dib0090_config) == NULL) |
2407 | return -ENODEV; | 2407 | return -ENODEV; |
2408 | 2408 | ||
2409 | dib7000p_set_gpio(adap->fe[0], 8, 0, 1); | 2409 | dib7000p_set_gpio(adap->fe_adap[0].fe, 8, 0, 1); |
2410 | 2410 | ||
2411 | st->set_param_save = adap->fe[0]->ops.tuner_ops.set_params; | 2411 | st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; |
2412 | adap->fe[0]->ops.tuner_ops.set_params = dib7090_agc_startup; | 2412 | adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; |
2413 | return 0; | 2413 | return 0; |
2414 | } | 2414 | } |
2415 | 2415 | ||
@@ -2439,11 +2439,11 @@ static int tfe7090pvr_frontend0_attach(struct dvb_usb_adapter *adap) | |||
2439 | } | 2439 | } |
2440 | 2440 | ||
2441 | dib0700_set_i2c_speed(adap->dev, 340); | 2441 | dib0700_set_i2c_speed(adap->dev, 340); |
2442 | adap->fe[0] = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x90, &tfe7090pvr_dib7000p_config[0]); | 2442 | adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x90, &tfe7090pvr_dib7000p_config[0]); |
2443 | if (adap->fe[0] == NULL) | 2443 | if (adap->fe_adap[0].fe == NULL) |
2444 | return -ENODEV; | 2444 | return -ENODEV; |
2445 | 2445 | ||
2446 | dib7090_slave_reset(adap->fe[0]); | 2446 | dib7090_slave_reset(adap->fe_adap[0].fe); |
2447 | 2447 | ||
2448 | return 0; | 2448 | return 0; |
2449 | } | 2449 | } |
@@ -2452,50 +2452,50 @@ static int tfe7090pvr_frontend1_attach(struct dvb_usb_adapter *adap) | |||
2452 | { | 2452 | { |
2453 | struct i2c_adapter *i2c; | 2453 | struct i2c_adapter *i2c; |
2454 | 2454 | ||
2455 | if (adap->dev->adapter[0].fe[0] == NULL) { | 2455 | if (adap->dev->adapter[0].fe_adap[0].fe == NULL) { |
2456 | err("the master dib7090 has to be initialized first"); | 2456 | err("the master dib7090 has to be initialized first"); |
2457 | return -ENODEV; /* the master device has not been initialized */ | 2457 | return -ENODEV; /* the master device has not been initialized */ |
2458 | } | 2458 | } |
2459 | 2459 | ||
2460 | i2c = dib7000p_get_i2c_master(adap->dev->adapter[0].fe[0], DIBX000_I2C_INTERFACE_GPIO_6_7, 1); | 2460 | i2c = dib7000p_get_i2c_master(adap->dev->adapter[0].fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_6_7, 1); |
2461 | if (dib7000p_i2c_enumeration(i2c, 1, 0x10, &tfe7090pvr_dib7000p_config[1]) != 0) { | 2461 | if (dib7000p_i2c_enumeration(i2c, 1, 0x10, &tfe7090pvr_dib7000p_config[1]) != 0) { |
2462 | err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n", __func__); | 2462 | err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n", __func__); |
2463 | return -ENODEV; | 2463 | return -ENODEV; |
2464 | } | 2464 | } |
2465 | 2465 | ||
2466 | adap->fe[0] = dvb_attach(dib7000p_attach, i2c, 0x92, &tfe7090pvr_dib7000p_config[1]); | 2466 | adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, i2c, 0x92, &tfe7090pvr_dib7000p_config[1]); |
2467 | dib0700_set_i2c_speed(adap->dev, 200); | 2467 | dib0700_set_i2c_speed(adap->dev, 200); |
2468 | 2468 | ||
2469 | return adap->fe[0] == NULL ? -ENODEV : 0; | 2469 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
2470 | } | 2470 | } |
2471 | 2471 | ||
2472 | static int tfe7090pvr_tuner0_attach(struct dvb_usb_adapter *adap) | 2472 | static int tfe7090pvr_tuner0_attach(struct dvb_usb_adapter *adap) |
2473 | { | 2473 | { |
2474 | struct dib0700_adapter_state *st = adap->priv; | 2474 | struct dib0700_adapter_state *st = adap->priv; |
2475 | struct i2c_adapter *tun_i2c = dib7090_get_i2c_tuner(adap->fe[0]); | 2475 | struct i2c_adapter *tun_i2c = dib7090_get_i2c_tuner(adap->fe_adap[0].fe); |
2476 | 2476 | ||
2477 | if (dvb_attach(dib0090_register, adap->fe[0], tun_i2c, &tfe7090pvr_dib0090_config[0]) == NULL) | 2477 | if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &tfe7090pvr_dib0090_config[0]) == NULL) |
2478 | return -ENODEV; | 2478 | return -ENODEV; |
2479 | 2479 | ||
2480 | dib7000p_set_gpio(adap->fe[0], 8, 0, 1); | 2480 | dib7000p_set_gpio(adap->fe_adap[0].fe, 8, 0, 1); |
2481 | 2481 | ||
2482 | st->set_param_save = adap->fe[0]->ops.tuner_ops.set_params; | 2482 | st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; |
2483 | adap->fe[0]->ops.tuner_ops.set_params = dib7090_agc_startup; | 2483 | adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; |
2484 | return 0; | 2484 | return 0; |
2485 | } | 2485 | } |
2486 | 2486 | ||
2487 | static int tfe7090pvr_tuner1_attach(struct dvb_usb_adapter *adap) | 2487 | static int tfe7090pvr_tuner1_attach(struct dvb_usb_adapter *adap) |
2488 | { | 2488 | { |
2489 | struct dib0700_adapter_state *st = adap->priv; | 2489 | struct dib0700_adapter_state *st = adap->priv; |
2490 | struct i2c_adapter *tun_i2c = dib7090_get_i2c_tuner(adap->fe[0]); | 2490 | struct i2c_adapter *tun_i2c = dib7090_get_i2c_tuner(adap->fe_adap[0].fe); |
2491 | 2491 | ||
2492 | if (dvb_attach(dib0090_register, adap->fe[0], tun_i2c, &tfe7090pvr_dib0090_config[1]) == NULL) | 2492 | if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, &tfe7090pvr_dib0090_config[1]) == NULL) |
2493 | return -ENODEV; | 2493 | return -ENODEV; |
2494 | 2494 | ||
2495 | dib7000p_set_gpio(adap->fe[0], 8, 0, 1); | 2495 | dib7000p_set_gpio(adap->fe_adap[0].fe, 8, 0, 1); |
2496 | 2496 | ||
2497 | st->set_param_save = adap->fe[0]->ops.tuner_ops.set_params; | 2497 | st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; |
2498 | adap->fe[0]->ops.tuner_ops.set_params = dib7090_agc_startup; | 2498 | adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup; |
2499 | return 0; | 2499 | return 0; |
2500 | } | 2500 | } |
2501 | 2501 | ||
@@ -2555,14 +2555,14 @@ static int stk7070pd_frontend_attach0(struct dvb_usb_adapter *adap) | |||
2555 | return -ENODEV; | 2555 | return -ENODEV; |
2556 | } | 2556 | } |
2557 | 2557 | ||
2558 | adap->fe[0] = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, &stk7070pd_dib7000p_config[0]); | 2558 | adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x80, &stk7070pd_dib7000p_config[0]); |
2559 | return adap->fe[0] == NULL ? -ENODEV : 0; | 2559 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
2560 | } | 2560 | } |
2561 | 2561 | ||
2562 | static int stk7070pd_frontend_attach1(struct dvb_usb_adapter *adap) | 2562 | static int stk7070pd_frontend_attach1(struct dvb_usb_adapter *adap) |
2563 | { | 2563 | { |
2564 | adap->fe[0] = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x82, &stk7070pd_dib7000p_config[1]); | 2564 | adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x82, &stk7070pd_dib7000p_config[1]); |
2565 | return adap->fe[0] == NULL ? -ENODEV : 0; | 2565 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
2566 | } | 2566 | } |
2567 | 2567 | ||
2568 | /* S5H1411 */ | 2568 | /* S5H1411 */ |
@@ -2617,9 +2617,9 @@ static int s5h1411_frontend_attach(struct dvb_usb_adapter *adap) | |||
2617 | dib0700_set_gpio(adap->dev, GPIO2, GPIO_OUT, 1); | 2617 | dib0700_set_gpio(adap->dev, GPIO2, GPIO_OUT, 1); |
2618 | 2618 | ||
2619 | /* GPIOs are initialized, do the attach */ | 2619 | /* GPIOs are initialized, do the attach */ |
2620 | adap->fe[0] = dvb_attach(s5h1411_attach, &pinnacle_801e_config, | 2620 | adap->fe_adap[0].fe = dvb_attach(s5h1411_attach, &pinnacle_801e_config, |
2621 | &adap->dev->i2c_adap); | 2621 | &adap->dev->i2c_adap); |
2622 | return adap->fe[0] == NULL ? -ENODEV : 0; | 2622 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
2623 | } | 2623 | } |
2624 | 2624 | ||
2625 | static int dib0700_xc5000_tuner_callback(void *priv, int component, | 2625 | static int dib0700_xc5000_tuner_callback(void *priv, int component, |
@@ -2649,9 +2649,9 @@ static struct xc5000_config s5h1411_xc5000_tunerconfig = { | |||
2649 | static int xc5000_tuner_attach(struct dvb_usb_adapter *adap) | 2649 | static int xc5000_tuner_attach(struct dvb_usb_adapter *adap) |
2650 | { | 2650 | { |
2651 | /* FIXME: generalize & move to common area */ | 2651 | /* FIXME: generalize & move to common area */ |
2652 | adap->fe[0]->callback = dib0700_xc5000_tuner_callback; | 2652 | adap->fe_adap[0].fe->callback = dib0700_xc5000_tuner_callback; |
2653 | 2653 | ||
2654 | return dvb_attach(xc5000_attach, adap->fe[0], &adap->dev->i2c_adap, | 2654 | return dvb_attach(xc5000_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, |
2655 | &s5h1411_xc5000_tunerconfig) | 2655 | &s5h1411_xc5000_tunerconfig) |
2656 | == NULL ? -ENODEV : 0; | 2656 | == NULL ? -ENODEV : 0; |
2657 | } | 2657 | } |
@@ -2663,9 +2663,9 @@ static int dib0700_xc4000_tuner_callback(void *priv, int component, | |||
2663 | 2663 | ||
2664 | if (command == XC4000_TUNER_RESET) { | 2664 | if (command == XC4000_TUNER_RESET) { |
2665 | /* Reset the tuner */ | 2665 | /* Reset the tuner */ |
2666 | dib7000p_set_gpio(adap->fe[0], 8, 0, 0); | 2666 | dib7000p_set_gpio(adap->fe_adap[0].fe, 8, 0, 0); |
2667 | msleep(10); | 2667 | msleep(10); |
2668 | dib7000p_set_gpio(adap->fe[0], 8, 0, 1); | 2668 | dib7000p_set_gpio(adap->fe_adap[0].fe, 8, 0, 1); |
2669 | } else { | 2669 | } else { |
2670 | err("xc4000: unknown tuner callback command: %d\n", command); | 2670 | err("xc4000: unknown tuner callback command: %d\n", command); |
2671 | return -EINVAL; | 2671 | return -EINVAL; |
@@ -2771,11 +2771,11 @@ static int pctv340e_frontend_attach(struct dvb_usb_adapter *adap) | |||
2771 | return -ENODEV; | 2771 | return -ENODEV; |
2772 | } | 2772 | } |
2773 | 2773 | ||
2774 | adap->fe[0] = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x12, | 2774 | adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x12, |
2775 | &pctv_340e_config); | 2775 | &pctv_340e_config); |
2776 | st->is_dib7000pc = 1; | 2776 | st->is_dib7000pc = 1; |
2777 | 2777 | ||
2778 | return adap->fe[0] == NULL ? -ENODEV : 0; | 2778 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
2779 | } | 2779 | } |
2780 | 2780 | ||
2781 | static struct xc4000_config dib7000p_xc4000_tunerconfig = { | 2781 | static struct xc4000_config dib7000p_xc4000_tunerconfig = { |
@@ -2791,7 +2791,7 @@ static int xc4000_tuner_attach(struct dvb_usb_adapter *adap) | |||
2791 | struct i2c_adapter *tun_i2c; | 2791 | struct i2c_adapter *tun_i2c; |
2792 | 2792 | ||
2793 | /* The xc4000 is not on the main i2c bus */ | 2793 | /* The xc4000 is not on the main i2c bus */ |
2794 | tun_i2c = dib7000p_get_i2c_master(adap->fe[0], | 2794 | tun_i2c = dib7000p_get_i2c_master(adap->fe_adap[0].fe, |
2795 | DIBX000_I2C_INTERFACE_TUNER, 1); | 2795 | DIBX000_I2C_INTERFACE_TUNER, 1); |
2796 | if (tun_i2c == NULL) { | 2796 | if (tun_i2c == NULL) { |
2797 | printk(KERN_ERR "Could not reach tuner i2c bus\n"); | 2797 | printk(KERN_ERR "Could not reach tuner i2c bus\n"); |
@@ -2799,9 +2799,9 @@ static int xc4000_tuner_attach(struct dvb_usb_adapter *adap) | |||
2799 | } | 2799 | } |
2800 | 2800 | ||
2801 | /* Setup the reset callback */ | 2801 | /* Setup the reset callback */ |
2802 | adap->fe[0]->callback = dib0700_xc4000_tuner_callback; | 2802 | adap->fe_adap[0].fe->callback = dib0700_xc4000_tuner_callback; |
2803 | 2803 | ||
2804 | return dvb_attach(xc4000_attach, adap->fe[0], tun_i2c, | 2804 | return dvb_attach(xc4000_attach, adap->fe_adap[0].fe, tun_i2c, |
2805 | &dib7000p_xc4000_tunerconfig) | 2805 | &dib7000p_xc4000_tunerconfig) |
2806 | == NULL ? -ENODEV : 0; | 2806 | == NULL ? -ENODEV : 0; |
2807 | } | 2807 | } |
@@ -2857,16 +2857,16 @@ static int lgdt3305_frontend_attach(struct dvb_usb_adapter *adap) | |||
2857 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); | 2857 | dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1); |
2858 | msleep(30); | 2858 | msleep(30); |
2859 | 2859 | ||
2860 | adap->fe[0] = dvb_attach(lgdt3305_attach, | 2860 | adap->fe_adap[0].fe = dvb_attach(lgdt3305_attach, |
2861 | &hcw_lgdt3305_config, | 2861 | &hcw_lgdt3305_config, |
2862 | &adap->dev->i2c_adap); | 2862 | &adap->dev->i2c_adap); |
2863 | 2863 | ||
2864 | return adap->fe[0] == NULL ? -ENODEV : 0; | 2864 | return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; |
2865 | } | 2865 | } |
2866 | 2866 | ||
2867 | static int mxl5007t_tuner_attach(struct dvb_usb_adapter *adap) | 2867 | static int mxl5007t_tuner_attach(struct dvb_usb_adapter *adap) |
2868 | { | 2868 | { |
2869 | return dvb_attach(mxl5007t_attach, adap->fe[0], | 2869 | return dvb_attach(mxl5007t_attach, adap->fe_adap[0].fe, |
2870 | &adap->dev->i2c_adap, 0x60, | 2870 | &adap->dev->i2c_adap, 0x60, |
2871 | &hcw_mxl5007t_config) == NULL ? -ENODEV : 0; | 2871 | &hcw_mxl5007t_config) == NULL ? -ENODEV : 0; |
2872 | } | 2872 | } |
@@ -2989,6 +2989,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2989 | .num_adapters = 1, | 2989 | .num_adapters = 1, |
2990 | .adapter = { | 2990 | .adapter = { |
2991 | { | 2991 | { |
2992 | .num_frontends = 1, | ||
2993 | .fe = {{ | ||
2992 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 2994 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
2993 | .pid_filter_count = 32, | 2995 | .pid_filter_count = 32, |
2994 | .pid_filter = stk7700p_pid_filter, | 2996 | .pid_filter = stk7700p_pid_filter, |
@@ -2997,6 +2999,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
2997 | .tuner_attach = stk7700p_tuner_attach, | 2999 | .tuner_attach = stk7700p_tuner_attach, |
2998 | 3000 | ||
2999 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3001 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3002 | }}, | ||
3000 | }, | 3003 | }, |
3001 | }, | 3004 | }, |
3002 | 3005 | ||
@@ -3050,15 +3053,21 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3050 | .num_adapters = 2, | 3053 | .num_adapters = 2, |
3051 | .adapter = { | 3054 | .adapter = { |
3052 | { | 3055 | { |
3056 | .num_frontends = 1, | ||
3057 | .fe = {{ | ||
3053 | .frontend_attach = bristol_frontend_attach, | 3058 | .frontend_attach = bristol_frontend_attach, |
3054 | .tuner_attach = bristol_tuner_attach, | 3059 | .tuner_attach = bristol_tuner_attach, |
3055 | 3060 | ||
3056 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3061 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3062 | }}, | ||
3057 | }, { | 3063 | }, { |
3064 | .num_frontends = 1, | ||
3065 | .fe = {{ | ||
3058 | .frontend_attach = bristol_frontend_attach, | 3066 | .frontend_attach = bristol_frontend_attach, |
3059 | .tuner_attach = bristol_tuner_attach, | 3067 | .tuner_attach = bristol_tuner_attach, |
3060 | 3068 | ||
3061 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), | 3069 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), |
3070 | }}, | ||
3062 | } | 3071 | } |
3063 | }, | 3072 | }, |
3064 | 3073 | ||
@@ -3084,6 +3093,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3084 | .num_adapters = 2, | 3093 | .num_adapters = 2, |
3085 | .adapter = { | 3094 | .adapter = { |
3086 | { | 3095 | { |
3096 | .num_frontends = 1, | ||
3097 | .fe = {{ | ||
3087 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3098 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3088 | .pid_filter_count = 32, | 3099 | .pid_filter_count = 32, |
3089 | .pid_filter = stk70x0p_pid_filter, | 3100 | .pid_filter = stk70x0p_pid_filter, |
@@ -3092,7 +3103,10 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3092 | .tuner_attach = stk7700d_tuner_attach, | 3103 | .tuner_attach = stk7700d_tuner_attach, |
3093 | 3104 | ||
3094 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3105 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3106 | }}, | ||
3095 | }, { | 3107 | }, { |
3108 | .num_frontends = 1, | ||
3109 | .fe = {{ | ||
3096 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3110 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3097 | .pid_filter_count = 32, | 3111 | .pid_filter_count = 32, |
3098 | .pid_filter = stk70x0p_pid_filter, | 3112 | .pid_filter = stk70x0p_pid_filter, |
@@ -3101,6 +3115,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3101 | .tuner_attach = stk7700d_tuner_attach, | 3115 | .tuner_attach = stk7700d_tuner_attach, |
3102 | 3116 | ||
3103 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), | 3117 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), |
3118 | }}, | ||
3104 | } | 3119 | } |
3105 | }, | 3120 | }, |
3106 | 3121 | ||
@@ -3143,6 +3158,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3143 | .num_adapters = 1, | 3158 | .num_adapters = 1, |
3144 | .adapter = { | 3159 | .adapter = { |
3145 | { | 3160 | { |
3161 | .num_frontends = 1, | ||
3162 | .fe = {{ | ||
3146 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3163 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3147 | .pid_filter_count = 32, | 3164 | .pid_filter_count = 32, |
3148 | .pid_filter = stk70x0p_pid_filter, | 3165 | .pid_filter = stk70x0p_pid_filter, |
@@ -3151,6 +3168,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3151 | .tuner_attach = stk7700d_tuner_attach, | 3168 | .tuner_attach = stk7700d_tuner_attach, |
3152 | 3169 | ||
3153 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3170 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3171 | }}, | ||
3154 | }, | 3172 | }, |
3155 | }, | 3173 | }, |
3156 | 3174 | ||
@@ -3185,6 +3203,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3185 | .num_adapters = 1, | 3203 | .num_adapters = 1, |
3186 | .adapter = { | 3204 | .adapter = { |
3187 | { | 3205 | { |
3206 | .num_frontends = 1, | ||
3207 | .fe = {{ | ||
3188 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3208 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3189 | .pid_filter_count = 32, | 3209 | .pid_filter_count = 32, |
3190 | .pid_filter = stk70x0p_pid_filter, | 3210 | .pid_filter = stk70x0p_pid_filter, |
@@ -3193,7 +3213,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3193 | .tuner_attach = dib7070p_tuner_attach, | 3213 | .tuner_attach = dib7070p_tuner_attach, |
3194 | 3214 | ||
3195 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3215 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3196 | 3216 | }}, | |
3197 | .size_of_priv = sizeof(struct dib0700_adapter_state), | 3217 | .size_of_priv = sizeof(struct dib0700_adapter_state), |
3198 | }, | 3218 | }, |
3199 | }, | 3219 | }, |
@@ -3261,6 +3281,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3261 | .num_adapters = 1, | 3281 | .num_adapters = 1, |
3262 | .adapter = { | 3282 | .adapter = { |
3263 | { | 3283 | { |
3284 | .num_frontends = 1, | ||
3285 | .fe = {{ | ||
3264 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3286 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3265 | .pid_filter_count = 32, | 3287 | .pid_filter_count = 32, |
3266 | .pid_filter = stk70x0p_pid_filter, | 3288 | .pid_filter = stk70x0p_pid_filter, |
@@ -3269,7 +3291,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3269 | .tuner_attach = dib7070p_tuner_attach, | 3291 | .tuner_attach = dib7070p_tuner_attach, |
3270 | 3292 | ||
3271 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3293 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3272 | 3294 | }}, | |
3273 | .size_of_priv = sizeof(struct dib0700_adapter_state), | 3295 | .size_of_priv = sizeof(struct dib0700_adapter_state), |
3274 | }, | 3296 | }, |
3275 | }, | 3297 | }, |
@@ -3305,6 +3327,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3305 | .num_adapters = 2, | 3327 | .num_adapters = 2, |
3306 | .adapter = { | 3328 | .adapter = { |
3307 | { | 3329 | { |
3330 | .num_frontends = 1, | ||
3331 | .fe = {{ | ||
3308 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3332 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3309 | .pid_filter_count = 32, | 3333 | .pid_filter_count = 32, |
3310 | .pid_filter = stk70x0p_pid_filter, | 3334 | .pid_filter = stk70x0p_pid_filter, |
@@ -3313,9 +3337,11 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3313 | .tuner_attach = dib7070p_tuner_attach, | 3337 | .tuner_attach = dib7070p_tuner_attach, |
3314 | 3338 | ||
3315 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3339 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3316 | 3340 | }}, | |
3317 | .size_of_priv = sizeof(struct dib0700_adapter_state), | 3341 | .size_of_priv = sizeof(struct dib0700_adapter_state), |
3318 | }, { | 3342 | }, { |
3343 | .num_frontends = 1, | ||
3344 | .fe = {{ | ||
3319 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3345 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3320 | .pid_filter_count = 32, | 3346 | .pid_filter_count = 32, |
3321 | .pid_filter = stk70x0p_pid_filter, | 3347 | .pid_filter = stk70x0p_pid_filter, |
@@ -3324,7 +3350,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3324 | .tuner_attach = dib7070p_tuner_attach, | 3350 | .tuner_attach = dib7070p_tuner_attach, |
3325 | 3351 | ||
3326 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), | 3352 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), |
3327 | 3353 | }}, | |
3328 | .size_of_priv = sizeof(struct dib0700_adapter_state), | 3354 | .size_of_priv = sizeof(struct dib0700_adapter_state), |
3329 | } | 3355 | } |
3330 | }, | 3356 | }, |
@@ -3373,6 +3399,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3373 | .num_adapters = 2, | 3399 | .num_adapters = 2, |
3374 | .adapter = { | 3400 | .adapter = { |
3375 | { | 3401 | { |
3402 | .num_frontends = 1, | ||
3403 | .fe = {{ | ||
3376 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3404 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3377 | .pid_filter_count = 32, | 3405 | .pid_filter_count = 32, |
3378 | .pid_filter = stk70x0p_pid_filter, | 3406 | .pid_filter = stk70x0p_pid_filter, |
@@ -3381,9 +3409,11 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3381 | .tuner_attach = dib7070p_tuner_attach, | 3409 | .tuner_attach = dib7070p_tuner_attach, |
3382 | 3410 | ||
3383 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3411 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3384 | 3412 | }}, | |
3385 | .size_of_priv = sizeof(struct dib0700_adapter_state), | 3413 | .size_of_priv = sizeof(struct dib0700_adapter_state), |
3386 | }, { | 3414 | }, { |
3415 | .num_frontends = 1, | ||
3416 | .fe = {{ | ||
3387 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3417 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3388 | .pid_filter_count = 32, | 3418 | .pid_filter_count = 32, |
3389 | .pid_filter = stk70x0p_pid_filter, | 3419 | .pid_filter = stk70x0p_pid_filter, |
@@ -3392,7 +3422,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3392 | .tuner_attach = dib7070p_tuner_attach, | 3422 | .tuner_attach = dib7070p_tuner_attach, |
3393 | 3423 | ||
3394 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), | 3424 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), |
3395 | 3425 | }}, | |
3396 | .size_of_priv = sizeof(struct dib0700_adapter_state), | 3426 | .size_of_priv = sizeof(struct dib0700_adapter_state), |
3397 | } | 3427 | } |
3398 | }, | 3428 | }, |
@@ -3420,6 +3450,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3420 | .num_adapters = 1, | 3450 | .num_adapters = 1, |
3421 | .adapter = { | 3451 | .adapter = { |
3422 | { | 3452 | { |
3453 | .num_frontends = 1, | ||
3454 | .fe = {{ | ||
3423 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3455 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3424 | .pid_filter_count = 32, | 3456 | .pid_filter_count = 32, |
3425 | .pid_filter = stk70x0p_pid_filter, | 3457 | .pid_filter = stk70x0p_pid_filter, |
@@ -3428,7 +3460,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3428 | .tuner_attach = stk7700ph_tuner_attach, | 3460 | .tuner_attach = stk7700ph_tuner_attach, |
3429 | 3461 | ||
3430 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3462 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3431 | 3463 | }}, | |
3432 | .size_of_priv = sizeof(struct | 3464 | .size_of_priv = sizeof(struct |
3433 | dib0700_adapter_state), | 3465 | dib0700_adapter_state), |
3434 | }, | 3466 | }, |
@@ -3488,11 +3520,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3488 | .num_adapters = 1, | 3520 | .num_adapters = 1, |
3489 | .adapter = { | 3521 | .adapter = { |
3490 | { | 3522 | { |
3523 | .num_frontends = 1, | ||
3524 | .fe = {{ | ||
3491 | .frontend_attach = s5h1411_frontend_attach, | 3525 | .frontend_attach = s5h1411_frontend_attach, |
3492 | .tuner_attach = xc5000_tuner_attach, | 3526 | .tuner_attach = xc5000_tuner_attach, |
3493 | 3527 | ||
3494 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3528 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3495 | 3529 | }}, | |
3496 | .size_of_priv = sizeof(struct | 3530 | .size_of_priv = sizeof(struct |
3497 | dib0700_adapter_state), | 3531 | dib0700_adapter_state), |
3498 | }, | 3532 | }, |
@@ -3524,11 +3558,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3524 | .num_adapters = 1, | 3558 | .num_adapters = 1, |
3525 | .adapter = { | 3559 | .adapter = { |
3526 | { | 3560 | { |
3561 | .num_frontends = 1, | ||
3562 | .fe = {{ | ||
3527 | .frontend_attach = lgdt3305_frontend_attach, | 3563 | .frontend_attach = lgdt3305_frontend_attach, |
3528 | .tuner_attach = mxl5007t_tuner_attach, | 3564 | .tuner_attach = mxl5007t_tuner_attach, |
3529 | 3565 | ||
3530 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3566 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3531 | 3567 | }}, | |
3532 | .size_of_priv = sizeof(struct | 3568 | .size_of_priv = sizeof(struct |
3533 | dib0700_adapter_state), | 3569 | dib0700_adapter_state), |
3534 | }, | 3570 | }, |
@@ -3550,6 +3586,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3550 | .num_adapters = 1, | 3586 | .num_adapters = 1, |
3551 | .adapter = { | 3587 | .adapter = { |
3552 | { | 3588 | { |
3589 | .num_frontends = 1, | ||
3590 | .fe = {{ | ||
3553 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3591 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3554 | .pid_filter_count = 32, | 3592 | .pid_filter_count = 32, |
3555 | .pid_filter = stk70x0p_pid_filter, | 3593 | .pid_filter = stk70x0p_pid_filter, |
@@ -3558,7 +3596,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3558 | .tuner_attach = dib7770p_tuner_attach, | 3596 | .tuner_attach = dib7770p_tuner_attach, |
3559 | 3597 | ||
3560 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3598 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3561 | 3599 | }}, | |
3562 | .size_of_priv = | 3600 | .size_of_priv = |
3563 | sizeof(struct dib0700_adapter_state), | 3601 | sizeof(struct dib0700_adapter_state), |
3564 | }, | 3602 | }, |
@@ -3600,6 +3638,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3600 | .num_adapters = 1, | 3638 | .num_adapters = 1, |
3601 | .adapter = { | 3639 | .adapter = { |
3602 | { | 3640 | { |
3641 | .num_frontends = 1, | ||
3642 | .fe = {{ | ||
3603 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3643 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3604 | .pid_filter_count = 32, | 3644 | .pid_filter_count = 32, |
3605 | .pid_filter = stk80xx_pid_filter, | 3645 | .pid_filter = stk80xx_pid_filter, |
@@ -3608,7 +3648,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3608 | .tuner_attach = dib807x_tuner_attach, | 3648 | .tuner_attach = dib807x_tuner_attach, |
3609 | 3649 | ||
3610 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3650 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3611 | 3651 | }}, | |
3612 | .size_of_priv = | 3652 | .size_of_priv = |
3613 | sizeof(struct dib0700_adapter_state), | 3653 | sizeof(struct dib0700_adapter_state), |
3614 | }, | 3654 | }, |
@@ -3644,6 +3684,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3644 | .num_adapters = 2, | 3684 | .num_adapters = 2, |
3645 | .adapter = { | 3685 | .adapter = { |
3646 | { | 3686 | { |
3687 | .num_frontends = 1, | ||
3688 | .fe = {{ | ||
3647 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3689 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3648 | .pid_filter_count = 32, | 3690 | .pid_filter_count = 32, |
3649 | .pid_filter = stk80xx_pid_filter, | 3691 | .pid_filter = stk80xx_pid_filter, |
@@ -3652,11 +3694,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3652 | .tuner_attach = dib807x_tuner_attach, | 3694 | .tuner_attach = dib807x_tuner_attach, |
3653 | 3695 | ||
3654 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3696 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3655 | 3697 | }}, | |
3656 | .size_of_priv = | 3698 | .size_of_priv = |
3657 | sizeof(struct dib0700_adapter_state), | 3699 | sizeof(struct dib0700_adapter_state), |
3658 | }, | 3700 | }, |
3659 | { | 3701 | { |
3702 | .num_frontends = 1, | ||
3703 | .fe = {{ | ||
3660 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3704 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3661 | .pid_filter_count = 32, | 3705 | .pid_filter_count = 32, |
3662 | .pid_filter = stk80xx_pid_filter, | 3706 | .pid_filter = stk80xx_pid_filter, |
@@ -3665,7 +3709,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3665 | .tuner_attach = dib807x_tuner_attach, | 3709 | .tuner_attach = dib807x_tuner_attach, |
3666 | 3710 | ||
3667 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), | 3711 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), |
3668 | 3712 | }}, | |
3669 | .size_of_priv = | 3713 | .size_of_priv = |
3670 | sizeof(struct dib0700_adapter_state), | 3714 | sizeof(struct dib0700_adapter_state), |
3671 | }, | 3715 | }, |
@@ -3693,6 +3737,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3693 | .num_adapters = 1, | 3737 | .num_adapters = 1, |
3694 | .adapter = { | 3738 | .adapter = { |
3695 | { | 3739 | { |
3740 | .num_frontends = 1, | ||
3741 | .fe = {{ | ||
3696 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 3742 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
3697 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3743 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3698 | .pid_filter_count = 32, | 3744 | .pid_filter_count = 32, |
@@ -3702,7 +3748,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3702 | .tuner_attach = dib809x_tuner_attach, | 3748 | .tuner_attach = dib809x_tuner_attach, |
3703 | 3749 | ||
3704 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3750 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3705 | 3751 | }}, | |
3706 | .size_of_priv = | 3752 | .size_of_priv = |
3707 | sizeof(struct dib0700_adapter_state), | 3753 | sizeof(struct dib0700_adapter_state), |
3708 | }, | 3754 | }, |
@@ -3730,6 +3776,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3730 | .num_adapters = 1, | 3776 | .num_adapters = 1, |
3731 | .adapter = { | 3777 | .adapter = { |
3732 | { | 3778 | { |
3779 | .num_frontends = 1, | ||
3780 | .fe = {{ | ||
3733 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 3781 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
3734 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3782 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3735 | .pid_filter_count = 32, | 3783 | .pid_filter_count = 32, |
@@ -3739,7 +3787,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3739 | .tuner_attach = dib9090_tuner_attach, | 3787 | .tuner_attach = dib9090_tuner_attach, |
3740 | 3788 | ||
3741 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3789 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3742 | 3790 | }}, | |
3743 | .size_of_priv = | 3791 | .size_of_priv = |
3744 | sizeof(struct dib0700_adapter_state), | 3792 | sizeof(struct dib0700_adapter_state), |
3745 | }, | 3793 | }, |
@@ -3767,6 +3815,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3767 | .num_adapters = 1, | 3815 | .num_adapters = 1, |
3768 | .adapter = { | 3816 | .adapter = { |
3769 | { | 3817 | { |
3818 | .num_frontends = 1, | ||
3819 | .fe = {{ | ||
3770 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 3820 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
3771 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3821 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3772 | .pid_filter_count = 32, | 3822 | .pid_filter_count = 32, |
@@ -3776,7 +3826,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3776 | .tuner_attach = nim8096md_tuner_attach, | 3826 | .tuner_attach = nim8096md_tuner_attach, |
3777 | 3827 | ||
3778 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3828 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3779 | 3829 | }}, | |
3780 | .size_of_priv = | 3830 | .size_of_priv = |
3781 | sizeof(struct dib0700_adapter_state), | 3831 | sizeof(struct dib0700_adapter_state), |
3782 | }, | 3832 | }, |
@@ -3804,6 +3854,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3804 | .num_adapters = 1, | 3854 | .num_adapters = 1, |
3805 | .adapter = { | 3855 | .adapter = { |
3806 | { | 3856 | { |
3857 | .num_frontends = 1, | ||
3858 | .fe = {{ | ||
3807 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 3859 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
3808 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3860 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3809 | .pid_filter_count = 32, | 3861 | .pid_filter_count = 32, |
@@ -3813,7 +3865,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3813 | .tuner_attach = nim9090md_tuner_attach, | 3865 | .tuner_attach = nim9090md_tuner_attach, |
3814 | 3866 | ||
3815 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3867 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3816 | 3868 | }}, | |
3817 | .size_of_priv = | 3869 | .size_of_priv = |
3818 | sizeof(struct dib0700_adapter_state), | 3870 | sizeof(struct dib0700_adapter_state), |
3819 | }, | 3871 | }, |
@@ -3841,6 +3893,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3841 | .num_adapters = 1, | 3893 | .num_adapters = 1, |
3842 | .adapter = { | 3894 | .adapter = { |
3843 | { | 3895 | { |
3896 | .num_frontends = 1, | ||
3897 | .fe = {{ | ||
3844 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 3898 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
3845 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3899 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3846 | .pid_filter_count = 32, | 3900 | .pid_filter_count = 32, |
@@ -3850,7 +3904,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3850 | .tuner_attach = nim7090_tuner_attach, | 3904 | .tuner_attach = nim7090_tuner_attach, |
3851 | 3905 | ||
3852 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3906 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3853 | 3907 | }}, | |
3854 | .size_of_priv = | 3908 | .size_of_priv = |
3855 | sizeof(struct dib0700_adapter_state), | 3909 | sizeof(struct dib0700_adapter_state), |
3856 | }, | 3910 | }, |
@@ -3878,6 +3932,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3878 | .num_adapters = 2, | 3932 | .num_adapters = 2, |
3879 | .adapter = { | 3933 | .adapter = { |
3880 | { | 3934 | { |
3935 | .num_frontends = 1, | ||
3936 | .fe = {{ | ||
3881 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 3937 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
3882 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3938 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3883 | .pid_filter_count = 32, | 3939 | .pid_filter_count = 32, |
@@ -3887,11 +3943,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3887 | .tuner_attach = tfe7090pvr_tuner0_attach, | 3943 | .tuner_attach = tfe7090pvr_tuner0_attach, |
3888 | 3944 | ||
3889 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), | 3945 | DIB0700_DEFAULT_STREAMING_CONFIG(0x03), |
3890 | 3946 | }}, | |
3891 | .size_of_priv = | 3947 | .size_of_priv = |
3892 | sizeof(struct dib0700_adapter_state), | 3948 | sizeof(struct dib0700_adapter_state), |
3893 | }, | 3949 | }, |
3894 | { | 3950 | { |
3951 | .num_frontends = 1, | ||
3952 | .fe = {{ | ||
3895 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 3953 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
3896 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 3954 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
3897 | .pid_filter_count = 32, | 3955 | .pid_filter_count = 32, |
@@ -3901,7 +3959,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3901 | .tuner_attach = tfe7090pvr_tuner1_attach, | 3959 | .tuner_attach = tfe7090pvr_tuner1_attach, |
3902 | 3960 | ||
3903 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3961 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3904 | 3962 | }}, | |
3905 | .size_of_priv = | 3963 | .size_of_priv = |
3906 | sizeof(struct dib0700_adapter_state), | 3964 | sizeof(struct dib0700_adapter_state), |
3907 | }, | 3965 | }, |
@@ -3929,11 +3987,13 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
3929 | .num_adapters = 1, | 3987 | .num_adapters = 1, |
3930 | .adapter = { | 3988 | .adapter = { |
3931 | { | 3989 | { |
3990 | .num_frontends = 1, | ||
3991 | .fe = {{ | ||
3932 | .frontend_attach = pctv340e_frontend_attach, | 3992 | .frontend_attach = pctv340e_frontend_attach, |
3933 | .tuner_attach = xc4000_tuner_attach, | 3993 | .tuner_attach = xc4000_tuner_attach, |
3934 | 3994 | ||
3935 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), | 3995 | DIB0700_DEFAULT_STREAMING_CONFIG(0x02), |
3936 | 3996 | }}, | |
3937 | .size_of_priv = sizeof(struct | 3997 | .size_of_priv = sizeof(struct |
3938 | dib0700_adapter_state), | 3998 | dib0700_adapter_state), |
3939 | }, | 3999 | }, |
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c index 263235e194f9..735e914815e6 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-common.c +++ b/drivers/media/dvb/dvb-usb/dibusb-common.c | |||
@@ -23,7 +23,7 @@ int dibusb_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) | |||
23 | if (adap->priv != NULL) { | 23 | if (adap->priv != NULL) { |
24 | struct dibusb_state *st = adap->priv; | 24 | struct dibusb_state *st = adap->priv; |
25 | if (st->ops.fifo_ctrl != NULL) | 25 | if (st->ops.fifo_ctrl != NULL) |
26 | if (st->ops.fifo_ctrl(adap->fe[0],onoff)) { | 26 | if (st->ops.fifo_ctrl(adap->fe_adap[0].fe,onoff)) { |
27 | err("error while controlling the fifo of the demod."); | 27 | err("error while controlling the fifo of the demod."); |
28 | return -ENODEV; | 28 | return -ENODEV; |
29 | } | 29 | } |
@@ -37,7 +37,7 @@ int dibusb_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, int onof | |||
37 | if (adap->priv != NULL) { | 37 | if (adap->priv != NULL) { |
38 | struct dibusb_state *st = adap->priv; | 38 | struct dibusb_state *st = adap->priv; |
39 | if (st->ops.pid_ctrl != NULL) | 39 | if (st->ops.pid_ctrl != NULL) |
40 | st->ops.pid_ctrl(adap->fe[0],index,pid,onoff); | 40 | st->ops.pid_ctrl(adap->fe_adap[0].fe,index,pid,onoff); |
41 | } | 41 | } |
42 | return 0; | 42 | return 0; |
43 | } | 43 | } |
@@ -48,7 +48,7 @@ int dibusb_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff) | |||
48 | if (adap->priv != NULL) { | 48 | if (adap->priv != NULL) { |
49 | struct dibusb_state *st = adap->priv; | 49 | struct dibusb_state *st = adap->priv; |
50 | if (st->ops.pid_parse != NULL) | 50 | if (st->ops.pid_parse != NULL) |
51 | if (st->ops.pid_parse(adap->fe[0],onoff) < 0) | 51 | if (st->ops.pid_parse(adap->fe_adap[0].fe,onoff) < 0) |
52 | err("could not handle pid_parser"); | 52 | err("could not handle pid_parser"); |
53 | } | 53 | } |
54 | return 0; | 54 | return 0; |
@@ -254,8 +254,8 @@ int dibusb_dib3000mc_frontend_attach(struct dvb_usb_adapter *adap) | |||
254 | msleep(1000); | 254 | msleep(1000); |
255 | } | 255 | } |
256 | 256 | ||
257 | if ((adap->fe[0] = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, DEFAULT_DIB3000P_I2C_ADDRESS, &mod3000p_dib3000p_config)) != NULL || | 257 | if ((adap->fe_adap[0].fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, DEFAULT_DIB3000P_I2C_ADDRESS, &mod3000p_dib3000p_config)) != NULL || |
258 | (adap->fe[0] = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, DEFAULT_DIB3000MC_I2C_ADDRESS, &mod3000p_dib3000p_config)) != NULL) { | 258 | (adap->fe_adap[0].fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, DEFAULT_DIB3000MC_I2C_ADDRESS, &mod3000p_dib3000p_config)) != NULL) { |
259 | if (adap->priv != NULL) { | 259 | if (adap->priv != NULL) { |
260 | struct dibusb_state *st = adap->priv; | 260 | struct dibusb_state *st = adap->priv; |
261 | st->ops.pid_parse = dib3000mc_pid_parse; | 261 | st->ops.pid_parse = dib3000mc_pid_parse; |
@@ -309,15 +309,15 @@ int dibusb_dib3000mc_tuner_attach(struct dvb_usb_adapter *adap) | |||
309 | } | 309 | } |
310 | } | 310 | } |
311 | 311 | ||
312 | tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe[0], 1); | 312 | tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe_adap[0].fe, 1); |
313 | if (dvb_attach(mt2060_attach, adap->fe[0], tun_i2c, &stk3000p_mt2060_config, if1) == NULL) { | 313 | if (dvb_attach(mt2060_attach, adap->fe_adap[0].fe, tun_i2c, &stk3000p_mt2060_config, if1) == NULL) { |
314 | /* not found - use panasonic pll parameters */ | 314 | /* not found - use panasonic pll parameters */ |
315 | if (dvb_attach(dvb_pll_attach, adap->fe[0], 0x60, tun_i2c, DVB_PLL_ENV57H1XD5) == NULL) | 315 | if (dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, tun_i2c, DVB_PLL_ENV57H1XD5) == NULL) |
316 | return -ENOMEM; | 316 | return -ENOMEM; |
317 | } else { | 317 | } else { |
318 | st->mt2060_present = 1; | 318 | st->mt2060_present = 1; |
319 | /* set the correct parameters for the dib3000p */ | 319 | /* set the correct parameters for the dib3000p */ |
320 | dib3000mc_set_config(adap->fe[0], &stk3000p_dib3000p_config); | 320 | dib3000mc_set_config(adap->fe_adap[0].fe, &stk3000p_dib3000p_config); |
321 | } | 321 | } |
322 | return 0; | 322 | return 0; |
323 | } | 323 | } |
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c b/drivers/media/dvb/dvb-usb/dibusb-mb.c index c653b321e428..f13b3a3605c0 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-mb.c +++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c | |||
@@ -31,11 +31,11 @@ static int dibusb_dib3000mb_frontend_attach(struct dvb_usb_adapter *adap) | |||
31 | 31 | ||
32 | demod_cfg.demod_address = 0x8; | 32 | demod_cfg.demod_address = 0x8; |
33 | 33 | ||
34 | if ((adap->fe[0] = dvb_attach(dib3000mb_attach, &demod_cfg, | 34 | if ((adap->fe_adap[0].fe = dvb_attach(dib3000mb_attach, &demod_cfg, |
35 | &adap->dev->i2c_adap, &st->ops)) == NULL) | 35 | &adap->dev->i2c_adap, &st->ops)) == NULL) |
36 | return -ENODEV; | 36 | return -ENODEV; |
37 | 37 | ||
38 | adap->fe[0]->ops.i2c_gate_ctrl = dib3000mb_i2c_gate_ctrl; | 38 | adap->fe_adap[0].fe->ops.i2c_gate_ctrl = dib3000mb_i2c_gate_ctrl; |
39 | 39 | ||
40 | return 0; | 40 | return 0; |
41 | } | 41 | } |
@@ -46,7 +46,7 @@ static int dibusb_thomson_tuner_attach(struct dvb_usb_adapter *adap) | |||
46 | 46 | ||
47 | st->tuner_addr = 0x61; | 47 | st->tuner_addr = 0x61; |
48 | 48 | ||
49 | dvb_attach(dvb_pll_attach, adap->fe[0], 0x61, &adap->dev->i2c_adap, | 49 | dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x61, &adap->dev->i2c_adap, |
50 | DVB_PLL_TUA6010XS); | 50 | DVB_PLL_TUA6010XS); |
51 | return 0; | 51 | return 0; |
52 | } | 52 | } |
@@ -57,7 +57,7 @@ static int dibusb_panasonic_tuner_attach(struct dvb_usb_adapter *adap) | |||
57 | 57 | ||
58 | st->tuner_addr = 0x60; | 58 | st->tuner_addr = 0x60; |
59 | 59 | ||
60 | dvb_attach(dvb_pll_attach, adap->fe[0], 0x60, &adap->dev->i2c_adap, | 60 | dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, &adap->dev->i2c_adap, |
61 | DVB_PLL_TDA665X); | 61 | DVB_PLL_TDA665X); |
62 | return 0; | 62 | return 0; |
63 | } | 63 | } |
@@ -78,16 +78,16 @@ static int dibusb_tuner_probe_and_attach(struct dvb_usb_adapter *adap) | |||
78 | /* the Panasonic sits on I2C addrass 0x60, the Thomson on 0x61 */ | 78 | /* the Panasonic sits on I2C addrass 0x60, the Thomson on 0x61 */ |
79 | msg[0].addr = msg[1].addr = st->tuner_addr = 0x60; | 79 | msg[0].addr = msg[1].addr = st->tuner_addr = 0x60; |
80 | 80 | ||
81 | if (adap->fe[0]->ops.i2c_gate_ctrl) | 81 | if (adap->fe_adap[0].fe->ops.i2c_gate_ctrl) |
82 | adap->fe[0]->ops.i2c_gate_ctrl(adap->fe[0],1); | 82 | adap->fe_adap[0].fe->ops.i2c_gate_ctrl(adap->fe_adap[0].fe,1); |
83 | 83 | ||
84 | if (i2c_transfer(&adap->dev->i2c_adap, msg, 2) != 2) { | 84 | if (i2c_transfer(&adap->dev->i2c_adap, msg, 2) != 2) { |
85 | err("tuner i2c write failed."); | 85 | err("tuner i2c write failed."); |
86 | ret = -EREMOTEIO; | 86 | ret = -EREMOTEIO; |
87 | } | 87 | } |
88 | 88 | ||
89 | if (adap->fe[0]->ops.i2c_gate_ctrl) | 89 | if (adap->fe_adap[0].fe->ops.i2c_gate_ctrl) |
90 | adap->fe[0]->ops.i2c_gate_ctrl(adap->fe[0],0); | 90 | adap->fe_adap[0].fe->ops.i2c_gate_ctrl(adap->fe_adap[0].fe,0); |
91 | 91 | ||
92 | if (b2[0] == 0xfe) { | 92 | if (b2[0] == 0xfe) { |
93 | info("This device has the Thomson Cable onboard. Which is default."); | 93 | info("This device has the Thomson Cable onboard. Which is default."); |
@@ -185,6 +185,8 @@ static struct dvb_usb_device_properties dibusb1_1_properties = { | |||
185 | .num_adapters = 1, | 185 | .num_adapters = 1, |
186 | .adapter = { | 186 | .adapter = { |
187 | { | 187 | { |
188 | .num_frontends = 1, | ||
189 | .fe = {{ | ||
188 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 190 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
189 | .pid_filter_count = 16, | 191 | .pid_filter_count = 16, |
190 | 192 | ||
@@ -205,6 +207,7 @@ static struct dvb_usb_device_properties dibusb1_1_properties = { | |||
205 | } | 207 | } |
206 | } | 208 | } |
207 | }, | 209 | }, |
210 | }}, | ||
208 | .size_of_priv = sizeof(struct dibusb_state), | 211 | .size_of_priv = sizeof(struct dibusb_state), |
209 | } | 212 | } |
210 | }, | 213 | }, |
@@ -272,6 +275,8 @@ static struct dvb_usb_device_properties dibusb1_1_an2235_properties = { | |||
272 | .num_adapters = 1, | 275 | .num_adapters = 1, |
273 | .adapter = { | 276 | .adapter = { |
274 | { | 277 | { |
278 | .num_frontends = 1, | ||
279 | .fe = {{ | ||
275 | .caps = DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF | DVB_USB_ADAP_HAS_PID_FILTER, | 280 | .caps = DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF | DVB_USB_ADAP_HAS_PID_FILTER, |
276 | .pid_filter_count = 16, | 281 | .pid_filter_count = 16, |
277 | 282 | ||
@@ -292,6 +297,7 @@ static struct dvb_usb_device_properties dibusb1_1_an2235_properties = { | |||
292 | } | 297 | } |
293 | } | 298 | } |
294 | }, | 299 | }, |
300 | }}, | ||
295 | .size_of_priv = sizeof(struct dibusb_state), | 301 | .size_of_priv = sizeof(struct dibusb_state), |
296 | }, | 302 | }, |
297 | }, | 303 | }, |
@@ -338,6 +344,8 @@ static struct dvb_usb_device_properties dibusb2_0b_properties = { | |||
338 | .num_adapters = 1, | 344 | .num_adapters = 1, |
339 | .adapter = { | 345 | .adapter = { |
340 | { | 346 | { |
347 | .num_frontends = 1, | ||
348 | .fe = {{ | ||
341 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 349 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
342 | .pid_filter_count = 16, | 350 | .pid_filter_count = 16, |
343 | 351 | ||
@@ -358,6 +366,7 @@ static struct dvb_usb_device_properties dibusb2_0b_properties = { | |||
358 | } | 366 | } |
359 | } | 367 | } |
360 | }, | 368 | }, |
369 | }}, | ||
361 | .size_of_priv = sizeof(struct dibusb_state), | 370 | .size_of_priv = sizeof(struct dibusb_state), |
362 | } | 371 | } |
363 | }, | 372 | }, |
@@ -398,6 +407,8 @@ static struct dvb_usb_device_properties artec_t1_usb2_properties = { | |||
398 | .num_adapters = 1, | 407 | .num_adapters = 1, |
399 | .adapter = { | 408 | .adapter = { |
400 | { | 409 | { |
410 | .num_frontends = 1, | ||
411 | .fe = {{ | ||
401 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 412 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
402 | .pid_filter_count = 16, | 413 | .pid_filter_count = 16, |
403 | 414 | ||
@@ -417,6 +428,7 @@ static struct dvb_usb_device_properties artec_t1_usb2_properties = { | |||
417 | } | 428 | } |
418 | } | 429 | } |
419 | }, | 430 | }, |
431 | }}, | ||
420 | .size_of_priv = sizeof(struct dibusb_state), | 432 | .size_of_priv = sizeof(struct dibusb_state), |
421 | } | 433 | } |
422 | }, | 434 | }, |
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mc.c b/drivers/media/dvb/dvb-usb/dibusb-mc.c index c1d9094b61e5..9c165e2569d4 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-mc.c +++ b/drivers/media/dvb/dvb-usb/dibusb-mc.c | |||
@@ -57,6 +57,8 @@ static struct dvb_usb_device_properties dibusb_mc_properties = { | |||
57 | .num_adapters = 1, | 57 | .num_adapters = 1, |
58 | .adapter = { | 58 | .adapter = { |
59 | { | 59 | { |
60 | .num_frontends = 1, | ||
61 | .fe = {{ | ||
60 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 62 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
61 | .pid_filter_count = 32, | 63 | .pid_filter_count = 32, |
62 | .streaming_ctrl = dibusb2_0_streaming_ctrl, | 64 | .streaming_ctrl = dibusb2_0_streaming_ctrl, |
@@ -76,6 +78,7 @@ static struct dvb_usb_device_properties dibusb_mc_properties = { | |||
76 | } | 78 | } |
77 | } | 79 | } |
78 | }, | 80 | }, |
81 | }}, | ||
79 | .size_of_priv = sizeof(struct dibusb_state), | 82 | .size_of_priv = sizeof(struct dibusb_state), |
80 | } | 83 | } |
81 | }, | 84 | }, |
diff --git a/drivers/media/dvb/dvb-usb/digitv.c b/drivers/media/dvb/dvb-usb/digitv.c index 1e17d15bd3e9..edabdae5accb 100644 --- a/drivers/media/dvb/dvb-usb/digitv.c +++ b/drivers/media/dvb/dvb-usb/digitv.c | |||
@@ -137,11 +137,11 @@ static int digitv_frontend_attach(struct dvb_usb_adapter *adap) | |||
137 | { | 137 | { |
138 | struct digitv_state *st = adap->dev->priv; | 138 | struct digitv_state *st = adap->dev->priv; |
139 | 139 | ||
140 | if ((adap->fe[0] = dvb_attach(mt352_attach, &digitv_mt352_config, &adap->dev->i2c_adap)) != NULL) { | 140 | if ((adap->fe_adap[0].fe = dvb_attach(mt352_attach, &digitv_mt352_config, &adap->dev->i2c_adap)) != NULL) { |
141 | st->is_nxt6000 = 0; | 141 | st->is_nxt6000 = 0; |
142 | return 0; | 142 | return 0; |
143 | } | 143 | } |
144 | if ((adap->fe[0] = dvb_attach(nxt6000_attach, &digitv_nxt6000_config, &adap->dev->i2c_adap)) != NULL) { | 144 | if ((adap->fe_adap[0].fe = dvb_attach(nxt6000_attach, &digitv_nxt6000_config, &adap->dev->i2c_adap)) != NULL) { |
145 | st->is_nxt6000 = 1; | 145 | st->is_nxt6000 = 1; |
146 | return 0; | 146 | return 0; |
147 | } | 147 | } |
@@ -152,11 +152,11 @@ static int digitv_tuner_attach(struct dvb_usb_adapter *adap) | |||
152 | { | 152 | { |
153 | struct digitv_state *st = adap->dev->priv; | 153 | struct digitv_state *st = adap->dev->priv; |
154 | 154 | ||
155 | if (!dvb_attach(dvb_pll_attach, adap->fe[0], 0x60, NULL, DVB_PLL_TDED4)) | 155 | if (!dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, NULL, DVB_PLL_TDED4)) |
156 | return -ENODEV; | 156 | return -ENODEV; |
157 | 157 | ||
158 | if (st->is_nxt6000) | 158 | if (st->is_nxt6000) |
159 | adap->fe[0]->ops.tuner_ops.set_params = digitv_nxt6000_tuner_set_params; | 159 | adap->fe_adap[0].fe->ops.tuner_ops.set_params = digitv_nxt6000_tuner_set_params; |
160 | 160 | ||
161 | return 0; | 161 | return 0; |
162 | } | 162 | } |
@@ -292,6 +292,8 @@ static struct dvb_usb_device_properties digitv_properties = { | |||
292 | .num_adapters = 1, | 292 | .num_adapters = 1, |
293 | .adapter = { | 293 | .adapter = { |
294 | { | 294 | { |
295 | .num_frontends = 1, | ||
296 | .fe = {{ | ||
295 | .frontend_attach = digitv_frontend_attach, | 297 | .frontend_attach = digitv_frontend_attach, |
296 | .tuner_attach = digitv_tuner_attach, | 298 | .tuner_attach = digitv_tuner_attach, |
297 | 299 | ||
@@ -306,6 +308,7 @@ static struct dvb_usb_device_properties digitv_properties = { | |||
306 | } | 308 | } |
307 | } | 309 | } |
308 | }, | 310 | }, |
311 | }}, | ||
309 | } | 312 | } |
310 | }, | 313 | }, |
311 | .identify_state = digitv_identify_state, | 314 | .identify_state = digitv_identify_state, |
diff --git a/drivers/media/dvb/dvb-usb/dtt200u.c b/drivers/media/dvb/dvb-usb/dtt200u.c index ea2a46ffbb0a..106dfd55ff9c 100644 --- a/drivers/media/dvb/dvb-usb/dtt200u.c +++ b/drivers/media/dvb/dvb-usb/dtt200u.c | |||
@@ -90,7 +90,7 @@ static int dtt200u_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
90 | 90 | ||
91 | static int dtt200u_frontend_attach(struct dvb_usb_adapter *adap) | 91 | static int dtt200u_frontend_attach(struct dvb_usb_adapter *adap) |
92 | { | 92 | { |
93 | adap->fe[0] = dtt200u_fe_attach(adap->dev); | 93 | adap->fe_adap[0].fe = dtt200u_fe_attach(adap->dev); |
94 | return 0; | 94 | return 0; |
95 | } | 95 | } |
96 | 96 | ||
@@ -140,6 +140,8 @@ static struct dvb_usb_device_properties dtt200u_properties = { | |||
140 | .num_adapters = 1, | 140 | .num_adapters = 1, |
141 | .adapter = { | 141 | .adapter = { |
142 | { | 142 | { |
143 | .num_frontends = 1, | ||
144 | .fe = {{ | ||
143 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING, | 145 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING, |
144 | .pid_filter_count = 15, | 146 | .pid_filter_count = 15, |
145 | 147 | ||
@@ -157,6 +159,7 @@ static struct dvb_usb_device_properties dtt200u_properties = { | |||
157 | } | 159 | } |
158 | } | 160 | } |
159 | }, | 161 | }, |
162 | }}, | ||
160 | } | 163 | } |
161 | }, | 164 | }, |
162 | .power_ctrl = dtt200u_power_ctrl, | 165 | .power_ctrl = dtt200u_power_ctrl, |
@@ -187,6 +190,8 @@ static struct dvb_usb_device_properties wt220u_properties = { | |||
187 | .num_adapters = 1, | 190 | .num_adapters = 1, |
188 | .adapter = { | 191 | .adapter = { |
189 | { | 192 | { |
193 | .num_frontends = 1, | ||
194 | .fe = {{ | ||
190 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING, | 195 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING, |
191 | .pid_filter_count = 15, | 196 | .pid_filter_count = 15, |
192 | 197 | ||
@@ -204,6 +209,7 @@ static struct dvb_usb_device_properties wt220u_properties = { | |||
204 | } | 209 | } |
205 | } | 210 | } |
206 | }, | 211 | }, |
212 | }}, | ||
207 | } | 213 | } |
208 | }, | 214 | }, |
209 | .power_ctrl = dtt200u_power_ctrl, | 215 | .power_ctrl = dtt200u_power_ctrl, |
@@ -234,6 +240,8 @@ static struct dvb_usb_device_properties wt220u_fc_properties = { | |||
234 | .num_adapters = 1, | 240 | .num_adapters = 1, |
235 | .adapter = { | 241 | .adapter = { |
236 | { | 242 | { |
243 | .num_frontends = 1, | ||
244 | .fe = {{ | ||
237 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING, | 245 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING, |
238 | .pid_filter_count = 15, | 246 | .pid_filter_count = 15, |
239 | 247 | ||
@@ -251,6 +259,7 @@ static struct dvb_usb_device_properties wt220u_fc_properties = { | |||
251 | } | 259 | } |
252 | } | 260 | } |
253 | }, | 261 | }, |
262 | }}, | ||
254 | } | 263 | } |
255 | }, | 264 | }, |
256 | .power_ctrl = dtt200u_power_ctrl, | 265 | .power_ctrl = dtt200u_power_ctrl, |
@@ -281,6 +290,8 @@ static struct dvb_usb_device_properties wt220u_zl0353_properties = { | |||
281 | .num_adapters = 1, | 290 | .num_adapters = 1, |
282 | .adapter = { | 291 | .adapter = { |
283 | { | 292 | { |
293 | .num_frontends = 1, | ||
294 | .fe = {{ | ||
284 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING, | 295 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING, |
285 | .pid_filter_count = 15, | 296 | .pid_filter_count = 15, |
286 | 297 | ||
@@ -298,6 +309,7 @@ static struct dvb_usb_device_properties wt220u_zl0353_properties = { | |||
298 | } | 309 | } |
299 | } | 310 | } |
300 | }, | 311 | }, |
312 | }}, | ||
301 | } | 313 | } |
302 | }, | 314 | }, |
303 | .power_ctrl = dtt200u_power_ctrl, | 315 | .power_ctrl = dtt200u_power_ctrl, |
diff --git a/drivers/media/dvb/dvb-usb/dtv5100.c b/drivers/media/dvb/dvb-usb/dtv5100.c index 75ed55cdd8a0..7373132163d2 100644 --- a/drivers/media/dvb/dvb-usb/dtv5100.c +++ b/drivers/media/dvb/dvb-usb/dtv5100.c | |||
@@ -115,13 +115,13 @@ static struct zl10353_config dtv5100_zl10353_config = { | |||
115 | 115 | ||
116 | static int dtv5100_frontend_attach(struct dvb_usb_adapter *adap) | 116 | static int dtv5100_frontend_attach(struct dvb_usb_adapter *adap) |
117 | { | 117 | { |
118 | adap->fe[0] = dvb_attach(zl10353_attach, &dtv5100_zl10353_config, | 118 | adap->fe_adap[0].fe = dvb_attach(zl10353_attach, &dtv5100_zl10353_config, |
119 | &adap->dev->i2c_adap); | 119 | &adap->dev->i2c_adap); |
120 | if (adap->fe[0] == NULL) | 120 | if (adap->fe_adap[0].fe == NULL) |
121 | return -EIO; | 121 | return -EIO; |
122 | 122 | ||
123 | /* disable i2c gate, or it won't work... is this safe? */ | 123 | /* disable i2c gate, or it won't work... is this safe? */ |
124 | adap->fe[0]->ops.i2c_gate_ctrl = NULL; | 124 | adap->fe_adap[0].fe->ops.i2c_gate_ctrl = NULL; |
125 | 125 | ||
126 | return 0; | 126 | return 0; |
127 | } | 127 | } |
@@ -133,7 +133,7 @@ static struct qt1010_config dtv5100_qt1010_config = { | |||
133 | static int dtv5100_tuner_attach(struct dvb_usb_adapter *adap) | 133 | static int dtv5100_tuner_attach(struct dvb_usb_adapter *adap) |
134 | { | 134 | { |
135 | return dvb_attach(qt1010_attach, | 135 | return dvb_attach(qt1010_attach, |
136 | adap->fe[0], &adap->dev->i2c_adap, | 136 | adap->fe_adap[0].fe, &adap->dev->i2c_adap, |
137 | &dtv5100_qt1010_config) == NULL ? -ENODEV : 0; | 137 | &dtv5100_qt1010_config) == NULL ? -ENODEV : 0; |
138 | } | 138 | } |
139 | 139 | ||
@@ -180,6 +180,8 @@ static struct dvb_usb_device_properties dtv5100_properties = { | |||
180 | 180 | ||
181 | .num_adapters = 1, | 181 | .num_adapters = 1, |
182 | .adapter = {{ | 182 | .adapter = {{ |
183 | .num_frontends = 1, | ||
184 | .fe = {{ | ||
183 | .frontend_attach = dtv5100_frontend_attach, | 185 | .frontend_attach = dtv5100_frontend_attach, |
184 | .tuner_attach = dtv5100_tuner_attach, | 186 | .tuner_attach = dtv5100_tuner_attach, |
185 | 187 | ||
@@ -193,6 +195,7 @@ static struct dvb_usb_device_properties dtv5100_properties = { | |||
193 | } | 195 | } |
194 | } | 196 | } |
195 | }, | 197 | }, |
198 | }}, | ||
196 | } }, | 199 | } }, |
197 | 200 | ||
198 | .i2c_algo = &dtv5100_i2c_algo, | 201 | .i2c_algo = &dtv5100_i2c_algo, |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c index 5e34df70ad6e..3f1115925ce6 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c | |||
@@ -17,15 +17,19 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) | |||
17 | if (adap == NULL) | 17 | if (adap == NULL) |
18 | return -ENODEV; | 18 | return -ENODEV; |
19 | 19 | ||
20 | if (adap->active_fe < 0) { | ||
21 | return -EINVAL; | ||
22 | } | ||
23 | |||
20 | newfeedcount = adap->feedcount + (onoff ? 1 : -1); | 24 | newfeedcount = adap->feedcount + (onoff ? 1 : -1); |
21 | 25 | ||
22 | /* stop feed before setting a new pid if there will be no pid anymore */ | 26 | /* stop feed before setting a new pid if there will be no pid anymore */ |
23 | if (newfeedcount == 0) { | 27 | if (newfeedcount == 0) { |
24 | deb_ts("stop feeding\n"); | 28 | deb_ts("stop feeding\n"); |
25 | usb_urb_kill(&adap->stream); | 29 | usb_urb_kill(&adap->fe_adap[adap->active_fe].stream); |
26 | 30 | ||
27 | if (adap->props.streaming_ctrl != NULL) { | 31 | if (adap->props.fe[adap->active_fe].streaming_ctrl != NULL) { |
28 | ret = adap->props.streaming_ctrl(adap, 0); | 32 | ret = adap->props.fe[adap->active_fe].streaming_ctrl(adap, 0); |
29 | if (ret < 0) { | 33 | if (ret < 0) { |
30 | err("error while stopping stream."); | 34 | err("error while stopping stream."); |
31 | return ret; | 35 | return ret; |
@@ -36,36 +40,36 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) | |||
36 | adap->feedcount = newfeedcount; | 40 | adap->feedcount = newfeedcount; |
37 | 41 | ||
38 | /* activate the pid on the device specific pid_filter */ | 42 | /* activate the pid on the device specific pid_filter */ |
39 | deb_ts("setting pid (%s): %5d %04x at index %d '%s'\n",adap->pid_filtering ? | 43 | deb_ts("setting pid (%s): %5d %04x at index %d '%s'\n",adap->fe_adap[adap->active_fe].pid_filtering ? |
40 | "yes" : "no", dvbdmxfeed->pid,dvbdmxfeed->pid,dvbdmxfeed->index,onoff ? | 44 | "yes" : "no", dvbdmxfeed->pid,dvbdmxfeed->pid,dvbdmxfeed->index,onoff ? |
41 | "on" : "off"); | 45 | "on" : "off"); |
42 | if (adap->props.caps & DVB_USB_ADAP_HAS_PID_FILTER && | 46 | if (adap->props.fe[adap->active_fe].caps & DVB_USB_ADAP_HAS_PID_FILTER && |
43 | adap->pid_filtering && | 47 | adap->fe_adap[adap->active_fe].pid_filtering && |
44 | adap->props.pid_filter != NULL) | 48 | adap->props.fe[adap->active_fe].pid_filter != NULL) |
45 | adap->props.pid_filter(adap, dvbdmxfeed->index, dvbdmxfeed->pid,onoff); | 49 | adap->props.fe[adap->active_fe].pid_filter(adap, dvbdmxfeed->index, dvbdmxfeed->pid, onoff); |
46 | 50 | ||
47 | /* start the feed if this was the first feed and there is still a feed | 51 | /* start the feed if this was the first feed and there is still a feed |
48 | * for reception. | 52 | * for reception. |
49 | */ | 53 | */ |
50 | if (adap->feedcount == onoff && adap->feedcount > 0) { | 54 | if (adap->feedcount == onoff && adap->feedcount > 0) { |
51 | deb_ts("submitting all URBs\n"); | 55 | deb_ts("submitting all URBs\n"); |
52 | usb_urb_submit(&adap->stream); | 56 | usb_urb_submit(&adap->fe_adap[adap->active_fe].stream); |
53 | 57 | ||
54 | deb_ts("controlling pid parser\n"); | 58 | deb_ts("controlling pid parser\n"); |
55 | if (adap->props.caps & DVB_USB_ADAP_HAS_PID_FILTER && | 59 | if (adap->props.fe[adap->active_fe].caps & DVB_USB_ADAP_HAS_PID_FILTER && |
56 | adap->props.caps & | 60 | adap->props.fe[adap->active_fe].caps & |
57 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF && | 61 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF && |
58 | adap->props.pid_filter_ctrl != NULL) { | 62 | adap->props.fe[adap->active_fe].pid_filter_ctrl != NULL) { |
59 | ret = adap->props.pid_filter_ctrl(adap, | 63 | ret = adap->props.fe[adap->active_fe].pid_filter_ctrl(adap, |
60 | adap->pid_filtering); | 64 | adap->fe_adap[adap->active_fe].pid_filtering); |
61 | if (ret < 0) { | 65 | if (ret < 0) { |
62 | err("could not handle pid_parser"); | 66 | err("could not handle pid_parser"); |
63 | return ret; | 67 | return ret; |
64 | } | 68 | } |
65 | } | 69 | } |
66 | deb_ts("start feeding\n"); | 70 | deb_ts("start feeding\n"); |
67 | if (adap->props.streaming_ctrl != NULL) { | 71 | if (adap->props.fe[adap->active_fe].streaming_ctrl != NULL) { |
68 | ret = adap->props.streaming_ctrl(adap, 1); | 72 | ret = adap->props.fe[adap->active_fe].streaming_ctrl(adap, 1); |
69 | if (ret < 0) { | 73 | if (ret < 0) { |
70 | err("error while enabling fifo."); | 74 | err("error while enabling fifo."); |
71 | return ret; | 75 | return ret; |
@@ -73,6 +77,9 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) | |||
73 | } | 77 | } |
74 | 78 | ||
75 | } | 79 | } |
80 | if ((adap->feedcount == onoff) && (!onoff)) | ||
81 | adap->active_fe = -1; | ||
82 | |||
76 | return 0; | 83 | return 0; |
77 | } | 84 | } |
78 | 85 | ||
@@ -90,6 +97,7 @@ static int dvb_usb_stop_feed(struct dvb_demux_feed *dvbdmxfeed) | |||
90 | 97 | ||
91 | int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, short *adapter_nums) | 98 | int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, short *adapter_nums) |
92 | { | 99 | { |
100 | int i; | ||
93 | int ret = dvb_register_adapter(&adap->dvb_adap, adap->dev->desc->name, | 101 | int ret = dvb_register_adapter(&adap->dvb_adap, adap->dev->desc->name, |
94 | adap->dev->owner, &adap->dev->udev->dev, | 102 | adap->dev->owner, &adap->dev->udev->dev, |
95 | adapter_nums); | 103 | adapter_nums); |
@@ -112,7 +120,12 @@ int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, short *adapter_nums) | |||
112 | adap->demux.dmx.capabilities = DMX_TS_FILTERING | DMX_SECTION_FILTERING; | 120 | adap->demux.dmx.capabilities = DMX_TS_FILTERING | DMX_SECTION_FILTERING; |
113 | adap->demux.priv = adap; | 121 | adap->demux.priv = adap; |
114 | 122 | ||
115 | adap->demux.feednum = adap->demux.filternum = adap->max_feed_count; | 123 | adap->demux.filternum = 0; |
124 | for (i = 0; i < adap->props.num_frontends; i++) { | ||
125 | if (adap->demux.filternum < adap->fe_adap[i].max_feed_count) | ||
126 | adap->demux.filternum = adap->fe_adap[i].max_feed_count; | ||
127 | } | ||
128 | adap->demux.feednum = adap->demux.filternum; | ||
116 | adap->demux.start_feed = dvb_usb_start_feed; | 129 | adap->demux.start_feed = dvb_usb_start_feed; |
117 | adap->demux.stop_feed = dvb_usb_stop_feed; | 130 | adap->demux.stop_feed = dvb_usb_stop_feed; |
118 | adap->demux.write_to_decoder = NULL; | 131 | adap->demux.write_to_decoder = NULL; |
@@ -156,17 +169,33 @@ int dvb_usb_adapter_dvb_exit(struct dvb_usb_adapter *adap) | |||
156 | return 0; | 169 | return 0; |
157 | } | 170 | } |
158 | 171 | ||
172 | static int dvb_usb_set_active_fe(struct dvb_frontend *fe, int onoff) | ||
173 | { | ||
174 | struct dvb_usb_adapter *adap = fe->dvb->priv; | ||
175 | |||
176 | int ret = (adap->props.frontend_ctrl) ? | ||
177 | adap->props.frontend_ctrl(fe, onoff) : 0; | ||
178 | |||
179 | if (ret < 0) { | ||
180 | err("frontend_ctrl request failed"); | ||
181 | return ret; | ||
182 | } | ||
183 | if (onoff) | ||
184 | adap->active_fe = fe->id; | ||
185 | |||
186 | return 0; | ||
187 | } | ||
188 | |||
159 | static int dvb_usb_fe_wakeup(struct dvb_frontend *fe) | 189 | static int dvb_usb_fe_wakeup(struct dvb_frontend *fe) |
160 | { | 190 | { |
161 | struct dvb_usb_adapter *adap = fe->dvb->priv; | 191 | struct dvb_usb_adapter *adap = fe->dvb->priv; |
162 | 192 | ||
163 | dvb_usb_device_power_ctrl(adap->dev, 1); | 193 | dvb_usb_device_power_ctrl(adap->dev, 1); |
164 | 194 | ||
165 | if (adap->props.frontend_ctrl) | 195 | dvb_usb_set_active_fe(fe, 1); |
166 | adap->props.frontend_ctrl(fe, 1); | ||
167 | 196 | ||
168 | if (adap->fe_init[fe->id]) | 197 | if (adap->fe_adap[fe->id].fe_init) |
169 | adap->fe_init[fe->id](fe); | 198 | adap->fe_adap[fe->id].fe_init(fe); |
170 | 199 | ||
171 | return 0; | 200 | return 0; |
172 | } | 201 | } |
@@ -175,37 +204,31 @@ static int dvb_usb_fe_sleep(struct dvb_frontend *fe) | |||
175 | { | 204 | { |
176 | struct dvb_usb_adapter *adap = fe->dvb->priv; | 205 | struct dvb_usb_adapter *adap = fe->dvb->priv; |
177 | 206 | ||
178 | if (adap->fe_sleep[fe->id]) | 207 | if (adap->fe_adap[fe->id].fe_sleep) |
179 | adap->fe_sleep[fe->id](fe); | 208 | adap->fe_adap[fe->id].fe_sleep(fe); |
180 | 209 | ||
181 | if (adap->props.frontend_ctrl) | 210 | dvb_usb_set_active_fe(fe, 0); |
182 | adap->props.frontend_ctrl(fe, 0); | ||
183 | 211 | ||
184 | return dvb_usb_device_power_ctrl(adap->dev, 0); | 212 | return dvb_usb_device_power_ctrl(adap->dev, 0); |
185 | } | 213 | } |
186 | 214 | ||
187 | int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap) | 215 | int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap) |
188 | { | 216 | { |
189 | int ret, i, x; | 217 | int ret, i; |
190 | 218 | ||
191 | memset(adap->fe, 0, sizeof(adap->fe)); | 219 | /* register all given adapter frontends */ |
220 | for (i = 0; i < adap->props.num_frontends; i++) { | ||
192 | 221 | ||
193 | if (adap->props.frontend_attach == NULL) { | 222 | if (adap->props.fe[i].frontend_attach == NULL) { |
194 | err("strange: '%s' #%d doesn't want to attach a frontend.", | 223 | err("strange: '%s' #%d,%d " |
195 | adap->dev->desc->name, adap->id); | 224 | "doesn't want to attach a frontend.", |
225 | adap->dev->desc->name, adap->id, i); | ||
196 | 226 | ||
197 | return 0; | 227 | return 0; |
198 | } | 228 | } |
199 | 229 | ||
200 | /* register all given adapter frontends */ | 230 | ret = adap->props.fe[i].frontend_attach(adap); |
201 | if (adap->props.num_frontends) | 231 | if (ret || adap->fe_adap[i].fe == NULL) { |
202 | x = adap->props.num_frontends - 1; | ||
203 | else | ||
204 | x = 0; | ||
205 | |||
206 | for (i = 0; i <= x; i++) { | ||
207 | ret = adap->props.frontend_attach(adap); | ||
208 | if (ret || adap->fe[i] == NULL) { | ||
209 | /* only print error when there is no FE at all */ | 232 | /* only print error when there is no FE at all */ |
210 | if (i == 0) | 233 | if (i == 0) |
211 | err("no frontend was attached by '%s'", | 234 | err("no frontend was attached by '%s'", |
@@ -214,18 +237,18 @@ int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap) | |||
214 | return 0; | 237 | return 0; |
215 | } | 238 | } |
216 | 239 | ||
217 | adap->fe[i]->id = i; | 240 | adap->fe_adap[i].fe->id = i; |
218 | 241 | ||
219 | /* re-assign sleep and wakeup functions */ | 242 | /* re-assign sleep and wakeup functions */ |
220 | adap->fe_init[i] = adap->fe[i]->ops.init; | 243 | adap->fe_adap[i].fe_init = adap->fe_adap[i].fe->ops.init; |
221 | adap->fe[i]->ops.init = dvb_usb_fe_wakeup; | 244 | adap->fe_adap[i].fe->ops.init = dvb_usb_fe_wakeup; |
222 | adap->fe_sleep[i] = adap->fe[i]->ops.sleep; | 245 | adap->fe_adap[i].fe_sleep = adap->fe_adap[i].fe->ops.sleep; |
223 | adap->fe[i]->ops.sleep = dvb_usb_fe_sleep; | 246 | adap->fe_adap[i].fe->ops.sleep = dvb_usb_fe_sleep; |
224 | 247 | ||
225 | if (dvb_register_frontend(&adap->dvb_adap, adap->fe[i])) { | 248 | if (dvb_register_frontend(&adap->dvb_adap, adap->fe_adap[i].fe)) { |
226 | err("Frontend %d registration failed.", i); | 249 | err("Frontend %d registration failed.", i); |
227 | dvb_frontend_detach(adap->fe[i]); | 250 | dvb_frontend_detach(adap->fe_adap[i].fe); |
228 | adap->fe[i] = NULL; | 251 | adap->fe_adap[i].fe = NULL; |
229 | /* In error case, do not try register more FEs, | 252 | /* In error case, do not try register more FEs, |
230 | * still leaving already registered FEs alive. */ | 253 | * still leaving already registered FEs alive. */ |
231 | if (i == 0) | 254 | if (i == 0) |
@@ -235,8 +258,10 @@ int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap) | |||
235 | } | 258 | } |
236 | 259 | ||
237 | /* only attach the tuner if the demod is there */ | 260 | /* only attach the tuner if the demod is there */ |
238 | if (adap->props.tuner_attach != NULL) | 261 | if (adap->props.fe[i].tuner_attach != NULL) |
239 | adap->props.tuner_attach(adap); | 262 | adap->props.fe[i].tuner_attach(adap); |
263 | |||
264 | adap->num_frontends_initialized++; | ||
240 | } | 265 | } |
241 | 266 | ||
242 | return 0; | 267 | return 0; |
@@ -244,20 +269,16 @@ int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap) | |||
244 | 269 | ||
245 | int dvb_usb_adapter_frontend_exit(struct dvb_usb_adapter *adap) | 270 | int dvb_usb_adapter_frontend_exit(struct dvb_usb_adapter *adap) |
246 | { | 271 | { |
247 | int i; | 272 | int i = adap->num_frontends_initialized - 1; |
248 | 273 | ||
249 | /* unregister all given adapter frontends */ | 274 | /* unregister all given adapter frontends */ |
250 | if (adap->props.num_frontends) | ||
251 | i = adap->props.num_frontends - 1; | ||
252 | else | ||
253 | i = 0; | ||
254 | |||
255 | for (; i >= 0; i--) { | 275 | for (; i >= 0; i--) { |
256 | if (adap->fe[i] != NULL) { | 276 | if (adap->fe_adap[i].fe != NULL) { |
257 | dvb_unregister_frontend(adap->fe[i]); | 277 | dvb_unregister_frontend(adap->fe_adap[i].fe); |
258 | dvb_frontend_detach(adap->fe[i]); | 278 | dvb_frontend_detach(adap->fe_adap[i].fe); |
259 | } | 279 | } |
260 | } | 280 | } |
281 | adap->num_frontends_initialized = 0; | ||
261 | 282 | ||
262 | return 0; | 283 | return 0; |
263 | } | 284 | } |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-init.c b/drivers/media/dvb/dvb-usb/dvb-usb-init.c index f9af3484834f..169196ec2d4e 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-init.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-init.c | |||
@@ -29,7 +29,7 @@ MODULE_PARM_DESC(force_pid_filter_usage, "force all dvb-usb-devices to use a PID | |||
29 | static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs) | 29 | static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs) |
30 | { | 30 | { |
31 | struct dvb_usb_adapter *adap; | 31 | struct dvb_usb_adapter *adap; |
32 | int ret, n; | 32 | int ret, n, o; |
33 | 33 | ||
34 | for (n = 0; n < d->props.num_adapters; n++) { | 34 | for (n = 0; n < d->props.num_adapters; n++) { |
35 | adap = &d->adapter[n]; | 35 | adap = &d->adapter[n]; |
@@ -38,31 +38,42 @@ static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs) | |||
38 | 38 | ||
39 | memcpy(&adap->props, &d->props.adapter[n], sizeof(struct dvb_usb_adapter_properties)); | 39 | memcpy(&adap->props, &d->props.adapter[n], sizeof(struct dvb_usb_adapter_properties)); |
40 | 40 | ||
41 | for (o = 0; o < adap->props.num_frontends; o++) { | ||
42 | struct dvb_usb_adapter_fe_properties *props = &adap->props.fe[o]; | ||
41 | /* speed - when running at FULL speed we need a HW PID filter */ | 43 | /* speed - when running at FULL speed we need a HW PID filter */ |
42 | if (d->udev->speed == USB_SPEED_FULL && !(adap->props.caps & DVB_USB_ADAP_HAS_PID_FILTER)) { | 44 | if (d->udev->speed == USB_SPEED_FULL && !(props->caps & DVB_USB_ADAP_HAS_PID_FILTER)) { |
43 | err("This USB2.0 device cannot be run on a USB1.1 port. (it lacks a hardware PID filter)"); | 45 | err("This USB2.0 device cannot be run on a USB1.1 port. (it lacks a hardware PID filter)"); |
44 | return -ENODEV; | 46 | return -ENODEV; |
45 | } | 47 | } |
46 | 48 | ||
47 | if ((d->udev->speed == USB_SPEED_FULL && adap->props.caps & DVB_USB_ADAP_HAS_PID_FILTER) || | 49 | if ((d->udev->speed == USB_SPEED_FULL && props->caps & DVB_USB_ADAP_HAS_PID_FILTER) || |
48 | (adap->props.caps & DVB_USB_ADAP_NEED_PID_FILTERING)) { | 50 | (props->caps & DVB_USB_ADAP_NEED_PID_FILTERING)) { |
49 | info("will use the device's hardware PID filter (table count: %d).", adap->props.pid_filter_count); | 51 | info("will use the device's hardware PID filter (table count: %d).", props->pid_filter_count); |
50 | adap->pid_filtering = 1; | 52 | adap->fe_adap[o].pid_filtering = 1; |
51 | adap->max_feed_count = adap->props.pid_filter_count; | 53 | adap->fe_adap[o].max_feed_count = props->pid_filter_count; |
52 | } else { | 54 | } else { |
53 | info("will pass the complete MPEG2 transport stream to the software demuxer."); | 55 | info("will pass the complete MPEG2 transport stream to the software demuxer."); |
54 | adap->pid_filtering = 0; | 56 | adap->fe_adap[o].pid_filtering = 0; |
55 | adap->max_feed_count = 255; | 57 | adap->fe_adap[o].max_feed_count = 255; |
56 | } | 58 | } |
57 | 59 | ||
58 | if (!adap->pid_filtering && | 60 | if (!adap->fe_adap[o].pid_filtering && |
59 | dvb_usb_force_pid_filter_usage && | 61 | dvb_usb_force_pid_filter_usage && |
60 | adap->props.caps & DVB_USB_ADAP_HAS_PID_FILTER) { | 62 | props->caps & DVB_USB_ADAP_HAS_PID_FILTER) { |
61 | info("pid filter enabled by module option."); | 63 | info("pid filter enabled by module option."); |
62 | adap->pid_filtering = 1; | 64 | adap->fe_adap[o].pid_filtering = 1; |
63 | adap->max_feed_count = adap->props.pid_filter_count; | 65 | adap->fe_adap[o].max_feed_count = props->pid_filter_count; |
64 | } | 66 | } |
65 | 67 | ||
68 | if (props->size_of_priv > 0) { | ||
69 | adap->fe_adap[o].priv = kzalloc(props->size_of_priv, GFP_KERNEL); | ||
70 | if (adap->fe_adap[o].priv == NULL) { | ||
71 | err("no memory for priv for adapter %d fe %d.", n, o); | ||
72 | return -ENOMEM; | ||
73 | } | ||
74 | } | ||
75 | } | ||
76 | |||
66 | if (adap->props.size_of_priv > 0) { | 77 | if (adap->props.size_of_priv > 0) { |
67 | adap->priv = kzalloc(adap->props.size_of_priv, GFP_KERNEL); | 78 | adap->priv = kzalloc(adap->props.size_of_priv, GFP_KERNEL); |
68 | if (adap->priv == NULL) { | 79 | if (adap->priv == NULL) { |
@@ -78,7 +89,7 @@ static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs) | |||
78 | } | 89 | } |
79 | 90 | ||
80 | /* use exclusive FE lock if there is multiple shared FEs */ | 91 | /* use exclusive FE lock if there is multiple shared FEs */ |
81 | if (adap->fe[1]) | 92 | if (adap->fe_adap[1].fe) |
82 | adap->dvb_adap.mfe_shared = 1; | 93 | adap->dvb_adap.mfe_shared = 1; |
83 | 94 | ||
84 | d->num_adapters_initialized++; | 95 | d->num_adapters_initialized++; |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-urb.c b/drivers/media/dvb/dvb-usb/dvb-usb-urb.c index bb46ba6a3573..53a5c30b51b2 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-urb.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-urb.c | |||
@@ -82,16 +82,28 @@ static void dvb_usb_data_complete_204(struct usb_data_stream *stream, u8 *buffer | |||
82 | 82 | ||
83 | int dvb_usb_adapter_stream_init(struct dvb_usb_adapter *adap) | 83 | int dvb_usb_adapter_stream_init(struct dvb_usb_adapter *adap) |
84 | { | 84 | { |
85 | adap->stream.udev = adap->dev->udev; | 85 | int i, ret = 0; |
86 | if (adap->props.caps & DVB_USB_ADAP_RECEIVES_204_BYTE_TS) | 86 | for (i = 0; i < adap->props.num_frontends; i++) { |
87 | adap->stream.complete = dvb_usb_data_complete_204; | 87 | |
88 | else | 88 | adap->fe_adap[i].stream.udev = adap->dev->udev; |
89 | adap->stream.complete = dvb_usb_data_complete; | 89 | if (adap->props.fe[i].caps & DVB_USB_ADAP_RECEIVES_204_BYTE_TS) |
90 | adap->stream.user_priv = adap; | 90 | adap->fe_adap[i].stream.complete = |
91 | return usb_urb_init(&adap->stream, &adap->props.stream); | 91 | dvb_usb_data_complete_204; |
92 | else | ||
93 | adap->fe_adap[i].stream.complete = dvb_usb_data_complete; | ||
94 | adap->fe_adap[i].stream.user_priv = adap; | ||
95 | ret = usb_urb_init(&adap->fe_adap[i].stream, | ||
96 | &adap->props.fe[i].stream); | ||
97 | if (ret < 0) | ||
98 | break; | ||
99 | } | ||
100 | return ret; | ||
92 | } | 101 | } |
93 | 102 | ||
94 | int dvb_usb_adapter_stream_exit(struct dvb_usb_adapter *adap) | 103 | int dvb_usb_adapter_stream_exit(struct dvb_usb_adapter *adap) |
95 | { | 104 | { |
96 | return usb_urb_exit(&adap->stream); | 105 | int i; |
106 | for (i = 0; i < adap->props.num_frontends; i++) | ||
107 | usb_urb_exit(&adap->fe_adap[i].stream); | ||
108 | return 0; | ||
97 | } | 109 | } |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h index a3e77b2e2261..6d7d13f9ce68 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb.h | |||
@@ -136,16 +136,14 @@ struct usb_data_stream_properties { | |||
136 | * pll_desc and pll_init_buf of struct dvb_usb_device). | 136 | * pll_desc and pll_init_buf of struct dvb_usb_device). |
137 | * @stream: configuration of the USB streaming | 137 | * @stream: configuration of the USB streaming |
138 | */ | 138 | */ |
139 | struct dvb_usb_adapter_properties { | 139 | struct dvb_usb_adapter_fe_properties { |
140 | #define DVB_USB_ADAP_HAS_PID_FILTER 0x01 | 140 | #define DVB_USB_ADAP_HAS_PID_FILTER 0x01 |
141 | #define DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF 0x02 | 141 | #define DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF 0x02 |
142 | #define DVB_USB_ADAP_NEED_PID_FILTERING 0x04 | 142 | #define DVB_USB_ADAP_NEED_PID_FILTERING 0x04 |
143 | #define DVB_USB_ADAP_RECEIVES_204_BYTE_TS 0x08 | 143 | #define DVB_USB_ADAP_RECEIVES_204_BYTE_TS 0x08 |
144 | int caps; | 144 | int caps; |
145 | int pid_filter_count; | 145 | int pid_filter_count; |
146 | int num_frontends; | ||
147 | 146 | ||
148 | int (*frontend_ctrl) (struct dvb_frontend *, int); | ||
149 | int (*streaming_ctrl) (struct dvb_usb_adapter *, int); | 147 | int (*streaming_ctrl) (struct dvb_usb_adapter *, int); |
150 | int (*pid_filter_ctrl) (struct dvb_usb_adapter *, int); | 148 | int (*pid_filter_ctrl) (struct dvb_usb_adapter *, int); |
151 | int (*pid_filter) (struct dvb_usb_adapter *, int, u16, int); | 149 | int (*pid_filter) (struct dvb_usb_adapter *, int, u16, int); |
@@ -156,9 +154,18 @@ struct dvb_usb_adapter_properties { | |||
156 | struct usb_data_stream_properties stream; | 154 | struct usb_data_stream_properties stream; |
157 | 155 | ||
158 | int size_of_priv; | 156 | int size_of_priv; |
157 | }; | ||
158 | |||
159 | #define MAX_NO_OF_FE_PER_ADAP 2 | ||
160 | struct dvb_usb_adapter_properties { | ||
161 | int size_of_priv; | ||
159 | 162 | ||
163 | int (*frontend_ctrl) (struct dvb_frontend *, int); | ||
160 | int (*fe_ioctl_override) (struct dvb_frontend *, | 164 | int (*fe_ioctl_override) (struct dvb_frontend *, |
161 | unsigned int, void *, unsigned int); | 165 | unsigned int, void *, unsigned int); |
166 | |||
167 | int num_frontends; | ||
168 | struct dvb_usb_adapter_fe_properties fe[MAX_NO_OF_FE_PER_ADAP]; | ||
162 | }; | 169 | }; |
163 | 170 | ||
164 | /** | 171 | /** |
@@ -349,7 +356,20 @@ struct usb_data_stream { | |||
349 | * | 356 | * |
350 | * @stream: the usb data stream. | 357 | * @stream: the usb data stream. |
351 | */ | 358 | */ |
352 | #define MAX_NO_OF_FE_PER_ADAP 2 | 359 | struct dvb_usb_fe_adapter { |
360 | struct dvb_frontend *fe; | ||
361 | |||
362 | int (*fe_init) (struct dvb_frontend *); | ||
363 | int (*fe_sleep) (struct dvb_frontend *); | ||
364 | |||
365 | struct usb_data_stream stream; | ||
366 | |||
367 | int pid_filtering; | ||
368 | int max_feed_count; | ||
369 | |||
370 | void *priv; | ||
371 | }; | ||
372 | |||
353 | struct dvb_usb_adapter { | 373 | struct dvb_usb_adapter { |
354 | struct dvb_usb_device *dev; | 374 | struct dvb_usb_device *dev; |
355 | struct dvb_usb_adapter_properties props; | 375 | struct dvb_usb_adapter_properties props; |
@@ -361,20 +381,16 @@ struct dvb_usb_adapter { | |||
361 | u8 id; | 381 | u8 id; |
362 | 382 | ||
363 | int feedcount; | 383 | int feedcount; |
364 | int pid_filtering; | ||
365 | 384 | ||
366 | /* dvb */ | 385 | /* dvb */ |
367 | struct dvb_adapter dvb_adap; | 386 | struct dvb_adapter dvb_adap; |
368 | struct dmxdev dmxdev; | 387 | struct dmxdev dmxdev; |
369 | struct dvb_demux demux; | 388 | struct dvb_demux demux; |
370 | struct dvb_net dvb_net; | 389 | struct dvb_net dvb_net; |
371 | struct dvb_frontend *fe[MAX_NO_OF_FE_PER_ADAP]; | ||
372 | int max_feed_count; | ||
373 | |||
374 | int (*fe_init[MAX_NO_OF_FE_PER_ADAP]) (struct dvb_frontend *); | ||
375 | int (*fe_sleep[MAX_NO_OF_FE_PER_ADAP]) (struct dvb_frontend *); | ||
376 | 390 | ||
377 | struct usb_data_stream stream; | 391 | struct dvb_usb_fe_adapter fe_adap[MAX_NO_OF_FE_PER_ADAP]; |
392 | int active_fe; | ||
393 | int num_frontends_initialized; | ||
378 | 394 | ||
379 | void *priv; | 395 | void *priv; |
380 | }; | 396 | }; |
diff --git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c index eb5dff59251d..f103ec1fe82e 100644 --- a/drivers/media/dvb/dvb-usb/dw2102.c +++ b/drivers/media/dvb/dvb-usb/dw2102.c | |||
@@ -992,18 +992,18 @@ static int dw2104_frontend_attach(struct dvb_usb_adapter *d) | |||
992 | struct dvb_tuner_ops *tuner_ops = NULL; | 992 | struct dvb_tuner_ops *tuner_ops = NULL; |
993 | 993 | ||
994 | if (demod_probe & 4) { | 994 | if (demod_probe & 4) { |
995 | d->fe[0] = dvb_attach(stv0900_attach, &dw2104a_stv0900_config, | 995 | d->fe_adap[0].fe = dvb_attach(stv0900_attach, &dw2104a_stv0900_config, |
996 | &d->dev->i2c_adap, 0); | 996 | &d->dev->i2c_adap, 0); |
997 | if (d->fe[0] != NULL) { | 997 | if (d->fe_adap[0].fe != NULL) { |
998 | if (dvb_attach(stb6100_attach, d->fe[0], | 998 | if (dvb_attach(stb6100_attach, d->fe_adap[0].fe, |
999 | &dw2104a_stb6100_config, | 999 | &dw2104a_stb6100_config, |
1000 | &d->dev->i2c_adap)) { | 1000 | &d->dev->i2c_adap)) { |
1001 | tuner_ops = &d->fe[0]->ops.tuner_ops; | 1001 | tuner_ops = &d->fe_adap[0].fe->ops.tuner_ops; |
1002 | tuner_ops->set_frequency = stb6100_set_freq; | 1002 | tuner_ops->set_frequency = stb6100_set_freq; |
1003 | tuner_ops->get_frequency = stb6100_get_freq; | 1003 | tuner_ops->get_frequency = stb6100_get_freq; |
1004 | tuner_ops->set_bandwidth = stb6100_set_bandw; | 1004 | tuner_ops->set_bandwidth = stb6100_set_bandw; |
1005 | tuner_ops->get_bandwidth = stb6100_get_bandw; | 1005 | tuner_ops->get_bandwidth = stb6100_get_bandw; |
1006 | d->fe[0]->ops.set_voltage = dw210x_set_voltage; | 1006 | d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; |
1007 | info("Attached STV0900+STB6100!\n"); | 1007 | info("Attached STV0900+STB6100!\n"); |
1008 | return 0; | 1008 | return 0; |
1009 | } | 1009 | } |
@@ -1011,13 +1011,13 @@ static int dw2104_frontend_attach(struct dvb_usb_adapter *d) | |||
1011 | } | 1011 | } |
1012 | 1012 | ||
1013 | if (demod_probe & 2) { | 1013 | if (demod_probe & 2) { |
1014 | d->fe[0] = dvb_attach(stv0900_attach, &dw2104_stv0900_config, | 1014 | d->fe_adap[0].fe = dvb_attach(stv0900_attach, &dw2104_stv0900_config, |
1015 | &d->dev->i2c_adap, 0); | 1015 | &d->dev->i2c_adap, 0); |
1016 | if (d->fe[0] != NULL) { | 1016 | if (d->fe_adap[0].fe != NULL) { |
1017 | if (dvb_attach(stv6110_attach, d->fe[0], | 1017 | if (dvb_attach(stv6110_attach, d->fe_adap[0].fe, |
1018 | &dw2104_stv6110_config, | 1018 | &dw2104_stv6110_config, |
1019 | &d->dev->i2c_adap)) { | 1019 | &d->dev->i2c_adap)) { |
1020 | d->fe[0]->ops.set_voltage = dw210x_set_voltage; | 1020 | d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; |
1021 | info("Attached STV0900+STV6110A!\n"); | 1021 | info("Attached STV0900+STV6110A!\n"); |
1022 | return 0; | 1022 | return 0; |
1023 | } | 1023 | } |
@@ -1025,19 +1025,19 @@ static int dw2104_frontend_attach(struct dvb_usb_adapter *d) | |||
1025 | } | 1025 | } |
1026 | 1026 | ||
1027 | if (demod_probe & 1) { | 1027 | if (demod_probe & 1) { |
1028 | d->fe[0] = dvb_attach(cx24116_attach, &dw2104_config, | 1028 | d->fe_adap[0].fe = dvb_attach(cx24116_attach, &dw2104_config, |
1029 | &d->dev->i2c_adap); | 1029 | &d->dev->i2c_adap); |
1030 | if (d->fe[0] != NULL) { | 1030 | if (d->fe_adap[0].fe != NULL) { |
1031 | d->fe[0]->ops.set_voltage = dw210x_set_voltage; | 1031 | d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; |
1032 | info("Attached cx24116!\n"); | 1032 | info("Attached cx24116!\n"); |
1033 | return 0; | 1033 | return 0; |
1034 | } | 1034 | } |
1035 | } | 1035 | } |
1036 | 1036 | ||
1037 | d->fe[0] = dvb_attach(ds3000_attach, &dw2104_ds3000_config, | 1037 | d->fe_adap[0].fe = dvb_attach(ds3000_attach, &dw2104_ds3000_config, |
1038 | &d->dev->i2c_adap); | 1038 | &d->dev->i2c_adap); |
1039 | if (d->fe[0] != NULL) { | 1039 | if (d->fe_adap[0].fe != NULL) { |
1040 | d->fe[0]->ops.set_voltage = dw210x_set_voltage; | 1040 | d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; |
1041 | info("Attached DS3000!\n"); | 1041 | info("Attached DS3000!\n"); |
1042 | return 0; | 1042 | return 0; |
1043 | } | 1043 | } |
@@ -1053,22 +1053,22 @@ static int dw2102_frontend_attach(struct dvb_usb_adapter *d) | |||
1053 | { | 1053 | { |
1054 | if (dw2102_properties.i2c_algo == &dw2102_serit_i2c_algo) { | 1054 | if (dw2102_properties.i2c_algo == &dw2102_serit_i2c_algo) { |
1055 | /*dw2102_properties.adapter->tuner_attach = NULL;*/ | 1055 | /*dw2102_properties.adapter->tuner_attach = NULL;*/ |
1056 | d->fe[0] = dvb_attach(si21xx_attach, &serit_sp1511lhb_config, | 1056 | d->fe_adap[0].fe = dvb_attach(si21xx_attach, &serit_sp1511lhb_config, |
1057 | &d->dev->i2c_adap); | 1057 | &d->dev->i2c_adap); |
1058 | if (d->fe[0] != NULL) { | 1058 | if (d->fe_adap[0].fe != NULL) { |
1059 | d->fe[0]->ops.set_voltage = dw210x_set_voltage; | 1059 | d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; |
1060 | info("Attached si21xx!\n"); | 1060 | info("Attached si21xx!\n"); |
1061 | return 0; | 1061 | return 0; |
1062 | } | 1062 | } |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | if (dw2102_properties.i2c_algo == &dw2102_earda_i2c_algo) { | 1065 | if (dw2102_properties.i2c_algo == &dw2102_earda_i2c_algo) { |
1066 | d->fe[0] = dvb_attach(stv0288_attach, &earda_config, | 1066 | d->fe_adap[0].fe = dvb_attach(stv0288_attach, &earda_config, |
1067 | &d->dev->i2c_adap); | 1067 | &d->dev->i2c_adap); |
1068 | if (d->fe[0] != NULL) { | 1068 | if (d->fe_adap[0].fe != NULL) { |
1069 | if (dvb_attach(stb6000_attach, d->fe[0], 0x61, | 1069 | if (dvb_attach(stb6000_attach, d->fe_adap[0].fe, 0x61, |
1070 | &d->dev->i2c_adap)) { | 1070 | &d->dev->i2c_adap)) { |
1071 | d->fe[0]->ops.set_voltage = dw210x_set_voltage; | 1071 | d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; |
1072 | info("Attached stv0288!\n"); | 1072 | info("Attached stv0288!\n"); |
1073 | return 0; | 1073 | return 0; |
1074 | } | 1074 | } |
@@ -1077,10 +1077,10 @@ static int dw2102_frontend_attach(struct dvb_usb_adapter *d) | |||
1077 | 1077 | ||
1078 | if (dw2102_properties.i2c_algo == &dw2102_i2c_algo) { | 1078 | if (dw2102_properties.i2c_algo == &dw2102_i2c_algo) { |
1079 | /*dw2102_properties.adapter->tuner_attach = dw2102_tuner_attach;*/ | 1079 | /*dw2102_properties.adapter->tuner_attach = dw2102_tuner_attach;*/ |
1080 | d->fe[0] = dvb_attach(stv0299_attach, &sharp_z0194a_config, | 1080 | d->fe_adap[0].fe = dvb_attach(stv0299_attach, &sharp_z0194a_config, |
1081 | &d->dev->i2c_adap); | 1081 | &d->dev->i2c_adap); |
1082 | if (d->fe[0] != NULL) { | 1082 | if (d->fe_adap[0].fe != NULL) { |
1083 | d->fe[0]->ops.set_voltage = dw210x_set_voltage; | 1083 | d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; |
1084 | info("Attached stv0299!\n"); | 1084 | info("Attached stv0299!\n"); |
1085 | return 0; | 1085 | return 0; |
1086 | } | 1086 | } |
@@ -1090,9 +1090,9 @@ static int dw2102_frontend_attach(struct dvb_usb_adapter *d) | |||
1090 | 1090 | ||
1091 | static int dw3101_frontend_attach(struct dvb_usb_adapter *d) | 1091 | static int dw3101_frontend_attach(struct dvb_usb_adapter *d) |
1092 | { | 1092 | { |
1093 | d->fe[0] = dvb_attach(tda10023_attach, &dw3101_tda10023_config, | 1093 | d->fe_adap[0].fe = dvb_attach(tda10023_attach, &dw3101_tda10023_config, |
1094 | &d->dev->i2c_adap, 0x48); | 1094 | &d->dev->i2c_adap, 0x48); |
1095 | if (d->fe[0] != NULL) { | 1095 | if (d->fe_adap[0].fe != NULL) { |
1096 | info("Attached tda10023!\n"); | 1096 | info("Attached tda10023!\n"); |
1097 | return 0; | 1097 | return 0; |
1098 | } | 1098 | } |
@@ -1101,12 +1101,12 @@ static int dw3101_frontend_attach(struct dvb_usb_adapter *d) | |||
1101 | 1101 | ||
1102 | static int zl100313_frontend_attach(struct dvb_usb_adapter *d) | 1102 | static int zl100313_frontend_attach(struct dvb_usb_adapter *d) |
1103 | { | 1103 | { |
1104 | d->fe[0] = dvb_attach(mt312_attach, &zl313_config, | 1104 | d->fe_adap[0].fe = dvb_attach(mt312_attach, &zl313_config, |
1105 | &d->dev->i2c_adap); | 1105 | &d->dev->i2c_adap); |
1106 | if (d->fe[0] != NULL) { | 1106 | if (d->fe_adap[0].fe != NULL) { |
1107 | if (dvb_attach(zl10039_attach, d->fe[0], 0x60, | 1107 | if (dvb_attach(zl10039_attach, d->fe_adap[0].fe, 0x60, |
1108 | &d->dev->i2c_adap)) { | 1108 | &d->dev->i2c_adap)) { |
1109 | d->fe[0]->ops.set_voltage = dw210x_set_voltage; | 1109 | d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; |
1110 | info("Attached zl100313+zl10039!\n"); | 1110 | info("Attached zl100313+zl10039!\n"); |
1111 | return 0; | 1111 | return 0; |
1112 | } | 1112 | } |
@@ -1119,16 +1119,16 @@ static int stv0288_frontend_attach(struct dvb_usb_adapter *d) | |||
1119 | { | 1119 | { |
1120 | u8 obuf[] = {7, 1}; | 1120 | u8 obuf[] = {7, 1}; |
1121 | 1121 | ||
1122 | d->fe[0] = dvb_attach(stv0288_attach, &earda_config, | 1122 | d->fe_adap[0].fe = dvb_attach(stv0288_attach, &earda_config, |
1123 | &d->dev->i2c_adap); | 1123 | &d->dev->i2c_adap); |
1124 | 1124 | ||
1125 | if (d->fe[0] == NULL) | 1125 | if (d->fe_adap[0].fe == NULL) |
1126 | return -EIO; | 1126 | return -EIO; |
1127 | 1127 | ||
1128 | if (NULL == dvb_attach(stb6000_attach, d->fe[0], 0x61, &d->dev->i2c_adap)) | 1128 | if (NULL == dvb_attach(stb6000_attach, d->fe_adap[0].fe, 0x61, &d->dev->i2c_adap)) |
1129 | return -EIO; | 1129 | return -EIO; |
1130 | 1130 | ||
1131 | d->fe[0]->ops.set_voltage = dw210x_set_voltage; | 1131 | d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; |
1132 | 1132 | ||
1133 | dw210x_op_rw(d->dev->udev, 0x8a, 0, 0, obuf, 2, DW210X_WRITE_MSG); | 1133 | dw210x_op_rw(d->dev->udev, 0x8a, 0, 0, obuf, 2, DW210X_WRITE_MSG); |
1134 | 1134 | ||
@@ -1143,14 +1143,14 @@ static int ds3000_frontend_attach(struct dvb_usb_adapter *d) | |||
1143 | struct s6x0_state *st = (struct s6x0_state *)d->dev->priv; | 1143 | struct s6x0_state *st = (struct s6x0_state *)d->dev->priv; |
1144 | u8 obuf[] = {7, 1}; | 1144 | u8 obuf[] = {7, 1}; |
1145 | 1145 | ||
1146 | d->fe[0] = dvb_attach(ds3000_attach, &dw2104_ds3000_config, | 1146 | d->fe_adap[0].fe = dvb_attach(ds3000_attach, &dw2104_ds3000_config, |
1147 | &d->dev->i2c_adap); | 1147 | &d->dev->i2c_adap); |
1148 | 1148 | ||
1149 | if (d->fe[0] == NULL) | 1149 | if (d->fe_adap[0].fe == NULL) |
1150 | return -EIO; | 1150 | return -EIO; |
1151 | 1151 | ||
1152 | st->old_set_voltage = d->fe[0]->ops.set_voltage; | 1152 | st->old_set_voltage = d->fe_adap[0].fe->ops.set_voltage; |
1153 | d->fe[0]->ops.set_voltage = s660_set_voltage; | 1153 | d->fe_adap[0].fe->ops.set_voltage = s660_set_voltage; |
1154 | 1154 | ||
1155 | dw210x_op_rw(d->dev->udev, 0x8a, 0, 0, obuf, 2, DW210X_WRITE_MSG); | 1155 | dw210x_op_rw(d->dev->udev, 0x8a, 0, 0, obuf, 2, DW210X_WRITE_MSG); |
1156 | 1156 | ||
@@ -1163,12 +1163,12 @@ static int prof_7500_frontend_attach(struct dvb_usb_adapter *d) | |||
1163 | { | 1163 | { |
1164 | u8 obuf[] = {7, 1}; | 1164 | u8 obuf[] = {7, 1}; |
1165 | 1165 | ||
1166 | d->fe[0] = dvb_attach(stv0900_attach, &prof_7500_stv0900_config, | 1166 | d->fe_adap[0].fe = dvb_attach(stv0900_attach, &prof_7500_stv0900_config, |
1167 | &d->dev->i2c_adap, 0); | 1167 | &d->dev->i2c_adap, 0); |
1168 | if (d->fe[0] == NULL) | 1168 | if (d->fe_adap[0].fe == NULL) |
1169 | return -EIO; | 1169 | return -EIO; |
1170 | 1170 | ||
1171 | d->fe[0]->ops.set_voltage = dw210x_set_voltage; | 1171 | d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage; |
1172 | 1172 | ||
1173 | dw210x_op_rw(d->dev->udev, 0x8a, 0, 0, obuf, 2, DW210X_WRITE_MSG); | 1173 | dw210x_op_rw(d->dev->udev, 0x8a, 0, 0, obuf, 2, DW210X_WRITE_MSG); |
1174 | 1174 | ||
@@ -1204,9 +1204,9 @@ static int su3000_frontend_attach(struct dvb_usb_adapter *d) | |||
1204 | if (dvb_usb_generic_rw(d->dev, obuf, 1, ibuf, 1, 0) < 0) | 1204 | if (dvb_usb_generic_rw(d->dev, obuf, 1, ibuf, 1, 0) < 0) |
1205 | err("command 0x51 transfer failed."); | 1205 | err("command 0x51 transfer failed."); |
1206 | 1206 | ||
1207 | d->fe[0] = dvb_attach(ds3000_attach, &su3000_ds3000_config, | 1207 | d->fe_adap[0].fe = dvb_attach(ds3000_attach, &su3000_ds3000_config, |
1208 | &d->dev->i2c_adap); | 1208 | &d->dev->i2c_adap); |
1209 | if (d->fe[0] == NULL) | 1209 | if (d->fe_adap[0].fe == NULL) |
1210 | return -EIO; | 1210 | return -EIO; |
1211 | 1211 | ||
1212 | info("Attached DS3000!\n"); | 1212 | info("Attached DS3000!\n"); |
@@ -1216,14 +1216,14 @@ static int su3000_frontend_attach(struct dvb_usb_adapter *d) | |||
1216 | 1216 | ||
1217 | static int dw2102_tuner_attach(struct dvb_usb_adapter *adap) | 1217 | static int dw2102_tuner_attach(struct dvb_usb_adapter *adap) |
1218 | { | 1218 | { |
1219 | dvb_attach(dvb_pll_attach, adap->fe[0], 0x60, | 1219 | dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, |
1220 | &adap->dev->i2c_adap, DVB_PLL_OPERA1); | 1220 | &adap->dev->i2c_adap, DVB_PLL_OPERA1); |
1221 | return 0; | 1221 | return 0; |
1222 | } | 1222 | } |
1223 | 1223 | ||
1224 | static int dw3101_tuner_attach(struct dvb_usb_adapter *adap) | 1224 | static int dw3101_tuner_attach(struct dvb_usb_adapter *adap) |
1225 | { | 1225 | { |
1226 | dvb_attach(dvb_pll_attach, adap->fe[0], 0x60, | 1226 | dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, |
1227 | &adap->dev->i2c_adap, DVB_PLL_TUA6034); | 1227 | &adap->dev->i2c_adap, DVB_PLL_TUA6034); |
1228 | 1228 | ||
1229 | return 0; | 1229 | return 0; |
@@ -1535,7 +1535,7 @@ static int dw2102_load_firmware(struct usb_device *dev, | |||
1535 | DW210X_READ_MSG); | 1535 | DW210X_READ_MSG); |
1536 | if ((reset16[0] == 0xa1) || (reset16[0] == 0x80)) { | 1536 | if ((reset16[0] == 0xa1) || (reset16[0] == 0x80)) { |
1537 | dw2102_properties.i2c_algo = &dw2102_i2c_algo; | 1537 | dw2102_properties.i2c_algo = &dw2102_i2c_algo; |
1538 | dw2102_properties.adapter->tuner_attach = &dw2102_tuner_attach; | 1538 | dw2102_properties.adapter->fe[0].tuner_attach = &dw2102_tuner_attach; |
1539 | break; | 1539 | break; |
1540 | } else { | 1540 | } else { |
1541 | /* check STV0288 frontend */ | 1541 | /* check STV0288 frontend */ |
@@ -1591,6 +1591,8 @@ static struct dvb_usb_device_properties dw2102_properties = { | |||
1591 | .read_mac_address = dw210x_read_mac_address, | 1591 | .read_mac_address = dw210x_read_mac_address, |
1592 | .adapter = { | 1592 | .adapter = { |
1593 | { | 1593 | { |
1594 | .num_frontends = 1, | ||
1595 | .fe = {{ | ||
1594 | .frontend_attach = dw2102_frontend_attach, | 1596 | .frontend_attach = dw2102_frontend_attach, |
1595 | .stream = { | 1597 | .stream = { |
1596 | .type = USB_BULK, | 1598 | .type = USB_BULK, |
@@ -1602,6 +1604,7 @@ static struct dvb_usb_device_properties dw2102_properties = { | |||
1602 | } | 1604 | } |
1603 | } | 1605 | } |
1604 | }, | 1606 | }, |
1607 | }}, | ||
1605 | } | 1608 | } |
1606 | }, | 1609 | }, |
1607 | .num_device_descs = 3, | 1610 | .num_device_descs = 3, |
@@ -1642,6 +1645,8 @@ static struct dvb_usb_device_properties dw2104_properties = { | |||
1642 | .read_mac_address = dw210x_read_mac_address, | 1645 | .read_mac_address = dw210x_read_mac_address, |
1643 | .adapter = { | 1646 | .adapter = { |
1644 | { | 1647 | { |
1648 | .num_frontends = 1, | ||
1649 | .fe = {{ | ||
1645 | .frontend_attach = dw2104_frontend_attach, | 1650 | .frontend_attach = dw2104_frontend_attach, |
1646 | .stream = { | 1651 | .stream = { |
1647 | .type = USB_BULK, | 1652 | .type = USB_BULK, |
@@ -1653,6 +1658,7 @@ static struct dvb_usb_device_properties dw2104_properties = { | |||
1653 | } | 1658 | } |
1654 | } | 1659 | } |
1655 | }, | 1660 | }, |
1661 | }}, | ||
1656 | } | 1662 | } |
1657 | }, | 1663 | }, |
1658 | .num_device_descs = 2, | 1664 | .num_device_descs = 2, |
@@ -1689,6 +1695,8 @@ static struct dvb_usb_device_properties dw3101_properties = { | |||
1689 | .read_mac_address = dw210x_read_mac_address, | 1695 | .read_mac_address = dw210x_read_mac_address, |
1690 | .adapter = { | 1696 | .adapter = { |
1691 | { | 1697 | { |
1698 | .num_frontends = 1, | ||
1699 | .fe = {{ | ||
1692 | .frontend_attach = dw3101_frontend_attach, | 1700 | .frontend_attach = dw3101_frontend_attach, |
1693 | .tuner_attach = dw3101_tuner_attach, | 1701 | .tuner_attach = dw3101_tuner_attach, |
1694 | .stream = { | 1702 | .stream = { |
@@ -1701,6 +1709,7 @@ static struct dvb_usb_device_properties dw3101_properties = { | |||
1701 | } | 1709 | } |
1702 | } | 1710 | } |
1703 | }, | 1711 | }, |
1712 | }}, | ||
1704 | } | 1713 | } |
1705 | }, | 1714 | }, |
1706 | .num_device_descs = 1, | 1715 | .num_device_descs = 1, |
@@ -1733,6 +1742,8 @@ static struct dvb_usb_device_properties s6x0_properties = { | |||
1733 | .read_mac_address = s6x0_read_mac_address, | 1742 | .read_mac_address = s6x0_read_mac_address, |
1734 | .adapter = { | 1743 | .adapter = { |
1735 | { | 1744 | { |
1745 | .num_frontends = 1, | ||
1746 | .fe = {{ | ||
1736 | .frontend_attach = zl100313_frontend_attach, | 1747 | .frontend_attach = zl100313_frontend_attach, |
1737 | .stream = { | 1748 | .stream = { |
1738 | .type = USB_BULK, | 1749 | .type = USB_BULK, |
@@ -1744,6 +1755,7 @@ static struct dvb_usb_device_properties s6x0_properties = { | |||
1744 | } | 1755 | } |
1745 | } | 1756 | } |
1746 | }, | 1757 | }, |
1758 | }}, | ||
1747 | } | 1759 | } |
1748 | }, | 1760 | }, |
1749 | .num_device_descs = 1, | 1761 | .num_device_descs = 1, |
@@ -1810,6 +1822,8 @@ static struct dvb_usb_device_properties su3000_properties = { | |||
1810 | 1822 | ||
1811 | .adapter = { | 1823 | .adapter = { |
1812 | { | 1824 | { |
1825 | .num_frontends = 1, | ||
1826 | .fe = {{ | ||
1813 | .streaming_ctrl = su3000_streaming_ctrl, | 1827 | .streaming_ctrl = su3000_streaming_ctrl, |
1814 | .frontend_attach = su3000_frontend_attach, | 1828 | .frontend_attach = su3000_frontend_attach, |
1815 | .stream = { | 1829 | .stream = { |
@@ -1822,6 +1836,7 @@ static struct dvb_usb_device_properties su3000_properties = { | |||
1822 | } | 1836 | } |
1823 | } | 1837 | } |
1824 | } | 1838 | } |
1839 | }}, | ||
1825 | } | 1840 | } |
1826 | }, | 1841 | }, |
1827 | .num_device_descs = 3, | 1842 | .num_device_descs = 3, |
@@ -1855,7 +1870,7 @@ static int dw2102_probe(struct usb_interface *intf, | |||
1855 | p1100->devices[0] = d1100; | 1870 | p1100->devices[0] = d1100; |
1856 | p1100->rc.legacy.rc_map_table = rc_map_tbs_table; | 1871 | p1100->rc.legacy.rc_map_table = rc_map_tbs_table; |
1857 | p1100->rc.legacy.rc_map_size = ARRAY_SIZE(rc_map_tbs_table); | 1872 | p1100->rc.legacy.rc_map_size = ARRAY_SIZE(rc_map_tbs_table); |
1858 | p1100->adapter->frontend_attach = stv0288_frontend_attach; | 1873 | p1100->adapter->fe[0].frontend_attach = stv0288_frontend_attach; |
1859 | 1874 | ||
1860 | s660 = kzalloc(sizeof(struct dvb_usb_device_properties), GFP_KERNEL); | 1875 | s660 = kzalloc(sizeof(struct dvb_usb_device_properties), GFP_KERNEL); |
1861 | if (!s660) { | 1876 | if (!s660) { |
@@ -1869,7 +1884,7 @@ static int dw2102_probe(struct usb_interface *intf, | |||
1869 | s660->devices[0] = d660; | 1884 | s660->devices[0] = d660; |
1870 | s660->devices[1] = d480_1; | 1885 | s660->devices[1] = d480_1; |
1871 | s660->devices[2] = d480_2; | 1886 | s660->devices[2] = d480_2; |
1872 | s660->adapter->frontend_attach = ds3000_frontend_attach; | 1887 | s660->adapter->fe[0].frontend_attach = ds3000_frontend_attach; |
1873 | 1888 | ||
1874 | p7500 = kzalloc(sizeof(struct dvb_usb_device_properties), GFP_KERNEL); | 1889 | p7500 = kzalloc(sizeof(struct dvb_usb_device_properties), GFP_KERNEL); |
1875 | if (!p7500) { | 1890 | if (!p7500) { |
@@ -1883,7 +1898,7 @@ static int dw2102_probe(struct usb_interface *intf, | |||
1883 | p7500->devices[0] = d7500; | 1898 | p7500->devices[0] = d7500; |
1884 | p7500->rc.legacy.rc_map_table = rc_map_tbs_table; | 1899 | p7500->rc.legacy.rc_map_table = rc_map_tbs_table; |
1885 | p7500->rc.legacy.rc_map_size = ARRAY_SIZE(rc_map_tbs_table); | 1900 | p7500->rc.legacy.rc_map_size = ARRAY_SIZE(rc_map_tbs_table); |
1886 | p7500->adapter->frontend_attach = prof_7500_frontend_attach; | 1901 | p7500->adapter->fe[0].frontend_attach = prof_7500_frontend_attach; |
1887 | 1902 | ||
1888 | if (0 == dvb_usb_device_init(intf, &dw2102_properties, | 1903 | if (0 == dvb_usb_device_init(intf, &dw2102_properties, |
1889 | THIS_MODULE, NULL, adapter_nr) || | 1904 | THIS_MODULE, NULL, adapter_nr) || |
diff --git a/drivers/media/dvb/dvb-usb/ec168.c b/drivers/media/dvb/dvb-usb/ec168.c index 581bdfc0b1ff..78442fe4aa5e 100644 --- a/drivers/media/dvb/dvb-usb/ec168.c +++ b/drivers/media/dvb/dvb-usb/ec168.c | |||
@@ -200,9 +200,9 @@ static struct ec100_config ec168_ec100_config = { | |||
200 | static int ec168_ec100_frontend_attach(struct dvb_usb_adapter *adap) | 200 | static int ec168_ec100_frontend_attach(struct dvb_usb_adapter *adap) |
201 | { | 201 | { |
202 | deb_info("%s:\n", __func__); | 202 | deb_info("%s:\n", __func__); |
203 | adap->fe[0] = dvb_attach(ec100_attach, &ec168_ec100_config, | 203 | adap->fe_adap[0].fe = dvb_attach(ec100_attach, &ec168_ec100_config, |
204 | &adap->dev->i2c_adap); | 204 | &adap->dev->i2c_adap); |
205 | if (adap->fe[0] == NULL) | 205 | if (adap->fe_adap[0].fe == NULL) |
206 | return -ENODEV; | 206 | return -ENODEV; |
207 | 207 | ||
208 | return 0; | 208 | return 0; |
@@ -228,7 +228,7 @@ static struct mxl5005s_config ec168_mxl5003s_config = { | |||
228 | static int ec168_mxl5003s_tuner_attach(struct dvb_usb_adapter *adap) | 228 | static int ec168_mxl5003s_tuner_attach(struct dvb_usb_adapter *adap) |
229 | { | 229 | { |
230 | deb_info("%s:\n", __func__); | 230 | deb_info("%s:\n", __func__); |
231 | return dvb_attach(mxl5005s_attach, adap->fe[0], &adap->dev->i2c_adap, | 231 | return dvb_attach(mxl5005s_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, |
232 | &ec168_mxl5003s_config) == NULL ? -ENODEV : 0; | 232 | &ec168_mxl5003s_config) == NULL ? -ENODEV : 0; |
233 | } | 233 | } |
234 | 234 | ||
@@ -382,6 +382,8 @@ static struct dvb_usb_device_properties ec168_properties = { | |||
382 | .num_adapters = 1, | 382 | .num_adapters = 1, |
383 | .adapter = { | 383 | .adapter = { |
384 | { | 384 | { |
385 | .num_frontends = 1, | ||
386 | .fe = {{ | ||
385 | .streaming_ctrl = ec168_streaming_ctrl, | 387 | .streaming_ctrl = ec168_streaming_ctrl, |
386 | .frontend_attach = ec168_ec100_frontend_attach, | 388 | .frontend_attach = ec168_ec100_frontend_attach, |
387 | .tuner_attach = ec168_mxl5003s_tuner_attach, | 389 | .tuner_attach = ec168_mxl5003s_tuner_attach, |
@@ -395,6 +397,7 @@ static struct dvb_usb_device_properties ec168_properties = { | |||
395 | } | 397 | } |
396 | } | 398 | } |
397 | }, | 399 | }, |
400 | }}, | ||
398 | } | 401 | } |
399 | }, | 402 | }, |
400 | 403 | ||
diff --git a/drivers/media/dvb/dvb-usb/friio.c b/drivers/media/dvb/dvb-usb/friio.c index 0e4b559720ea..b092dc2137cd 100644 --- a/drivers/media/dvb/dvb-usb/friio.c +++ b/drivers/media/dvb/dvb-usb/friio.c | |||
@@ -403,8 +403,8 @@ static int friio_frontend_attach(struct dvb_usb_adapter *adap) | |||
403 | if (friio_initialize(adap->dev) < 0) | 403 | if (friio_initialize(adap->dev) < 0) |
404 | return -EIO; | 404 | return -EIO; |
405 | 405 | ||
406 | adap->fe[0] = jdvbt90502_attach(adap->dev); | 406 | adap->fe_adap[0].fe = jdvbt90502_attach(adap->dev); |
407 | if (adap->fe[0] == NULL) | 407 | if (adap->fe_adap[0].fe == NULL) |
408 | return -EIO; | 408 | return -EIO; |
409 | 409 | ||
410 | return 0; | 410 | return 0; |
@@ -473,6 +473,8 @@ static struct dvb_usb_device_properties friio_properties = { | |||
473 | /* caps:0 => no pid filter, 188B TS packet */ | 473 | /* caps:0 => no pid filter, 188B TS packet */ |
474 | /* GL861 has a HW pid filter, but no info available. */ | 474 | /* GL861 has a HW pid filter, but no info available. */ |
475 | { | 475 | { |
476 | .num_frontends = 1, | ||
477 | .fe = {{ | ||
476 | .caps = 0, | 478 | .caps = 0, |
477 | 479 | ||
478 | .frontend_attach = friio_frontend_attach, | 480 | .frontend_attach = friio_frontend_attach, |
@@ -490,6 +492,7 @@ static struct dvb_usb_device_properties friio_properties = { | |||
490 | } | 492 | } |
491 | } | 493 | } |
492 | }, | 494 | }, |
495 | }}, | ||
493 | } | 496 | } |
494 | }, | 497 | }, |
495 | .i2c_algo = &gl861_i2c_algo, | 498 | .i2c_algo = &gl861_i2c_algo, |
diff --git a/drivers/media/dvb/dvb-usb/gl861.c b/drivers/media/dvb/dvb-usb/gl861.c index fba24ed2e843..63681df244c4 100644 --- a/drivers/media/dvb/dvb-usb/gl861.c +++ b/drivers/media/dvb/dvb-usb/gl861.c | |||
@@ -103,9 +103,9 @@ static struct zl10353_config gl861_zl10353_config = { | |||
103 | static int gl861_frontend_attach(struct dvb_usb_adapter *adap) | 103 | static int gl861_frontend_attach(struct dvb_usb_adapter *adap) |
104 | { | 104 | { |
105 | 105 | ||
106 | adap->fe[0] = dvb_attach(zl10353_attach, &gl861_zl10353_config, | 106 | adap->fe_adap[0].fe = dvb_attach(zl10353_attach, &gl861_zl10353_config, |
107 | &adap->dev->i2c_adap); | 107 | &adap->dev->i2c_adap); |
108 | if (adap->fe[0] == NULL) | 108 | if (adap->fe_adap[0].fe == NULL) |
109 | return -EIO; | 109 | return -EIO; |
110 | 110 | ||
111 | return 0; | 111 | return 0; |
@@ -118,7 +118,7 @@ static struct qt1010_config gl861_qt1010_config = { | |||
118 | static int gl861_tuner_attach(struct dvb_usb_adapter *adap) | 118 | static int gl861_tuner_attach(struct dvb_usb_adapter *adap) |
119 | { | 119 | { |
120 | return dvb_attach(qt1010_attach, | 120 | return dvb_attach(qt1010_attach, |
121 | adap->fe[0], &adap->dev->i2c_adap, | 121 | adap->fe_adap[0].fe, &adap->dev->i2c_adap, |
122 | &gl861_qt1010_config) == NULL ? -ENODEV : 0; | 122 | &gl861_qt1010_config) == NULL ? -ENODEV : 0; |
123 | } | 123 | } |
124 | 124 | ||
@@ -167,6 +167,8 @@ static struct dvb_usb_device_properties gl861_properties = { | |||
167 | 167 | ||
168 | .num_adapters = 1, | 168 | .num_adapters = 1, |
169 | .adapter = {{ | 169 | .adapter = {{ |
170 | .num_frontends = 1, | ||
171 | .fe = {{ | ||
170 | 172 | ||
171 | .frontend_attach = gl861_frontend_attach, | 173 | .frontend_attach = gl861_frontend_attach, |
172 | .tuner_attach = gl861_tuner_attach, | 174 | .tuner_attach = gl861_tuner_attach, |
@@ -181,6 +183,7 @@ static struct dvb_usb_device_properties gl861_properties = { | |||
181 | } | 183 | } |
182 | } | 184 | } |
183 | }, | 185 | }, |
186 | }}, | ||
184 | } }, | 187 | } }, |
185 | .i2c_algo = &gl861_i2c_algo, | 188 | .i2c_algo = &gl861_i2c_algo, |
186 | 189 | ||
diff --git a/drivers/media/dvb/dvb-usb/gp8psk.c b/drivers/media/dvb/dvb-usb/gp8psk.c index f254e13c35be..5f71284703d0 100644 --- a/drivers/media/dvb/dvb-usb/gp8psk.c +++ b/drivers/media/dvb/dvb-usb/gp8psk.c | |||
@@ -230,7 +230,7 @@ static int gp8psk_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) | |||
230 | 230 | ||
231 | static int gp8psk_frontend_attach(struct dvb_usb_adapter *adap) | 231 | static int gp8psk_frontend_attach(struct dvb_usb_adapter *adap) |
232 | { | 232 | { |
233 | adap->fe[0] = gp8psk_fe_attach(adap->dev); | 233 | adap->fe_adap[0].fe = gp8psk_fe_attach(adap->dev); |
234 | return 0; | 234 | return 0; |
235 | } | 235 | } |
236 | 236 | ||
@@ -268,6 +268,8 @@ static struct dvb_usb_device_properties gp8psk_properties = { | |||
268 | .num_adapters = 1, | 268 | .num_adapters = 1, |
269 | .adapter = { | 269 | .adapter = { |
270 | { | 270 | { |
271 | .num_frontends = 1, | ||
272 | .fe = {{ | ||
271 | .streaming_ctrl = gp8psk_streaming_ctrl, | 273 | .streaming_ctrl = gp8psk_streaming_ctrl, |
272 | .frontend_attach = gp8psk_frontend_attach, | 274 | .frontend_attach = gp8psk_frontend_attach, |
273 | /* parameter for the MPEG2-data transfer */ | 275 | /* parameter for the MPEG2-data transfer */ |
@@ -281,6 +283,7 @@ static struct dvb_usb_device_properties gp8psk_properties = { | |||
281 | } | 283 | } |
282 | } | 284 | } |
283 | }, | 285 | }, |
286 | }}, | ||
284 | } | 287 | } |
285 | }, | 288 | }, |
286 | .power_ctrl = gp8psk_power_ctrl, | 289 | .power_ctrl = gp8psk_power_ctrl, |
diff --git a/drivers/media/dvb/dvb-usb/it913x.c b/drivers/media/dvb/dvb-usb/it913x.c index 3900068a2928..6d2f281510c3 100644 --- a/drivers/media/dvb/dvb-usb/it913x.c +++ b/drivers/media/dvb/dvb-usb/it913x.c | |||
@@ -436,7 +436,7 @@ static int it913x_name(struct dvb_usb_adapter *adap) | |||
436 | { | 436 | { |
437 | const char *desc = adap->dev->desc->name; | 437 | const char *desc = adap->dev->desc->name; |
438 | char *fe_name[] = {"_1", "_2", "_3", "_4"}; | 438 | char *fe_name[] = {"_1", "_2", "_3", "_4"}; |
439 | char *name = adap->fe[0]->ops.info.name; | 439 | char *name = adap->fe_adap[0].fe->ops.info.name; |
440 | 440 | ||
441 | strlcpy(name, desc, 128); | 441 | strlcpy(name, desc, 128); |
442 | strlcat(name, fe_name[adap->id], 128); | 442 | strlcat(name, fe_name[adap->id], 128); |
@@ -450,12 +450,12 @@ static int it913x_frontend_attach(struct dvb_usb_adapter *adap) | |||
450 | int ret = 0; | 450 | int ret = 0; |
451 | u8 adf = it913x_read_reg(udev, IO_MUX_POWER_CLK); | 451 | u8 adf = it913x_read_reg(udev, IO_MUX_POWER_CLK); |
452 | u8 adap_addr = I2C_BASE_ADDR + (adap->id << 5); | 452 | u8 adap_addr = I2C_BASE_ADDR + (adap->id << 5); |
453 | u16 ep_size = adap->props.stream.u.bulk.buffersize; | 453 | u16 ep_size = adap->props.fe[0].stream.u.bulk.buffersize; |
454 | 454 | ||
455 | adap->fe[0] = dvb_attach(it913x_fe_attach, | 455 | adap->fe_adap[0].fe = dvb_attach(it913x_fe_attach, |
456 | &adap->dev->i2c_adap, adap_addr, adf, IT9137); | 456 | &adap->dev->i2c_adap, adap_addr, adf, IT9137); |
457 | 457 | ||
458 | if (adap->id == 0 && adap->fe[0]) { | 458 | if (adap->id == 0 && adap->fe_adap[0].fe) { |
459 | ret = it913x_wr_reg(udev, DEV_0_DMOD, MP2_SW_RST, 0x1); | 459 | ret = it913x_wr_reg(udev, DEV_0_DMOD, MP2_SW_RST, 0x1); |
460 | ret = it913x_wr_reg(udev, DEV_0_DMOD, MP2IF2_SW_RST, 0x1); | 460 | ret = it913x_wr_reg(udev, DEV_0_DMOD, MP2IF2_SW_RST, 0x1); |
461 | ret = it913x_wr_reg(udev, DEV_0, EP0_TX_EN, 0x0f); | 461 | ret = it913x_wr_reg(udev, DEV_0, EP0_TX_EN, 0x0f); |
@@ -465,7 +465,7 @@ static int it913x_frontend_attach(struct dvb_usb_adapter *adap) | |||
465 | ep_size & 0xff); | 465 | ep_size & 0xff); |
466 | ret = it913x_wr_reg(udev, DEV_0, EP4_TX_LEN_MSB, ep_size >> 8); | 466 | ret = it913x_wr_reg(udev, DEV_0, EP4_TX_LEN_MSB, ep_size >> 8); |
467 | ret = it913x_wr_reg(udev, DEV_0, EP4_MAX_PKT, 0x80); | 467 | ret = it913x_wr_reg(udev, DEV_0, EP4_MAX_PKT, 0x80); |
468 | } else if (adap->id == 1 && adap->fe[0]) { | 468 | } else if (adap->id == 1 && adap->fe_adap[0].fe) { |
469 | ret = it913x_wr_reg(udev, DEV_0, EP0_TX_EN, 0x6f); | 469 | ret = it913x_wr_reg(udev, DEV_0, EP0_TX_EN, 0x6f); |
470 | ret = it913x_wr_reg(udev, DEV_0, EP5_TX_LEN_LSB, | 470 | ret = it913x_wr_reg(udev, DEV_0, EP5_TX_LEN_LSB, |
471 | ep_size & 0xff); | 471 | ep_size & 0xff); |
@@ -524,6 +524,8 @@ static struct dvb_usb_device_properties it913x_properties = { | |||
524 | .num_adapters = 2, | 524 | .num_adapters = 2, |
525 | .adapter = { | 525 | .adapter = { |
526 | { | 526 | { |
527 | .num_frontends = 1, | ||
528 | .fe = {{ | ||
527 | .caps = DVB_USB_ADAP_HAS_PID_FILTER| | 529 | .caps = DVB_USB_ADAP_HAS_PID_FILTER| |
528 | DVB_USB_ADAP_NEED_PID_FILTERING| | 530 | DVB_USB_ADAP_NEED_PID_FILTERING| |
529 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 531 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
@@ -544,8 +546,11 @@ static struct dvb_usb_device_properties it913x_properties = { | |||
544 | } | 546 | } |
545 | } | 547 | } |
546 | } | 548 | } |
549 | }}, | ||
547 | }, | 550 | }, |
548 | { | 551 | { |
552 | .num_frontends = 1, | ||
553 | .fe = {{ | ||
549 | .caps = DVB_USB_ADAP_HAS_PID_FILTER| | 554 | .caps = DVB_USB_ADAP_HAS_PID_FILTER| |
550 | DVB_USB_ADAP_NEED_PID_FILTERING| | 555 | DVB_USB_ADAP_NEED_PID_FILTERING| |
551 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 556 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
@@ -566,6 +571,7 @@ static struct dvb_usb_device_properties it913x_properties = { | |||
566 | } | 571 | } |
567 | } | 572 | } |
568 | } | 573 | } |
574 | }}, | ||
569 | } | 575 | } |
570 | }, | 576 | }, |
571 | .identify_state = it913x_identify_state, | 577 | .identify_state = it913x_identify_state, |
diff --git a/drivers/media/dvb/dvb-usb/lmedm04.c b/drivers/media/dvb/dvb-usb/lmedm04.c index ef5911a2d342..55b25be072ee 100644 --- a/drivers/media/dvb/dvb-usb/lmedm04.c +++ b/drivers/media/dvb/dvb-usb/lmedm04.c | |||
@@ -941,7 +941,7 @@ static int lme_name(struct dvb_usb_adapter *adap) | |||
941 | const char *desc = adap->dev->desc->name; | 941 | const char *desc = adap->dev->desc->name; |
942 | char *fe_name[] = {"", " LG TDQY-P001F", " SHARP:BS2F7HZ7395", | 942 | char *fe_name[] = {"", " LG TDQY-P001F", " SHARP:BS2F7HZ7395", |
943 | " SHARP:BS2F7HZ0194"}; | 943 | " SHARP:BS2F7HZ0194"}; |
944 | char *name = adap->fe[0]->ops.info.name; | 944 | char *name = adap->fe_adap[0].fe->ops.info.name; |
945 | 945 | ||
946 | strlcpy(name, desc, 128); | 946 | strlcpy(name, desc, 128); |
947 | strlcat(name, fe_name[st->tuner_config], 128); | 947 | strlcat(name, fe_name[st->tuner_config], 128); |
@@ -958,10 +958,10 @@ static int dm04_lme2510_frontend_attach(struct dvb_usb_adapter *adap) | |||
958 | st->i2c_talk_onoff = 1; | 958 | st->i2c_talk_onoff = 1; |
959 | 959 | ||
960 | st->i2c_gate = 4; | 960 | st->i2c_gate = 4; |
961 | adap->fe[0] = dvb_attach(tda10086_attach, &tda10086_config, | 961 | adap->fe_adap[0].fe = dvb_attach(tda10086_attach, &tda10086_config, |
962 | &adap->dev->i2c_adap); | 962 | &adap->dev->i2c_adap); |
963 | 963 | ||
964 | if (adap->fe[0]) { | 964 | if (adap->fe_adap[0].fe) { |
965 | info("TUN Found Frontend TDA10086"); | 965 | info("TUN Found Frontend TDA10086"); |
966 | st->i2c_tuner_gate_w = 4; | 966 | st->i2c_tuner_gate_w = 4; |
967 | st->i2c_tuner_gate_r = 4; | 967 | st->i2c_tuner_gate_r = 4; |
@@ -975,9 +975,9 @@ static int dm04_lme2510_frontend_attach(struct dvb_usb_adapter *adap) | |||
975 | } | 975 | } |
976 | 976 | ||
977 | st->i2c_gate = 4; | 977 | st->i2c_gate = 4; |
978 | adap->fe[0] = dvb_attach(stv0299_attach, &sharp_z0194_config, | 978 | adap->fe_adap[0].fe = dvb_attach(stv0299_attach, &sharp_z0194_config, |
979 | &adap->dev->i2c_adap); | 979 | &adap->dev->i2c_adap); |
980 | if (adap->fe[0]) { | 980 | if (adap->fe_adap[0].fe) { |
981 | info("FE Found Stv0299"); | 981 | info("FE Found Stv0299"); |
982 | st->i2c_tuner_gate_w = 4; | 982 | st->i2c_tuner_gate_w = 4; |
983 | st->i2c_tuner_gate_r = 5; | 983 | st->i2c_tuner_gate_r = 5; |
@@ -991,9 +991,9 @@ static int dm04_lme2510_frontend_attach(struct dvb_usb_adapter *adap) | |||
991 | } | 991 | } |
992 | 992 | ||
993 | st->i2c_gate = 5; | 993 | st->i2c_gate = 5; |
994 | adap->fe[0] = dvb_attach(stv0288_attach, &lme_config, | 994 | adap->fe_adap[0].fe = dvb_attach(stv0288_attach, &lme_config, |
995 | &adap->dev->i2c_adap); | 995 | &adap->dev->i2c_adap); |
996 | if (adap->fe[0]) { | 996 | if (adap->fe_adap[0].fe) { |
997 | info("FE Found Stv0288"); | 997 | info("FE Found Stv0288"); |
998 | st->i2c_tuner_gate_w = 4; | 998 | st->i2c_tuner_gate_w = 4; |
999 | st->i2c_tuner_gate_r = 5; | 999 | st->i2c_tuner_gate_r = 5; |
@@ -1010,15 +1010,15 @@ static int dm04_lme2510_frontend_attach(struct dvb_usb_adapter *adap) | |||
1010 | 1010 | ||
1011 | 1011 | ||
1012 | end: if (ret) { | 1012 | end: if (ret) { |
1013 | if (adap->fe[0]) { | 1013 | if (adap->fe_adap[0].fe) { |
1014 | dvb_frontend_detach(adap->fe[0]); | 1014 | dvb_frontend_detach(adap->fe_adap[0].fe); |
1015 | adap->fe[0] = NULL; | 1015 | adap->fe_adap[0].fe = NULL; |
1016 | } | 1016 | } |
1017 | adap->dev->props.rc.core.rc_codes = NULL; | 1017 | adap->dev->props.rc.core.rc_codes = NULL; |
1018 | return -ENODEV; | 1018 | return -ENODEV; |
1019 | } | 1019 | } |
1020 | 1020 | ||
1021 | adap->fe[0]->ops.set_voltage = dm04_lme2510_set_voltage; | 1021 | adap->fe_adap[0].fe->ops.set_voltage = dm04_lme2510_set_voltage; |
1022 | ret = lme_name(adap); | 1022 | ret = lme_name(adap); |
1023 | return ret; | 1023 | return ret; |
1024 | } | 1024 | } |
@@ -1031,17 +1031,17 @@ static int dm04_lme2510_tuner(struct dvb_usb_adapter *adap) | |||
1031 | 1031 | ||
1032 | switch (st->tuner_config) { | 1032 | switch (st->tuner_config) { |
1033 | case TUNER_LG: | 1033 | case TUNER_LG: |
1034 | if (dvb_attach(tda826x_attach, adap->fe[0], 0xc0, | 1034 | if (dvb_attach(tda826x_attach, adap->fe_adap[0].fe, 0xc0, |
1035 | &adap->dev->i2c_adap, 1)) | 1035 | &adap->dev->i2c_adap, 1)) |
1036 | ret = st->tuner_config; | 1036 | ret = st->tuner_config; |
1037 | break; | 1037 | break; |
1038 | case TUNER_S7395: | 1038 | case TUNER_S7395: |
1039 | if (dvb_attach(ix2505v_attach , adap->fe[0], &lme_tuner, | 1039 | if (dvb_attach(ix2505v_attach , adap->fe_adap[0].fe, &lme_tuner, |
1040 | &adap->dev->i2c_adap)) | 1040 | &adap->dev->i2c_adap)) |
1041 | ret = st->tuner_config; | 1041 | ret = st->tuner_config; |
1042 | break; | 1042 | break; |
1043 | case TUNER_S0194: | 1043 | case TUNER_S0194: |
1044 | if (dvb_attach(dvb_pll_attach , adap->fe[0], 0xc0, | 1044 | if (dvb_attach(dvb_pll_attach , adap->fe_adap[0].fe, 0xc0, |
1045 | &adap->dev->i2c_adap, DVB_PLL_OPERA1)) | 1045 | &adap->dev->i2c_adap, DVB_PLL_OPERA1)) |
1046 | ret = st->tuner_config; | 1046 | ret = st->tuner_config; |
1047 | break; | 1047 | break; |
@@ -1145,6 +1145,8 @@ static struct dvb_usb_device_properties lme2510_properties = { | |||
1145 | .num_adapters = 1, | 1145 | .num_adapters = 1, |
1146 | .adapter = { | 1146 | .adapter = { |
1147 | { | 1147 | { |
1148 | .num_frontends = 1, | ||
1149 | .fe = {{ | ||
1148 | .caps = DVB_USB_ADAP_HAS_PID_FILTER| | 1150 | .caps = DVB_USB_ADAP_HAS_PID_FILTER| |
1149 | DVB_USB_ADAP_NEED_PID_FILTERING| | 1151 | DVB_USB_ADAP_NEED_PID_FILTERING| |
1150 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 1152 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
@@ -1166,6 +1168,7 @@ static struct dvb_usb_device_properties lme2510_properties = { | |||
1166 | } | 1168 | } |
1167 | } | 1169 | } |
1168 | } | 1170 | } |
1171 | }}, | ||
1169 | } | 1172 | } |
1170 | }, | 1173 | }, |
1171 | .rc.core = { | 1174 | .rc.core = { |
@@ -1193,6 +1196,8 @@ static struct dvb_usb_device_properties lme2510c_properties = { | |||
1193 | .num_adapters = 1, | 1196 | .num_adapters = 1, |
1194 | .adapter = { | 1197 | .adapter = { |
1195 | { | 1198 | { |
1199 | .num_frontends = 1, | ||
1200 | .fe = {{ | ||
1196 | .caps = DVB_USB_ADAP_HAS_PID_FILTER| | 1201 | .caps = DVB_USB_ADAP_HAS_PID_FILTER| |
1197 | DVB_USB_ADAP_NEED_PID_FILTERING| | 1202 | DVB_USB_ADAP_NEED_PID_FILTERING| |
1198 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 1203 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
@@ -1214,6 +1219,7 @@ static struct dvb_usb_device_properties lme2510c_properties = { | |||
1214 | } | 1219 | } |
1215 | } | 1220 | } |
1216 | } | 1221 | } |
1222 | }}, | ||
1217 | } | 1223 | } |
1218 | }, | 1224 | }, |
1219 | .rc.core = { | 1225 | .rc.core = { |
@@ -1241,7 +1247,7 @@ static void *lme2510_exit_int(struct dvb_usb_device *d) | |||
1241 | void *buffer = NULL; | 1247 | void *buffer = NULL; |
1242 | 1248 | ||
1243 | if (adap != NULL) { | 1249 | if (adap != NULL) { |
1244 | lme2510_kill_urb(&adap->stream); | 1250 | lme2510_kill_urb(&adap->fe_adap[0].stream); |
1245 | adap->feedcount = 0; | 1251 | adap->feedcount = 0; |
1246 | } | 1252 | } |
1247 | 1253 | ||
diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c index ed5c161c1c4b..c3e461e9fa71 100644 --- a/drivers/media/dvb/dvb-usb/m920x.c +++ b/drivers/media/dvb/dvb-usb/m920x.c | |||
@@ -86,12 +86,12 @@ static int m920x_init(struct dvb_usb_device *d, struct m920x_inits *rc_seq) | |||
86 | } | 86 | } |
87 | 87 | ||
88 | for (i = 0; i < d->props.num_adapters; i++) | 88 | for (i = 0; i < d->props.num_adapters; i++) |
89 | flags |= d->adapter[i].props.caps; | 89 | flags |= d->adapter[i].props.fe[0].caps; |
90 | 90 | ||
91 | /* Some devices(Dposh) might crash if we attempt touch at all. */ | 91 | /* Some devices(Dposh) might crash if we attempt touch at all. */ |
92 | if (flags & DVB_USB_ADAP_HAS_PID_FILTER) { | 92 | if (flags & DVB_USB_ADAP_HAS_PID_FILTER) { |
93 | for (i = 0; i < d->props.num_adapters; i++) { | 93 | for (i = 0; i < d->props.num_adapters; i++) { |
94 | epi = d->adapter[i].props.stream.endpoint - 0x81; | 94 | epi = d->adapter[i].props.fe[0].stream.endpoint - 0x81; |
95 | 95 | ||
96 | if (epi < 0 || epi >= M9206_MAX_ADAPTERS) { | 96 | if (epi < 0 || epi >= M9206_MAX_ADAPTERS) { |
97 | printk(KERN_INFO "m920x: Unexpected adapter endpoint!\n"); | 97 | printk(KERN_INFO "m920x: Unexpected adapter endpoint!\n"); |
@@ -292,7 +292,7 @@ static int m920x_update_filters(struct dvb_usb_adapter *adap) | |||
292 | struct m920x_state *m = adap->dev->priv; | 292 | struct m920x_state *m = adap->dev->priv; |
293 | int enabled = m->filtering_enabled[adap->id]; | 293 | int enabled = m->filtering_enabled[adap->id]; |
294 | int i, ret = 0, filter = 0; | 294 | int i, ret = 0, filter = 0; |
295 | int ep = adap->props.stream.endpoint; | 295 | int ep = adap->props.fe[0].stream.endpoint; |
296 | 296 | ||
297 | for (i = 0; i < M9206_MAX_FILTERS; i++) | 297 | for (i = 0; i < M9206_MAX_FILTERS; i++) |
298 | if (m->filters[adap->id][i] == 8192) | 298 | if (m->filters[adap->id][i] == 8192) |
@@ -501,7 +501,7 @@ static int m920x_mt352_frontend_attach(struct dvb_usb_adapter *adap) | |||
501 | { | 501 | { |
502 | deb("%s\n",__func__); | 502 | deb("%s\n",__func__); |
503 | 503 | ||
504 | if ((adap->fe[0] = dvb_attach(mt352_attach, | 504 | if ((adap->fe_adap[0].fe = dvb_attach(mt352_attach, |
505 | &m920x_mt352_config, | 505 | &m920x_mt352_config, |
506 | &adap->dev->i2c_adap)) == NULL) | 506 | &adap->dev->i2c_adap)) == NULL) |
507 | return -EIO; | 507 | return -EIO; |
@@ -513,7 +513,7 @@ static int m920x_tda10046_08_frontend_attach(struct dvb_usb_adapter *adap) | |||
513 | { | 513 | { |
514 | deb("%s\n",__func__); | 514 | deb("%s\n",__func__); |
515 | 515 | ||
516 | if ((adap->fe[0] = dvb_attach(tda10046_attach, | 516 | if ((adap->fe_adap[0].fe = dvb_attach(tda10046_attach, |
517 | &m920x_tda10046_08_config, | 517 | &m920x_tda10046_08_config, |
518 | &adap->dev->i2c_adap)) == NULL) | 518 | &adap->dev->i2c_adap)) == NULL) |
519 | return -EIO; | 519 | return -EIO; |
@@ -525,7 +525,7 @@ static int m920x_tda10046_0b_frontend_attach(struct dvb_usb_adapter *adap) | |||
525 | { | 525 | { |
526 | deb("%s\n",__func__); | 526 | deb("%s\n",__func__); |
527 | 527 | ||
528 | if ((adap->fe[0] = dvb_attach(tda10046_attach, | 528 | if ((adap->fe_adap[0].fe = dvb_attach(tda10046_attach, |
529 | &m920x_tda10046_0b_config, | 529 | &m920x_tda10046_0b_config, |
530 | &adap->dev->i2c_adap)) == NULL) | 530 | &adap->dev->i2c_adap)) == NULL) |
531 | return -EIO; | 531 | return -EIO; |
@@ -537,7 +537,7 @@ static int m920x_qt1010_tuner_attach(struct dvb_usb_adapter *adap) | |||
537 | { | 537 | { |
538 | deb("%s\n",__func__); | 538 | deb("%s\n",__func__); |
539 | 539 | ||
540 | if (dvb_attach(qt1010_attach, adap->fe[0], &adap->dev->i2c_adap, &m920x_qt1010_config) == NULL) | 540 | if (dvb_attach(qt1010_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, &m920x_qt1010_config) == NULL) |
541 | return -ENODEV; | 541 | return -ENODEV; |
542 | 542 | ||
543 | return 0; | 543 | return 0; |
@@ -547,7 +547,7 @@ static int m920x_tda8275_60_tuner_attach(struct dvb_usb_adapter *adap) | |||
547 | { | 547 | { |
548 | deb("%s\n",__func__); | 548 | deb("%s\n",__func__); |
549 | 549 | ||
550 | if (dvb_attach(tda827x_attach, adap->fe[0], 0x60, &adap->dev->i2c_adap, NULL) == NULL) | 550 | if (dvb_attach(tda827x_attach, adap->fe_adap[0].fe, 0x60, &adap->dev->i2c_adap, NULL) == NULL) |
551 | return -ENODEV; | 551 | return -ENODEV; |
552 | 552 | ||
553 | return 0; | 553 | return 0; |
@@ -557,7 +557,7 @@ static int m920x_tda8275_61_tuner_attach(struct dvb_usb_adapter *adap) | |||
557 | { | 557 | { |
558 | deb("%s\n",__func__); | 558 | deb("%s\n",__func__); |
559 | 559 | ||
560 | if (dvb_attach(tda827x_attach, adap->fe[0], 0x61, &adap->dev->i2c_adap, NULL) == NULL) | 560 | if (dvb_attach(tda827x_attach, adap->fe_adap[0].fe, 0x61, &adap->dev->i2c_adap, NULL) == NULL) |
561 | return -ENODEV; | 561 | return -ENODEV; |
562 | 562 | ||
563 | return 0; | 563 | return 0; |
@@ -565,7 +565,7 @@ static int m920x_tda8275_61_tuner_attach(struct dvb_usb_adapter *adap) | |||
565 | 565 | ||
566 | static int m920x_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap) | 566 | static int m920x_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap) |
567 | { | 567 | { |
568 | dvb_attach(simple_tuner_attach, adap->fe[0], | 568 | dvb_attach(simple_tuner_attach, adap->fe_adap[0].fe, |
569 | &adap->dev->i2c_adap, 0x61, | 569 | &adap->dev->i2c_adap, 0x61, |
570 | TUNER_PHILIPS_FMD1216ME_MK3); | 570 | TUNER_PHILIPS_FMD1216ME_MK3); |
571 | return 0; | 571 | return 0; |
@@ -807,6 +807,9 @@ static struct dvb_usb_device_properties megasky_properties = { | |||
807 | .identify_state = m920x_identify_state, | 807 | .identify_state = m920x_identify_state, |
808 | .num_adapters = 1, | 808 | .num_adapters = 1, |
809 | .adapter = {{ | 809 | .adapter = {{ |
810 | .num_frontends = 1, | ||
811 | .fe = {{ | ||
812 | |||
810 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 813 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
811 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 814 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
812 | 815 | ||
@@ -827,6 +830,7 @@ static struct dvb_usb_device_properties megasky_properties = { | |||
827 | } | 830 | } |
828 | } | 831 | } |
829 | }, | 832 | }, |
833 | }}, | ||
830 | }}, | 834 | }}, |
831 | .i2c_algo = &m920x_i2c_algo, | 835 | .i2c_algo = &m920x_i2c_algo, |
832 | 836 | ||
@@ -851,6 +855,9 @@ static struct dvb_usb_device_properties digivox_mini_ii_properties = { | |||
851 | .identify_state = m920x_identify_state, | 855 | .identify_state = m920x_identify_state, |
852 | .num_adapters = 1, | 856 | .num_adapters = 1, |
853 | .adapter = {{ | 857 | .adapter = {{ |
858 | .num_frontends = 1, | ||
859 | .fe = {{ | ||
860 | |||
854 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 861 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
855 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 862 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
856 | 863 | ||
@@ -871,6 +878,7 @@ static struct dvb_usb_device_properties digivox_mini_ii_properties = { | |||
871 | } | 878 | } |
872 | } | 879 | } |
873 | }, | 880 | }, |
881 | }}, | ||
874 | }}, | 882 | }}, |
875 | .i2c_algo = &m920x_i2c_algo, | 883 | .i2c_algo = &m920x_i2c_algo, |
876 | 884 | ||
@@ -910,6 +918,9 @@ static struct dvb_usb_device_properties tvwalkertwin_properties = { | |||
910 | .identify_state = m920x_identify_state, | 918 | .identify_state = m920x_identify_state, |
911 | .num_adapters = 2, | 919 | .num_adapters = 2, |
912 | .adapter = {{ | 920 | .adapter = {{ |
921 | .num_frontends = 1, | ||
922 | .fe = {{ | ||
923 | |||
913 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 924 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
914 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 925 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
915 | 926 | ||
@@ -929,7 +940,11 @@ static struct dvb_usb_device_properties tvwalkertwin_properties = { | |||
929 | .buffersize = 512, | 940 | .buffersize = 512, |
930 | } | 941 | } |
931 | } | 942 | } |
943 | }}, | ||
932 | }},{ | 944 | }},{ |
945 | .num_frontends = 1, | ||
946 | .fe = {{ | ||
947 | |||
933 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 948 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
934 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 949 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
935 | 950 | ||
@@ -949,6 +964,7 @@ static struct dvb_usb_device_properties tvwalkertwin_properties = { | |||
949 | .buffersize = 512, | 964 | .buffersize = 512, |
950 | } | 965 | } |
951 | } | 966 | } |
967 | }}, | ||
952 | }, | 968 | }, |
953 | }}, | 969 | }}, |
954 | .i2c_algo = &m920x_i2c_algo, | 970 | .i2c_algo = &m920x_i2c_algo, |
@@ -974,6 +990,8 @@ static struct dvb_usb_device_properties dposh_properties = { | |||
974 | .identify_state = m920x_identify_state, | 990 | .identify_state = m920x_identify_state, |
975 | .num_adapters = 1, | 991 | .num_adapters = 1, |
976 | .adapter = {{ | 992 | .adapter = {{ |
993 | .num_frontends = 1, | ||
994 | .fe = {{ | ||
977 | /* Hardware pid filters don't work with this device/firmware */ | 995 | /* Hardware pid filters don't work with this device/firmware */ |
978 | 996 | ||
979 | .frontend_attach = m920x_mt352_frontend_attach, | 997 | .frontend_attach = m920x_mt352_frontend_attach, |
@@ -989,6 +1007,7 @@ static struct dvb_usb_device_properties dposh_properties = { | |||
989 | } | 1007 | } |
990 | } | 1008 | } |
991 | }, | 1009 | }, |
1010 | }}, | ||
992 | }}, | 1011 | }}, |
993 | .i2c_algo = &m920x_i2c_algo, | 1012 | .i2c_algo = &m920x_i2c_algo, |
994 | 1013 | ||
@@ -1019,6 +1038,9 @@ static struct dvb_usb_device_properties pinnacle_pctv310e_properties = { | |||
1019 | .identify_state = m920x_identify_state, | 1038 | .identify_state = m920x_identify_state, |
1020 | .num_adapters = 1, | 1039 | .num_adapters = 1, |
1021 | .adapter = {{ | 1040 | .adapter = {{ |
1041 | .num_frontends = 1, | ||
1042 | .fe = {{ | ||
1043 | |||
1022 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 1044 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
1023 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 1045 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
1024 | 1046 | ||
@@ -1041,6 +1063,7 @@ static struct dvb_usb_device_properties pinnacle_pctv310e_properties = { | |||
1041 | } | 1063 | } |
1042 | } | 1064 | } |
1043 | }, | 1065 | }, |
1066 | }}, | ||
1044 | } }, | 1067 | } }, |
1045 | .i2c_algo = &m920x_i2c_algo, | 1068 | .i2c_algo = &m920x_i2c_algo, |
1046 | 1069 | ||
diff --git a/drivers/media/dvb/dvb-usb/mxl111sf.c b/drivers/media/dvb/dvb-usb/mxl111sf.c index 3da452a1a06f..0c3f69ae946a 100644 --- a/drivers/media/dvb/dvb-usb/mxl111sf.c +++ b/drivers/media/dvb/dvb-usb/mxl111sf.c | |||
@@ -253,7 +253,8 @@ static int mxl111sf_adap_fe_init(struct dvb_frontend *fe) | |||
253 | struct dvb_usb_adapter *adap = fe->dvb->priv; | 253 | struct dvb_usb_adapter *adap = fe->dvb->priv; |
254 | struct dvb_usb_device *d = adap->dev; | 254 | struct dvb_usb_device *d = adap->dev; |
255 | struct mxl111sf_state *state = d->priv; | 255 | struct mxl111sf_state *state = d->priv; |
256 | struct mxl111sf_adap_state *adap_state = adap->priv; | 256 | struct mxl111sf_adap_state *adap_state = adap->fe_adap[fe->id].priv; |
257 | |||
257 | int err; | 258 | int err; |
258 | 259 | ||
259 | /* exit if we didnt initialize the driver yet */ | 260 | /* exit if we didnt initialize the driver yet */ |
@@ -311,7 +312,7 @@ static int mxl111sf_adap_fe_sleep(struct dvb_frontend *fe) | |||
311 | struct dvb_usb_adapter *adap = fe->dvb->priv; | 312 | struct dvb_usb_adapter *adap = fe->dvb->priv; |
312 | struct dvb_usb_device *d = adap->dev; | 313 | struct dvb_usb_device *d = adap->dev; |
313 | struct mxl111sf_state *state = d->priv; | 314 | struct mxl111sf_state *state = d->priv; |
314 | struct mxl111sf_adap_state *adap_state = adap->priv; | 315 | struct mxl111sf_adap_state *adap_state = adap->fe_adap[fe->id].priv; |
315 | int err; | 316 | int err; |
316 | 317 | ||
317 | /* exit if we didnt initialize the driver yet */ | 318 | /* exit if we didnt initialize the driver yet */ |
@@ -336,7 +337,7 @@ static int mxl111sf_ep6_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) | |||
336 | { | 337 | { |
337 | struct dvb_usb_device *d = adap->dev; | 338 | struct dvb_usb_device *d = adap->dev; |
338 | struct mxl111sf_state *state = d->priv; | 339 | struct mxl111sf_state *state = d->priv; |
339 | struct mxl111sf_adap_state *adap_state = adap->priv; | 340 | struct mxl111sf_adap_state *adap_state = adap->fe_adap[adap->active_fe].priv; |
340 | int ret = 0; | 341 | int ret = 0; |
341 | u8 tmp; | 342 | u8 tmp; |
342 | 343 | ||
@@ -378,7 +379,7 @@ static int mxl111sf_lgdt3305_frontend_attach(struct dvb_usb_adapter *adap) | |||
378 | { | 379 | { |
379 | struct dvb_usb_device *d = adap->dev; | 380 | struct dvb_usb_device *d = adap->dev; |
380 | struct mxl111sf_state *state = d->priv; | 381 | struct mxl111sf_state *state = d->priv; |
381 | struct mxl111sf_adap_state *adap_state = adap->priv; | 382 | struct mxl111sf_adap_state *adap_state = adap->fe_adap[0].priv; |
382 | int ret; | 383 | int ret; |
383 | 384 | ||
384 | deb_adv("%s()\n", __func__); | 385 | deb_adv("%s()\n", __func__); |
@@ -421,14 +422,14 @@ static int mxl111sf_lgdt3305_frontend_attach(struct dvb_usb_adapter *adap) | |||
421 | if (mxl_fail(ret)) | 422 | if (mxl_fail(ret)) |
422 | goto fail; | 423 | goto fail; |
423 | 424 | ||
424 | adap->fe[0] = dvb_attach(lgdt3305_attach, | 425 | adap->fe_adap[0].fe = dvb_attach(lgdt3305_attach, |
425 | &hauppauge_lgdt3305_config, | 426 | &hauppauge_lgdt3305_config, |
426 | &adap->dev->i2c_adap); | 427 | &adap->dev->i2c_adap); |
427 | if (adap->fe[0]) { | 428 | if (adap->fe_adap[0].fe) { |
428 | adap_state->fe_init = adap->fe[0]->ops.init; | 429 | adap_state->fe_init = adap->fe_adap[0].fe->ops.init; |
429 | adap->fe[0]->ops.init = mxl111sf_adap_fe_init; | 430 | adap->fe_adap[0].fe->ops.init = mxl111sf_adap_fe_init; |
430 | adap_state->fe_sleep = adap->fe[0]->ops.sleep; | 431 | adap_state->fe_sleep = adap->fe_adap[0].fe->ops.sleep; |
431 | adap->fe[0]->ops.sleep = mxl111sf_adap_fe_sleep; | 432 | adap->fe_adap[0].fe->ops.sleep = mxl111sf_adap_fe_sleep; |
432 | return 0; | 433 | return 0; |
433 | } | 434 | } |
434 | ret = -EIO; | 435 | ret = -EIO; |
@@ -516,7 +517,7 @@ static int mxl111sf_attach_tuner(struct dvb_usb_adapter *adap) | |||
516 | 517 | ||
517 | deb_adv("%s()\n", __func__); | 518 | deb_adv("%s()\n", __func__); |
518 | 519 | ||
519 | if (NULL != dvb_attach(mxl111sf_tuner_attach, adap->fe[0], state, | 520 | if (NULL != dvb_attach(mxl111sf_tuner_attach, adap->fe_adap[0].fe, state, |
520 | &mxl_tuner_config)) | 521 | &mxl_tuner_config)) |
521 | return 0; | 522 | return 0; |
522 | 523 | ||
@@ -714,13 +715,16 @@ static struct dvb_usb_device_properties mxl111sf_atsc_bulk_properties = { | |||
714 | .num_adapters = 1, | 715 | .num_adapters = 1, |
715 | .adapter = { | 716 | .adapter = { |
716 | { | 717 | { |
718 | .fe_ioctl_override = mxl111sf_fe_ioctl_override, | ||
719 | .num_frontends = 1, | ||
720 | .fe = {{ | ||
717 | .size_of_priv = sizeof(struct mxl111sf_adap_state), | 721 | .size_of_priv = sizeof(struct mxl111sf_adap_state), |
718 | .fe_ioctl_override = mxl111sf_fe_ioctl_override, | ||
719 | 722 | ||
720 | .frontend_attach = mxl111sf_lgdt3305_frontend_attach, | 723 | .frontend_attach = mxl111sf_lgdt3305_frontend_attach, |
721 | .tuner_attach = mxl111sf_attach_tuner, | 724 | .tuner_attach = mxl111sf_attach_tuner, |
722 | 725 | ||
723 | MXL111SF_EP6_BULK_STREAMING_CONFIG, | 726 | MXL111SF_EP6_BULK_STREAMING_CONFIG, |
727 | }}, | ||
724 | }, | 728 | }, |
725 | }, | 729 | }, |
726 | .num_device_descs = 6, | 730 | .num_device_descs = 6, |
@@ -768,13 +772,16 @@ static struct dvb_usb_device_properties mxl111sf_atsc_isoc_properties = { | |||
768 | .num_adapters = 1, | 772 | .num_adapters = 1, |
769 | .adapter = { | 773 | .adapter = { |
770 | { | 774 | { |
775 | .fe_ioctl_override = mxl111sf_fe_ioctl_override, | ||
776 | .num_frontends = 1, | ||
777 | .fe = {{ | ||
771 | .size_of_priv = sizeof(struct mxl111sf_adap_state), | 778 | .size_of_priv = sizeof(struct mxl111sf_adap_state), |
772 | .fe_ioctl_override = mxl111sf_fe_ioctl_override, | ||
773 | 779 | ||
774 | .frontend_attach = mxl111sf_lgdt3305_frontend_attach, | 780 | .frontend_attach = mxl111sf_lgdt3305_frontend_attach, |
775 | .tuner_attach = mxl111sf_attach_tuner, | 781 | .tuner_attach = mxl111sf_attach_tuner, |
776 | 782 | ||
777 | MXL111SF_EP6_ISOC_STREAMING_CONFIG, | 783 | MXL111SF_EP6_ISOC_STREAMING_CONFIG, |
784 | }}, | ||
778 | }, | 785 | }, |
779 | }, | 786 | }, |
780 | .num_device_descs = 6, | 787 | .num_device_descs = 6, |
diff --git a/drivers/media/dvb/dvb-usb/nova-t-usb2.c b/drivers/media/dvb/dvb-usb/nova-t-usb2.c index bc350e982b72..21384da6570e 100644 --- a/drivers/media/dvb/dvb-usb/nova-t-usb2.c +++ b/drivers/media/dvb/dvb-usb/nova-t-usb2.c | |||
@@ -166,6 +166,8 @@ static struct dvb_usb_device_properties nova_t_properties = { | |||
166 | .num_adapters = 1, | 166 | .num_adapters = 1, |
167 | .adapter = { | 167 | .adapter = { |
168 | { | 168 | { |
169 | .num_frontends = 1, | ||
170 | .fe = {{ | ||
169 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 171 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
170 | .pid_filter_count = 32, | 172 | .pid_filter_count = 32, |
171 | 173 | ||
@@ -186,7 +188,7 @@ static struct dvb_usb_device_properties nova_t_properties = { | |||
186 | } | 188 | } |
187 | } | 189 | } |
188 | }, | 190 | }, |
189 | 191 | }}, | |
190 | .size_of_priv = sizeof(struct dibusb_state), | 192 | .size_of_priv = sizeof(struct dibusb_state), |
191 | } | 193 | } |
192 | }, | 194 | }, |
diff --git a/drivers/media/dvb/dvb-usb/opera1.c b/drivers/media/dvb/dvb-usb/opera1.c index 170b1ef16fac..b6e12f9665b3 100644 --- a/drivers/media/dvb/dvb-usb/opera1.c +++ b/drivers/media/dvb/dvb-usb/opera1.c | |||
@@ -263,10 +263,10 @@ static struct stv0299_config opera1_stv0299_config = { | |||
263 | 263 | ||
264 | static int opera1_frontend_attach(struct dvb_usb_adapter *d) | 264 | static int opera1_frontend_attach(struct dvb_usb_adapter *d) |
265 | { | 265 | { |
266 | if ((d->fe[0] = | 266 | if ((d->fe_adap[0].fe = |
267 | dvb_attach(stv0299_attach, &opera1_stv0299_config, | 267 | dvb_attach(stv0299_attach, &opera1_stv0299_config, |
268 | &d->dev->i2c_adap)) != NULL) { | 268 | &d->dev->i2c_adap)) != NULL) { |
269 | d->fe[0]->ops.set_voltage = opera1_set_voltage; | 269 | d->fe_adap[0].fe->ops.set_voltage = opera1_set_voltage; |
270 | return 0; | 270 | return 0; |
271 | } | 271 | } |
272 | info("not attached stv0299"); | 272 | info("not attached stv0299"); |
@@ -276,7 +276,7 @@ static int opera1_frontend_attach(struct dvb_usb_adapter *d) | |||
276 | static int opera1_tuner_attach(struct dvb_usb_adapter *adap) | 276 | static int opera1_tuner_attach(struct dvb_usb_adapter *adap) |
277 | { | 277 | { |
278 | dvb_attach( | 278 | dvb_attach( |
279 | dvb_pll_attach, adap->fe[0], 0xc0>>1, | 279 | dvb_pll_attach, adap->fe_adap[0].fe, 0xc0>>1, |
280 | &adap->dev->i2c_adap, DVB_PLL_OPERA1 | 280 | &adap->dev->i2c_adap, DVB_PLL_OPERA1 |
281 | ); | 281 | ); |
282 | return 0; | 282 | return 0; |
@@ -516,6 +516,8 @@ static struct dvb_usb_device_properties opera1_properties = { | |||
516 | .num_adapters = 1, | 516 | .num_adapters = 1, |
517 | .adapter = { | 517 | .adapter = { |
518 | { | 518 | { |
519 | .num_frontends = 1, | ||
520 | .fe = {{ | ||
519 | .frontend_attach = opera1_frontend_attach, | 521 | .frontend_attach = opera1_frontend_attach, |
520 | .streaming_ctrl = opera1_streaming_ctrl, | 522 | .streaming_ctrl = opera1_streaming_ctrl, |
521 | .tuner_attach = opera1_tuner_attach, | 523 | .tuner_attach = opera1_tuner_attach, |
@@ -535,6 +537,7 @@ static struct dvb_usb_device_properties opera1_properties = { | |||
535 | } | 537 | } |
536 | } | 538 | } |
537 | }, | 539 | }, |
540 | }}, | ||
538 | } | 541 | } |
539 | }, | 542 | }, |
540 | .num_device_descs = 1, | 543 | .num_device_descs = 1, |
diff --git a/drivers/media/dvb/dvb-usb/technisat-usb2.c b/drivers/media/dvb/dvb-usb/technisat-usb2.c index 2a89d1ef89a3..0998fe961950 100644 --- a/drivers/media/dvb/dvb-usb/technisat-usb2.c +++ b/drivers/media/dvb/dvb-usb/technisat-usb2.c | |||
@@ -292,7 +292,7 @@ static void technisat_usb2_green_led_control(struct work_struct *work) | |||
292 | { | 292 | { |
293 | struct technisat_usb2_state *state = | 293 | struct technisat_usb2_state *state = |
294 | container_of(work, struct technisat_usb2_state, green_led_work.work); | 294 | container_of(work, struct technisat_usb2_state, green_led_work.work); |
295 | struct dvb_frontend *fe = state->dev->adapter[0].fe[0]; | 295 | struct dvb_frontend *fe = state->dev->adapter[0].fe_adap[0].fe; |
296 | 296 | ||
297 | if (state->power_state == 0) | 297 | if (state->power_state == 0) |
298 | goto schedule; | 298 | goto schedule; |
@@ -505,14 +505,14 @@ static int technisat_usb2_frontend_attach(struct dvb_usb_adapter *a) | |||
505 | struct usb_device *udev = a->dev->udev; | 505 | struct usb_device *udev = a->dev->udev; |
506 | int ret; | 506 | int ret; |
507 | 507 | ||
508 | a->fe[0] = dvb_attach(stv090x_attach, &technisat_usb2_stv090x_config, | 508 | a->fe_adap[0].fe = dvb_attach(stv090x_attach, &technisat_usb2_stv090x_config, |
509 | &a->dev->i2c_adap, STV090x_DEMODULATOR_0); | 509 | &a->dev->i2c_adap, STV090x_DEMODULATOR_0); |
510 | 510 | ||
511 | if (a->fe[0]) { | 511 | if (a->fe_adap[0].fe) { |
512 | struct stv6110x_devctl *ctl; | 512 | struct stv6110x_devctl *ctl; |
513 | 513 | ||
514 | ctl = dvb_attach(stv6110x_attach, | 514 | ctl = dvb_attach(stv6110x_attach, |
515 | a->fe[0], | 515 | a->fe_adap[0].fe, |
516 | &technisat_usb2_stv6110x_config, | 516 | &technisat_usb2_stv6110x_config, |
517 | &a->dev->i2c_adap); | 517 | &a->dev->i2c_adap); |
518 | 518 | ||
@@ -532,8 +532,8 @@ static int technisat_usb2_frontend_attach(struct dvb_usb_adapter *a) | |||
532 | /* call the init function once to initialize | 532 | /* call the init function once to initialize |
533 | tuner's clock output divider and demod's | 533 | tuner's clock output divider and demod's |
534 | master clock */ | 534 | master clock */ |
535 | if (a->fe[0]->ops.init) | 535 | if (a->fe_adap[0].fe->ops.init) |
536 | a->fe[0]->ops.init(a->fe[0]); | 536 | a->fe_adap[0].fe->ops.init(a->fe_adap[0].fe); |
537 | 537 | ||
538 | if (mutex_lock_interruptible(&a->dev->i2c_mutex) < 0) | 538 | if (mutex_lock_interruptible(&a->dev->i2c_mutex) < 0) |
539 | return -EAGAIN; | 539 | return -EAGAIN; |
@@ -548,20 +548,20 @@ static int technisat_usb2_frontend_attach(struct dvb_usb_adapter *a) | |||
548 | if (ret != 0) | 548 | if (ret != 0) |
549 | err("could not set IF_CLK to external"); | 549 | err("could not set IF_CLK to external"); |
550 | 550 | ||
551 | a->fe[0]->ops.set_voltage = technisat_usb2_set_voltage; | 551 | a->fe_adap[0].fe->ops.set_voltage = technisat_usb2_set_voltage; |
552 | 552 | ||
553 | /* if everything was successful assign a nice name to the frontend */ | 553 | /* if everything was successful assign a nice name to the frontend */ |
554 | strlcpy(a->fe[0]->ops.info.name, a->dev->desc->name, | 554 | strlcpy(a->fe_adap[0].fe->ops.info.name, a->dev->desc->name, |
555 | sizeof(a->fe[0]->ops.info.name)); | 555 | sizeof(a->fe_adap[0].fe->ops.info.name)); |
556 | } else { | 556 | } else { |
557 | dvb_frontend_detach(a->fe[0]); | 557 | dvb_frontend_detach(a->fe_adap[0].fe); |
558 | a->fe[0] = NULL; | 558 | a->fe_adap[0].fe = NULL; |
559 | } | 559 | } |
560 | } | 560 | } |
561 | 561 | ||
562 | technisat_usb2_set_led_timer(a->dev, 1, 1); | 562 | technisat_usb2_set_led_timer(a->dev, 1, 1); |
563 | 563 | ||
564 | return a->fe[0] == NULL ? -ENODEV : 0; | 564 | return a->fe_adap[0].fe == NULL ? -ENODEV : 0; |
565 | } | 565 | } |
566 | 566 | ||
567 | /* Remote control */ | 567 | /* Remote control */ |
@@ -697,6 +697,8 @@ static struct dvb_usb_device_properties technisat_usb2_devices = { | |||
697 | .num_adapters = 1, | 697 | .num_adapters = 1, |
698 | .adapter = { | 698 | .adapter = { |
699 | { | 699 | { |
700 | .num_frontends = 1, | ||
701 | .fe = {{ | ||
700 | .frontend_attach = technisat_usb2_frontend_attach, | 702 | .frontend_attach = technisat_usb2_frontend_attach, |
701 | 703 | ||
702 | .stream = { | 704 | .stream = { |
@@ -711,7 +713,7 @@ static struct dvb_usb_device_properties technisat_usb2_devices = { | |||
711 | } | 713 | } |
712 | } | 714 | } |
713 | }, | 715 | }, |
714 | 716 | }}, | |
715 | .size_of_priv = 0, | 717 | .size_of_priv = 0, |
716 | }, | 718 | }, |
717 | }, | 719 | }, |
diff --git a/drivers/media/dvb/dvb-usb/ttusb2.c b/drivers/media/dvb/dvb-usb/ttusb2.c index bda37ce05627..130d2960ddf5 100644 --- a/drivers/media/dvb/dvb-usb/ttusb2.c +++ b/drivers/media/dvb/dvb-usb/ttusb2.c | |||
@@ -222,7 +222,7 @@ static int ttusb2_frontend_tda10086_attach(struct dvb_usb_adapter *adap) | |||
222 | if (usb_set_interface(adap->dev->udev,0,3) < 0) | 222 | if (usb_set_interface(adap->dev->udev,0,3) < 0) |
223 | err("set interface to alts=3 failed"); | 223 | err("set interface to alts=3 failed"); |
224 | 224 | ||
225 | if ((adap->fe[0] = dvb_attach(tda10086_attach, &tda10086_config, &adap->dev->i2c_adap)) == NULL) { | 225 | if ((adap->fe_adap[0].fe = dvb_attach(tda10086_attach, &tda10086_config, &adap->dev->i2c_adap)) == NULL) { |
226 | deb_info("TDA10086 attach failed\n"); | 226 | deb_info("TDA10086 attach failed\n"); |
227 | return -ENODEV; | 227 | return -ENODEV; |
228 | } | 228 | } |
@@ -234,7 +234,7 @@ static int ttusb2_ct3650_i2c_gate_ctrl(struct dvb_frontend *fe, int enable) | |||
234 | { | 234 | { |
235 | struct dvb_usb_adapter *adap = fe->dvb->priv; | 235 | struct dvb_usb_adapter *adap = fe->dvb->priv; |
236 | 236 | ||
237 | return adap->fe[0]->ops.i2c_gate_ctrl(adap->fe[0], enable); | 237 | return adap->fe_adap[0].fe->ops.i2c_gate_ctrl(adap->fe_adap[0].fe, enable); |
238 | } | 238 | } |
239 | 239 | ||
240 | static int ttusb2_frontend_tda10023_attach(struct dvb_usb_adapter *adap) | 240 | static int ttusb2_frontend_tda10023_attach(struct dvb_usb_adapter *adap) |
@@ -242,26 +242,26 @@ static int ttusb2_frontend_tda10023_attach(struct dvb_usb_adapter *adap) | |||
242 | if (usb_set_interface(adap->dev->udev, 0, 3) < 0) | 242 | if (usb_set_interface(adap->dev->udev, 0, 3) < 0) |
243 | err("set interface to alts=3 failed"); | 243 | err("set interface to alts=3 failed"); |
244 | 244 | ||
245 | if (adap->fe[0] == NULL) { | 245 | if (adap->fe_adap[0].fe == NULL) { |
246 | /* FE 0 DVB-C */ | 246 | /* FE 0 DVB-C */ |
247 | adap->fe[0] = dvb_attach(tda10023_attach, | 247 | adap->fe_adap[0].fe = dvb_attach(tda10023_attach, |
248 | &tda10023_config, &adap->dev->i2c_adap, 0x48); | 248 | &tda10023_config, &adap->dev->i2c_adap, 0x48); |
249 | 249 | ||
250 | if (adap->fe[0] == NULL) { | 250 | if (adap->fe_adap[0].fe == NULL) { |
251 | deb_info("TDA10023 attach failed\n"); | 251 | deb_info("TDA10023 attach failed\n"); |
252 | return -ENODEV; | 252 | return -ENODEV; |
253 | } | 253 | } |
254 | } else { | 254 | } else { |
255 | adap->fe[1] = dvb_attach(tda10048_attach, | 255 | adap->fe_adap[1].fe = dvb_attach(tda10048_attach, |
256 | &tda10048_config, &adap->dev->i2c_adap); | 256 | &tda10048_config, &adap->dev->i2c_adap); |
257 | 257 | ||
258 | if (adap->fe[1] == NULL) { | 258 | if (adap->fe_adap[1].fe == NULL) { |
259 | deb_info("TDA10048 attach failed\n"); | 259 | deb_info("TDA10048 attach failed\n"); |
260 | return -ENODEV; | 260 | return -ENODEV; |
261 | } | 261 | } |
262 | 262 | ||
263 | /* tuner is behind TDA10023 I2C-gate */ | 263 | /* tuner is behind TDA10023 I2C-gate */ |
264 | adap->fe[1]->ops.i2c_gate_ctrl = ttusb2_ct3650_i2c_gate_ctrl; | 264 | adap->fe_adap[1].fe->ops.i2c_gate_ctrl = ttusb2_ct3650_i2c_gate_ctrl; |
265 | 265 | ||
266 | } | 266 | } |
267 | 267 | ||
@@ -273,10 +273,10 @@ static int ttusb2_tuner_tda827x_attach(struct dvb_usb_adapter *adap) | |||
273 | struct dvb_frontend *fe; | 273 | struct dvb_frontend *fe; |
274 | 274 | ||
275 | /* MFE: select correct FE to attach tuner since that's called twice */ | 275 | /* MFE: select correct FE to attach tuner since that's called twice */ |
276 | if (adap->fe[1] == NULL) | 276 | if (adap->fe_adap[1].fe == NULL) |
277 | fe = adap->fe[0]; | 277 | fe = adap->fe_adap[0].fe; |
278 | else | 278 | else |
279 | fe = adap->fe[1]; | 279 | fe = adap->fe_adap[1].fe; |
280 | 280 | ||
281 | /* attach tuner */ | 281 | /* attach tuner */ |
282 | if (dvb_attach(tda827x_attach, fe, 0x61, &adap->dev->i2c_adap, &tda827x_config) == NULL) { | 282 | if (dvb_attach(tda827x_attach, fe, 0x61, &adap->dev->i2c_adap, &tda827x_config) == NULL) { |
@@ -288,12 +288,12 @@ static int ttusb2_tuner_tda827x_attach(struct dvb_usb_adapter *adap) | |||
288 | 288 | ||
289 | static int ttusb2_tuner_tda826x_attach(struct dvb_usb_adapter *adap) | 289 | static int ttusb2_tuner_tda826x_attach(struct dvb_usb_adapter *adap) |
290 | { | 290 | { |
291 | if (dvb_attach(tda826x_attach, adap->fe[0], 0x60, &adap->dev->i2c_adap, 0) == NULL) { | 291 | if (dvb_attach(tda826x_attach, adap->fe_adap[0].fe, 0x60, &adap->dev->i2c_adap, 0) == NULL) { |
292 | deb_info("TDA8263 attach failed\n"); | 292 | deb_info("TDA8263 attach failed\n"); |
293 | return -ENODEV; | 293 | return -ENODEV; |
294 | } | 294 | } |
295 | 295 | ||
296 | if (dvb_attach(lnbp21_attach, adap->fe[0], &adap->dev->i2c_adap, 0, 0) == NULL) { | 296 | if (dvb_attach(lnbp21_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, 0, 0) == NULL) { |
297 | deb_info("LNBP21 attach failed\n"); | 297 | deb_info("LNBP21 attach failed\n"); |
298 | return -ENODEV; | 298 | return -ENODEV; |
299 | } | 299 | } |
@@ -340,6 +340,8 @@ static struct dvb_usb_device_properties ttusb2_properties = { | |||
340 | .num_adapters = 1, | 340 | .num_adapters = 1, |
341 | .adapter = { | 341 | .adapter = { |
342 | { | 342 | { |
343 | .num_frontends = 1, | ||
344 | .fe = {{ | ||
343 | .streaming_ctrl = NULL, // ttusb2_streaming_ctrl, | 345 | .streaming_ctrl = NULL, // ttusb2_streaming_ctrl, |
344 | 346 | ||
345 | .frontend_attach = ttusb2_frontend_tda10086_attach, | 347 | .frontend_attach = ttusb2_frontend_tda10086_attach, |
@@ -358,6 +360,7 @@ static struct dvb_usb_device_properties ttusb2_properties = { | |||
358 | } | 360 | } |
359 | } | 361 | } |
360 | } | 362 | } |
363 | }}, | ||
361 | } | 364 | } |
362 | }, | 365 | }, |
363 | 366 | ||
@@ -392,6 +395,8 @@ static struct dvb_usb_device_properties ttusb2_properties_s2400 = { | |||
392 | .num_adapters = 1, | 395 | .num_adapters = 1, |
393 | .adapter = { | 396 | .adapter = { |
394 | { | 397 | { |
398 | .num_frontends = 1, | ||
399 | .fe = {{ | ||
395 | .streaming_ctrl = NULL, | 400 | .streaming_ctrl = NULL, |
396 | 401 | ||
397 | .frontend_attach = ttusb2_frontend_tda10086_attach, | 402 | .frontend_attach = ttusb2_frontend_tda10086_attach, |
@@ -410,6 +415,7 @@ static struct dvb_usb_device_properties ttusb2_properties_s2400 = { | |||
410 | } | 415 | } |
411 | } | 416 | } |
412 | } | 417 | } |
418 | }}, | ||
413 | } | 419 | } |
414 | }, | 420 | }, |
415 | 421 | ||
@@ -446,9 +452,10 @@ static struct dvb_usb_device_properties ttusb2_properties_ct3650 = { | |||
446 | .num_adapters = 1, | 452 | .num_adapters = 1, |
447 | .adapter = { | 453 | .adapter = { |
448 | { | 454 | { |
455 | .num_frontends = 2, | ||
456 | .fe = {{ | ||
449 | .streaming_ctrl = NULL, | 457 | .streaming_ctrl = NULL, |
450 | 458 | ||
451 | .num_frontends = 2, | ||
452 | .frontend_attach = ttusb2_frontend_tda10023_attach, | 459 | .frontend_attach = ttusb2_frontend_tda10023_attach, |
453 | .tuner_attach = ttusb2_tuner_tda827x_attach, | 460 | .tuner_attach = ttusb2_tuner_tda827x_attach, |
454 | 461 | ||
@@ -465,6 +472,26 @@ static struct dvb_usb_device_properties ttusb2_properties_ct3650 = { | |||
465 | } | 472 | } |
466 | } | 473 | } |
467 | } | 474 | } |
475 | },{ | ||
476 | .streaming_ctrl = NULL, | ||
477 | |||
478 | .frontend_attach = ttusb2_frontend_tda10023_attach, | ||
479 | .tuner_attach = ttusb2_tuner_tda827x_attach, | ||
480 | |||
481 | /* parameter for the MPEG2-data transfer */ | ||
482 | .stream = { | ||
483 | .type = USB_ISOC, | ||
484 | .count = 5, | ||
485 | .endpoint = 0x02, | ||
486 | .u = { | ||
487 | .isoc = { | ||
488 | .framesperurb = 4, | ||
489 | .framesize = 940, | ||
490 | .interval = 1, | ||
491 | } | ||
492 | } | ||
493 | } | ||
494 | }}, | ||
468 | }, | 495 | }, |
469 | }, | 496 | }, |
470 | 497 | ||
diff --git a/drivers/media/dvb/dvb-usb/umt-010.c b/drivers/media/dvb/dvb-usb/umt-010.c index ed4765a1f323..463673a5c2b2 100644 --- a/drivers/media/dvb/dvb-usb/umt-010.c +++ b/drivers/media/dvb/dvb-usb/umt-010.c | |||
@@ -60,14 +60,14 @@ static int umt_mt352_frontend_attach(struct dvb_usb_adapter *adap) | |||
60 | umt_config.demod_init = umt_mt352_demod_init; | 60 | umt_config.demod_init = umt_mt352_demod_init; |
61 | umt_config.demod_address = 0xf; | 61 | umt_config.demod_address = 0xf; |
62 | 62 | ||
63 | adap->fe[0] = dvb_attach(mt352_attach, &umt_config, &adap->dev->i2c_adap); | 63 | adap->fe_adap[0].fe = dvb_attach(mt352_attach, &umt_config, &adap->dev->i2c_adap); |
64 | 64 | ||
65 | return 0; | 65 | return 0; |
66 | } | 66 | } |
67 | 67 | ||
68 | static int umt_tuner_attach (struct dvb_usb_adapter *adap) | 68 | static int umt_tuner_attach (struct dvb_usb_adapter *adap) |
69 | { | 69 | { |
70 | dvb_attach(dvb_pll_attach, adap->fe[0], 0x61, NULL, DVB_PLL_TUA6034); | 70 | dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x61, NULL, DVB_PLL_TUA6034); |
71 | return 0; | 71 | return 0; |
72 | } | 72 | } |
73 | 73 | ||
@@ -100,6 +100,8 @@ static struct dvb_usb_device_properties umt_properties = { | |||
100 | .num_adapters = 1, | 100 | .num_adapters = 1, |
101 | .adapter = { | 101 | .adapter = { |
102 | { | 102 | { |
103 | .num_frontends = 1, | ||
104 | .fe = {{ | ||
103 | .streaming_ctrl = dibusb2_0_streaming_ctrl, | 105 | .streaming_ctrl = dibusb2_0_streaming_ctrl, |
104 | .frontend_attach = umt_mt352_frontend_attach, | 106 | .frontend_attach = umt_mt352_frontend_attach, |
105 | .tuner_attach = umt_tuner_attach, | 107 | .tuner_attach = umt_tuner_attach, |
@@ -115,7 +117,7 @@ static struct dvb_usb_device_properties umt_properties = { | |||
115 | } | 117 | } |
116 | } | 118 | } |
117 | }, | 119 | }, |
118 | 120 | }}, | |
119 | .size_of_priv = sizeof(struct dibusb_state), | 121 | .size_of_priv = sizeof(struct dibusb_state), |
120 | } | 122 | } |
121 | }, | 123 | }, |
diff --git a/drivers/media/dvb/dvb-usb/vp702x.c b/drivers/media/dvb/dvb-usb/vp702x.c index 47b3462cead8..45e31f224814 100644 --- a/drivers/media/dvb/dvb-usb/vp702x.c +++ b/drivers/media/dvb/dvb-usb/vp702x.c | |||
@@ -320,7 +320,7 @@ static int vp702x_frontend_attach(struct dvb_usb_adapter *adap) | |||
320 | 320 | ||
321 | vp702x_init_pid_filter(adap); | 321 | vp702x_init_pid_filter(adap); |
322 | 322 | ||
323 | adap->fe[0] = vp702x_fe_attach(adap->dev); | 323 | adap->fe_adap[0].fe = vp702x_fe_attach(adap->dev); |
324 | vp702x_usb_out_op(adap->dev, SET_TUNER_POWER_REQ, 1, 7, NULL, 0); | 324 | vp702x_usb_out_op(adap->dev, SET_TUNER_POWER_REQ, 1, 7, NULL, 0); |
325 | 325 | ||
326 | return 0; | 326 | return 0; |
@@ -383,6 +383,8 @@ static struct dvb_usb_device_properties vp702x_properties = { | |||
383 | .num_adapters = 1, | 383 | .num_adapters = 1, |
384 | .adapter = { | 384 | .adapter = { |
385 | { | 385 | { |
386 | .num_frontends = 1, | ||
387 | .fe = {{ | ||
386 | .caps = DVB_USB_ADAP_RECEIVES_204_BYTE_TS, | 388 | .caps = DVB_USB_ADAP_RECEIVES_204_BYTE_TS, |
387 | 389 | ||
388 | .streaming_ctrl = vp702x_streaming_ctrl, | 390 | .streaming_ctrl = vp702x_streaming_ctrl, |
@@ -399,6 +401,7 @@ static struct dvb_usb_device_properties vp702x_properties = { | |||
399 | } | 401 | } |
400 | } | 402 | } |
401 | }, | 403 | }, |
404 | }}, | ||
402 | .size_of_priv = sizeof(struct vp702x_adapter_state), | 405 | .size_of_priv = sizeof(struct vp702x_adapter_state), |
403 | } | 406 | } |
404 | }, | 407 | }, |
diff --git a/drivers/media/dvb/dvb-usb/vp7045.c b/drivers/media/dvb/dvb-usb/vp7045.c index 4264523fcf67..498024cec2d3 100644 --- a/drivers/media/dvb/dvb-usb/vp7045.c +++ b/drivers/media/dvb/dvb-usb/vp7045.c | |||
@@ -214,7 +214,7 @@ static int vp7045_frontend_attach(struct dvb_usb_adapter *adap) | |||
214 | /* Dump the EEPROM */ | 214 | /* Dump the EEPROM */ |
215 | /* vp7045_read_eeprom(d,buf, 255, FX2_ID_ADDR); */ | 215 | /* vp7045_read_eeprom(d,buf, 255, FX2_ID_ADDR); */ |
216 | 216 | ||
217 | adap->fe[0] = vp7045_fe_attach(adap->dev); | 217 | adap->fe_adap[0].fe = vp7045_fe_attach(adap->dev); |
218 | 218 | ||
219 | return 0; | 219 | return 0; |
220 | } | 220 | } |
@@ -263,6 +263,8 @@ static struct dvb_usb_device_properties vp7045_properties = { | |||
263 | .num_adapters = 1, | 263 | .num_adapters = 1, |
264 | .adapter = { | 264 | .adapter = { |
265 | { | 265 | { |
266 | .num_frontends = 1, | ||
267 | .fe = {{ | ||
266 | .frontend_attach = vp7045_frontend_attach, | 268 | .frontend_attach = vp7045_frontend_attach, |
267 | /* parameter for the MPEG2-data transfer */ | 269 | /* parameter for the MPEG2-data transfer */ |
268 | .stream = { | 270 | .stream = { |
@@ -275,6 +277,7 @@ static struct dvb_usb_device_properties vp7045_properties = { | |||
275 | } | 277 | } |
276 | } | 278 | } |
277 | }, | 279 | }, |
280 | }}, | ||
278 | } | 281 | } |
279 | }, | 282 | }, |
280 | .power_ctrl = vp7045_power_ctrl, | 283 | .power_ctrl = vp7045_power_ctrl, |