Index: libs/libmythtv/dvbchannel.h
===================================================================
--- libs/libmythtv/dvbchannel.h	(revision 8222)
+++ libs/libmythtv/dvbchannel.h	(working copy)
@@ -92,6 +92,8 @@
     bool GetTransportOptions(int mplexid);
     bool GetChannelOptions(const QString &channum);
 
+    void InitializeInputs(void);
+
     void CheckOptions();
     bool CheckModulation(fe_modulation_t modulation) const;
     bool CheckCodeRate(fe_code_rate_t rate) const;
Index: libs/libmythtv/dvbtypes.h
===================================================================
--- libs/libmythtv/dvbtypes.h	(revision 8222)
+++ libs/libmythtv/dvbtypes.h	(working copy)
@@ -423,7 +423,7 @@
         QString lnb_lof_hi,        QString lnb_lof_lo,     QString _sistandard,
         QString hp_code_rate,      QString lp_code_rate,   QString constellation,
         QString transmission_mode, QString guard_interval, QString hierarchy,
-        QString modulation,        QString bandwidth);
+        QString modulation,        QString bandwidth,      QString _input_id);
 
     DVBTuning       tuning;
 
@@ -436,6 +436,7 @@
     uint16_t        transportID;
 
     QString         sistandard;
+    int             input_id;
     uint8_t         version;
   private:
     mutable QMutex  lock;
Index: libs/libmythtv/dvbchannel.cpp
===================================================================
--- libs/libmythtv/dvbchannel.cpp	(revision 8222)
+++ libs/libmythtv/dvbchannel.cpp	(working copy)
@@ -125,6 +125,54 @@
     }
 }
 
+/** \fn DVBChannel::InitializeInputs(void)
+ *  This enumerates the inputs, from a DiSEqC switch if available
+ */
+void DVBChannel::InitializeInputs(void)
+{
+
+    channelnames.clear();
+    inputChannel.clear();
+    
+    MSqlQuery query(MSqlQuery::InitCon());
+    query.prepare(
+        "SELECT cardinputid, inputname, "
+        "       if (startchan, startchan, '') "
+        "FROM cardinput "
+        "WHERE cardid = :CARDID");
+    query.bindValue(":CARDID", GetCardID());
+
+    if (!query.exec() || !query.isActive())
+    {
+        MythContext::DBError("InitializeInputs", query);
+        return;
+    }
+    else if (!query.size())
+    {
+        VERBOSE(VB_IMPORTANT, "dvbchannel.cpp::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?");
+        return;
+    }
+
+    while (query.next())
+    {
+        int inputNum              = query.value(0).toInt();
+        channelnames[inputNum]    = query.value(1).toString();
+        inputChannel[inputNum]    = query.value(2).toString();
+    }
+
+    // print em
+    InputNames::const_iterator it;
+    for (it = channelnames.begin(); it != channelnames.end(); ++it)
+    {
+        VERBOSE(VB_CHANNEL, QString("Input #%1: '%2' schan(%3)")
+                .arg(it.key()).arg(*it)
+                .arg(inputChannel[it.key()]));
+    }
+}
+
 bool DVBChannel::Open()
 {
     CHANNEL("Opening DVB channel");
@@ -171,6 +219,8 @@
 
     first_tune = true;
 
+    InitializeInputs();
+
     return (fd_frontend >= 0 );
 }
 
@@ -234,8 +284,9 @@
 
     CHANNEL(QString("Tuned to frequency for channel %1.").arg(chan));
 
+    currentcapchannel = chan_opts.input_id;
     inputChannel[currentcapchannel] = curchannelname;
-
+   
     return true;
 }
 
@@ -250,10 +301,7 @@
 
 bool DVBChannel::SwitchToInput(const QString &input, const QString &chan)
 {
-    currentcapchannel = 0;
-    if (channelnames.empty())
-       channelnames[currentcapchannel] = input;
-
+    (void)input;
     return SetChannelByString(chan);
 }
 
@@ -338,7 +386,7 @@
         "       lnb_lof_hi,        lnb_lof_lo,     sistandard, "
         "       hp_code_rate,      lp_code_rate,   constellation, "
         "       transmission_mode, guard_interval, hierarchy, "
-        "       modulation,        bandwidth "
+        "       modulation,        bandwidth,      cardinputid "
         "FROM dtv_multiplex, cardinput, capturecard "
         "WHERE dtv_multiplex.sourceid = cardinput.sourceid AND ");
 
@@ -370,7 +418,8 @@
         query.value(12).toString(), query.value(13).toString(),
         query.value(14).toString(), query.value(15).toString(),
         query.value(16).toString(), query.value(17).toString(),
-        query.value(18).toString(), query.value(19).toString());
+        query.value(18).toString(), query.value(19).toString(),
+        query.value(20).toString());
 }
 
 /** \fn DVBChannel::CheckOptions()
Index: libs/libmythtv/dvbtypes.cpp
===================================================================
--- libs/libmythtv/dvbtypes.cpp	(revision 8222)
+++ libs/libmythtv/dvbtypes.cpp	(working copy)
@@ -906,7 +906,7 @@
     QString lnb_lof_hi,        QString lnb_lof_lo,     QString _sistandard,
     QString hp_code_rate,      QString lp_code_rate,   QString constellation,
     QString trans_mode,        QString guard_interval, QString hierarchy,
-    QString modulation,        QString bandwidth)
+    QString modulation,        QString bandwidth,      QString _input_id)
 {
     lock.lock();
         
@@ -928,7 +928,8 @@
         ok = tuning.parseATSC(frequency, modulation);
         
     sistandard = _sistandard;
-        
+    input_id   = _input_id.toInt();
+
     lock.unlock();
     return ok;
 }
