From e952f3d775a90d770c6f718e186dbb7d716fbbb0 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 27 Aug 2020 11:51:06 -0600 Subject: [PATCH 1/6] Adds missing case for Dmc4kHdDspBase --- .../Essentials_DM/Chassis/DmChassisController.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs index 0a25dadb..9446daa4 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs @@ -355,6 +355,12 @@ namespace PepperDash.Essentials.DM InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support; return (int)(inputCard.Card as Dmc4kHdBase).HdmiInput.HdcpReceiveCapability; } + if (inputCard.Card is Dmc4kHdDspBase) + { + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support; + return (int)(inputCard.Card as Dmc4kHdDspBase).HdmiInput.HdcpReceiveCapability; + } + if (inputCard.Card is Dmc4kCBase) { if (PropertiesConfig.InputSlotSupportsHdcp2[tempX]) From 9846d87a40745cbba4adcdb3820f3eb1f3601e73 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 27 Aug 2020 12:25:08 -0600 Subject: [PATCH 2/6] Adds case to handle misisng eventId for HdcpSupportOffEventId --- .../Chassis/DmChassisController.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs index 9446daa4..32904276 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs @@ -198,6 +198,7 @@ namespace PepperDash.Essentials.DM Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange); Chassis.DMSystemChange += new DMSystemEventHandler(Chassis_DMSystemChange); Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange); + Chassis.BaseEvent += ChassisOnBaseEvent; VideoOutputFeedbacks = new Dictionary(); AudioOutputFeedbacks = new Dictionary(); UsbOutputRoutedToFeebacks = new Dictionary(); @@ -867,6 +868,25 @@ namespace PepperDash.Essentials.DM Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks"); break; } + case DMInputEventIds.HdcpSupportOffEventId: + { + Debug.Console(2, this, "DM Input {0} HdcpSupportOffEventId", args.Number); + if (InputCardHdcpStateFeedbacks[args.Number] != null) + InputCardHdcpStateFeedbacks[args.Number].FireUpdate(); + else + Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks"); + break; + } + // This case may be redundant as the case above should fire when HdcpSupport changes to on or off + //case DMInputEventIds.HdcpSupportOnEventId: + // { + // Debug.Console(2, this, "DM Input {0} HdcpSupportOnEventId", args.Number); + // if (InputCardHdcpStateFeedbacks[args.Number] != null) + // InputCardHdcpStateFeedbacks[args.Number].FireUpdate(); + // else + // Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks"); + // break; + // } default: { Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId); From 6c400c80a232b4d872815f45a58010750861dffc Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 27 Aug 2020 12:58:43 -0600 Subject: [PATCH 3/6] Fixes issue where true was always being passed into SetHdcpStateAction method --- .../Essentials_DM/Chassis/DmChassisController.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs index 32904276..d6b6e60c 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs @@ -1210,8 +1210,8 @@ namespace PepperDash.Essentials.DM var hdmiInPortWCec = port as HdmiInputWithCEC; - - SetHdcpStateAction(true, hdmiInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist); + + SetHdcpStateAction(PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], hdmiInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist); InputCardHdcpStateFeedbacks[ioSlot].LinkInputSig( @@ -1500,10 +1500,12 @@ namespace PepperDash.Essentials.DM { if (s == 0) { + Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to off", join, s); port.HdcpSupportOff(); } else if (s > 0) { + Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to on", join, s); port.HdcpSupportOn(); } }); @@ -1513,6 +1515,7 @@ namespace PepperDash.Essentials.DM trilist.SetUShortSigAction(join, u => { + Debug.Console(2, this, "Join {0} value {1} Setting HdcpReceiveCapability to: {2}", join, u, (eHdcpCapabilityType)u); port.HdcpReceiveCapability = (eHdcpCapabilityType)u; }); } @@ -1527,10 +1530,12 @@ namespace PepperDash.Essentials.DM { if (s == 0) { + Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to off", join, s); port.HdcpSupportOff(); } else if (s > 0) { + Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to on", join, s); port.HdcpSupportOn(); } }); @@ -1540,6 +1545,7 @@ namespace PepperDash.Essentials.DM trilist.SetUShortSigAction(join, u => { + Debug.Console(2, this, "Join {0} value {1} Setting HdcpReceiveCapability to: {2}", join, u, (eHdcpCapabilityType)u); port.HdcpCapability = (eHdcpCapabilityType)u; }); } From 64d92fdfce0f5f81635996bc756b3c6486f3cfd5 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 27 Aug 2020 13:09:28 -0600 Subject: [PATCH 4/6] adds extra event handler --- .../Chassis/DmChassisController.cs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs index d6b6e60c..0a16290f 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs @@ -877,16 +877,15 @@ namespace PepperDash.Essentials.DM Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks"); break; } - // This case may be redundant as the case above should fire when HdcpSupport changes to on or off - //case DMInputEventIds.HdcpSupportOnEventId: - // { - // Debug.Console(2, this, "DM Input {0} HdcpSupportOnEventId", args.Number); - // if (InputCardHdcpStateFeedbacks[args.Number] != null) - // InputCardHdcpStateFeedbacks[args.Number].FireUpdate(); - // else - // Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks"); - // break; - // } + case DMInputEventIds.HdcpSupportOnEventId: + { + Debug.Console(2, this, "DM Input {0} HdcpSupportOnEventId", args.Number); + if (InputCardHdcpStateFeedbacks[args.Number] != null) + InputCardHdcpStateFeedbacks[args.Number].FireUpdate(); + else + Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks"); + break; + } default: { Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId); From 5f80e12faf4e6920e59076a9d43c12153e0cc0ab Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 27 Aug 2020 13:22:54 -0600 Subject: [PATCH 5/6] Handles scenario where Dmc4kHdDspBase may not support Hdcp2 --- .../Essentials_DM/Chassis/DmChassisController.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs index 0a16290f..747b768b 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs @@ -358,8 +358,16 @@ namespace PepperDash.Essentials.DM } if (inputCard.Card is Dmc4kHdDspBase) { - InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support; - return (int)(inputCard.Card as Dmc4kHdDspBase).HdmiInput.HdcpReceiveCapability; + if (PropertiesConfig.InputSlotSupportsHdcp2[tempX]) + { + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support; + return (int)(inputCard.Card as Dmc4kCBase).DmInput.HdcpReceiveCapability; + } + + InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; + if ((inputCard.Card as Dmc4kCBase).DmInput.HdcpSupportOnFeedback.BoolValue) + return 1; + return 0; } if (inputCard.Card is Dmc4kCBase) From 0ed316eaa4c6b276e2f19457f22ba4953da4ec43 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 27 Aug 2020 13:31:00 -0600 Subject: [PATCH 6/6] cast as correct base type and change port to HdmiInput --- .../Essentials_DM/Chassis/DmChassisController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs index 747b768b..1e376950 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs @@ -361,11 +361,11 @@ namespace PepperDash.Essentials.DM if (PropertiesConfig.InputSlotSupportsHdcp2[tempX]) { InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support; - return (int)(inputCard.Card as Dmc4kCBase).DmInput.HdcpReceiveCapability; + return (int)(inputCard.Card as Dmc4kHdDspBase).HdmiInput.HdcpReceiveCapability; } InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport; - if ((inputCard.Card as Dmc4kCBase).DmInput.HdcpSupportOnFeedback.BoolValue) + if ((inputCard.Card as Dmc4kHdDspBase).HdmiInput.HdcpSupportOnFeedback.BoolValue) return 1; return 0; }