minisatip/minisatip5 fixes

This commit is contained in:
Jaroslav Kysela 2016-02-24 20:33:45 +01:00
parent 603c847897
commit 511b99c0d8
3 changed files with 155 additions and 1156 deletions

View File

@ -31,7 +31,7 @@ KMODULES = drivers/usb/serial/cp210x.ko \
drivers/usb/serial/oti6858.ko
MINISATIP_COMMIT=54df9348e7bd7e6075f54f1b93ec4ad36429abe0
MINISATIP5_COMMIT=6569cb0c1cc790aec9c254fc99de38be5de6d549
MINISATIP5_COMMIT=c1a31b3a677fa4af3cbb10f9c95d07c040e787ed
BUSYBOX=busybox-1.24.1
@ -608,6 +608,7 @@ apps/$(PYTHON3)/compiled.stamp: apps/$(PYTHON3)/patch.stamp
rm -rf $(CURDIR)/apps/$(PYTHON3)/dest/usr/lib/python3*/idlelib
rm -rf $(CURDIR)/apps/$(PYTHON3)/dest/usr/lib/python3*/distutils
rm -rf $(CURDIR)/apps/$(PYTHON3)/dest/usr/lib/python3*/ensurepip
rm -rf $(CURDIR)/apps/$(PYTHON3)/dest/usr/lib/python3*/curses
find $(CURDIR)/apps/$(PYTHON3)/dest/usr/lib/ -name "*.opt-[12].pyc" -exec rm {} \;
find $(CURDIR)/apps/$(PYTHON3)/dest/usr/lib/ -name "test_*" -exec rm {} \;
touch apps/$(PYTHON3)/compiled.stamp

View File

