This section describes the steps required to initialize and run the HDCP RX. The application should call the functions roughly in the order specified to ensure that the driver operates properly. When only a single HDCP protocol is enabled, either 1.4 or 2.3, a subset of the function calls might be needed.
- Load the HDCP production keys into the HDMI subsystem.
This function needs to be called for each key that is loaded.
If HDCP is
enabled all the keys must be loaded. Note that the byte arrays used to
store the key octet strings for HDCP are defined in big endian byte order.
-
XV_HdmiRxSs1_HdcpSetKey
-
XV_HDMIRXSS1_KEY_HDCP14
-
XV_HDMIRXSS1_KEY_HDCP22_LC128
(128-bit DCP Licensed Constant) -
XV_HDMIRXSS1_KEY_HDCP22_PRIVATE
(902-byte DCP Receiver Device Key Set)
-
Table 1. HDCP Production Keys Mapping Position in Bytes Size in Bytes Description 0–39 40 Reserved 40–561 522 Device Public Certificate 562–901 340 Device Private Key 1 - The actual Private Key size is 320 bytes. The additional 20 bytes is for a hash code that can be used by the software application to verify the keys before loading them. These additional bytes are not used by the HDCP driver.
Important: In an HDCP-enabled system, after the key management block is successfully initialized, a bit is set to block reading out the key again. The bit remains set until the device is reprogrammed. Therefore, the keys can only be read once during initialization. -
- Initialize the HDMI 2.1 RX Subsystem driver after the HDCP keys have been loaded. Initializing the subsystem starts the HDCP 1.4/2.3 drivers internally.
- Connect the HDCP interrupt handlers to the interrupt controller
interrupt ID:
-
XV_HdmiRxSS1_HdcpIntrHandler
-
XV_HdmiRxSS1_HdcpTimerIntrHandler
-
- Set the HDCP user callback functions. These callback functions are
optional and used to hook into the HDCP state machine and allow the user to take
action at various stages of the HDCP protocol. If there is no use for the callback
at the application level, then the callback can be left undefined.
-
XV_HdmiRxSs1_SetCallback
-
XV_HDMIRXSS1_HANDLER_HDCP_AUTHENTICATED
-
XV_HDMIRXSS1_HANDLER_HDCP_UNAUTHENTICATED
-
XV_HDMIRXSS1_HANDLER_HDCP_AUTHENTICATION_REQUEST
-
XV_HDMIRXSS1_HANDLER_HDCP_STREAM_MANAGE_REQUEST
-
XV_HDMIRXSS1_HANDLER_HDCP_TOPOLOGY_UPDATE
-
XV_HDMIRXSS1_HANDLER_HDCP_ENCRYPTION_UPDATE
-
-
- Execute the poll function to run the HDCP state machine. This
function checks to see which HDCP protocol is enabled, and then execute only the
active protocol. The call to this function can be inserted in the main loop of the
user application and should execute continuously.
Because the HDCP RX state machine is run
using this poll function, it is important to ensure that this function is given
adequate CPU runtime, especially during authentication attempts.
-
XV_HdmiRxSs1_HdcpPoll
-
-
Set
the HDCP protocol capability to notify the upstream transmitter which protocols
are supported. Setting the HDCP protocol capability is optional and is used to
override the default capability of the receiver. The default capability is set
to both protocols. There are only two valid capability options: both and none.
Setting the capability to none disables the HDCP DDC slave device. Note that
setting the protocol capability does not enable the protocol. When the capability is
changed, HPD should be immediately toggled to get the attention of the upstream
transmitter.
-
XV_HdmiRxSs1_HdcpSetCapability
-
XV_HDMIRXSS1_HDCP_NONE
-
XV_HDMIRXSS1_HDCP_BOTH
-
-
- Check the status of authentication.
-
XV_HdmiRxSs1_HdcpIsAuthenticated
-
- Check the status of the cipher encryption. This is the
instantaneous encryption status of the cipher and can change between subsequent
frames.
-
XV_HdmiRxSs1_HdcpIsEncrypted
-
- Check the overall HDCP protocol status and log data. You can also
set the level of detail for log information reported.
-
XV_HdmiRxSs1_HdcpInfo
-
XV_HdmiRxSs1_SetInfoDetail
-