diff mbox

TT-budget S-1500b card support

Message ID 738177.69799.qm@web33508.mail.mud.yahoo.com (mailing list archive)
State RFC
Headers show

Commit Message

Patrick Cairns March 9, 2011, 2:35 p.m. UTC
None
diff mbox

Patch

diff -Naur budget-ci.c.orig budget-ci.c
--- budget-ci.c.orig    2011-03-09 13:20:28.000000000 +0000
+++ budget-ci.c 2011-03-09 13:23:37.000000000 +0000
@@ -48,6 +48,8 @@ 
 #include "stb0899_cfg.h"
 #include "stb6100.h"
 #include "stb6100_cfg.h"
+#include "stv0288.h"
+#include "stb6000.h"
 #include "lnbp21.h"
 #include "bsbe1.h"
 #include "bsru6.h"
@@ -217,6 +219,7 @@ 
        case 0x1017:
        case 0x1019:
        case 0x101a:
+       case 0x101b:
                /* for the Technotrend 1500 bundled remote */
                ir_codes = RC_MAP_TT_1500;
                break;
@@ -1303,6 +1306,11 @@ 
        .refclock       = 27000000,
 };
 
+static struct stv0288_config tt1500_stv0288_config = {
+    .demod_address = 0x68,
+    .min_delay_ms = 100,
+};
+
 static void frontend_init(struct budget_ci *budget_ci)
 {
        switch (budget_ci->budget.dev->pci->subsystem_device) {
@@ -1372,6 +1380,22 @@ 
                }
                break;
 
+    case 0x101b:            // TT S-1500B PCI
+        budget_ci->budget.dvb_frontend = dvb_attach(stv0288_attach, 
&tt1500_stv0288_config, &budget_ci->budget.i2c_adap);
+        if (budget_ci->budget.dvb_frontend) {
+            if (dvb_attach(stb6000_attach, budget_ci->budget.dvb_frontend, 
0x63, &budget_ci->budget.i2c_adap) != NULL) {
+                if (!dvb_attach(lnbp21_attach, budget_ci->budget.dvb_frontend, 
&budget_ci->budget.i2c_adap, 0, 0)) {
+                    printk("%s: No LNBP21 found!\n", __func__);
+                    dvb_frontend_detach(budget_ci->budget.dvb_frontend);
+                    budget_ci->budget.dvb_frontend = NULL;
+                }
+            } else {
+                dvb_frontend_detach(budget_ci->budget.dvb_frontend);
+                budget_ci->budget.dvb_frontend = NULL;
+            }
+        }
+        break;
+