Index: mythtv-trunk/libs/libmythtv/dvbsignalmonitor.cpp
===================================================================
--- mythtv-trunk.orig/libs/libmythtv/dvbsignalmonitor.cpp
+++ mythtv-trunk/libs/libmythtv/dvbsignalmonitor.cpp
@@ -57,7 +57,6 @@ DVBSignalMonitor::DVBSignalMonitor(int d
                         65535,  false,     0, 65535, 0),
       rotorPosition    (tr("Rotor Progress"),     "pos",
                         100,    true,      0,   100, 0),
-      useSectionReader(false),
       dtvMonitorRunning(false)
 {
     // These two values should probably come from the database...
@@ -190,66 +189,44 @@ bool DVBSignalMonitor::AddPIDFilter(uint
         return false;
     }
 
-    if (!useSectionReader)
-    {
-        struct dmx_pes_filter_params pesFilterParams;
-        bzero(&pesFilterParams, sizeof(struct dmx_pes_filter_params));
-        pesFilterParams.pid      = (__u16) pid;
-        pesFilterParams.input    = DMX_IN_FRONTEND;
-        pesFilterParams.output   = DMX_OUT_TS_TAP;
-        pesFilterParams.flags    = DMX_IMMEDIATE_START;
-        pesFilterParams.pes_type = DMX_PES_OTHER;
-
-        if (ioctl(mux_fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0)
-        {
-            VERBOSE(VB_IMPORTANT, LOC_ERR +
-                    QString("Failed to set TS filter (pid %1)").arg(pid));
-            close(mux_fd);
-            return false;
-        }
-    }
-    else
-    {
-        struct dmx_sct_filter_params sctFilterParams;
-        bzero(&sctFilterParams, sizeof(struct dmx_sct_filter_params));
+    struct dmx_sct_filter_params sctFilterParams;
+    bzero(&sctFilterParams, sizeof(struct dmx_sct_filter_params));
 
-        sctFilterParams.filter.mask[0]   = 0xff; // default
+    sctFilterParams.filter.mask[0]   = 0xff; // default
 
-        switch ( (__u16) pid )
-        {
-            case 0x0: // PAT
-                sctFilterParams.filter.filter[0] = 0;
-                break;
-            case 0x0010: // assume this is for an NIT
-                // With this filter we can only ever get NIT for this network
-                // because other networks nit need a filter of 0x41
-                sctFilterParams.filter.filter[0] = 0x40;
-                break;
-            case 0x0011: // assume this is for an SDT
-                sctFilterParams.filter.filter[0] = 0x42;
-                break;
-            case 0x1ffb: // assume this is for a MGT or VCT
-                // MGT 0xc7, terrestrial VCT 0xc8, cable VCT 0xc9
-                sctFilterParams.filter.filter[0] = 0xc0;
-                sctFilterParams.filter.mask[0]   = 0xf0;
-            default: // otherwise assume we are looking for a PMT or EIT
-                sctFilterParams.filter.filter[0] = 0x00;
-                sctFilterParams.filter.mask[0]   = 0x00;
-                break;
-        }
-        sctFilterParams.pid            = (__u16) pid;
-        sctFilterParams.timeout        = 0;
-        sctFilterParams.flags          = DMX_IMMEDIATE_START; 
-
-        if (ioctl(mux_fd, DMX_SET_FILTER, &sctFilterParams) < 0)
-        {
-            VERBOSE(VB_IMPORTANT, LOC_ERR + 
-                    "Failed to set \"section\" filter " +
-                    QString("(pid %1) (filter %2)").arg(pid)
-                    .arg(sctFilterParams.filter.filter[0]));
-            close(mux_fd);
-            return false;
-        }
+    switch ( (__u16) pid )
+    {
+        case 0x0: // PAT
+            sctFilterParams.filter.filter[0] = 0;
+            break;
+        case 0x0010: // assume this is for an NIT
+            // With this filter we can only ever get NIT for this network
+            // because other networks nit need a filter of 0x41
+            sctFilterParams.filter.filter[0] = 0x40;
+            break;
+        case 0x0011: // assume this is for an SDT
+            sctFilterParams.filter.filter[0] = 0x42;
+            break;
+        case 0x1ffb: // assume this is for a MGT or VCT
+            // MGT 0xc7, terrestrial VCT 0xc8, cable VCT 0xc9
+            sctFilterParams.filter.filter[0] = 0xc0;
+            sctFilterParams.filter.mask[0]   = 0xf0;
+        default: // otherwise assume we are looking for a PMT or EIT
+            sctFilterParams.filter.filter[0] = 0x00;
+            sctFilterParams.filter.mask[0]   = 0x00;
+            break;
+    }
+    sctFilterParams.pid            = (__u16) pid;
+    sctFilterParams.timeout        = 0;
+    sctFilterParams.flags          = DMX_IMMEDIATE_START;
+
+    if (ioctl(mux_fd, DMX_SET_FILTER, &sctFilterParams) < 0)
+    {
+        VERBOSE(VB_IMPORTANT, LOC_ERR + "Failed to set \"section\" filter " +
+                QString("(pid %1) (filter %2)").arg(pid)
+                .arg(sctFilterParams.filter.filter[0]));
+        close(mux_fd);
+        return false;
     }
 
     filters[pid] = mux_fd;
@@ -309,101 +286,14 @@ bool DVBSignalMonitor::UpdateFiltersFrom
     return ok;
 }
 
-/** \fn DVBSignalMonitor::RunTableMonitorTS(void)
- *  \brief Uses TS filtering monitor to monitor a DVB device for tables
+/** \fn DVBSignalMonitor::RunTableMonitor(void)
+ *  \brief Uses "Section reader" to monitor a DVB device for tables
  *
- *  This supports all types of MPEG based stream data, but is extreemely
- *  slow with DVB over USB 1.0 devices which for efficiency reasons buffer 
- *  a stream until a full block transfer buffer full of the requested 
- *  tables is available. This takes a very long time when you are just
- *  waiting for a PAT or PMT table, and the buffer is hundreds of packets
- *  in size.
  */
-void DVBSignalMonitor::RunTableMonitorTS(void)
+void DVBSignalMonitor::RunTableMonitor(void)
 {
-    int remainder = 0;
-    int buffer_size = TSPacket::SIZE * 15000;
-    unsigned char *buffer = new unsigned char[buffer_size];
-    if (!buffer)
-        return;
-    bzero(buffer, buffer_size);
-
-    QString dvr_fname = CardUtil::GetDeviceName(DVB_DEV_DVR, GetDVBCardNum());
-    int dvr_fd = open(dvr_fname.ascii(), O_RDONLY | O_NONBLOCK);
-    if (dvr_fd < 0)
-    {
-        VERBOSE(VB_IMPORTANT, LOC +
-                QString("Failed to open DVR device %1 : %2")
-                .arg(dvr_fname).arg(strerror(errno)));
-        delete[] buffer;
-        return;
-    }
-
-    VERBOSE(VB_CHANNEL, LOC + "RunTableMonitorTS(): " +
-            QString("begin (# of pids %1)")
-            .arg(GetStreamData()->ListeningPIDs().size()));
-
-    fd_set fd_select_set;
-    FD_ZERO(        &fd_select_set);
-    FD_SET (dvr_fd, &fd_select_set);
-    while (dtvMonitorRunning && GetStreamData())
-    {
-        RetuneMonitor();
-        UpdateFiltersFromStreamData();
-
-        // timeout gets reset by select, so we need to create new one
-        struct timeval timeout = { 0, 50 /* ms */ * 1000 /* -> usec */ };
-        select(dvr_fd+1, &fd_select_set, NULL, NULL, &timeout);
-
-        long long len = read(
-            dvr_fd, &(buffer[remainder]), buffer_size - remainder);
-
-        if ((0 == len) || (-1 == len))
-        {
-            usleep(100);
-            continue;
-        }
-
-        len += remainder;
-
-        if (len < 10) // 10 bytes = 4 bytes TS header + 6 bytes PES header
-        {
-            remainder = len;
-            continue;
-        }
-
-        remainder = GetStreamData()->ProcessData(buffer, len);
-        if (remainder > 0 && (len > remainder)) // leftover bytes
-            memmove(buffer, &(buffer[len - remainder]), remainder);
-    }
-    VERBOSE(VB_CHANNEL, LOC + "RunTableMonitorTS(): " + "shutdown");
-
-    if (GetStreamData())
-    {
-        vector<int> del_pids;
-        FilterMap::iterator it = filters.begin();
-        for (; it != filters.end(); ++it)
-            del_pids.push_back(it.key());
-
-        vector<int>::iterator dit = del_pids.begin();
-        for (; dit != del_pids.end(); ++dit)
-            RemovePIDFilter(*dit);
-    }
-
-    close(dvr_fd);
-    delete[] buffer;
-
-    VERBOSE(VB_CHANNEL, LOC + "RunTableMonitorTS(): " + "end");
-}
+    dtvMonitorRunning = true;
 
-/** \fn DVBSignalMonitor::RunTableMonitorSR(void)
- *  \brief Uses "Section" monitor to monitor a DVB device for tables
- *
- *  This currently only supports DVB streams, ATSC and the raw MPEG
- *  streams used by some cable and satelite providers is not supported.
- */
-void DVBSignalMonitor::RunTableMonitorSR(void)
-{
     int buffer_size = 4192;  // maximum size of Section we handle
     unsigned char *buffer = new unsigned char[buffer_size];
     if (!buffer)
@@ -457,53 +347,6 @@ void DVBSignalMonitor::RunTableMonitorSR
     VERBOSE(VB_CHANNEL, LOC + "RunTableMonitorSR(): " + "end");
 }
 
-// for caching TS monitoring supported value.
-static QMap<uint,bool> _rec_supports_ts_monitoring;
-static QMutex          _rec_supports_ts_monitoring_lock;
-
-/** \fn DVBSignalMonitor::SupportsTSMonitoring(void)
- *  \brief Returns true if TS monitoring is supported.
- *
- *   NOTE: If you are using a DEC2000-t device you need to
- *   apply the patches provided by Peter Beutner for it, see
- *   http://www.gossamer-threads.com/lists/mythtv/dev/166172
- *   These patches should make it in to Linux 2.6.15 or 2.6.16.
- */
-bool DVBSignalMonitor::SupportsTSMonitoring(void)
-{
-    const uint pat_pid = 0x0;
-
-    {
-        QMutexLocker locker(&_rec_supports_ts_monitoring_lock);
-        QMap<uint,bool>::const_iterator it;
-        it = _rec_supports_ts_monitoring.find(GetDVBCardNum());
-        if (it != _rec_supports_ts_monitoring.end())
-            return *it;
-    }
-
-    QString dvr_fname = CardUtil::GetDeviceName(DVB_DEV_DVR, GetDVBCardNum());
-    int dvr_fd = open(dvr_fname.ascii(), O_RDONLY | O_NONBLOCK);
-    if (dvr_fd < 0)
-    {
-        QMutexLocker locker(&_rec_supports_ts_monitoring_lock);
-        _rec_supports_ts_monitoring[GetDVBCardNum()] = false;
-        return false;
-    }
-
-    bool supports_ts = false;
-    if (AddPIDFilter(pat_pid))
-    {
-        supports_ts = true;
-        RemovePIDFilter(pat_pid);
-    }
-
-    close(dvr_fd);
-
-    QMutexLocker locker(&_rec_supports_ts_monitoring_lock);
-    _rec_supports_ts_monitoring[GetDVBCardNum()] = supports_ts;
-    return supports_ts;
-}
-
 void DVBSignalMonitor::RetuneMonitor(void)
 {
     DVBChannel *dvbchan = dynamic_cast<DVBChannel*>(channel);
@@ -542,16 +385,6 @@ void DVBSignalMonitor::RetuneMonitor(voi
     }
 }
 
-void DVBSignalMonitor::RunTableMonitor(void)
-{
-    dtvMonitorRunning = true;
-
-    if (useSectionReader = !SupportsTSMonitoring())
-        RunTableMonitorSR();
-    else
-        RunTableMonitorTS();
-}
-
 /** \fn DVBSignalMonitor::UpdateValues()
  *  \brief Fills in frontend stats and emits status Qt signals.
  *
Index: mythtv-trunk/libs/libmythtv/dvbsignalmonitor.h
===================================================================
--- mythtv-trunk.orig/libs/libmythtv/dvbsignalmonitor.h
+++ mythtv-trunk/libs/libmythtv/dvbsignalmonitor.h
@@ -46,21 +46,17 @@ class DVBSignalMonitor: public DTVSignal
     void RetuneMonitor(void);
     static void *TableMonitorThread(void *param);
     void RunTableMonitor(void);
-    void RunTableMonitorTS(void);
-    void RunTableMonitorSR(void);
     bool AddPIDFilter(uint pid);
     bool RemovePIDFilter(uint pid);
 
     int GetDVBCardNum(void) const;
 
-    bool SupportsTSMonitoring(void);
   protected:
     SignalMonitorValue signalToNoise;
     SignalMonitorValue bitErrorRate;
     SignalMonitorValue uncorrectedBlocks;
     SignalMonitorValue rotorPosition;
 
-    bool               useSectionReader;
     bool               dtvMonitorRunning;
     pthread_t          table_monitor_thread;
 
