]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
linuxdvb satconf: handle correctly LNB power off
authorJaroslav Kysela <perex@perex.cz>
Fri, 19 Dec 2014 15:35:57 +0000 (16:35 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 19 Dec 2014 15:35:57 +0000 (16:35 +0100)
src/input/mpegts/linuxdvb/linuxdvb_lnb.c
src/input/mpegts/linuxdvb/linuxdvb_satconf.c

index d6a63721231d49c3266e1316cf33534b968304a1..c91bdebccc98fd7b6493312f9fe9b8ec6dc3b175 100644 (file)
@@ -169,7 +169,16 @@ linuxdvb_lnb_bandstack_tune
   ( linuxdvb_diseqc_t *ld, dvb_mux_t *lm, linuxdvb_satconf_ele_t *ls, int fd )
 {
   int pol = linuxdvb_lnb_bandstack_pol((linuxdvb_lnb_t*)ld, lm);
-  return linuxdvb_diseqc_set_volt(fd, pol);
+
+  /* en50494 does not use the voltage tune. this is happend in the switch */
+  if (ls->lse_en50494)
+    return 0;
+
+  if (ls->lse_parent->ls_diseqc_full || ls->lse_parent->ls_last_pol != pol + 1) {
+    ls->lse_parent->ls_last_pol = pol + 1;
+    return linuxdvb_diseqc_set_volt(fd, pol);
+  }
+  return 0;
 }
 
 /* **************************************************************************
index 9a68b2cc8f998860e1c9851ef21b6422494cb4d3..a785124b78a8eb3166764fcce44878de4bc662b8 100644 (file)
@@ -656,9 +656,11 @@ linuxdvb_satconf_post_stop_mux
   ( linuxdvb_satconf_t *ls )
 {
   gtimer_disarm(&ls->ls_diseqc_timer);
-  if (ls->ls_frontend && ls->ls_lnb_poweroff)
+  if (ls->ls_frontend && ls->ls_lnb_poweroff) {
     linuxdvb_diseqc_set_volt(
         ((linuxdvb_frontend_t *)ls->ls_frontend)->lfe_fe_fd, -1);
+    linuxdvb_satconf_reset(ls);
+  }
 }
 
 int