Added support for DBS Bandstacked LNBFs

This commit is contained in:
John Klimek 2012-09-02 20:52:50 -04:00 committed by Adam Sutton
parent e4b800de1d
commit 285cf87671
3 changed files with 22 additions and 9 deletions

View 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) \

View 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);

View 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;