Index: TVLibrary/TVLibrary/Implementations/DVB/ConditionalAccess/ConditionalAccess.cs
===================================================================
--- TVLibrary/TVLibrary/Implementations/DVB/ConditionalAccess/ConditionalAccess.cs (revision 26914)
+++ TVLibrary/TVLibrary/Implementations/DVB/ConditionalAccess/ConditionalAccess.cs (working copy)
@@ -825,10 +825,11 @@
}
///
- /// Sets the DVB s2 modulation.
+ /// Sets the DVB-S2 parameters such as modulation, roll-off, pilot etc.
///
- /// The parameters.
- /// The channel.
+ /// The LNB parameters.
+ /// The channel to tune.
+ /// The channel with DVB-S2 parameters set.
public DVBSChannel SetDVBS2Modulation(ScanParameters parameters, DVBSChannel channel)
{
//Log.Log.WriteFile("Trying to set DVB-S2 modulation...");
@@ -983,7 +984,6 @@
//Log.Log.WriteFile("DigitalEverywhere: we're tuning DVB-S, pilot & roll-off are now not set");
}
- DVBSChannel tuneChannel = new DVBSChannel(channel);
if (channel.InnerFecRate != BinaryConvolutionCodeRate.RateNotSet)
{
//Set the DigitalEverywhere binary values for Pilot & Roll-off
@@ -1000,13 +1000,14 @@
if (channel.Rolloff == RollOff.ThirtyFive)
_rollOff = 48;
//The binary values get added to the current InnerFECRate - done!
- tuneChannel.InnerFecRate = channel.InnerFecRate + _pilot + _rollOff;
+ BinaryConvolutionCodeRate r = channel.InnerFecRate + _pilot + _rollOff;
+ channel.InnerFecRate = r;
}
Log.Log.WriteFile("DigitalEverywhere DVB-S2 modulation set to:{0}", channel.ModulationType);
Log.Log.WriteFile("DigitalEverywhere Pilot set to:{0}", channel.Pilot);
Log.Log.WriteFile("DigitalEverywhere RollOff set to:{0}", channel.Rolloff);
- Log.Log.WriteFile("DigitalEverywhere fec set to:{0}", (int)tuneChannel.InnerFecRate);
- return tuneChannel;
+ Log.Log.WriteFile("DigitalEverywhere fec set to:{0}", (int)channel.InnerFecRate);
+ return channel;
}
}
catch (Exception ex)
Index: TVLibrary/TVLibrary/Implementations/DVB/Graphs/DVBS/TvCardDVBS.cs
===================================================================
--- TVLibrary/TVLibrary/Implementations/DVB/Graphs/DVBS/TvCardDVBS.cs (revision 26914)
+++ TVLibrary/TVLibrary/Implementations/DVB/Graphs/DVBS/TvCardDVBS.cs (working copy)
@@ -332,19 +332,25 @@
locator.put_CarrierFrequency((int)dvbsChannel.Frequency);
dvbsLocator.put_SymbolRate(dvbsChannel.SymbolRate);
dvbsLocator.put_SignalPolarisation(dvbsChannel.Polarisation);
- //DVB-S2 specific modulation class call here if DVB-S2 card detected
- DVBSChannel tuneChannel = dvbsChannel;
+
+ // Set DVB-S2 and manufacturer specific tuning parameters here.
+ //-------------------------------------------------------------------
+ // Important: the original dvbsChannel object *must not* be modified
+ // otherwise IsDifferentTransponder() will sometimes returns true
+ // when it shouldn't. See mantis 0002979.
+ //-------------------------------------------------------------------
+ DVBSChannel tuneChannel = new DVBSChannel(dvbsChannel);
if (_conditionalAccess != null)
{
- tuneChannel = _conditionalAccess.SetDVBS2Modulation(_parameters, dvbsChannel);
+ tuneChannel = _conditionalAccess.SetDVBS2Modulation(_parameters, tuneChannel);
}
dvbsLocator.put_Modulation(tuneChannel.ModulationType);
Log.Log.WriteFile("dvbs:channel modulation is set to {0}", tuneChannel.ModulationType);
dvbsLocator.put_InnerFECRate(dvbsChannel.InnerFecRate);
Log.Log.WriteFile("dvbs:channel FECRate is set to {0}", tuneChannel.InnerFecRate);
_tuneRequest.put_Locator(locator);
+
//set the DisEqC parameters
-
if (_conditionalAccess != null)
{
//int hr2 = ((IMediaControl)_graphBuilder).Pause();