HDCP RX Driver Integration - 3.1 English

HDMI 1.4/2.0 Receiver Subsystem Product Guide (PG236)

Document ID
Release Date
3.1 English

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.

  1. Load the HDCP production keys into the HDMI subsystem. This function needs to be called for each key that is loaded. If HDCP 1.4 and 2.3 are enabled all the keys must be loaded, otherwise a subset of the keys are loaded. Note that the byte arrays used to store the key octet strings for HDCP are defined in big endian byte order.
    • XV_HdmiRxSs_HdcpSetKey
      • XV_HDMIRXSS_KEY_HDCP22_LC128 (128-bit DCP Licensed Constant)
      • XV_HDMIRXSS_KEY_HDCP22_PRIVATE (902-byte DCP Receiver Device Key Set)
    Position in Bytes Size in Bytes Description
    0–39 40 Reserved
    40–561 522 Device Public Certificate
    562–901 340 Device Private Key 1
    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.
  2. Initialize the HDMI 1.4/2.0 RX Subsystem driver after the HDCP keys have been loaded. Initializing the subsystem starts the HDCP 1.4/2.3 drivers internally.
  3. Connect the HDCP interrupt handlers to the interrupt controller interrupt ID:
    • XV_HdmiRxSS_HdcpIntrHandler
    • XV_HdmiRxSS_HdcpTimerIntrHandler
  4. 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_HdmiRxSs_SetCallback
  5. 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_HdmiRxSs_HdcpPoll
  6. 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. The enabling of the protocol is automatically handled by the subsystem, thus the legacy XV_HdmiRxSs_HdcpSetProtocol API is deprecated. When the capability is changed, HPD should be immediately toggled to get the attention of the upstream transmitter.
    • XV_HdmiRxSs_HdcpSetCapability
  7. Check the status of authentication.
    • XV_HdmiRxSs_HdcpIsAuthenticated
  8. Check the status of the cipher encryption. This is the instantaneous encryption status of the cipher and can change between subsequent frames.
    • XV_HdmiRxSs_HdcpIsEncrypted
  9. Check the overall HDCP protocol status and log data. You can also set the level of detail for log information reported.
    • XV_HdmiRxSs_HdcpInfo
    • XV_HdmiRxSs_SetInfoDetail