Permalink
Browse files

Added fix for TBS Modulation check. Tuning was failing when modulatio…

…n was not set for DVB-S channels.

Added fix for SendPids as there wasn't a check in place for the subChannel key. Was filling up the error log.
Fixed an error with Hauppauge card not setting the Modulation for DVB-S channels.
  • Loading branch information...
1 parent 19c8f53 commit c1657a27bfa562f0391ad97838208aee6bfc993f @djblu djblu committed Aug 26, 2012
@@ -792,8 +792,10 @@ public void SendPids(int subChannel, DVBBaseChannel channel, List<ushort> pids)
try
{
List<ushort> HwPids = new List<ushort>();
-
- _mapSubChannels[subChannel].Pids = pids;
+ if (_mapSubChannels.ContainsKey(subChannel))
+ {
+ _mapSubChannels[subChannel].Pids = pids;
+ }
Dictionary<int, ConditionalAccessContext>.Enumerator enSubch = _mapSubChannels.GetEnumerator();
while (enSubch.MoveNext())
@@ -900,7 +902,7 @@ public DVBSChannel SetDVBS2Modulation(ScanParameters parameters, DVBSChannel cha
}
channel.ModulationType = channel.InnerFecRate == BinaryConvolutionCodeRate.Rate8_9
? ModulationType.Mod16Qam
- : ModulationType.ModBpsk;
+ : ModulationType.ModQpsk;
}
//Set the Hauppauge Modulation type
/*if (channel.ModulationType == ModulationType.ModQpsk)
@@ -562,26 +562,21 @@ public DVBBaseChannel SetTuningParameters(DVBBaseChannel channel)
NbcTuningParams command = new NbcTuningParams();
// Default: tuning with "auto" is slower, so avoid it if possible.
command.DvbsStandard = TbsDvbsStandard.Auto;
-
// FEC rate
command.InnerFecRate = ch.InnerFecRate;
Log.Log.Debug(" inner FEC rate = {0}", command.InnerFecRate);
// Modulation
- if (ch.ModulationType == ModulationType.ModNotSet)
- {
- ch.ModulationType = ModulationType.ModQpsk;
- command.DvbsStandard = TbsDvbsStandard.Dvbs;
- }
- else if (ch.ModulationType == ModulationType.ModQpsk)
- {
- ch.ModulationType = ModulationType.ModNbcQpsk;
- command.DvbsStandard = TbsDvbsStandard.Dvbs2;
- }
- else if (ch.ModulationType == ModulationType.Mod8Psk)
+ if (ch.ModulationType != ModulationType.ModNotDefined && ch.ModulationType != ModulationType.ModNotSet)
{
- ch.ModulationType = ModulationType.ModNbc8Psk;
- command.DvbsStandard = TbsDvbsStandard.Dvbs2;
+ if (ch.ModulationType == ModulationType.ModNbcQpsk || ch.ModulationType == ModulationType.ModNbc8Psk)
+ {
+ command.DvbsStandard = TbsDvbsStandard.Dvbs2;
+ }
+ else
+ {
+ command.DvbsStandard = TbsDvbsStandard.Dvbs;
+ }
}
command.ModulationType = ch.ModulationType;
Log.Log.Debug(" modulation = {0}", ch.ModulationType);

0 comments on commit c1657a2

Please sign in to comment.