hi_mpi_hdmi_register_callback

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Function Description

Registers the HDMI event callback function in user mode.

Prototype

hi_s32 hi_mpi_hdmi_register_callback(hi_hdmi_id hdmi, const hi_hdmi_callback_func *callback_func)

Parameters

Parameter

Input/Output

Description

hdmi

Input

HDMI ID.

Value range: [0, 2)

callback_func

Input

HDMI callback function struct.

Returns

Restrictions

  • You are advised to register the HDMI event callback function.

    For example, when a hot plug event is generated, the registered callback function can be used to read the capability set information generated after the hot plug. The HDMI attributes can be modified based on the capability set information. Then you can restart the HDMI to enable the HDMI attributes to adapt to the peer-end monitor or television.

    If you do not register an event callback function, HDMI will adopt the default processing method when an event occurs, which supports hot plug of the original screen by default. If you register an event callback function, the registered function is used for processing, and the default hot plug function in the system becomes invalid. In this case, you need to ensure there is support for hot plug.

  • The callback function registration supports only the plug-in and plug-out events.

    Generally, hi_mpi_hdmi_get_sink_capability is used in the insertion event processing function to obtain the sink capability set.

  • During callback function registration, ensure that the function pointer in the input parameter does not have issues such as memory leaks and function suspension.
  • If the HDMI display device is connected when this API is called, the first removal event is not responded to, and the second removal event is responded to.