Ticket #2099: remove-norecover-retunes.patch

File remove-norecover-retunes.patch, 2.9 KB (added by yeasah@…, 18 years ago)
  • libs/libmythtv/dvbchannel.cpp

     
    601601        return false;
    602602    }
    603603
    604     tune_time.start();
    605604    desired_tuning = tuning;
    606605
    607606    if (fd_frontend < 0)
     
    784783    return NULL;
    785784}
    786785
    787 bool DVBChannel::IsSelfRetuning(void) const
    788 {
    789     return info.caps & FE_CAN_RECOVER;
    790 }
    791 
    792 int DVBChannel::GetTimeSinceTune(void) const
    793 {
    794     return first_tune ? 0 : tune_time.elapsed();
    795 }
    796 
    797786/** \fn drain_dvb_events(int)
    798787 *  \brief Reads all the events off the queue, so we can use select
    799788 *         in wait_for_backend(int,int).
  • libs/libmythtv/dvbchannel.h

     
    5959    /// Returns true iff we have a faulty DVB driver that munges PMT
    6060    bool HasCRCBug(void)                const { return has_crc_bug; }
    6161    uint GetMinSignalMonitorDelay(void) const { return sigmon_delay; }
    62     /// If true the hardware will retune when it loses lock, otherwise
    63     /// the tuner needs to be told to tune when it loses lock.
    64     bool IsSelfRetuning(void) const;
    65     /// Milliseconds since last tuning request, or 0 if never tuned.
    66     int  GetTimeSinceTune(void) const;
    6762    /// Returns rotor object if it exists, NULL otherwise.
    6863    const DiSEqCDevRotor *GetRotor(void) const;
    6964
     
    121116    int               cardnum;     ///< DVB Card number
    122117    bool              has_crc_bug; ///< true iff our driver munges PMT
    123118    int               nextInputID; ///< Signal an input change
    124     QTime             tune_time;   ///< FIXME won't work well at midnight
    125119};
    126120
    127121#endif
  • libs/libmythtv/dvbsignalmonitor.cpp

     
    503503void DVBSignalMonitor::RetuneMonitor(void)
    504504{
    505505    DVBChannel *dvbchan = dynamic_cast<DVBChannel*>(channel);
    506     int fd_frontend = dvbchan->GetFd();
    507506
    508     // Get lock status
    509     bool is_locked = true;
    510     fe_status_t status;
    511     if (ioctl(fd_frontend, FE_READ_STATUS, &status) != -1)
    512     {
    513         QMutexLocker locker(&statusLock);
    514         is_locked = (status & FE_HAS_LOCK);
    515         signalLock.SetValue(is_locked ? 1 : 0);
    516     }
    517 
    518507    // Rotor position
    519508    if (HasFlags(kDVBSigMon_WaitForPos))
    520509    {
     
    547536            rotorPosition.SetValue(100);
    548537        }
    549538    }
    550 
    551     // Periodically retune if card can't recover
    552     if (!dvbchan->IsSelfRetuning() && !is_locked &&
    553         dvbchan->GetTimeSinceTune() > RETUNE_TIMEOUT)
    554     {
    555         DBG_SM("UpdateValues", "Retuning for lock loss");
    556         dvbchan->Retune();
    557     }
    558539}
    559540
    560541void DVBSignalMonitor::RunTableMonitor(void)