]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Added support for DBS Bandstacked LNBFs
authorJohn Klimek <jklimek@gmail.com>
Mon, 3 Sep 2012 00:52:50 +0000 (20:52 -0400)
committerAdam Sutton <dev@adamsutton.me.uk>
Mon, 17 Sep 2012 19:54:08 +0000 (20:54 +0100)
src/dvb/dvb.h
src/dvb/dvb_fe.c
src/dvb/dvb_satconf.c

index 528df4e693b79b162f423ea14ce8ba4125208cd2..7ac8260df1693f177659533ff71bc04710122d1c 100644 (file)
@@ -24,7 +24,6 @@
 #include <pthread.h>
 #include "htsmsg.h"
 
-
 #define DVB_VER_INT(maj,min) (((maj) << 16) + (min))
 
 #define DVB_VER_ATLEAST(maj, min) \
index 34a379f6203116c127ad1151539b815ef0193de4..7ef2b3b0607db84b96a184919bc01397a7f01d9d 100644 (file)
@@ -466,20 +466,29 @@ dvb_fe_tune(th_dvb_mux_instance_t *tdmi, const char *reason)
        dvb_lnb_get_frequencies(sc->sc_lnb, &lowfreq, &hifreq, &switchfreq);
     }
 
-    hiband = switchfreq && p->frequency > switchfreq;
-
-    pol = tdmi->tdmi_conf.dmc_polarisation;
+    if(!strcmp(sc->sc_id, "DBS Bandstacked")) {
+      hiband = 0;
+      if(tdmi->tdmi_conf.dmc_polarisation == POLARISATION_HORIZONTAL ||
+         tdmi->tdmi_conf.dmc_polarisation == POLARISATION_CIRCULAR_LEFT)
+        p->frequency = abs(p->frequency - hifreq);
+      else
+        p->frequency = abs(p->frequency - lowfreq);
+      pol = POLARISATION_CIRCULAR_LEFT;
+    } else {
+      hiband = switchfreq && p->frequency > switchfreq;
+      pol = tdmi->tdmi_conf.dmc_polarisation;
+      if(hiband)
+        p->frequency = abs(p->frequency - hifreq);
+      else
+        p->frequency = abs(p->frequency - lowfreq);
+    }
     if ((r = diseqc_setup(tda->tda_fe_fd,
                 port,
                 pol == POLARISATION_HORIZONTAL ||
                 pol == POLARISATION_CIRCULAR_LEFT,
                 hiband, tda->tda_diseqc_version)) != 0)
       tvhlog(LOG_ERR, "dvb", "diseqc setup failed %d\n", r);
-      
-    if(hiband)
-      p->frequency = abs(p->frequency - hifreq);
-    else
-      p->frequency = abs(p->frequency - lowfreq);
   }
 
   dvb_mux_nicename(buf, sizeof(buf), tdmi);
index 6a41e35ce10eb1e5b3e40ed28f69255c1ae0e504..4c15be783589ddf77f53c07160ae010d50117fc8 100644 (file)
@@ -290,6 +290,7 @@ dvb_lnblist_get(void)
 
   add_to_lnblist(array, "Universal");
   add_to_lnblist(array, "DBS");
+  add_to_lnblist(array, "DBS Bandstacked");
   add_to_lnblist(array, "Standard");
   add_to_lnblist(array, "Enhanced");
   add_to_lnblist(array, "C-Band");
@@ -313,6 +314,10 @@ dvb_lnb_get_frequencies(const char *id, int *f_low, int *f_hi, int *f_switch)
     *f_low    = 11250000;
     *f_hi     = 0;
     *f_switch = 0;
+  } else if(!strcmp(id, "DBS Bandstacked")) {
+    *f_low    = 11250000;
+    *f_hi     = 14350000;
+    *f_switch = 0;
   } else if(!strcmp(id, "Standard")) {
     *f_low    = 10000000;
     *f_hi     = 0;