aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttpci/av7110.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/ttpci/av7110.c')
-rw-r--r--drivers/media/dvb/ttpci/av7110.c135
1 files changed, 85 insertions, 50 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index d028245c8eed..8832f80c05f7 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -1552,7 +1552,7 @@ static int get_firmware(struct av7110* av7110)
1552#endif 1552#endif
1553 1553
1554 1554
1555static int alps_bsrv2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) 1555static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params)
1556{ 1556{
1557 struct av7110* av7110 = (struct av7110*) fe->dvb->priv; 1557 struct av7110* av7110 = (struct av7110*) fe->dvb->priv;
1558 u8 pwr = 0; 1558 u8 pwr = 0;
@@ -1575,6 +1575,8 @@ static int alps_bsrv2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_param
1575 // NOTE: since we're using a prescaler of 2, we set the 1575 // NOTE: since we're using a prescaler of 2, we set the
1576 // divisor frequency to 62.5kHz and divide by 125 above 1576 // divisor frequency to 62.5kHz and divide by 125 above
1577 1577
1578 if (fe->ops.i2c_gate_ctrl)
1579 fe->ops.i2c_gate_ctrl(fe, 1);
1578 if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) 1580 if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1)
1579 return -EIO; 1581 return -EIO;
1580 return 0; 1582 return 0;
@@ -1584,10 +1586,9 @@ static struct ves1x93_config alps_bsrv2_config = {
1584 .demod_address = 0x08, 1586 .demod_address = 0x08,
1585 .xin = 90100000UL, 1587 .xin = 90100000UL,
1586 .invert_pwm = 0, 1588 .invert_pwm = 0,
1587 .pll_set = alps_bsrv2_pll_set,
1588}; 1589};
1589 1590
1590static int alps_tdbe2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) 1591static int alps_tdbe2_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params)
1591{ 1592{
1592 struct av7110* av7110 = fe->dvb->priv; 1593 struct av7110* av7110 = fe->dvb->priv;
1593 u32 div; 1594 u32 div;
@@ -1601,6 +1602,8 @@ static int alps_tdbe2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_param
1601 data[2] = 0x85 | ((div >> 10) & 0x60); 1602 data[2] = 0x85 | ((div >> 10) & 0x60);
1602 data[3] = (params->frequency < 174000000 ? 0x88 : params->frequency < 470000000 ? 0x84 : 0x81); 1603 data[3] = (params->frequency < 174000000 ? 0x88 : params->frequency < 470000000 ? 0x84 : 0x81);
1603 1604
1605 if (fe->ops.i2c_gate_ctrl)
1606 fe->ops.i2c_gate_ctrl(fe, 1);
1604 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) 1607 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1)
1605 return -EIO; 1608 return -EIO;
1606 return 0; 1609 return 0;
@@ -1611,14 +1614,12 @@ static struct ves1820_config alps_tdbe2_config = {
1611 .xin = 57840000UL, 1614 .xin = 57840000UL,
1612 .invert = 1, 1615 .invert = 1,
1613 .selagc = VES1820_SELAGC_SIGNAMPERR, 1616 .selagc = VES1820_SELAGC_SIGNAMPERR,
1614 .pll_set = alps_tdbe2_pll_set,
1615}; 1617};
1616 1618
1617 1619
1618 1620
1619 1621
1620static int grundig_29504_451_pll_set(struct dvb_frontend* fe, 1622static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params)
1621 struct dvb_frontend_parameters* params)
1622{ 1623{
1623 struct av7110* av7110 = fe->dvb->priv; 1624 struct av7110* av7110 = fe->dvb->priv;
1624 u32 div; 1625 u32 div;
@@ -1631,6 +1632,8 @@ static int grundig_29504_451_pll_set(struct dvb_frontend* fe,
1631 data[2] = 0x8e; 1632 data[2] = 0x8e;
1632 data[3] = 0x00; 1633 data[3] = 0x00;
1633 1634
1635 if (fe->ops.i2c_gate_ctrl)
1636 fe->ops.i2c_gate_ctrl(fe, 1);
1634 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) 1637 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1)
1635 return -EIO; 1638 return -EIO;
1636 return 0; 1639 return 0;
@@ -1638,13 +1641,11 @@ static int grundig_29504_451_pll_set(struct dvb_frontend* fe,
1638 1641
1639static struct tda8083_config grundig_29504_451_config = { 1642static struct tda8083_config grundig_29504_451_config = {
1640 .demod_address = 0x68, 1643 .demod_address = 0x68,
1641 .pll_set = grundig_29504_451_pll_set,
1642}; 1644};
1643 1645
1644 1646
1645 1647
1646static int philips_cd1516_pll_set(struct dvb_frontend* fe, 1648static int philips_cd1516_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params)
1647 struct dvb_frontend_parameters* params)
1648{ 1649{
1649 struct av7110* av7110 = fe->dvb->priv; 1650 struct av7110* av7110 = fe->dvb->priv;
1650 u32 div; 1651 u32 div;
@@ -1659,6 +1660,8 @@ static int philips_cd1516_pll_set(struct dvb_frontend* fe,
1659 data[2] = 0x8e; 1660 data[2] = 0x8e;
1660 data[3] = (f < 174000000 ? 0xa1 : f < 470000000 ? 0x92 : 0x34); 1661 data[3] = (f < 174000000 ? 0xa1 : f < 470000000 ? 0x92 : 0x34);
1661 1662
1663 if (fe->ops.i2c_gate_ctrl)
1664 fe->ops.i2c_gate_ctrl(fe, 1);
1662 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) 1665 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1)
1663 return -EIO; 1666 return -EIO;
1664 return 0; 1667 return 0;
@@ -1669,12 +1672,11 @@ static struct ves1820_config philips_cd1516_config = {
1669 .xin = 57840000UL, 1672 .xin = 57840000UL,
1670 .invert = 1, 1673 .invert = 1,
1671 .selagc = VES1820_SELAGC_SIGNAMPERR, 1674 .selagc = VES1820_SELAGC_SIGNAMPERR,
1672 .pll_set = philips_cd1516_pll_set,
1673}; 1675};
1674 1676
1675 1677
1676 1678
1677static int alps_tdlb7_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) 1679static int alps_tdlb7_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params)
1678{ 1680{
1679 struct av7110* av7110 = fe->dvb->priv; 1681 struct av7110* av7110 = fe->dvb->priv;
1680 u32 div, pwr; 1682 u32 div, pwr;
@@ -1693,6 +1695,8 @@ static int alps_tdlb7_pll_set(struct dvb_frontend* fe, struct dvb_frontend_param
1693 data[2] = 0x85; 1695 data[2] = 0x85;
1694 data[3] = pwr << 6; 1696 data[3] = pwr << 6;
1695 1697
1698 if (fe->ops.i2c_gate_ctrl)
1699 fe->ops.i2c_gate_ctrl(fe, 1);
1696 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) 1700 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1)
1697 return -EIO; 1701 return -EIO;
1698 return 0; 1702 return 0;
@@ -1708,7 +1712,6 @@ static int alps_tdlb7_request_firmware(struct dvb_frontend* fe, const struct fir
1708static struct sp8870_config alps_tdlb7_config = { 1712static struct sp8870_config alps_tdlb7_config = {
1709 1713
1710 .demod_address = 0x71, 1714 .demod_address = 0x71,
1711 .pll_set = alps_tdlb7_pll_set,
1712 .request_firmware = alps_tdlb7_request_firmware, 1715 .request_firmware = alps_tdlb7_request_firmware,
1713}; 1716};
1714 1717
@@ -1806,7 +1809,7 @@ static u8 nexusca_stv0297_inittab[] = {
1806 0xff, 0xff, 1809 0xff, 0xff,
1807}; 1810};
1808 1811
1809static int nexusca_stv0297_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) 1812static int nexusca_stv0297_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params)
1810{ 1813{
1811 struct av7110* av7110 = fe->dvb->priv; 1814 struct av7110* av7110 = fe->dvb->priv;
1812 u32 div; 1815 u32 div;
@@ -1832,7 +1835,8 @@ static int nexusca_stv0297_pll_set(struct dvb_frontend* fe, struct dvb_frontend_
1832 else 1835 else
1833 return -EINVAL; 1836 return -EINVAL;
1834 1837
1835 stv0297_enable_plli2c(fe); 1838 if (fe->ops.i2c_gate_ctrl)
1839 fe->ops.i2c_gate_ctrl(fe, 1);
1836 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) { 1840 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) {
1837 printk("nexusca: pll transfer failed!\n"); 1841 printk("nexusca: pll transfer failed!\n");
1838 return -EIO; 1842 return -EIO;
@@ -1840,8 +1844,8 @@ static int nexusca_stv0297_pll_set(struct dvb_frontend* fe, struct dvb_frontend_
1840 1844
1841 // wait for PLL lock 1845 // wait for PLL lock
1842 for(i = 0; i < 20; i++) { 1846 for(i = 0; i < 20; i++) {
1843 1847 if (fe->ops.i2c_gate_ctrl)
1844 stv0297_enable_plli2c(fe); 1848 fe->ops.i2c_gate_ctrl(fe, 1);
1845 if (i2c_transfer(&av7110->i2c_adap, &readmsg, 1) == 1) 1849 if (i2c_transfer(&av7110->i2c_adap, &readmsg, 1) == 1)
1846 if (data[0] & 0x40) break; 1850 if (data[0] & 0x40) break;
1847 msleep(10); 1851 msleep(10);
@@ -1855,12 +1859,12 @@ static struct stv0297_config nexusca_stv0297_config = {
1855 .demod_address = 0x1C, 1859 .demod_address = 0x1C,
1856 .inittab = nexusca_stv0297_inittab, 1860 .inittab = nexusca_stv0297_inittab,
1857 .invert = 1, 1861 .invert = 1,
1858 .pll_set = nexusca_stv0297_pll_set, 1862 .stop_during_read = 1,
1859}; 1863};
1860 1864
1861 1865
1862 1866
1863static int grundig_29504_401_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) 1867static int grundig_29504_401_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params)
1864{ 1868{
1865 struct av7110* av7110 = (struct av7110*) fe->dvb->priv; 1869 struct av7110* av7110 = (struct av7110*) fe->dvb->priv;
1866 u32 div; 1870 u32 div;
@@ -1887,13 +1891,14 @@ static int grundig_29504_401_pll_set(struct dvb_frontend* fe, struct dvb_fronten
1887 data[2] = ((div >> 10) & 0x60) | cfg; 1891 data[2] = ((div >> 10) & 0x60) | cfg;
1888 data[3] = (cpump << 6) | band_select; 1892 data[3] = (cpump << 6) | band_select;
1889 1893
1894 if (fe->ops.i2c_gate_ctrl)
1895 fe->ops.i2c_gate_ctrl(fe, 1);
1890 if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) return -EIO; 1896 if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) return -EIO;
1891 return 0; 1897 return 0;
1892} 1898}
1893 1899
1894static struct l64781_config grundig_29504_401_config = { 1900static struct l64781_config grundig_29504_401_config = {
1895 .demod_address = 0x55, 1901 .demod_address = 0x55,
1896 .pll_set = grundig_29504_401_pll_set,
1897}; 1902};
1898 1903
1899 1904
@@ -2079,6 +2084,9 @@ static int frontend_init(struct av7110 *av7110)
2079 case 0x0000: // Fujitsu/Siemens DVB-Cable (ves1820/Philips CD1516(??)) 2084 case 0x0000: // Fujitsu/Siemens DVB-Cable (ves1820/Philips CD1516(??))
2080 av7110->fe = ves1820_attach(&philips_cd1516_config, 2085 av7110->fe = ves1820_attach(&philips_cd1516_config,
2081 &av7110->i2c_adap, read_pwm(av7110)); 2086 &av7110->i2c_adap, read_pwm(av7110));
2087 if (av7110->fe) {
2088 av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params;
2089 }
2082 break; 2090 break;
2083 } 2091 }
2084 2092
@@ -2091,9 +2099,10 @@ static int frontend_init(struct av7110 *av7110)
2091 // try the ALPS BSRV2 first of all 2099 // try the ALPS BSRV2 first of all
2092 av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap); 2100 av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap);
2093 if (av7110->fe) { 2101 if (av7110->fe) {
2094 av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2102 av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params;
2095 av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; 2103 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
2096 av7110->fe->ops->set_tone = av7110_set_tone; 2104 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst;
2105 av7110->fe->ops.set_tone = av7110_set_tone;
2097 av7110->recover = dvb_s_recover; 2106 av7110->recover = dvb_s_recover;
2098 break; 2107 break;
2099 } 2108 }
@@ -2101,9 +2110,12 @@ static int frontend_init(struct av7110 *av7110)
2101 // try the ALPS BSRU6 now 2110 // try the ALPS BSRU6 now
2102 av7110->fe = stv0299_attach(&alps_bsru6_config, &av7110->i2c_adap); 2111 av7110->fe = stv0299_attach(&alps_bsru6_config, &av7110->i2c_adap);
2103 if (av7110->fe) { 2112 if (av7110->fe) {
2104 av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2113 av7110->fe->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
2105 av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; 2114 av7110->fe->tuner_priv = &av7110->i2c_adap;
2106 av7110->fe->ops->set_tone = av7110_set_tone; 2115
2116 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
2117 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst;
2118 av7110->fe->ops.set_tone = av7110_set_tone;
2107 av7110->recover = dvb_s_recover; 2119 av7110->recover = dvb_s_recover;
2108 break; 2120 break;
2109 } 2121 }
@@ -2111,9 +2123,10 @@ static int frontend_init(struct av7110 *av7110)
2111 // Try the grundig 29504-451 2123 // Try the grundig 29504-451
2112 av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); 2124 av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap);
2113 if (av7110->fe) { 2125 if (av7110->fe) {
2114 av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2126 av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params;
2115 av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; 2127 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
2116 av7110->fe->ops->set_tone = av7110_set_tone; 2128 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst;
2129 av7110->fe->ops.set_tone = av7110_set_tone;
2117 av7110->recover = dvb_s_recover; 2130 av7110->recover = dvb_s_recover;
2118 break; 2131 break;
2119 } 2132 }
@@ -2124,11 +2137,17 @@ static int frontend_init(struct av7110 *av7110)
2124 /* Siemens DVB-C (full-length card) VES1820/Philips CD1516 */ 2137 /* Siemens DVB-C (full-length card) VES1820/Philips CD1516 */
2125 av7110->fe = ves1820_attach(&philips_cd1516_config, &av7110->i2c_adap, 2138 av7110->fe = ves1820_attach(&philips_cd1516_config, &av7110->i2c_adap,
2126 read_pwm(av7110)); 2139 read_pwm(av7110));
2140 if (av7110->fe) {
2141 av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params;
2142 }
2127 break; 2143 break;
2128 case 0x0003: 2144 case 0x0003:
2129 /* Hauppauge DVB-C 2.1 VES1820/ALPS TDBE2 */ 2145 /* Hauppauge DVB-C 2.1 VES1820/ALPS TDBE2 */
2130 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, 2146 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap,
2131 read_pwm(av7110)); 2147 read_pwm(av7110));
2148 if (av7110->fe) {
2149 av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params;
2150 }
2132 break; 2151 break;
2133 } 2152 }
2134 break; 2153 break;
@@ -2137,20 +2156,27 @@ static int frontend_init(struct av7110 *av7110)
2137 2156
2138 // ALPS TDLB7 2157 // ALPS TDLB7
2139 av7110->fe = sp8870_attach(&alps_tdlb7_config, &av7110->i2c_adap); 2158 av7110->fe = sp8870_attach(&alps_tdlb7_config, &av7110->i2c_adap);
2159 if (av7110->fe) {
2160 av7110->fe->ops.tuner_ops.set_params = alps_tdlb7_tuner_set_params;
2161 }
2140 break; 2162 break;
2141 2163
2142 case 0x0002: // Hauppauge/TT DVB-C premium rev2.X 2164 case 0x0002: // Hauppauge/TT DVB-C premium rev2.X
2143 2165
2144 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); 2166 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110));
2167 if (av7110->fe) {
2168 av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params;
2169 }
2145 break; 2170 break;
2146 2171
2147 case 0x0004: // Galaxis DVB-S rev1.3 2172 case 0x0004: // Galaxis DVB-S rev1.3
2148 /* ALPS BSRV2 */ 2173 /* ALPS BSRV2 */
2149 av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap); 2174 av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap);
2150 if (av7110->fe) { 2175 if (av7110->fe) {
2151 av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2176 av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params;
2152 av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; 2177 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
2153 av7110->fe->ops->set_tone = av7110_set_tone; 2178 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst;
2179 av7110->fe->ops.set_tone = av7110_set_tone;
2154 av7110->recover = dvb_s_recover; 2180 av7110->recover = dvb_s_recover;
2155 } 2181 }
2156 break; 2182 break;
@@ -2159,9 +2185,10 @@ static int frontend_init(struct av7110 *av7110)
2159 /* Grundig 29504-451 */ 2185 /* Grundig 29504-451 */
2160 av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); 2186 av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap);
2161 if (av7110->fe) { 2187 if (av7110->fe) {
2162 av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2188 av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params;
2163 av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; 2189 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
2164 av7110->fe->ops->set_tone = av7110_set_tone; 2190 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst;
2191 av7110->fe->ops.set_tone = av7110_set_tone;
2165 av7110->recover = dvb_s_recover; 2192 av7110->recover = dvb_s_recover;
2166 } 2193 }
2167 break; 2194 break;
@@ -2169,12 +2196,17 @@ static int frontend_init(struct av7110 *av7110)
2169 case 0x0008: // Hauppauge/TT DVB-T 2196 case 0x0008: // Hauppauge/TT DVB-T
2170 2197
2171 av7110->fe = l64781_attach(&grundig_29504_401_config, &av7110->i2c_adap); 2198 av7110->fe = l64781_attach(&grundig_29504_401_config, &av7110->i2c_adap);
2199 if (av7110->fe) {
2200 av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params;
2201 }
2172 break; 2202 break;
2173 2203
2174 case 0x000A: // Hauppauge/TT Nexus-CA rev1.X 2204 case 0x000A: // Hauppauge/TT Nexus-CA rev1.X
2175 2205
2176 av7110->fe = stv0297_attach(&nexusca_stv0297_config, &av7110->i2c_adap); 2206 av7110->fe = stv0297_attach(&nexusca_stv0297_config, &av7110->i2c_adap);
2177 if (av7110->fe) { 2207 if (av7110->fe) {
2208 av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params;
2209
2178 /* set TDA9819 into DVB mode */ 2210 /* set TDA9819 into DVB mode */
2179 saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD) 2211 saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD)
2180 saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF) 2212 saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9198 pin30(VIF)
@@ -2189,13 +2221,16 @@ static int frontend_init(struct av7110 *av7110)
2189 /* ALPS BSBE1 */ 2221 /* ALPS BSBE1 */
2190 av7110->fe = stv0299_attach(&alps_bsbe1_config, &av7110->i2c_adap); 2222 av7110->fe = stv0299_attach(&alps_bsbe1_config, &av7110->i2c_adap);
2191 if (av7110->fe) { 2223 if (av7110->fe) {
2192 if (lnbp21_init(av7110->fe, &av7110->i2c_adap, 0, 0)) { 2224 av7110->fe->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params;
2225 av7110->fe->tuner_priv = &av7110->i2c_adap;
2226
2227 if (lnbp21_attach(av7110->fe, &av7110->i2c_adap, 0, 0)) {
2193 printk("dvb-ttpci: LNBP21 not found!\n"); 2228 printk("dvb-ttpci: LNBP21 not found!\n");
2194 if (av7110->fe->ops->release) 2229 if (av7110->fe->ops.release)
2195 av7110->fe->ops->release(av7110->fe); 2230 av7110->fe->ops.release(av7110->fe);
2196 av7110->fe = NULL; 2231 av7110->fe = NULL;
2197 } else { 2232 } else {
2198 av7110->fe->ops->dishnetwork_send_legacy_command = NULL; 2233 av7110->fe->ops.dishnetwork_send_legacy_command = NULL;
2199 av7110->recover = dvb_s_recover; 2234 av7110->recover = dvb_s_recover;
2200 } 2235 }
2201 } 2236 }
@@ -2212,21 +2247,21 @@ static int frontend_init(struct av7110 *av7110)
2212 av7110->dev->pci->subsystem_vendor, 2247 av7110->dev->pci->subsystem_vendor,
2213 av7110->dev->pci->subsystem_device); 2248 av7110->dev->pci->subsystem_device);
2214 } else { 2249 } else {
2215 FE_FUNC_OVERRIDE(av7110->fe->ops->init, av7110->fe_init, av7110_fe_init); 2250 FE_FUNC_OVERRIDE(av7110->fe->ops.init, av7110->fe_init, av7110_fe_init);
2216 FE_FUNC_OVERRIDE(av7110->fe->ops->read_status, av7110->fe_read_status, av7110_fe_read_status); 2251 FE_FUNC_OVERRIDE(av7110->fe->ops.read_status, av7110->fe_read_status, av7110_fe_read_status);
2217 FE_FUNC_OVERRIDE(av7110->fe->ops->diseqc_reset_overload, av7110->fe_diseqc_reset_overload, av7110_fe_diseqc_reset_overload); 2252 FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_reset_overload, av7110->fe_diseqc_reset_overload, av7110_fe_diseqc_reset_overload);
2218 FE_FUNC_OVERRIDE(av7110->fe->ops->diseqc_send_master_cmd, av7110->fe_diseqc_send_master_cmd, av7110_fe_diseqc_send_master_cmd); 2253 FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_send_master_cmd, av7110->fe_diseqc_send_master_cmd, av7110_fe_diseqc_send_master_cmd);
2219 FE_FUNC_OVERRIDE(av7110->fe->ops->diseqc_send_burst, av7110->fe_diseqc_send_burst, av7110_fe_diseqc_send_burst); 2254 FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_send_burst, av7110->fe_diseqc_send_burst, av7110_fe_diseqc_send_burst);
2220 FE_FUNC_OVERRIDE(av7110->fe->ops->set_tone, av7110->fe_set_tone, av7110_fe_set_tone); 2255 FE_FUNC_OVERRIDE(av7110->fe->ops.set_tone, av7110->fe_set_tone, av7110_fe_set_tone);
2221 FE_FUNC_OVERRIDE(av7110->fe->ops->set_voltage, av7110->fe_set_voltage, av7110_fe_set_voltage;) 2256 FE_FUNC_OVERRIDE(av7110->fe->ops.set_voltage, av7110->fe_set_voltage, av7110_fe_set_voltage;)
2222 FE_FUNC_OVERRIDE(av7110->fe->ops->dishnetwork_send_legacy_command, av7110->fe_dishnetwork_send_legacy_command, av7110_fe_dishnetwork_send_legacy_command); 2257 FE_FUNC_OVERRIDE(av7110->fe->ops.dishnetwork_send_legacy_command, av7110->fe_dishnetwork_send_legacy_command, av7110_fe_dishnetwork_send_legacy_command);
2223 FE_FUNC_OVERRIDE(av7110->fe->ops->set_frontend, av7110->fe_set_frontend, av7110_fe_set_frontend); 2258 FE_FUNC_OVERRIDE(av7110->fe->ops.set_frontend, av7110->fe_set_frontend, av7110_fe_set_frontend);
2224 2259
2225 ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe); 2260 ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe);
2226 if (ret < 0) { 2261 if (ret < 0) {
2227 printk("av7110: Frontend registration failed!\n"); 2262 printk("av7110: Frontend registration failed!\n");
2228 if (av7110->fe->ops->release) 2263 if (av7110->fe->ops.release)
2229 av7110->fe->ops->release(av7110->fe); 2264 av7110->fe->ops.release(av7110->fe);
2230 av7110->fe = NULL; 2265 av7110->fe = NULL;
2231 } 2266 }
2232 } 2267 }
@@ -2413,7 +2448,7 @@ static int __devinit av7110_attach(struct saa7146_dev* dev,
2413 goto err_kfree_0; 2448 goto err_kfree_0;
2414 2449
2415 ret = dvb_register_adapter(&av7110->dvb_adapter, av7110->card_name, 2450 ret = dvb_register_adapter(&av7110->dvb_adapter, av7110->card_name,
2416 THIS_MODULE); 2451 THIS_MODULE, &dev->pci->dev);
2417 if (ret < 0) 2452 if (ret < 0)
2418 goto err_put_firmware_1; 2453 goto err_put_firmware_1;
2419 2454