blob: 627bcea292389a25f405e1d05c5a100587bbe920 [file] [log] [blame]
limin.tian79bf2b12023-02-24 10:28:26 +00001 /*
limin.tian75338482022-06-20 09:27:34 +08002 * Copyright (c) 2021 Amlogic, Inc. All rights reserved.
3 *
4 * This source code is subject to the terms and conditions defined in the
5 * file 'LICENSE' which is part of this source code package.
6 *
7 * Description:
8 */
9
10#ifndef MESON_DRM_EVENT_H_
11#define MESON_DRM_EVENT_H_
12#include <stdio.h>
13#include <stdint.h>
14#include <stdlib.h>
15#include <unistd.h>
16#include <stdbool.h>
17#if defined(__cplusplus)
18extern "C" {
19#endif
20
21typedef enum _ENUM_DISPLAY_EVENT {
22 DISPLAY_EVENT_CONNECTED = 0, //!< Display connected event.
23 DISPLAY_EVENT_DISCONNECTED, //!< Display disconnected event.
24 DISPLAY_HDCP_AUTHENTICATED, //!< HDCP authenticate success
25 DISPLAY_HDCP_AUTHENTICATIONFAILURE, //!< Rx Sense OFF event
26 DISPLAY_EVENT_MAX, //!<MAX
27}ENUM_DISPLAY_EVENT;
28
29typedef enum _ENUM_HDCP_STATUS {
30 HDCP_STATUS_AUTHENTICATED, /**< HDCP Authentication Process is initiated and Passed */
31 HDCP_STATUS_AUTHENTICATIONFAILURE, /**< HDCP Authentication Failure or Link Integroty Failure */
32 HDCP_STATUS_MAX /**< Maximum index for HDCP status. */
33} ENUM_HDCP_STATUS;
34typedef void (*displayEventCallback)(ENUM_DISPLAY_EVENT enEvent, void *eventData/*Optional*/);
35bool RegisterDisplayEventCallback(displayEventCallback cb);
36void startDisplayUeventMonitor();
37void stopDisplayUeventMonitor();
38
39#if defined(__cplusplus)
40}
41#endif
42
43#endif