diff --git a/mythtv/libs/libmythtv/cardutil.cpp b/mythtv/libs/libmythtv/cardutil.cpp
index 41224166d9..76fdf521e9 100644
--- a/mythtv/libs/libmythtv/cardutil.cpp
+++ b/mythtv/libs/libmythtv/cardutil.cpp
@@ -574,12 +574,13 @@ QStringList CardUtil::ProbeVideoDevices(const QString &rawtype)
     return devs;
 }
 
-QString CardUtil::ProbeDVBType(const QString &device)
+// Get the list of delivery systems from the card
+QStringList CardUtil::ProbeDeliverySystems(const QString &device)
 {
-    QString ret = "ERROR_UNKNOWN";
+    QStringList delsys;
 
     if (device.isEmpty())
-        return ret;
+        return delsys;
 
 #ifdef USING_DVB
     QString dvbdev = CardUtil::GetDeviceName(DVB_DEV_FRONTEND, device);
@@ -588,32 +589,11 @@ QString CardUtil::ProbeDVBType(const QString &device)
     int fd_frontend = open(dev.constData(), O_RDWR | O_NONBLOCK);
     if (fd_frontend < 0)
     {
-        LOG(VB_GENERAL, LOG_ERR, QString("Can't open DVB frontend (%1) for %2.")
+        LOG(VB_GENERAL, LOG_ERR, LOC +
+            QString("Can't open DVB frontend (%1) for %2.")
                 .arg(dvbdev).arg(device) + ENO);
-        return ret;
-    }
-
-    struct dvb_frontend_info info;
-    memset(&info, 0, sizeof(info));
-    int err = ioctl(fd_frontend, FE_GET_INFO, &info);
-    if (err < 0)
-    {
-        close(fd_frontend);
-        LOG(VB_GENERAL, LOG_ERR, QString("FE_GET_INFO ioctl failed (%1)")
-                                         .arg(dvbdev) + ENO);
-        return ret;
-    }
-
-    DTVTunerType type(info.type);
-#if HAVE_FE_CAN_2G_MODULATION
-    if (info.caps & FE_CAN_2G_MODULATION)
-    {
-        if (type == DTVTunerType::kTunerTypeDVBS1)
-            type = DTVTunerType::kTunerTypeDVBS2;
-        else if (type == DTVTunerType::kTunerTypeDVBT)
-            type = DTVTunerType::kTunerTypeDVBT2;
+        return delsys;
     }
-#endif // HAVE_FE_CAN_2G_MODULATION
 
 #if DVB_API_VERSION >=5
     unsigned int i;
@@ -621,33 +601,68 @@ QString CardUtil::ProbeDVBType(const QString &device)
     struct dtv_properties cmd;
 
     memset(&prop, 0, sizeof(prop));
-    prop.cmd = DTV_ENUM_DELSYS;
+    prop.cmd = DTV_API_VERSION;
     cmd.num = 1;
     cmd.props = &prop;
+    if (ioctl(fd_frontend, FE_GET_PROPERTY, &cmd) == 0)
+    {
+        LOG(VB_GENERAL, LOG_INFO, LOC +
+            QString("(%1) ").arg(dvbdev) +
+            QString("dvb api version %1.%2").arg((prop.u.data>>8)&0xff).arg((prop.u.data)&0xff));
+    }
+    else
+    {
+        LOG(VB_GENERAL, LOG_ERR, LOC + QString("(%1) FE_GET_PROPERTY ioctl failed")
+            .arg(dvbdev) + ENO);
+        close(fd_frontend);
+        return delsys;
+    }
 
+    memset(&prop, 0, sizeof(prop));
+    prop.cmd = DTV_ENUM_DELSYS;
+    cmd.num = 1;
+    cmd.props = &prop;
     if (ioctl(fd_frontend, FE_GET_PROPERTY, &cmd) == 0)
     {
         for (i = 0; i < prop.u.buffer.len; i++)
         {
-            switch (prop.u.buffer.data[i])
-            {
-                // TODO: not supported. you can have DVBC and DVBT on the same card
-                // The following are backwards compatible so its ok
-                case SYS_DVBS2:
-                    type = DTVTunerType::kTunerTypeDVBS2;
-                    break;
-                case SYS_DVBT2:
-                    type = DTVTunerType::kTunerTypeDVBT2;
-                    break;
-                default:
-                    break;
-            }
+            delsys.push_back(DTVModulationSystem::toString(prop.u.buffer.data[i]));
         }
+        QStringList::iterator it = delsys.begin();
+        QString msg = "Delivery systems:";
+        for (; it != delsys.end(); it++)
+        {
+            msg += " ";
+            msg += *it;
+        }
+        LOG(VB_GENERAL, LOG_INFO, QString("CardUtil: (%1) num props:%2 ")
+            .arg(dvbdev).arg(prop.u.buffer.len) + msg);
     }
-#endif
+    else
+    {
+        LOG(VB_GENERAL, LOG_ERR, LOC + QString("FE_GET_PROPERTY ioctl failed (%1)")
+            .arg(dvbdev) + ENO);
+    }
+#endif  // DVB_API_VERSION >= 5
     close(fd_frontend);
+#endif  // USING_DVB
 
+    return delsys;
+}
+
+QString CardUtil::ProbeDVBType(const QString &device)
+{
+    QString ret = "ERROR_UNKNOWN";
+
+    if (device.isEmpty())
+        return ret;
+
+#ifdef USING_DVB
+    DTVTunerType type = ProbeTunerType(device);
     ret = (type.toString() != "UNKNOWN") ? type.toString().toUpper() : ret;
+
+    LOG(VB_GENERAL, LOG_INFO, LOC + QString("(%1) tuner type:%2")
+        .arg(device).arg(ret));
 #endif // USING_DVB
 
     return ret;
@@ -719,6 +734,116 @@ uint CardUtil::GetMinSignalMonitoringDelay(const QString &device)
     return 25;
 }
 
+
+DTVTunerType CardUtil::ConvertToTunerType(DTVModulationSystem delsys)
+{
+    DTVTunerType tunertype;
+
+    switch (delsys)
+    {
+        case DTVModulationSystem::kModulationSystem_DVBS:
+            tunertype = DTVTunerType::kTunerTypeDVBS1;
+            break;
+        case DTVModulationSystem::kModulationSystem_DVBS2:
+            tunertype = DTVTunerType::kTunerTypeDVBS2;
+            break;
+        case DTVModulationSystem::kModulationSystem_DVBC_ANNEX_A:
+            tunertype = DTVTunerType::kTunerTypeDVBC;
+            break;
+        case DTVModulationSystem::kModulationSystem_DVBT:
+            tunertype = DTVTunerType::kTunerTypeDVBT;
+            break;
+        case DTVModulationSystem::kModulationSystem_DVBT2:
+            tunertype = DTVTunerType::kTunerTypeDVBT2;
+            break;
+        case DTVModulationSystem::kModulationSystem_ATSC:
+            tunertype = DTVTunerType::kTunerTypeATSC;
+            break;
+        default:
+            LOG(VB_GENERAL, LOG_ERR, LOC +
+                QString("TODO Add to switch case delivery system:%2 %3")
+                    .arg(delsys).arg(delsys.toString()));
+            break;
+    }
+
+    return tunertype;
+}
+
+// Get the currently configured delivery system from the database
+DTVModulationSystem CardUtil::GetDeliverySystem(uint inputid)
+{
+    QString delsys_db = GetDeliverySystemFromDB(inputid);
+    DTVModulationSystem delsys;
+    delsys.Parse(delsys_db);
+    return delsys;
+}
+
+// Get the currently configured tuner type from the database
+DTVTunerType CardUtil::GetTunerType(uint inputid)
+{
+    DTVModulationSystem delsys = GetDeliverySystem(inputid);
+    DTVTunerType tunertype = ConvertToTunerType(delsys);
+    return tunertype;
+}
+
+// Get the currently configured delivery system from the device
+DTVModulationSystem CardUtil::ProbeDeliverySystem(const QString &device)
+{
+    DTVModulationSystem delsys;
+
+    QByteArray dev = device.toLatin1();
+    int fd_frontend = open(dev.constData(), O_RDWR | O_NONBLOCK);
+    if (fd_frontend < 0)
+    {
+        LOG(VB_GENERAL, LOG_ERR, LOC +
+            QString("open failed (%1)")
+                .arg(device) + ENO);
+        return delsys;
+    }
+
+#ifdef USING_DVB
+#if DVB_API_VERSION >=5
+    struct dtv_property prop;
+    struct dtv_properties cmd;
+
+    memset(&prop, 0, sizeof(prop));
+    prop.cmd = DTV_DELIVERY_SYSTEM;
+    // prop.u.data = delsys;
+    cmd.num = 1;
+    cmd.props = &prop;
+
+    int ret = ioctl(fd_frontend, FE_GET_PROPERTY, &cmd);
+    if (ret < 0)
+    {
+        LOG(VB_GENERAL, LOG_ERR, LOC +
+            QString("FE_GET_PROPERTY ioctl failed (%1)")
+                .arg(device) + ENO);
+        return delsys;
+	}
+
+    delsys.Parse(DTVModulationSystem::toString(prop.u.data));
+
+    LOG(VB_GENERAL, LOG_INFO, LOC + QString("(%1) delsys:%2 %3")
+        .arg(device).arg(delsys).arg(delsys.toString()));
+
+#endif // DVB_API_VERSION >=5
+#endif // USING_DVB
+
+    close(fd_frontend);
+    return delsys;
+}
+
+// Get the currently configured tuner type from the device
+DTVTunerType CardUtil::ProbeTunerType(const QString &device)
+{
+    DTVModulationSystem delsys = ProbeDeliverySystem(device);
+    DTVTunerType tunertype = ConvertToTunerType(delsys);
+    return tunertype;
+}
+
+// Get the delivery system from database table capturecard
+// and configure the tuner accordingly.
+// Return the tuner type corresponding with the modulation system.
 QString CardUtil::ProbeSubTypeName(uint inputid)
 {
     QString type = GetRawInputType(inputid);
@@ -730,7 +855,24 @@ QString CardUtil::ProbeSubTypeName(uint inputid)
     if (device.isEmpty())
         return "ERROR_OPEN";
 
-    return ProbeDVBType(device);
+    DTVModulationSystem delsys = GetDeliverySystem(inputid);
+    DTVTunerType tunertype = ConvertToTunerType(delsys);
+    if (DTVTunerType::kTunerTypeUnknown != tunertype)
+    {
+        SetDeliverySystem(inputid, delsys);
+    }
+
+    QString subtype = "ERROR_UNKNOWN";
+    if (DTVTunerType::kTunerTypeUnknown != tunertype)
+    {
+        subtype = tunertype.toString();
+    }
+
+    LOG(VB_GENERAL, LOG_INFO, LOC + QString("[%1]: delsys:%2 %3 tunertype:%4 %5 subtype:%6")
+        .arg(inputid).arg(delsys).arg(delsys.toString())
+        .arg(tunertype).arg(tunertype.toString()).arg(subtype));
+
+    return subtype;
 }
 
 /// \brief Returns true iff the input_type is one of the DVB types.
@@ -741,6 +883,98 @@ bool CardUtil::IsDVBInputType(const QString &inputType)
         (t == "OFDM") || (t == "ATSC") || (t == "DVB_S2");
 }
 