@ -605,7 +605,7 @@ index 0000000..cfc1927
+
+#endif
diff --git a/dvb.c b/dvb.c
index 5701bd2..6179588 100755
index 5701bd2..79cac82 100755
--- a/dvb.c
+++ b/dvb.c
@@ -41,6 +41,10 @@
@ -717,7 +717,31 @@ index 5701bd2..6179588 100755
LOG("send_jess: FE_SET_VOLTAGE failed for fd %d: %s", fd, strerror(errno));
msleep(15);
if (ioctl(fd, FE_DISEQC_SEND_MASTER_CMD, &cmd) == -1)
@@ -320,7 +363,7 @@ int setup_switch (int frontend_fd, transponder *tp)
@@ -312,6 +355,23 @@ int send_jess(int fd, int freq, int pos, int pol, int hiband, int slot, int ufre
return ufreq * 1000;
}
+#ifdef AXE
+static inline int extra_quattro(int input, int diseqc, int *equattro)
+{
+ if (diseqc <= 0)
+ *equattro = 0;
+ /* lowband allowed - control the hiband inputs independently for positions src=2+ */
+ else if (opts.quattro_hiband == 1 && input < 2)
+ *equattro = diseqc - 1;
+ /* hiband allowed - control the lowband inputs independently for positions src=2+ */
+ else if (opts.quattro_hiband == 2 && input >= 2 && input < 4)
+ *equattro = diseqc - 1;
+ else
+ *equattro = 0;
+ return *equattro;
+}
+#endif
+
int setup_switch (int frontend_fd, transponder *tp)
{
int i;
@@ -320,7 +380,7 @@ int setup_switch (int frontend_fd, transponder *tp)
int diseqc = (tp->diseqc > 0)? tp->diseqc - 1: 0;
int freq = tp->freq;
int pol = (tp->pol - 1) & 1;
@ -726,13 +750,13 @@ index 5701bd2..6179588 100755
if (freq < SLOF)
{
freq = (freq - LOF1);
@@ -330,12 +373,111 @@ int setup_switch (int frontend_fd, transponder *tp)
@@ -330,12 +390,113 @@ int setup_switch (int frontend_fd, transponder *tp)
hiband = 1;
}
+#ifdef AXE
+ adapter *ad, *ad2, *adm;
+ int input = 0, aid;
+ int input = 0, aid, equattro = 0;
+
+ for (aid = 0; aid < 4; aid++) {
+ ad = get_adapter(aid);
@ -747,7 +771,9 @@ index 5701bd2..6179588 100755
+ ad->axe_feused = 1;
+ if (tp->switch_type != SWITCH_UNICABLE && tp->switch_type != SWITCH_JESS) {
+ input = aid;
+ if (ad && !opts.quattro) {
+ if (ad && (!opts.quattro || extra_quattro(input, diseqc, &equattro))) {
+ if (equattro > 0)
+ diseqc = equattro - 1;
+ adm = get_adapter(ad->slave ? ad->slave - 1 : ad->pa);
+ if (adm == NULL) {
+ LOG("axe_fe: unknown master adapter %d", input);
@ -767,7 +793,7 @@ index 5701bd2..6179588 100755
+ adm->tp.old_diseqc != diseqc))
+ return 0;
+ }
+ adm->axe_used |= (1 << aid);
+ adm->axe_used |= (1 << input);
+ adm->axe_feused = 1;
+ if (ad->slave) {
+ input = ad->slave - 1;
@ -808,7 +834,7 @@ index 5701bd2..6179588 100755
+ goto axe;
+ }
+ } else {
+ input = opts.axe_unicinp[input & 3];
+ input = opts.axe_unicinp[aid];
+ ad = get_adapter(input);
+ if (ad == NULL) {
+ LOGL(3, "axe setup: unable to find adapter %d", input);
@ -838,7 +864,7 @@ index 5701bd2..6179588 100755
}else
{
if(tp->old_pol != pol || tp->old_hiband != hiband || tp->old_diseqc != diseqc)
@@ -343,6 +485,16 @@ int setup_switch (int frontend_fd, transponder *tp)
@@ -343,6 +504,16 @@ int setup_switch (int frontend_fd, transponder *tp)
else
LOGL(3, "Skip sending diseqc commands since the switch position doesn't need to be changed: pol %d, hiband %d, switch position %d", pol, hiband, diseqc);
}
@ -855,7 +881,7 @@ index 5701bd2..6179588 100755
tp->old_pol = pol;
tp->old_hiband = hiband;
@@ -383,8 +535,10 @@ tune_it_s2 (int fd_frontend, transponder * tp)
@@ -383,8 +554,10 @@ tune_it_s2 (int fd_frontend, transponder * tp)
{.cmd = DTV_INVERSION,.u.data = 0},
{.cmd = DTV_SYMBOL_RATE,.u.data = 0},
{.cmd = DTV_INNER_FEC,.u.data = 0},
@ -866,7 +892,7 @@ index 5701bd2..6179588 100755
{.cmd = DTV_TUNE},
};
static struct dtv_properties dvbs2_cmdseq =
@@ -462,11 +616,15 @@ tune_it_s2 (int fd_frontend, transponder * tp)
@@ -462,11 +635,15 @@ tune_it_s2 (int fd_frontend, transponder * tp)
tp->mtype = QPSK;
bpol = getTick();
if_freq = setup_switch (fd_frontend, tp);
@ -882,7 +908,7 @@ index 5701bd2..6179588 100755
p->props[INVERSION].u.data = tp->inversion;
p->props[SYMBOL_RATE].u.data = tp->sr;
p->props[FEC_INNER].u.data = tp->fec;
@@ -475,7 +633,12 @@ tune_it_s2 (int fd_frontend, transponder * tp)
@@ -475,7 +652,12 @@ tune_it_s2 (int fd_frontend, transponder * tp)
LOG("tuning to %d(%d) pol: %s (%d) sr:%d fec:%s delsys:%s mod:%s rolloff:%s pilot:%s, ts clear=%d, ts pol=%d",
tp->freq, p->props[FREQUENCY].u.data, get_pol(tp->pol), tp->pol, p->props[SYMBOL_RATE].u.data, fe_fec[p->props[FEC_INNER].u.data],
fe_delsys[p->props[DELSYS].u.data], fe_modulation[p->props[MODULATION].u.data],
@ -896,7 +922,7 @@ index 5701bd2..6179588 100755
break;
@@ -560,6 +723,20 @@ set_pid (int hw, int ad, uint16_t i_pid)
@@ -560,6 +742,20 @@ set_pid (int hw, int ad, uint16_t i_pid)
char buf[100];
int fd;
@ -917,7 +943,7 @@ index 5701bd2..6179588 100755
if ( i_pid > 8192 )
LOG_AND_RETURN(-1, "pid %d > 8192 for /dev/dvb/adapter%d/demux%d", i_pid, hw, ad);
@@ -585,6 +762,7 @@ set_pid (int hw, int ad, uint16_t i_pid)
@@ -585,6 +781,7 @@ set_pid (int hw, int ad, uint16_t i_pid)
}
LOG ("setting filter on PID %d for fd %d", i_pid, fd);
@ -925,7 +951,7 @@ index 5701bd2..6179588 100755
return fd;
}
@@ -592,6 +770,17 @@ set_pid (int hw, int ad, uint16_t i_pid)
@@ -592,6 +789,17 @@ set_pid (int hw, int ad, uint16_t i_pid)
int del_filters (int fd, int pid)
{
@ -943,7 +969,7 @@ index 5701bd2..6179588 100755
if (fd < 0)
LOG_AND_RETURN(0, "DMX_STOP on an invalid handle %d, pid %d", fd, pid);
if (ioctl (fd, DMX_STOP) < 0)
@@ -599,6 +788,7 @@ int del_filters (int fd, int pid)
@@ -599,6 +807,7 @@ int del_filters (int fd, int pid)
else
LOG ("clearing filters on PID %d FD %d", pid, fd);
close (fd);
@ -951,7 +977,7 @@ index 5701bd2..6179588 100755
return 0;
}
@@ -606,6 +796,15 @@ int del_filters (int fd, int pid)
@@ -606,6 +815,15 @@ int del_filters (int fd, int pid)
fe_delivery_system_t
dvb_delsys (int aid, int fd, fe_delivery_system_t *sys)
{
@ -967,7 +993,7 @@ index 5701bd2..6179588 100755
int i, res, rv = 0;
struct dvb_frontend_info fe_info;
@@ -703,6 +902,7 @@ dvb_delsys (int aid, int fd, fe_delivery_system_t *sys)
@@ -703,6 +921,7 @@ dvb_delsys (int aid, int fd, fe_delivery_system_t *sys)
LOG ("returning default from dvb_delsys => %s (count %d)", fe_delsys[rv] , nsys);
return (fe_delivery_system_t) rv;

File diff suppressed because it is too large Load Diff