diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.c | 116 |
1 files changed, 113 insertions, 3 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 922c205a2652..e3f7bd68591e 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
@@ -1673,6 +1673,106 @@ static struct stv0299_config alps_bsru6_config = { | |||
1673 | }; | 1673 | }; |
1674 | 1674 | ||
1675 | 1675 | ||
1676 | static u8 alps_bsbe1_inittab[] = { | ||
1677 | 0x01, 0x15, | ||
1678 | 0x02, 0x30, | ||
1679 | 0x03, 0x00, | ||
1680 | 0x04, 0x7d, /* F22FR = 0x7d, F22 = f_VCO / 128 / 0x7d = 22 kHz */ | ||
1681 | 0x05, 0x35, /* I2CT = 0, SCLT = 1, SDAT = 1 */ | ||
1682 | 0x06, 0x40, /* DAC not used, set to high impendance mode */ | ||
1683 | 0x07, 0x00, /* DAC LSB */ | ||
1684 | 0x08, 0x40, /* DiSEqC off, LNB power on OP2/LOCK pin on */ | ||
1685 | 0x09, 0x00, /* FIFO */ | ||
1686 | 0x0c, 0x51, /* OP1 ctl = Normal, OP1 val = 1 (LNB Power ON) */ | ||
1687 | 0x0d, 0x82, /* DC offset compensation = ON, beta_agc1 = 2 */ | ||
1688 | 0x0e, 0x23, /* alpha_tmg = 2, beta_tmg = 3 */ | ||
1689 | 0x10, 0x3f, // AGC2 0x3d | ||
1690 | 0x11, 0x84, | ||
1691 | 0x12, 0xb5, // Lock detect: -64 Carrier freq detect:on | ||
1692 | 0x15, 0xc9, // lock detector threshold | ||
1693 | 0x16, 0x00, | ||
1694 | 0x17, 0x00, | ||
1695 | 0x18, 0x00, | ||
1696 | 0x19, 0x00, | ||
1697 | 0x1a, 0x00, | ||
1698 | 0x1f, 0x50, | ||
1699 | 0x20, 0x00, | ||
1700 | 0x21, 0x00, | ||
1701 | 0x22, 0x00, | ||
1702 | 0x23, 0x00, | ||
1703 | 0x28, 0x00, // out imp: normal out type: parallel FEC mode:0 | ||
1704 | 0x29, 0x1e, // 1/2 threshold | ||
1705 | 0x2a, 0x14, // 2/3 threshold | ||
1706 | 0x2b, 0x0f, // 3/4 threshold | ||
1707 | 0x2c, 0x09, // 5/6 threshold | ||
1708 | 0x2d, 0x05, // 7/8 threshold | ||
1709 | 0x2e, 0x01, | ||
1710 | 0x31, 0x1f, // test all FECs | ||
1711 | 0x32, 0x19, // viterbi and synchro search | ||
1712 | 0x33, 0xfc, // rs control | ||
1713 | 0x34, 0x93, // error control | ||
1714 | 0x0f, 0x92, | ||
1715 | 0xff, 0xff | ||
1716 | }; | ||
1717 | |||
1718 | static int alps_bsbe1_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) | ||
1719 | { | ||
1720 | struct av7110* av7110 = (struct av7110*) fe->dvb->priv; | ||
1721 | int ret; | ||
1722 | u8 data[4]; | ||
1723 | u32 div; | ||
1724 | struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = sizeof(data) }; | ||
1725 | |||
1726 | if ((params->frequency < 950000) || (params->frequency > 2150000)) | ||
1727 | return -EINVAL; | ||
1728 | |||
1729 | div = (params->frequency + (125 - 1)) / 125; // round correctly | ||
1730 | data[0] = (div >> 8) & 0x7f; | ||
1731 | data[1] = div & 0xff; | ||
1732 | data[2] = 0x80 | ((div & 0x18000) >> 10) | 4; | ||
1733 | data[3] = (params->frequency > 1530000) ? 0xE0 : 0xE4; | ||
1734 | |||
1735 | ret = i2c_transfer(&av7110->i2c_adap, &msg, 1); | ||
1736 | return (ret != 1) ? -EIO : 0; | ||
1737 | } | ||
1738 | |||
1739 | static struct stv0299_config alps_bsbe1_config = { | ||
1740 | .demod_address = 0x68, | ||
1741 | .inittab = alps_bsbe1_inittab, | ||
1742 | .mclk = 88000000UL, | ||
1743 | .invert = 1, | ||
1744 | .enhanced_tuning = 0, | ||
1745 | .skip_reinit = 0, | ||
1746 | .min_delay_ms = 100, | ||
1747 | .set_symbol_rate = alps_bsru6_set_symbol_rate, | ||
1748 | .pll_set = alps_bsbe1_pll_set, | ||
1749 | }; | ||
1750 | |||
1751 | static int lnbp21_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) | ||
1752 | { | ||
1753 | struct av7110* av7110 = (struct av7110*) fe->dvb->priv; | ||
1754 | int ret; | ||
1755 | u8 data[1]; | ||
1756 | struct i2c_msg msg = { .addr = 0x08, .flags = 0, .buf = data, .len = sizeof(data) }; | ||
1757 | |||
1758 | switch(voltage) { | ||
1759 | case SEC_VOLTAGE_OFF: | ||
1760 | data[0] = 0x00; | ||
1761 | break; | ||
1762 | case SEC_VOLTAGE_13: | ||
1763 | data[0] = 0x44; | ||
1764 | break; | ||
1765 | case SEC_VOLTAGE_18: | ||
1766 | data[0] = 0x4c; | ||
1767 | break; | ||
1768 | default: | ||
1769 | return -EINVAL; | ||
1770 | }; | ||
1771 | |||
1772 | ret = i2c_transfer(&av7110->i2c_adap, &msg, 1); | ||
1773 | return (ret != 1) ? -EIO : 0; | ||
1774 | } | ||
1775 | |||
1676 | 1776 | ||
1677 | static int alps_tdbe2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) | 1777 | static int alps_tdbe2_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) |
1678 | { | 1778 | { |
@@ -2116,6 +2216,14 @@ static int frontend_init(struct av7110 *av7110) | |||
2116 | av7110->dev->i2c_bitrate = SAA7146_I2C_BUS_BIT_RATE_240; | 2216 | av7110->dev->i2c_bitrate = SAA7146_I2C_BUS_BIT_RATE_240; |
2117 | break; | 2217 | break; |
2118 | } | 2218 | } |
2219 | break; | ||
2220 | |||
2221 | case 0x000E: /* Hauppauge/TT Nexus-S rev 2.3 */ | ||
2222 | /* ALPS BSBE1 */ | ||
2223 | av7110->fe = stv0299_attach(&alps_bsbe1_config, &av7110->i2c_adap); | ||
2224 | if (av7110->fe) | ||
2225 | av7110->fe->ops->set_voltage = lnbp21_set_voltage; | ||
2226 | break; | ||
2119 | } | 2227 | } |
2120 | } | 2228 | } |
2121 | 2229 | ||
@@ -2672,21 +2780,23 @@ MAKE_AV7110_INFO(ttt_1_X, "Technotrend/Hauppauge WinTV DVB-T rev1.X"); | |||
2672 | MAKE_AV7110_INFO(ttc_1_X, "Technotrend/Hauppauge WinTV Nexus-CA rev1.X"); | 2780 | MAKE_AV7110_INFO(ttc_1_X, "Technotrend/Hauppauge WinTV Nexus-CA rev1.X"); |
2673 | MAKE_AV7110_INFO(ttc_2_X, "Technotrend/Hauppauge WinTV DVB-C rev2.X"); | 2781 | MAKE_AV7110_INFO(ttc_2_X, "Technotrend/Hauppauge WinTV DVB-C rev2.X"); |
2674 | MAKE_AV7110_INFO(tts_2_X, "Technotrend/Hauppauge WinTV Nexus-S rev2.X"); | 2782 | MAKE_AV7110_INFO(tts_2_X, "Technotrend/Hauppauge WinTV Nexus-S rev2.X"); |
2783 | MAKE_AV7110_INFO(tts_2_3, "Technotrend/Hauppauge WinTV Nexus-S rev2.3"); | ||
2675 | MAKE_AV7110_INFO(tts_1_3se, "Technotrend/Hauppauge WinTV DVB-S rev1.3 SE"); | 2784 | MAKE_AV7110_INFO(tts_1_3se, "Technotrend/Hauppauge WinTV DVB-S rev1.3 SE"); |
2676 | MAKE_AV7110_INFO(ttt, "Technotrend/Hauppauge DVB-T"); | 2785 | MAKE_AV7110_INFO(ttt, "Technotrend/Hauppauge DVB-T"); |
2677 | MAKE_AV7110_INFO(fsc, "Fujitsu Siemens DVB-C"); | 2786 | MAKE_AV7110_INFO(fsc, "Fujitsu Siemens DVB-C"); |
2678 | MAKE_AV7110_INFO(fss, "Fujitsu Siemens DVB-S rev1.6"); | 2787 | MAKE_AV7110_INFO(fss, "Fujitsu Siemens DVB-S rev1.6"); |
2679 | 2788 | ||
2680 | static struct pci_device_id pci_tbl[] = { | 2789 | static struct pci_device_id pci_tbl[] = { |
2790 | MAKE_EXTENSION_PCI(fsc, 0x110a, 0x0000), | ||
2681 | MAKE_EXTENSION_PCI(tts_1_X, 0x13c2, 0x0000), | 2791 | MAKE_EXTENSION_PCI(tts_1_X, 0x13c2, 0x0000), |
2682 | MAKE_EXTENSION_PCI(ttt_1_X, 0x13c2, 0x0001), | 2792 | MAKE_EXTENSION_PCI(ttt_1_X, 0x13c2, 0x0001), |
2683 | MAKE_EXTENSION_PCI(ttc_2_X, 0x13c2, 0x0002), | 2793 | MAKE_EXTENSION_PCI(ttc_2_X, 0x13c2, 0x0002), |
2684 | MAKE_EXTENSION_PCI(tts_2_X, 0x13c2, 0x0003), | 2794 | MAKE_EXTENSION_PCI(tts_2_X, 0x13c2, 0x0003), |
2685 | MAKE_EXTENSION_PCI(tts_1_3se, 0x13c2, 0x1002), | ||
2686 | MAKE_EXTENSION_PCI(fsc, 0x110a, 0x0000), | ||
2687 | MAKE_EXTENSION_PCI(ttc_1_X, 0x13c2, 0x000a), | ||
2688 | MAKE_EXTENSION_PCI(fss, 0x13c2, 0x0006), | 2795 | MAKE_EXTENSION_PCI(fss, 0x13c2, 0x0006), |
2689 | MAKE_EXTENSION_PCI(ttt, 0x13c2, 0x0008), | 2796 | MAKE_EXTENSION_PCI(ttt, 0x13c2, 0x0008), |
2797 | MAKE_EXTENSION_PCI(ttc_1_X, 0x13c2, 0x000a), | ||
2798 | MAKE_EXTENSION_PCI(tts_2_3, 0x13c2, 0x000e), | ||
2799 | MAKE_EXTENSION_PCI(tts_1_3se, 0x13c2, 0x1002), | ||
2690 | 2800 | ||
2691 | /* MAKE_EXTENSION_PCI(???, 0x13c2, 0x0004), UNDEFINED CARD */ // Galaxis DVB PC-Sat-Carte | 2801 | /* MAKE_EXTENSION_PCI(???, 0x13c2, 0x0004), UNDEFINED CARD */ // Galaxis DVB PC-Sat-Carte |
2692 | /* MAKE_EXTENSION_PCI(???, 0x13c2, 0x0005), UNDEFINED CARD */ // Technisat SkyStar1 | 2802 | /* MAKE_EXTENSION_PCI(???, 0x13c2, 0x0005), UNDEFINED CARD */ // Technisat SkyStar1 |