limin.tian | 79bf2b1 | 2023-02-24 10:28:26 +0000 | [diff] [blame^] | 1 | /* |
limin.tian | 7533848 | 2022-06-20 09:27:34 +0800 | [diff] [blame] | 2 | * 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) |
| 18 | extern "C" { |
| 19 | #endif |
| 20 | |
| 21 | typedef 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 | |
| 29 | typedef 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; |
| 34 | typedef void (*displayEventCallback)(ENUM_DISPLAY_EVENT enEvent, void *eventData/*Optional*/); |
| 35 | bool RegisterDisplayEventCallback(displayEventCallback cb); |
| 36 | void startDisplayUeventMonitor(); |
| 37 | void stopDisplayUeventMonitor(); |
| 38 | |
| 39 | #if defined(__cplusplus) |
| 40 | } |
| 41 | #endif |
| 42 | |
| 43 | #endif |