]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
linuxdvb rotor: fix the polarization caching
authorJaroslav Kysela <perex@perex.cz>
Sun, 14 Dec 2014 16:26:19 +0000 (17:26 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sun, 14 Dec 2014 16:26:19 +0000 (17:26 +0100)
src/input/mpegts/linuxdvb/linuxdvb_rotor.c

index 82f6a37348418cc9af42f00165e067b575e4188e..dcecb376a130abd502206d664251f311e9d31205 100644 (file)
@@ -197,9 +197,6 @@ linuxdvb_rotor_gotox_tune
 {
   int i;
 
-  if (linuxdvb_rotor_check_orbital_pos(lm, ls))
-    return 0;
-
   for (i = 0; i <= ls->lse_parent->ls_diseqc_repeats; i++) {
     if (linuxdvb_diseqc_send(fd, 0xE0, 0x31, 0x6B, 1, (int)lr->lr_position)) {
       tvherror("diseqc", "failed to set GOTOX pos %d", lr->lr_position);
@@ -332,9 +329,6 @@ linuxdvb_rotor_usals_tune
   uint32_t tmp, cmd;
   int i;
 
-  if (linuxdvb_rotor_check_orbital_pos(lm, ls))
-    return 0;
-
   if (ls->lse_parent->ls_site_lat_south)
     site_lat = -site_lat;
   if (ls->lse_parent->ls_site_lon_west)
@@ -383,12 +377,16 @@ linuxdvb_rotor_tune
 {
   linuxdvb_rotor_t *lr = (linuxdvb_rotor_t*)ld;
 
+  if (linuxdvb_rotor_check_orbital_pos(lm, ls))
+    return 0;
+
   /* Force to 18v (quicker movement) */
   if (ioctl(fd, FE_SET_VOLTAGE, SEC_VOLTAGE_18)) {
     tvherror("diseqc", "failed to set 18v for rotor movement");
     return -1;
   }
   usleep(15000);
+  ls->lse_parent->ls_last_pol = 2;
 
   /* GotoX */
   if (idnode_is_instance(&lr->ld_id, &linuxdvb_rotor_gotox_class))