+int CardUtil::SetDeliverySystem(uint inputid)
+{
+    int ret = -1;
+
+#ifdef USING_DVB
+#if DVB_API_VERSION >=5
+    DTVModulationSystem delsys = GetDeliverySystem(inputid);
+    ret = SetDeliverySystem(inputid, delsys);
+#endif // DVB_API_VERSION >=5
+#endif // USING_DVB
+
+    return ret;
+}
+
+int CardUtil::SetDeliverySystem(uint inputid, DTVModulationSystem delsys)
+{
+    int ret = -1;
+
+#ifdef USING_DVB
+#if DVB_API_VERSION >=5
+    QString device = GetVideoDevice(inputid);
+
+    if (device.isEmpty())
+        return ret;
+
+    QString dvbdev = CardUtil::GetDeviceName(DVB_DEV_FRONTEND, device);
+    QByteArray dev = dvbdev.toLatin1();
+    int fd_frontend = open(dev.constData(), O_RDWR | O_NONBLOCK);
+    if (fd_frontend < 0)
+    {
+        LOG(VB_GENERAL, LOG_ERR, LOC +
+            QString("open failed (%1)")
+                .arg(dvbdev) + ENO);
+        return errno;
+    }
+    ret = SetDeliverySystem(inputid, delsys, fd_frontend);
+
+    close(fd_frontend);
+#endif // DVB_API_VERSION >=5
+#endif // USING_DVB
+
+    return ret;
+}
+
+// Get delivery system from the database and write it to the card
+int CardUtil::SetDeliverySystem(uint inputid, int fd)
+{
+    int ret = -1;
+
+#ifdef USING_DVB
+#if DVB_API_VERSION >=5
+    DTVModulationSystem delsys = GetDeliverySystem(inputid);
+    ret = SetDeliverySystem(inputid, delsys, fd);
+#endif // DVB_API_VERSION >=5
+#endif // USING_DVB
+
+    return ret;
+}
+
+// Write the delivery system to the card
+int CardUtil::SetDeliverySystem(uint inputid, DTVModulationSystem delsys, int fd)
+{
+    int ret = -1;
+
+#ifdef USING_DVB
+#if DVB_API_VERSION >=5
+    LOG(VB_GENERAL, LOG_INFO, LOC + QString("[%1] fd:%2 delsys:%3 %4")
+        .arg(inputid).arg(fd).arg(delsys).arg(delsys.toString()));
+
+    struct dtv_property prop;
+    struct dtv_properties cmd;
+
+    memset(&prop, 0, sizeof(prop));
+    prop.cmd = DTV_DELIVERY_SYSTEM;
+    prop.u.data = delsys;
+    cmd.num = 1;
+    cmd.props = &prop;
+
+    ret = ioctl(fd, FE_SET_PROPERTY, &cmd);
+    if (ret < 0)
+    {
+        LOG(VB_GENERAL, LOG_ERR, LOC +
+            QString("[%1] FE_SET_PROPERTY ioctl failed")
+                .arg(inputid) + ENO);
+        return ret;
+	}
+#endif // DVB_API_VERSION >=5
+#endif // USING_DVB
+
+    return ret;
+}
+
 QString get_on_input(const QString &to_get, uint inputid)
 {
     MSqlQuery query(MSqlQuery::InitCon());
diff --git a/mythtv/libs/libmythtv/cardutil.h b/mythtv/libs/libmythtv/cardutil.h
index 1de3a3ac48..e5c207ab16 100644
--- a/mythtv/libs/libmythtv/cardutil.h
+++ b/mythtv/libs/libmythtv/cardutil.h
@@ -14,6 +14,7 @@ using namespace std;
 
 // MythTV headers
 #include "mythtvexp.h"
+#include "dtvconfparserhelpers.h"
 
 class InputInfo;
 class CardInput;
@@ -275,6 +276,8 @@ class MTV_PUBLIC CardUtil
         { return get_on_input("audiodevice", inputid); }
     static QString      GetVBIDevice(uint inputid)
         { return get_on_input("vbidevice", inputid); }
+    static QString      GetDeliverySystemFromDB(uint inputid)
+        { return get_on_input("inputname", inputid); }          // use capturecard/inputname for now
 
     static QString      GetHostname(uint inputid)
         { return get_on_input("hostname", inputid); }
@@ -372,11 +375,21 @@ class MTV_PUBLIC CardUtil
         { return "DVB" == GetRawInputType(inputid); }
     static bool         IsDVBInputType(const QString &input_type);
     static QString      ProbeDVBFrontendName(const QString &device);
+    static QStringList  ProbeDeliverySystems(const QString &device);
+    static DTVModulationSystem ProbeDeliverySystem(const QString &device);
+    static DTVTunerType ProbeTunerType(const QString &device);
+    static DTVTunerType ConvertToTunerType(DTVModulationSystem delsys);
+    static DTVTunerType GetTunerType(uint inputid);
+    static DTVModulationSystem GetDeliverySystem(uint inputid);
     static QString      ProbeDVBType(const QString &device);
     static bool         HasDVBCRCBug(const QString &device);
     static uint         GetMinSignalMonitoringDelay(const QString &device);
     static QString      GetDeviceName(dvb_dev_type_t, const QString &device);
     static InputNames   GetConfiguredDVBInputs(const QString &device);
+    static int          SetDeliverySystem(uint inputid);
+    static int          SetDeliverySystem(uint inputid, DTVModulationSystem delsys);
+    static int          SetDeliverySystem(uint inputid, int fd);
+    static int          SetDeliverySystem(uint inputid, DTVModulationSystem delsys, int fd);
 
     // V4L info
     static bool         hasV4L2(int videofd);
diff --git a/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp b/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp
index 6b2942250e..69be48c8e4 100644
--- a/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp
+++ b/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp
@@ -2176,6 +2176,11 @@ bool ChannelScanSM::AddToList(uint mplexid)
 
     TransportScanItem item(sourceid, sistandard, fn, mplexid, m_signalTimeout);
 
+    // KdW
+    LOG(VB_CHANSCAN, LOG_INFO, LOC +
+        QString("tt:%1 %2 sourceid:%3 sistandard:%4 fn:'%5' mplexid:%6")
+            .arg(tt).arg(tt.toString()).arg(sourceid).arg(sistandard).arg(fn).arg(mplexid));
+
     if (item.m_tuning.FillFromDB(tt, mplexid))
     {
         LOG(VB_CHANSCAN, LOG_INFO, LOC + "Adding " + fn);
diff --git a/mythtv/libs/libmythtv/dtvconfparserhelpers.cpp b/mythtv/libs/libmythtv/dtvconfparserhelpers.cpp
index 55af025dac..a0101c8395 100644
--- a/mythtv/libs/libmythtv/dtvconfparserhelpers.cpp
+++ b/mythtv/libs/libmythtv/dtvconfparserhelpers.cpp
@@ -448,7 +448,7 @@ const char *DTVPolarity::s_dbStr[DTVPolarity::kDBStrCnt] =
 const DTVParamHelperStruct DTVModulationSystem::s_confTable[] =
 {
     { "SYS_UNDEFINED",     kModulationSystem_UNDEFINED     },
-    { "SYS_DVBC_ANNEX_AC", kModulationSystem_DVBC_ANNEX_AC },
+    { "SYS_DVBC_ANNEX_A",  kModulationSystem_DVBC_ANNEX_A  },
     { "SYS_DVBC_ANNEX_B",  kModulationSystem_DVBC_ANNEX_B  },
     { "SYS_DVBT",          kModulationSystem_DVBT          },
     { "SYS_DVBT2",         kModulationSystem_DVBT2         },
@@ -478,49 +478,49 @@ const DTVParamHelperStruct DTVModulationSystem::s_vdrTable[] =
 
 const DTVParamHelperStruct DTVModulationSystem::s_parseTable[] =
 {
-    { "UNDEFINED", kModulationSystem_UNDEFINED     },
-    { "DVBC_AC",   kModulationSystem_DVBC_ANNEX_AC },
-    { "DVBC_B",    kModulationSystem_DVBC_ANNEX_B  },
-    { "DVB-T",     kModulationSystem_DVBT          },
-    { "DVB-T2",    kModulationSystem_DVBT2         },
-    { "DSS",       kModulationSystem_DSS           },
-    { "DVB-S",     kModulationSystem_DVBS          },
-    { "DVB-S2",    kModulationSystem_DVBS2         },
-    { "DVBH",      kModulationSystem_DVBH          },
-    { "ISDBT",     kModulationSystem_ISDBT         },
-    { "ISDBS",     kModulationSystem_ISDBS         },
-    { "ISDBC",     kModulationSystem_ISDBC         },
-    { "ATSC",      kModulationSystem_ATSC          },
-    { "ATSCMH",    kModulationSystem_ATSCMH        },
-    { "DMBTH",     kModulationSystem_DMBTH         },
-    { "CMMB",      kModulationSystem_CMMB          },
-    { "DAB",       kModulationSystem_DAB           },
-    { "TURBO",     kModulationSystem_TURBO         },
-    { "DVBC_C",    kModulationSystem_DVBC_ANNEX_C  },
-    { nullptr,     kModulationSystem_UNDEFINED     },
+    { "UNDEFINED",    kModulationSystem_UNDEFINED     },
+    { "DVB-C/A",      kModulationSystem_DVBC_ANNEX_A  },
+    { "DVB-C/B",      kModulationSystem_DVBC_ANNEX_B  },
+    { "DVB-T",        kModulationSystem_DVBT          },
+    { "DSS",          kModulationSystem_DSS           },
+    { "DVB-S",        kModulationSystem_DVBS          },
+    { "DVB-S2",       kModulationSystem_DVBS2         },
+    { "DVBH",         kModulationSystem_DVBH          },
+    { "ISDBT",        kModulationSystem_ISDBT         },
+    { "ISDBS",        kModulationSystem_ISDBS         },
+    { "ISDBC",        kModulationSystem_ISDBC         },
+    { "ATSC",         kModulationSystem_ATSC          },
+    { "ATSCMH",       kModulationSystem_ATSCMH        },
+    { "DMBTH",        kModulationSystem_DMBTH         },
+    { "CMMB",         kModulationSystem_CMMB          },
+    { "DAB",          kModulationSystem_DAB           },
+    { "DVB-T2",       kModulationSystem_DVBT2         },
+    { "TURBO",        kModulationSystem_TURBO         },
+    { "DVB-C/C",      kModulationSystem_DVBC_ANNEX_C  },
+    { nullptr,        kModulationSystem_UNDEFINED     },
 };
 
 const char *DTVModulationSystem::s_dbStr[DTVModulationSystem::kDBStrCnt] =
 {
-    "UNDEFINED", ///< kModulationSystem_UNDEFINED
-    "DVBCAC",    ///< kModulationSystem_DVBC_ANNEX_AC
-    "DVBC_B",    ///< kModulationSystem_DVBC_ANNEX_B
-    "DVB-T",     ///< kModulationSystem_DVBT
-    "DSS",       ///< kModulationSystem_DSS
-    "DVB-S",     ///< kModulationSystem_DVBS
-    "DVB-S2",    ///< kModulationSystem_DVBS2
-    "DVBH",      ///< kModulationSystem_DVBH
-    "ISDBT",     ///< kModulationSystem_ISDBT
-    "ISDBS",     ///< kModulationSystem_ISDBS
-    "ISDBC",     ///< kModulationSystem_ISDBC
-    "ATSC",      ///< kModulationSystem_ATSC
-    "ATSCMH",    ///< kModulationSystem_ATSCMH
-    "DMBTH",     ///< kModulationSystem_DMBTH
-    "CMMB",      ///< kModulationSystem_CMMB
-    "DAB",       ///< kModulationSystem_DAB
-    "DVB-T2",    ///< kModulationSystem_DVBT2
-    "TURBO",     ///< kModulationSystem_TURBO
-    "DVBC-C",    ///< kModulationSystem_DVBC_ANNEX_C
+    "UNDEFINED",     ///< kModulationSystem_UNDEFINED
+    "DVB-C/A",       ///< kModulationSystem_DVBC_ANNEX_A
+    "DVB-C/B",       ///< kModulationSystem_DVBC_ANNEX_B
+    "DVB-T",         ///< kModulationSystem_DVBT
+    "DSS",           ///< kModulationSystem_DSS
+    "DVB-S",         ///< kModulationSystem_DVBS
+    "DVB-S2",        ///< kModulationSystem_DVBS2
+    "DVBH",          ///< kModulationSystem_DVBH
+    "ISDBT",         ///< kModulationSystem_ISDBT
+    "ISDBS",         ///< kModulationSystem_ISDBS
+    "ISDBC",         ///< kModulationSystem_ISDBC
+    "ATSC",          ///< kModulationSystem_ATSC
+    "ATSCMH",        ///< kModulationSystem_ATSCMH
+    "DMBTH",         ///< kModulationSystem_DMBTH
+    "CMMB",          ///< kModulationSystem_CMMB
+    "DAB",           ///< kModulationSystem_DAB
+    "DVB-T2",        ///< kModulationSystem_DVBT2
+    "TURBO",         ///< kModulationSystem_TURBO
+    "DVB-C/C",       ///< kModulationSystem_DVBC_ANNEX_C
 };
 
 const DTVParamHelperStruct DTVRollOff::s_confTable[] =
diff --git a/mythtv/libs/libmythtv/dtvconfparserhelpers.h b/mythtv/libs/libmythtv/dtvconfparserhelpers.h
index 69111b98de..dd172f1a6c 100644
--- a/mythtv/libs/libmythtv/dtvconfparserhelpers.h
+++ b/mythtv/libs/libmythtv/dtvconfparserhelpers.h
@@ -593,7 +593,7 @@ class DTVModulationSystem : public DTVParamHelper
     {
         // see fe_delivery_system in frontend.h
         kModulationSystem_UNDEFINED,
-        kModulationSystem_DVBC_ANNEX_AC,
+        kModulationSystem_DVBC_ANNEX_A,
         kModulationSystem_DVBC_ANNEX_B,
         kModulationSystem_DVBT,
         kModulationSystem_DSS,
diff --git a/mythtv/libs/libmythtv/dtvmultiplex.cpp b/mythtv/libs/libmythtv/dtvmultiplex.cpp
index cb1aeb0396..4ae52d4430 100644
--- a/mythtv/libs/libmythtv/dtvmultiplex.cpp
+++ b/mythtv/libs/libmythtv/dtvmultiplex.cpp
@@ -270,19 +270,19 @@ bool DTVMultiplex::ParseDVB_T2(
     QString l_mod_sys = _mod_sys;
     if (_mod_sys == "1")
     {
-        LOG(VB_GENERAL, LOG_WARNING, LOC + "Invalid T2 modulation system " +
+        LOG(VB_GENERAL, LOG_WARNING, LOC + "Invalid DVB-T2 modulation system " +
                 QString("parameter '%1', using DVB-T2.").arg(_mod_sys));
-        l_mod_sys = "DVB-T";
+        l_mod_sys = "DVB-T2";
     }
     else if (_mod_sys == "0")
     {
-        LOG(VB_GENERAL, LOG_WARNING, LOC + "Invalid T2 modulation system " +
+        LOG(VB_GENERAL, LOG_WARNING, LOC + "Invalid DVB-T modulation system " +
                 QString("parameter '%1', using DVB-T.").arg(_mod_sys));
         l_mod_sys = "DVB-T";
     }
     if (!m_mod_sys.Parse(l_mod_sys))
     {
-        LOG(VB_GENERAL, LOG_WARNING, LOC + "Invalid T2 modulation system " +
+        LOG(VB_GENERAL, LOG_WARNING, LOC + "Invalid DVB-T/T2 modulation system " +
                 QString("parameter '%1', aborting.").arg(l_mod_sys));
         return false;
     }
@@ -343,7 +343,9 @@ bool DTVMultiplex::ParseTuningParams(
     }
 
     if (DTVTunerType::kTunerTypeATSC == type)
+    {
         return ParseATSC(_frequency, _modulation);
+    }
 
     LOG(VB_GENERAL, LOG_ERR, LOC +
         QString("ParseTuningParams -- Unknown tuner type = 0x%1")
diff --git a/mythtv/libs/libmythtv/recorders/channelbase.cpp b/mythtv/libs/libmythtv/recorders/channelbase.cpp
index 882931f3ae..adf08e94d2 100644
--- a/mythtv/libs/libmythtv/recorders/channelbase.cpp
+++ b/mythtv/libs/libmythtv/recorders/channelbase.cpp
@@ -562,15 +562,14 @@ bool ChannelBase::InitializeInput(void)
 
     if (!query.exec() || !query.isActive())
     {
-        MythDB::DBError("InitializeInputs", query);
+        MythDB::DBError("ChannelBase::InitializeInput", query);
         return false;
     }
     else if (!query.size())
     {
-        LOG(VB_GENERAL, LOG_ERR, "InitializeInputs(): "
-            "\n\t\t\tCould not get inputs for the capturecard."
-            "\n\t\t\tPerhaps you have forgotten to bind video"
-            "\n\t\t\tsources to your card's inputs?");
+        LOG(VB_GENERAL, LOG_ERR, LOC +
+            QString("No capturecard record in database for input %1")
+            .arg(m_inputid));
         return false;
     }
 
@@ -582,6 +581,14 @@ bool ChannelBase::InitializeInput(void)
     m_externalChanger = query.value(3).toString();
     m_tuneToChannel = query.value(4).toString();
 
+    if (0 == m_sourceid)
+    {
+        LOG(VB_GENERAL, LOG_ERR, LOC +
+            QString("No video source defined for input %1")
+            .arg(m_inputid));
+            return false;
+    }
+
     m_channels = ChannelUtil::GetChannels(m_sourceid, false);
     QString order = gCoreContext->GetSetting("ChannelOrdering", "channum");
     ChannelUtil::SortChannels(m_channels, order);
diff --git a/mythtv/libs/libmythtv/recorders/dtvchannel.cpp b/mythtv/libs/libmythtv/recorders/dtvchannel.cpp
index 9721a97ca8..92f2f8927c 100644
--- a/mythtv/libs/libmythtv/recorders/dtvchannel.cpp
+++ b/mythtv/libs/libmythtv/recorders/dtvchannel.cpp
@@ -283,6 +283,11 @@ bool DTVChannel::SetChannelByString(const QString &channum)
             }
             else
             {
+                // KdW
+                LOG(VB_GENERAL, LOG_ERR, loc +
+                    QString("Initialize multiplex options m_tunerType:%1 mplexid:%2")
+                        .arg(m_tunerType).arg(mplexid));
+
                 // Try to fix any problems with the multiplex
                 CheckOptions(tuning);
 
diff --git a/mythtv/libs/libmythtv/recorders/dvbchannel.cpp b/mythtv/libs/libmythtv/recorders/dvbchannel.cpp
index 4cb8bed226..8dcc69c72d 100644
--- a/mythtv/libs/libmythtv/recorders/dvbchannel.cpp
+++ b/mythtv/libs/libmythtv/recorders/dvbchannel.cpp
@@ -260,73 +260,19 @@ bool DVBChannel::Open(DVBChannel *who)
         return false;
     }
 
-    m_frontend_name     = info.name;
-    m_tunerType         = info.type;
-#if HAVE_FE_CAN_2G_MODULATION
-    if (info.caps & FE_CAN_2G_MODULATION)
-    {
-        if (m_tunerType == DTVTunerType::kTunerTypeDVBS1)
-            m_tunerType = DTVTunerType::kTunerTypeDVBS2;
-        else if (m_tunerType == DTVTunerType::kTunerTypeDVBT)
-            m_tunerType = DTVTunerType::kTunerTypeDVBT2;
-    }
-#endif // HAVE_FE_CAN_2G_MODULATION
+    m_frontend_name       = info.name;
     m_capabilities        = info.caps;
     m_frequency_minimum   = info.frequency_min;
     m_frequency_maximum   = info.frequency_max;
     m_symbol_rate_minimum = info.symbol_rate_min;
     m_symbol_rate_maximum = info.symbol_rate_max;
 
-#if DVB_API_VERSION >=5
-    unsigned int i;
-    struct dtv_property prop;
-    struct dtv_properties cmd;
-
-    memset(&prop, 0, sizeof(prop));
-    prop.cmd = DTV_API_VERSION;
-    cmd.num = 1;
-    cmd.props = &prop;
-    if (ioctl(m_fd_frontend, FE_GET_PROPERTY, &cmd) == 0)
-    {
-        LOG(VB_RECORD, LOG_INFO, LOC +
-            QString("dvb api version %1.%2").arg((prop.u.data>>8)&0xff).arg((prop.u.data)&0xff));
-    }
-
-    memset(&prop, 0, sizeof(prop));
-    prop.cmd = DTV_ENUM_DELSYS;
-    cmd.num = 1;
-    cmd.props = &prop;
-
-    if (ioctl(m_fd_frontend, FE_GET_PROPERTY, &cmd) == 0)
-    {
-        LOG(VB_RECORD, LOG_DEBUG, LOC +
-            QString("num props %1").arg(prop.u.buffer.len));
-        for (i = 0; i < prop.u.buffer.len; i++)
-        {
-            LOG(VB_RECORD, LOG_INFO, LOC +
-                QString("delsys %1: %2 %3")
-                    .arg(i).arg(prop.u.buffer.data[i])
-                    .arg(DTVModulationSystem::toString(prop.u.buffer.data[i])));
-            switch (prop.u.buffer.data[i])
-            {
-                // TODO: not supported. you can have DVBC and DVBT on the same card
-                // The following are backwards compatible so its ok
-                case SYS_DVBS2:
-                    m_tunerType = DTVTunerType::kTunerTypeDVBS2;
-                    break;
-                case SYS_DVBT2:
-                    m_tunerType = DTVTunerType::kTunerTypeDVBT2;
-                    break;
-                default:
-                    break;
-            }
-        }
-    }
-#endif
+    CardUtil::SetDeliverySystem(m_inputid, m_fd_frontend);
+    m_tunerType = CardUtil::GetTunerType(m_inputid);
 
     LOG(VB_RECORD, LOG_INFO, LOC +
-        QString("Using DVB card %1, with frontend '%2'.")
-            .arg(m_device).arg(m_frontend_name));
+        QString("Frontend '%2' tunertype:%3 %4")
+            .arg(m_frontend_name).arg(m_tunerType).arg(m_tunerType.toString()));
 
     // Turn on the power to the LNB
     if (m_tunerType.IsDiSEqCSupported())
@@ -366,7 +312,7 @@ bool DVBChannel::Open(DVBChannel *who)
 
 bool DVBChannel::IsOpen(void) const
 {
-    //Have to acquire the hw lock to prevent is_open being modified whilst we're searching it
+    // Have to acquire the hw lock to prevent is_open being modified whilst we're searching it
     QMutexLocker locker(&m_hw_lock);
     IsOpenMap::const_iterator it = m_is_open.find(this);
     return it != m_is_open.end();
@@ -1078,11 +1024,24 @@ bool DVBChannel::HasLock(bool *ok) const
     fe_status_t status;
     memset(&status, 0, sizeof(status));
 
+    // KdW test
+    {
+        struct dvb_frontend_info info;
+        memset(&info, 0, sizeof(info));
+        int err = ioctl(m_fd_frontend, FE_GET_INFO, &info);
+        if (err < 0)
+        {
+            LOG(VB_GENERAL, LOG_ERR, LOC +
+                QString("FE_GET_INFO failed fd:%1")
+                    .arg(m_fd_frontend) + ENO);
+        }
+    }
+
     int ret = ioctl(m_fd_frontend, FE_READ_STATUS, &status);
     if (ret < 0)
     {
         LOG(VB_GENERAL, LOG_ERR, LOC +
-            "Getting Frontend status failed." + ENO);
+            "FE_READ_STATUS failed" + ENO);
     }
 
     if (ok)
diff --git a/mythtv/libs/libmythtv/transporteditor.cpp b/mythtv/libs/libmythtv/transporteditor.cpp
index 56b21e046f..4ce6f938d5 100644
--- a/mythtv/libs/libmythtv/transporteditor.cpp
+++ b/mythtv/libs/libmythtv/transporteditor.cpp
@@ -263,6 +263,8 @@ void TransportListEditor::Load()
                 type = "(DVB-S)";
             if (CardUtil::QAM == m_cardtype)
                 type = "(DVB-C)";
+            if (CardUtil::DVBS2 == m_cardtype)
+                type = "(DVB-S2)";
 
             QString txt = QString("%1 %2 %3 %4 %5 %6 %7")
                 .arg(mod).arg(query.value(2).toString())
diff --git a/mythtv/libs/libmythtv/videosource.cpp b/mythtv/libs/libmythtv/videosource.cpp
index 826bd657cf..af6b459ba2 100644
--- a/mythtv/libs/libmythtv/videosource.cpp
+++ b/mythtv/libs/libmythtv/videosource.cpp
@@ -1031,13 +1031,25 @@ class DVBCardNum : public CaptureCardComboBoxSetting
     }
 };
 
-class DVBCardType : public GroupSetting
+// KdW change DVBCardType from subtype to delivery system
+//
+// NOTE: use column capturecard/inputname to store the delivery system selection in the database
+// If this does conflict with other use of this field then a new column, e.g. "deliverysystem",
+// must be added to table capturecard
+// Changed GroupSetting into CaptureCardComboBoxSetting
+//
+class DVBCardType : public CaptureCardComboBoxSetting                   // KdW was: public GroupSetting
 {
   public:
-    DVBCardType()
+    explicit DVBCardType(const CaptureCard &parent) :
+        CaptureCardComboBoxSetting(parent, false, "inputname")          // KdW false means no "New entry"
     {
-        setLabel(QObject::tr("Subtype"));
-        setEnabled(false);
+        setLabel(QObject::tr("Delivery system"));                       // KdW was: Subtype
+        setHelpText(
+            QObject::tr("If your card supports more than one delivery system "
+                        "then you can select here the one that you want to use."));
+
+        // setEnabled(false);
     };
 };
 
@@ -3710,6 +3722,25 @@ void DVBConfigurationGroup::probeCard(const QString &videodevice)
         default:
             break;
     }
+
+    // Create selection list of all delivery systems of this card
+    {
+        m_cardType->clearSelections();
+        QStringList delsys = CardUtil::ProbeDeliverySystems(videodevice);
+        QStringList::iterator it = delsys.begin();
+        if (it != delsys.end())
+        {
+            m_cardType->setValue(*it);
+        }
+        for (; it != delsys.end(); it++)
+        {
+            LOG(VB_GENERAL, LOG_INFO, QString("DVBCardType: add deliverysystem:%1")
+                .arg(*it));
+
+            m_cardType->addSelection(*it, *it);
+        }
+    }
+#
 #else
     m_cardType->setValue(QString("Recompile with DVB-Support!"));
 #endif
@@ -3759,7 +3790,7 @@ DVBConfigurationGroup::DVBConfigurationGroup(CaptureCard& a_parent,
 
     m_cardNum  = new DVBCardNum(m_parent);
     m_cardName = new DVBCardName();
-    m_cardType = new DVBCardType();
+    m_cardType = new DVBCardType(m_parent);
 
     m_signalTimeout = new SignalTimeout(m_parent, 500, 250);
     m_channelTimeout = new ChannelTimeout(m_parent, 3000, 1750);
