]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
linuxdvb: satconf - even more udelay fixes (rotor/switch) - keep everything consistent
authorJaroslav Kysela <perex@perex.cz>
Fri, 23 Oct 2015 19:26:12 +0000 (21:26 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 23 Oct 2015 19:26:12 +0000 (21:26 +0200)
src/input/mpegts/linuxdvb/linuxdvb_rotor.c
src/input/mpegts/linuxdvb/linuxdvb_satconf.c
src/input/mpegts/linuxdvb/linuxdvb_switch.c

index f0ea501081f13d0ce0fe1aa4135c6eff64c0aa8b..be4fe06d91496eabc5a6ee7b02d8194fc8268eb9 100644 (file)
@@ -95,7 +95,7 @@ const idclass_t linuxdvb_rotor_class = {
     {
       .type    = PT_U32,
       .id      = "powerup_time",
-      .name    = N_("Powerup Time (ms) (0-200)"),
+      .name    = N_("Powerup Time (ms) (15-200)"),
       .off     = offsetof(linuxdvb_rotor_t, lr_powerup_time),
       .def.u32 = 100,
     },
@@ -430,7 +430,7 @@ linuxdvb_rotor_tune
     return 0;
 
   /* Force to 18v (quicker movement) */
-  if (linuxdvb_satconf_start(lsp, MINMAX(lr->lr_powerup_time, 0, 200), 1))
+  if (linuxdvb_satconf_start(lsp, MINMAX(lr->lr_powerup_time, 15, 200), 1))
     return -1;
 
   /* GotoX */
@@ -501,7 +501,7 @@ linuxdvb_rotor_create0
       }
       lr = (linuxdvb_rotor_t *)ld;
       if (lr->lr_powerup_time == 0)
-        lr->lr_powerup_time = 85;
+        lr->lr_powerup_time = 100;
       if (lr->lr_cmd_time == 0)
         lr->lr_cmd_time = 25;
     }
index 7a4a17c8c5c791e9d877cf192de63355cbce483f..cd457d45e6f6559823b8d13a8e8f3ce3f66ebdc8 100644 (file)
@@ -712,9 +712,10 @@ linuxdvb_satconf_start ( linuxdvb_satconf_t *ls, int delay, int vol )
     }
     ls->ls_last_tone_off = 1;
   }
-  if (delay) {
+  /* the linuxdvb_diseqc_set_volt() fcn already sleeps for 15ms */
+  if (delay > 15) {
     tvhtrace("diseqc", "initial sleep %dms", delay);
-    usleep(delay*1000);
+    usleep((delay-15)*1000);
   }
   return 0;
 }
index 0843997af41fcc73ed8dc55d778cbc38e343a12a..4157c37dbb0d290a360db8761f71df3f80a2a84a 100644 (file)
@@ -146,7 +146,7 @@ const idclass_t linuxdvb_switch_class =
     {
       .type    = PT_U32,
       .id      = "poweruptime",
-      .name    = N_("Powerup Time (ms) (0-200)"),
+      .name    = N_("Powerup Time (ms) (15-200)"),
       .off     = offsetof(linuxdvb_switch_t, ls_powerup_time),
       .def.u32 = 100,
     },
@@ -181,7 +181,7 @@ linuxdvb_switch_tune
 
     lsp->ls_last_switch = NULL;
 
-    if (linuxdvb_satconf_start(lsp, MINMAX(ls->ls_powerup_time, 0, 200), pol))
+    if (linuxdvb_satconf_start(lsp, MINMAX(ls->ls_powerup_time, 15, 200), pol))
       return -1;
 
     com = 0xF0 | (ls->ls_committed << 2) | (pol << 1) | band;
@@ -232,7 +232,7 @@ linuxdvb_switch_tune
   if (ls->ls_toneburst >= 0 &&
       (lsp->ls_diseqc_full || lsp->ls_last_toneburst != ls->ls_toneburst + 1)) {
 
-    if (linuxdvb_satconf_start(lsp, MINMAX(ls->ls_powerup_time, 0, 200), vol))
+    if (linuxdvb_satconf_start(lsp, MINMAX(ls->ls_powerup_time, 15, 200), vol))
       return -1;
 
     lsp->ls_last_toneburst = 0;
@@ -282,7 +282,7 @@ linuxdvb_switch_create0
           ld->ls_uncommitted = u;
       }
       if (ld->ls_powerup_time == 0)
-        ld->ls_powerup_time = 85;
+        ld->ls_powerup_time = 100;
       if (ld->ls_sleep_time == 0)
         ld->ls_sleep_time = 25;
     }