Permalink
Browse files

Added support for DBS Bandstacked LNBFs

  • Loading branch information...
sofakng committed Sep 3, 2012
1 parent dfd9570 commit b6be2b616b4c104803a2b6f0bf5318ad6a93305a
Showing with 23 additions and 8 deletions.
  1. +1 −0 src/dvb/dvb.h
  2. +17 −8 src/dvb/dvb_fe.c
  3. +5 −0 src/dvb/dvb_satconf.c
View
@@ -24,6 +24,7 @@
#include <pthread.h>
#include "htsmsg.h"
+#define BANDSTACKED_NA_LNB 1
#define DVB_VER_INT(maj,min) (((maj) << 16) + (min))
View
@@ -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 (switchfreq == BANDSTACKED_NA_LNB) {
+ 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);
View
@@ -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 = BANDSTACKED_NA_LNB; /* special case for Bandstacked LNB */
} else if(!strcmp(id, "Standard")) {
*f_low = 10000000;
*f_hi = 0;

0 comments on commit b6be2b6

Please sign in to comment.