rendered paste bodydiff -u ../original/mythtv.8112/libs/libmythtv/dvbdiseqc.cpp libs/libmythtv/dvbdiseqc.cpp
--- ../original/mythtv.8112/libs/libmythtv/dvbdiseqc.cpp 2005-12-04 12:12:00.000000000 -0800
+++ libs/libmythtv/dvbdiseqc.cpp 2005-12-04 12:29:55.000000000 -0800
@@ -94,7 +94,12 @@
if (!Diseqc1xSwitch(tuning, reset, havetuned, 10))
return false;
break;
-
+ case 9: // SW21
+ case 10: // SW64
+ if (!LegacyDishSwitch(tuning, reset, havetuned))
+ return false;
+ break;
+
default:
VERBOSE(VB_IMPORTANT, LOC_ERR + "Unsupported DiSEqC type("
<<tuning.diseqc_type<<")");
@@ -103,6 +108,64 @@
return true;
}
+bool DVBDiSEqC::LegacyDishSwitch(DVBTuning& tuning, bool reset,
+ bool& havetuned)
+{
+ if (reset)
+ {
+ //Do legacy switches need to be reset?
+ }
+ GENERAL(QString("Legacy Dish Switch - Port %1").arg(tuning.diseqc_port));
+ if ((prev_tuning.diseqc_port != tuning.diseqc_port ||
+ prev_tuning.tone != tuning.tone ||
+ prev_tuning.voltage != tuning.voltage) || reset)
+ {
+ dvb_diseqc_master_cmd cmd =
+ {{0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00}, 3};
+
+ switch(tuning.diseqc_type) {
+ //is there a pattern here?
+ case 9: //SW21
+ if(! tuning.diseqc_port)
+ cmd.msg[2]=0x34;
+ else
+ cmd.msg[2]=0x65;
+ break;
+ case 10: //SW64
+ if(tuning.diseqc_port == 0)
+ if(tuning.voltage == SEC_VOLTAGE_13)
+ cmd.msg[2]=0x39;
+ else
+ cmd.msg[2]=0x1A;
+ else if(tuning.diseqc_port == 1)
+ if(tuning.voltage == SEC_VOLTAGE_13)
+ cmd.msg[2]=0x4B;
+ else
+ cmd.msg[2]=0x5C;
+ else
+ if(tuning.voltage == SEC_VOLTAGE_13)
+ cmd.msg[2]=0x0D;
+ else
+ cmd.msg[2]=0x2E;
+ break;
+ }
+ if(tuning.voltage == SEC_VOLTAGE_18)
+ cmd.msg[2]|=0x80;
+ if (ioctl(fd_frontend, FE_DISHNETWORK_SEND_LEGACY_CMD, cmd.msg[2]) <0)
+ {
+ ERRNO("Setup: Sending init command failed.");
+ return false;
+ }
+ usleep(DISEQC_SHORT_WAIT);
+
+ prev_tuning.diseqc_port = tuning.diseqc_port;
+ prev_tuning.tone = tuning.tone;
+ prev_tuning.voltage = tuning.voltage;
+ havetuned = true;
+ }
+ return true;
+}
+
/*****************************************************************************
Backward Compatible Methods
****************************************************************************/
diff -u ../original/mythtv.8112/libs/libmythtv/dvbdiseqc.h libs/libmythtv/dvbdiseqc.h
--- ../original/mythtv.8112/libs/libmythtv/dvbdiseqc.h 2005-12-04 12:12:00.000000000 -0800
+++ libs/libmythtv/dvbdiseqc.h 2005-12-04 12:29:55.000000000 -0800
@@ -37,6 +37,7 @@
bool ToneVoltageLnb(DVBTuning& tuning, bool reset, bool& havetuned);
bool ToneSwitch(DVBTuning& tuning, bool reset, bool& havetuned);
+ bool LegacyDishSwitch(DVBTuning& tuning, bool reset, bool& havetuned);
bool Diseqc1xSwitch(DVBTuning& tuning, bool reset, bool& havetuned,
uint ports);
bool PositionerGoto(DVBTuning& tuning, bool reset, bool& havetuned);
diff -u ../original/mythtv.8112/libs/libmythtv/videosource.cpp libs/libmythtv/videosource.cpp
--- ../original/mythtv.8112/libs/libmythtv/videosource.cpp 2005-12-04 12:12:00.000000000 -0800
+++ libs/libmythtv/videosource.cpp 2005-12-04 12:29:55.000000000 -0800
@@ -1238,6 +1238,8 @@
addSelection("DiSEqC v1.2 Positioner","6");
addSelection("DiSEqC v1.3 Positioner (Goto X)","7");
addSelection("DiSEqC v1.1 or 2.1 (10-way method2)","8");
+ addSelection("SW21 Switch","9");
+ addSelection("SW64 Switch","10");
setHelpText(QObject::tr("Select the input type for DVB-S cards. "
"Leave as Single LNB/Input for DVB-C or DVB-T. "
"The inputs are mapped from Input Connections option "
@@ -2376,6 +2378,8 @@
QString stxt = "DiSEqC Switch Input %1";
QString mtxt = "DiSEqC v1.2 Motor Position %1";
QString itxt = "DiSEqC v1.3 Input %1";
+ QString l21txt = "SW21 Input %1";
+ QString l64txt = "SW64 Input %1";
uint i;
switch (dvb_diseqc_type)
@@ -2405,6 +2409,16 @@
list.append(DVBDiSEqCInputList(
stxt.arg(i+1,2), QString::number(i), ""));
break;
+ case 9:
+ for (i = 0; i < 2; ++i)
+ list.append(DVBDiSEqCInputList(
+ l21txt.arg(i+1,2), QString::number(i), ""));
+ break;
+ case 10:
+ for (i = 0; i < 3; ++i)
+ list.append(DVBDiSEqCInputList(
+ l64txt.arg(i+1,2), QString::number(i), ""));
+ break;
default:
list.append(DVBDiSEqCInputList(
QString("DVBInput"), QString(""), QString("")));
diff -u ../original/mythtv.7738/libs/libmythtv/mpeg/mpegdescriptors.h libs/libmythtv/mpeg/mpegdescriptors.h
--- ../original/mythtv.7738/libs/libmythtv/mpeg/mpegdescriptors.h 2005-11-25 10:39:21.000000000 -0800
+++ libs/libmythtv/mpeg/mpegdescriptors.h 2005-11-25 14:05:00.000000000 -0800
@@ -84,6 +84,11 @@
audio_stream = 0x81,
caption_service = 0x86,
content_advisory = 0x87,
+
+ // D*sh N*twork
+ dish_event_name = 0x91,
+ dish_event_description = 0x92,
+
extended_channel_name = 0xA0,
service_location = 0xA1,
atsc_time_shifted_service = 0xA2,