/****************************************************************************** Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. ****************************************************************************** File Name : hi_comm_hdmi.h Version : Initial Draft Author : Hisilicon multimedia software group Created : 2011/12/21 Description : History : 1.Date : 2011/12/21 Author : n00168968 Modification: Created file ******************************************************************************/ #ifndef __HI_COMM_HDMI_H__ #define __HI_COMM_HDMI_H__ #include "hi_type.h" #include "hi_errno.h" #include "hi_common.h" #include "hi_comm_video.h" #define HI_HDMI_MAX_AUDIO_CAP_COUNT 15 #define HI_HDMI_MAX_AUDIO_SMPRATE_COUNT 10 #ifdef __cplusplus #if __cplusplus extern "C"{ #endif #endif /* End of #ifdef __cplusplus */ typedef enum hiHDMI_VIDEO_FMT_E { HI_HDMI_VIDEO_FMT_1080P_60 = 0, HI_HDMI_VIDEO_FMT_1080P_50, HI_HDMI_VIDEO_FMT_1080P_30, HI_HDMI_VIDEO_FMT_1080P_25, HI_HDMI_VIDEO_FMT_1080P_24, HI_HDMI_VIDEO_FMT_1080i_60, HI_HDMI_VIDEO_FMT_1080i_50, HI_HDMI_VIDEO_FMT_720P_60, HI_HDMI_VIDEO_FMT_720P_50, HI_HDMI_VIDEO_FMT_576P_50, HI_HDMI_VIDEO_FMT_480P_60, HI_HDMI_VIDEO_FMT_PAL, /* B D G H I PAL */ HI_HDMI_VIDEO_FMT_PAL_N, /* (N)PAL */ HI_HDMI_VIDEO_FMT_PAL_Nc, /* (Nc)PAL */ HI_HDMI_VIDEO_FMT_NTSC, /* (M)NTSC */ HI_HDMI_VIDEO_FMT_NTSC_J, /* NTSC-J */ HI_HDMI_VIDEO_FMT_NTSC_PAL_M, /* (M)PAL */ HI_HDMI_VIDEO_FMT_SECAM_SIN, /**< SECAM_SIN*/ HI_HDMI_VIDEO_FMT_SECAM_COS, /**< SECAM_COS*/ HI_HDMI_VIDEO_FMT_861D_640X480_60, HI_HDMI_VIDEO_FMT_VESA_800X600_60, HI_HDMI_VIDEO_FMT_VESA_1024X768_60, HI_HDMI_VIDEO_FMT_VESA_1280X720_60, HI_HDMI_VIDEO_FMT_VESA_1280X800_60, HI_HDMI_VIDEO_FMT_VESA_1280X1024_60, HI_HDMI_VIDEO_FMT_VESA_1366X768_60, HI_HDMI_VIDEO_FMT_VESA_1440X900_60, HI_HDMI_VIDEO_FMT_VESA_1440X900_60_RB, HI_HDMI_VIDEO_FMT_VESA_1600X900_60_RB, HI_HDMI_VIDEO_FMT_VESA_1600X1200_60, HI_HDMI_VIDEO_FMT_VESA_1680X1050_60, HI_HDMI_VIDEO_FMT_VESA_1920X1080_60, HI_HDMI_VIDEO_FMT_VESA_1920X1200_60, HI_HDMI_VIDEO_FMT_VESA_2048X1152_60, /* Currently, not support */ HI_HDMI_VIDEO_FMT_2560x1440_30, HI_HDMI_VIDEO_FMT_2560x1600_60, HI_HDMI_VIDEO_FMT_1920x2160_30, HI_HDMI_VIDEO_FMT_3840X2160P_24, /** 93:3840x2160p @ 24Hz No Repetition */ HI_HDMI_VIDEO_FMT_3840X2160P_25, /** 94:3840x2160p @ 25Hz No Repetition */ HI_HDMI_VIDEO_FMT_3840X2160P_30, /** 95:3840x2160p @ 30Hz No Repetition */ HI_HDMI_VIDEO_FMT_3840X2160P_50, /** 96:3840x2160p @ 50Hz No Repetition */ HI_HDMI_VIDEO_FMT_3840X2160P_60, /** 97:3840x2160p @ 60Hz No Repetition */ HI_HDMI_VIDEO_FMT_4096X2160P_24, /** 98:4096x2160p @ 24Hz No Repetition */ HI_HDMI_VIDEO_FMT_4096X2160P_25, /** 99:4096x2160p @ 25Hz No Repetition */ HI_HDMI_VIDEO_FMT_4096X2160P_30, /** 100:4096x2160p @ 30Hz No Repetition */ HI_HDMI_VIDEO_FMT_4096X2160P_50, /** 101:4096x2160p @ 50Hz No Repetition */ HI_HDMI_VIDEO_FMT_4096X2160P_60, /** 102:4096x2160p @ 60Hz No Repetition */ HI_HDMI_VIDEO_FMT_VESA_CUSTOMER_DEFINE, /* Currently, not support */ HI_HDMI_VIDEO_FMT_BUTT }HI_HDMI_VIDEO_FMT_E; typedef enum hiHDMI_VIDEO_SAMPLE_TYPE_E { HI_HDMI_VIDEO_SAMPLE_TYPE_UNKNOWN, HI_HDMI_VIDEO_SAMPLE_TYPE_PROGRESSIVE, HI_HDMI_VIDEO_SAMPLE_TYPE_INTERLACE, HI_HDMI_VIDEO_SAMPLE_TYPE_INFERED_PROGRESSIVE, HI_HDMI_VIDEO_SAMPLE_TYPE_INFERED_INTERLACE, HI_HDMI_VIDEO_SAMPLE_TYPE_BUTT }HI_HDMI_VIDEO_SAMPLE_TYPE_E; typedef enum hiHDMI_ASPECT_RATIO_E { HI_HDMI_ASPECT_RATIO_UNKNOWN, /**< unknown aspect ratio */ HI_HDMI_ASPECT_RATIO_4TO3, /**< 4:3 */ HI_HDMI_ASPECT_RATIO_16TO9, /**< 16:9 */ HI_HDMI_ASPECT_RATIO_SQUARE, /**< square */ HI_HDMI_ASPECT_RATIO_14TO9, /**< 14:9 */ HI_HDMI_ASPECT_RATIO_221TO1, /**< 221:100 */ HI_HDMI_ASPECT_RATIO_ZOME, /**< default not support, use source's aspect ratio to display */ HI_HDMI_ASPECT_RATIO_FULL, /**< default not support, full screen display */ HI_HDMI_ASPECT_RATIO_BUTT }HI_HDMI_ASPECT_RATIO_E; typedef enum hiHDMI_SAMPLE_RATE_E { HI_HDMI_SAMPLE_RATE_UNKNOWN=0, /**< unknown sample rate */ HI_HDMI_SAMPLE_RATE_8K = 8000, /**< 8K sample rate */ HI_HDMI_SAMPLE_RATE_11K = 11025, /**< 11.025K sample rate */ HI_HDMI_SAMPLE_RATE_12K = 12000, /**< 12K sample rate */ HI_HDMI_SAMPLE_RATE_16K = 16000, /**< 16K sample rate */ HI_HDMI_SAMPLE_RATE_22K = 22050, /**< 22.050K sample rate */ HI_HDMI_SAMPLE_RATE_24K = 24000, /**< 24K sample rate */ HI_HDMI_SAMPLE_RATE_32K = 32000, /**< 32K sample rate */ HI_HDMI_SAMPLE_RATE_44K = 44100, /**< 44.1K sample rate */ HI_HDMI_SAMPLE_RATE_48K = 48000, /**< 48K sample rate */ HI_HDMI_SAMPLE_RATE_88K = 88200, /**< 88.2K sample rate */ HI_HDMI_SAMPLE_RATE_96K = 96000, /**< 96K sample rate */ HI_HDMI_SAMPLE_RATE_176K = 176400, /**< 176K sample rate */ HI_HDMI_SAMPLE_RATE_192K = 192000, /**< 192K sample rate */ HI_HDMI_SAMPLE_RATE_BUTT }HI_HDMI_SAMPLE_RATE_E; typedef enum hiHDMI_BIT_DEPTH_E { HI_HDMI_BIT_DEPTH_UNKNOWN =0, /**< unknown bit width */ HI_HDMI_BIT_DEPTH_8 = 8, /**< 8 bits width */ HI_HDMI_BIT_DEPTH_16 = 16, /**< 16 bits width */ HI_HDMI_BIT_DEPTH_18 = 18, /**< 18 bits width */ HI_HDMI_BIT_DEPTH_20 = 20, /**< 20 bits width */ HI_HDMI_BIT_DEPTH_24 = 24, /**< 24 bits width */ HI_HDMI_BIT_DEPTH_32 = 32, /**< 32 bits width */ HI_HDMI_BIT_DEPTH_BUTT }HI_HDMI_BIT_DEPTH_E; typedef enum hiHDMI_SND_INTERFACE_E { HI_HDMI_SND_INTERFACE_I2S, /** Used as a response to indicate that the device does not support the requested message type, or that it cannot execute it at the present time. */ #define CEC_OPCODE_ABORT_MESSAGE 0XFF /**< Message This message is reserved for testing purposes. */ /**< One Touch Play Feature*/ #define CEC_OPCODE_ACTIVE_SOURCE 0X82 /**< Used by a new source to indicate that it has started to transmit a stream OR used in response to a */ #define CEC_OPCODE_IMAGE_VIEW_ON 0X04 /**< Sent by a source device to the TV whenever it enters the active state (alternatively it may send ). */ #define CEC_OPCODE_TEXT_VIEW_ON 0X0D /**< As , but should also remove any text, menus and PIP windows from the TV¡¯s display. */ /**< Routing Control Feature*/ #define CEC_OPCODE_INACTIVE_SOURCE 0X9D /**< Used by the currently active source to inform the TV that it has no video to be presented to the user, or is going into standby as the result of a local user command on the device. */ #define CEC_OPCODE_REQUEST_ACTIVE_SOURCE 0X85 /**< Used by a new device to discover the status of the system. */ #define CEC_OPCODE_ROUTING_CHANGE 0X80 /**< Sent by a CEC Switch when it is manually switched to inform all other devices on the network that the active route below the switch has changed. */ #define CEC_OPCODE_ROUTING_INFORMATION 0X81 /**< Sent by a CEC Switch to indicate the active route below the switch. */ #define CEC_OPCODE_SET_STREAM_PATH 0X86 /**< Used by the TV to request a streaming path from the specified physical address. */ /**< Standby Feature*/ #define CEC_OPCODE_STANDBY 0X36 /**< Switches one or all devices into standby mode. Can be used as a broadcast message or be addressed to a specific device. See section CEC 13.3 for important notes on the use of this message */ /**< One Touch Record Feature*/ #define CEC_OPCODE_RECORD_OFF 0X0B /**< Requests a device to stop a recording. */ #define CEC_OPCODE_RECORD_ON 0X09 /**< Attempt to record the specified source. */ #define CEC_OPCODE_RECORD_STATUS 0X0A /**< Used by a Recording Device to inform the initiator of the message about its status. */ #define CEC_OPCODE_RECORD_TV_SCREEN 0X0F /**< Request by the Recording Device to record the presently displayed source. */ /**< Timer Programming Feature*/ #define CEC_OPCODE_CLEAR_ANALOGUE_TIMER 0X33 /**< Used to clear an Analogue timer block of a device. */ #define CEC_OPCODE_CLEAR_DIGITAL_TIMER 0X99 /**< Used to clear a Digital timer block of a device. */ #define CEC_OPCODE_CLEAR_EXTERNAL_TIMER 0XA1 /**< Used to clear an External timer block of a device. */ #define CEC_OPCODE_SET_ANALOGUE_TIMER 0X34 /**< Used to set a single timer block on an Analogue Recording Device. */ #define CEC_OPCODE_SET_DIGITAL_TIMER 0X97 /**< Used to set a single timer block on a Digital Recording Device. */ #define CEC_OPCODE_SET_EXTERNAL_TIMER 0XA2 /**< Used to set a single timer block to record from an external device. */ #define CEC_OPCODE_SET_TIMER_PROGRAM_TITLE 0X67 /**< Used to set the name of a program associated with a timer block. Sent directly after sending a or message. The name is then associated with that timer block. */ #define CEC_OPCODE_TIMER_CLEARED_STATUS 0X43 /**< Used to give the status of a , or message. */ #define CEC_OPCODE_TIMER_STATUS 0X35 /**< Used to send timer status to the initiator of a message. */ /**< System Information Feature*/ #define CEC_OPCODE_CEC_VERSION 0X9E /**< Used to indicate the supported CEC version, in response to a */ #define CEC_OPCODE_GET_CEC_VERSION 0X9F /**< Used by a device to enquire which version of CEC the target supports */ #define CEC_OPCODE_GIVE_PHYSICAL_ADDRESS 0X83 /**< A request to a device to return its physical address. */ #define CEC_OPCODE_REPORT_PHYSICAL_ADDRESS 0X84 /**< Used to inform all other devices of the mapping between physical and logical address of the initiator. */ #define CEC_OPCODE_GET_MENU_LANGUAGE 0X91 /**< Sent by a device capable of character generation (for OSD and Menus) to a TV in order to discover the currently selected Menu language. Also used by a TV during installation to discover the currently set menu language of other devices. */ #define CEC_OPCODE_SET_MENU_LANGUAGE 0X32 /**< Used by a TV or another device to indicate the menu language. */ /**< Deck Control Feature*/ #define CEC_OPCODE_DECK_CONTROL 0X42 /**< Used to control a device¡¯s media functions. */ #define CEC_OPCODE_DECK_STATUS 0X1B /**< Used to provide a deck¡¯s status to the initiator of the message. */ #define CEC_OPCODE_GIVE_DECK_STATUS 0X1A /**< Used to request the status of a device, regardless of whether or not it is the current active source. */ #define CEC_OPCODE_PLAY 0X41 /**< Used to control the playback behaviour of a source device. */ /**< Tuner Control Feature*/ #define CEC_OPCODE_GIVE_TUNER_DEVICE_STATUS 0X08 /**< Used to request the status of a tuner device. */ #define CEC_OPCODE_SELECT_ANALOGUE_SERVICE 0X92 /**< Directly selects a Digital TV, Radio or Data Broadcast Service */ #define CEC_OPCODE_TUNER_DEVICE_STATUS 0X07 /**< Use by a tuner device to provide its status to the initiator of the message. */ #define CEC_OPCODE_TUNER_STEP_DECREMENT 0X06 /**< Used to tune to next lowest service in a tuner¡¯s service list. Can be used for PIP. */ #define CEC_OPCODE_TUNER_STEP_INCREMENT 0X05 /**< Used to tune to next highest service in a tuner¡¯s service list. Can be used for PIP. */ /**< Vendor Specific Command*/ #define CEC_OPCODE_DEVICE_VENDOR_ID 0X87 /**< Reports the vendor ID of this device. */ #define CEC_OPCODE_GIVE_DEVICE_VENDOR_ID 0X8C /**< Requests the Vendor ID from a device. */ #define CEC_OPCODE_VENDOR_COMMAND 0X89 /**< Allows vendor specific commands to be sent between two devices. */ #define CEC_OPCODE_VENDOR_COMMAND_WITH_ID 0XA0 /**< Allows vendor specific commands to be sent between two devices or broadcast. */ #define CEC_OPCODE_VENDOR_REMOTE_BUTTON_DOWN 0X8A /**< Indicates that a remote control button has been depressed. */ #define CEC_OPCODE_VENDOR_REMOTE_BUTTON_UP 0X8B /**< Indicates that a remote control button (the last button pressed indicated by the Vendor Remote Button Down message) has been released. */ /**< OSD Display Feature*/ #define CEC_OPCODE_SET_OSD_STRING 0X64 /**< Used to send a text message to output on a TV. */ #define CEC_OPCODE_GIVE_OSD_NAME 0X46 /**< Used to request the preferred OSD name of a device for use in menus associated with that device. */ #define CEC_OPCODE_SET_OSD_NAME 0X47 /**< Used to set the preferred OSD name of a device for use in menus associated with that device. */ /**< Device Menu Control Feature*/ #define CEC_OPCODE_MENU_REQUEST 0X8D /**< A request from the TV for a device to show/remove a menu or to query if a device is currently showing a menu. */ #define CEC_OPCODE_MENU_STATUS 0X8E /**< Used to indicate to the TV that the device is showing/has removed a menu and requests the remote control keys to be passed though. */ #define CEC_OPCODE_USER_CONTROL_PRESSED 0X44 /**< Used to indicate that the user pressed a remote control button or switched from one remote control button to another. */ #define CEC_OPCODE_USER_CONTROL_RELEASED 0X45 /**< Indicates that user released a remote control button (the last one indicated by the message) */ /**< Power Status Feature*/ #define CEC_OPCODE_GIVE_DEVICE_POWER_STATUS 0X8F /**< Used to determine the current power status of a target device */ #define CEC_OPCODE_REPORT_POWER_STATUS 0X90 /**< Used to inform a requesting device of the current power status */ /**< System Audio Control Feature*/ #define CEC_OPCODE_GIVE_AUDIO_STATUS 0X71 /**< Requests an amplifier to send its volume and mute status */ #define CEC_OPCODE_GIVE_SYSTEM_AUDIO_MODE_STATUS 0x7D /**< Requests the status of the System Audio Mode */ #define CEC_OPCODE_REPORT_AUDIO_STATUS 0X7A /**< Reports an amplifier¡¯s volume and mute status */ #define CEC_OPCODE_SET_SYSTEM_AUDIO_MODE 0X72 /**< Turns the System Audio Mode On or Off. */ #define CEC_OPCODE_SYSTEM_AUDIO_MODE_REQUEST 0X70 /**< A device implementing System Audio Control and which has volume control RC buttons (eg TV or STB) requests to use System Audio Mode to the amplifier */ #define CEC_OPCODE_SYSTEM_AUDIO_MODE_STATUS 0X7E /**< Reports the current status of the System Audio Mode */ /**< Audio Rate Control Feature*/ #define CEC_OPCODE_SET_AUDIO_RATE 0X9A /**< Used to control audio rate from Source Device. */ #define CEC_OPCODE_POLLING_MESSAGE 0XFE/**< POLL message have no opcode, So, we just use this value */ typedef enum hiUNF_CEC_LOGICALADD_S { HI_CEC_LOGICALADD_TV = 0X00, HI_CEC_LOGICALADD_RECORDDEV_1 = 0X01, HI_CEC_LOGICALADD_RECORDDEV_2 = 0X02, HI_CEC_LOGICALADD_TUNER_1 = 0X03, HI_CEC_LOGICALADD_PLAYDEV_1 = 0X04, HI_CEC_LOGICALADD_AUDIOSYSTEM = 0X05, HI_CEC_LOGICALADD_TUNER_2 = 0X06, HI_CEC_LOGICALADD_TUNER_3 = 0X07, HI_CEC_LOGICALADD_PLAYDEV_2 = 0X08, HI_CEC_LOGICALADD_RECORDDEV_3 = 0X09, HI_CEC_LOGICALADD_TUNER_4 = 0X0A, HI_CEC_LOGICALADD_PLAYDEV_3 = 0X0B, HI_CEC_LOGICALADD_RESERVED_1 = 0X0C, HI_CEC_LOGICALADD_RESERVED_2 = 0X0D, HI_CEC_LOGICALADD_SPECIALUSE = 0X0E, HI_CEC_LOGICALADD_BROADCAST = 0X0F, HI_CEC_LOGICALADD_BUTT }HI_CEC_LOGICALADD_S; typedef enum hiUNF_CEC_CMDTYPE_E { HI_CEC_STRUCTCOMMAND, HI_CEC_RAWCOMMAND, HI_CEC_BUTT }HI_CEC_CMDTYPE_E; typedef struct hiUNF_CEC_RAWDATA_S { HI_U8 u8Length; HI_U8 u8Data[15]; }HI_CEC_RAWDATA_S; typedef enum hiUNF_CEC_UICMD_E /**< User Interface Command Opcode */ { HI_CEC_UICMD_SELECT = 0x00, HI_CEC_UICMD_UP = 0x01, HI_CEC_UICMD_DOWN = 0x02, HI_CEC_UICMD_LEFT = 0x03, HI_CEC_UICMD_RIGHT = 0x04, HI_CEC_UICMD_RIGHT_UP = 0x05, HI_CEC_UICMD_RIGHT_DOWN = 0x06, HI_CEC_UICMD_LEFT_UP = 0x07, HI_CEC_UICMD_LEFT_DOWN = 0x08, HI_CEC_UICMD_ROOT_MENU = 0x09, HI_CEC_UICMD_SETUP_MENU = 0x0A, HI_CEC_UICMD_CONTENTS_MENU = 0x0B, HI_CEC_UICMD_FAVORITE_MENU = 0x0C, HI_CEC_UICMD_EXIT = 0x0D, HI_CEC_UICMD_NUM_0 = 0x20, HI_CEC_UICMD_NUM_1 = 0x21, HI_CEC_UICMD_NUM_2 = 0x22, HI_CEC_UICMD_NUM_3 = 0x23, HI_CEC_UICMD_NUM_4 = 0x24, HI_CEC_UICMD_NUM_5 = 0x25, HI_CEC_UICMD_NUM_6 = 0x26, HI_CEC_UICMD_NUM_7 = 0x27, HI_CEC_UICMD_NUM_8 = 0x28, HI_CEC_UICMD_NUM_9 = 0x29, HI_CEC_UICMD_DOT = 0x2A, HI_CEC_UICMD_ENTER = 0x2B, HI_CEC_UICMD_CLEAR = 0x2C, HI_CEC_UICMD_NEXT_FAVORITE = 0x2F, HI_CEC_UICMD_CHANNEL_UP = 0x30, HI_CEC_UICMD_CHANNEL_DOWN = 0x31, HI_CEC_UICMD_PREVIOUS_CHANNEL = 0x32, HI_CEC_UICMD_SOUND_SELECT = 0x33, HI_CEC_UICMD_INPUT_SELECT = 0x34, HI_CEC_UICMD_DISPLAY_INFORMATION = 0x35, HI_CEC_UICMD_HELP = 0x36, HI_CEC_UICMD_PAGE_UP = 0x37, HI_CEC_UICMD_PAGE_DOWN = 0x38, HI_CEC_UICMD_POWER = 0x40, HI_CEC_UICMD_VOLUME_UP = 0x41, HI_CEC_UICMD_VOLUME_DOWN = 0x42, HI_CEC_UICMD_MUTE = 0x43, HI_CEC_UICMD_PLAY = 0x44, HI_CEC_UICMD_STOP = 0x45, HI_CEC_UICMD_PAUSE = 0x46, HI_CEC_UICMD_RECORD = 0x47, HI_CEC_UICMD_REWIND = 0x48, HI_CEC_UICMD_FAST_FORWARD = 0x49, HI_CEC_UICMD_EJECT = 0x4A, HI_CEC_UICMD_FORWARD = 0x4B, HI_CEC_UICMD_BACKWARD = 0x4C, HI_CEC_UICMD_STOP_RECORD = 0x4D, HI_CEC_UICMD_PAUSE_RECORD = 0x4E, HI_CEC_UICMD_ANGLE = 0x50, HI_CEC_UICMD_SUBPICTURE = 0x51, HI_CEC_UICMD_VIDEO_ON_DEMAND = 0x52, HI_CEC_UICMD_ELECTRONIC_PROGRAM_GUIDE = 0x53, HI_CEC_UICMD_TIMER_PROGRAMMING = 0x54, HI_CEC_UICMD_INITIAL_CONFIGURATION = 0x55, HI_CEC_UICMD_PLAY_FUNCTION = 0x60, HI_CEC_UICMD_PAUSE_PLAY_FUNCTION = 0x61, HI_CEC_UICMD_RECORD_FUNCTION = 0x62, HI_CEC_UICMD_PAUSE_RECORD_FUNCTION = 0x63, HI_CEC_UICMD_STOP_FUNCTION = 0x64, HI_CEC_UICMD_MUTE_FUNCTION = 0x65, HI_CEC_UICMD_RESTORE_VOLUME_FUNCTION = 0x66, HI_CEC_UICMD_TUNE_FUNCTION = 0x67, HI_CEC_UICMD_SELECT_MEDIA_FUNCTION = 0x68, HI_CEC_UICMD_SELECT_AV_INPUT_FUNCTION = 0x69, HI_CEC_UICMD_SELECT_AUDIO_INPUT_FUNCTION = 0x6A, HI_CEC_UICMD_POWER_TOGGLE_FUNCTION = 0x6B, HI_CEC_UICMD_POWER_OFF_FUNCTION = 0x6C, HI_CEC_UICMD_POWER_ON_FUNCTION = 0x6D, HI_CEC_UICMD_F1_BLUE = 0x71, HI_CEC_UICMD_F2_RED = 0x72, HI_CEC_UICMD_F3_GREEN = 0x73, HI_CEC_UICMD_F4_YELLOW = 0x74, HI_CEC_UICMD_F5 = 0x75, HI_CEC_UICMD_DATA = 0x76 }HI_CEC_UICMD_E; /* User Control Code */ typedef union hiUNF_CEC_Operand_t { HI_CEC_RAWDATA_S stRawData; HI_CEC_UICMD_E stUIOpcode; }HI_CEC_Operand_t; typedef struct hiUNF_HDMI_CEC_CMD_S { HI_CEC_LOGICALADD_S enSrcAdd; HI_CEC_LOGICALADD_S enDstAdd; HI_U8 u8Opcode; HI_CEC_Operand_t unOperand; }HI_HDMI_CEC_CMD_S; typedef struct hiUNF_HDMI_CEC_STATUS_S { HI_BOOL bEnable; HI_U8 u8PhysicalAddr[4]; /**< CEC physic addr */ HI_U8 u8LogicalAddr; /**< CEC logic addr, default:0x03. */ HI_U8 u8Network[HI_CEC_LOGICALADD_BUTT]; /**< CEC's net work£¬1:this device can answer cec command */ }HI_HDMI_CEC_STATUS_S; typedef enum hiERR_HDMI_CODE_E { ERR_HDMI_NOT_INIT = 1, ERR_HDMI_INVALID_PARA = 2, ERR_HDMI_NUL_PTR = 3, ERR_HDMI_DEV_NOT_OPEN = 4, ERR_HDMI_DEV_NOT_CONNECT = 5, ERR_HDMI_READ_SINK_FAILED = 6, ERR_HDMI_INIT_ALREADY = 7, ERR_HDMI_CALLBACK_ALREADY = 8, ERR_HDMI_INVALID_CALLBACK = 9, ERR_HDMI_FEATURE_NO_SUPPORT = 10, ERR_HDMI_BUS_BUSY = 11, ERR_HDMI_READ_EVENT_FAILED = 12, ERR_HDMI_NOT_START = 13, ERR_HDMI_READ_EDID_FAILED = 14, ERR_HDMI_BUTT, } ERR_HDMI_CODE_E; #define HI_ERR_HDMI_NOT_INIT HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_NOT_INIT) #define HI_ERR_HDMI_INVALID_PARA HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_INVALID_PARA) #define HI_ERR_HDMI_NUL_PTR HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_NUL_PTR) #define HI_ERR_HDMI_DEV_NOT_OPEN HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_DEV_NOT_OPEN) #define HI_ERR_HDMI_DEV_NOT_CONNECT HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_DEV_NOT_CONNECT) #define HI_ERR_HDMI_READ_SINK_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_READ_SINK_FAILED) #define HI_ERR_HDMI_INIT_ALREADY HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_INIT_ALREADY) #define HI_ERR_HDMI_CALLBACK_ALREADY HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CALLBACK_ALREADY) #define HI_ERR_HDMI_INVALID_CALLBACK HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_INVALID_CALLBACK) #define HI_ERR_HDMI_FEATURE_NO_SUPPORT HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_FEATURE_NO_SUPPORT) #define HI_ERR_HDMI_BUS_BUSY HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_BUS_BUSY) #define HI_ERR_HDMI_READ_EVENT_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_READ_EVENT_FAILED) #define HI_ERR_HDMI_NOT_START HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_NOT_START) #define HI_ERR_HDMI_READ_EDID_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_READ_EDID_FAILED) #ifdef __cplusplus #if __cplusplus } #endif #endif /* End of #ifdef __cplusplus */ #endif /* End of #ifndef __HI_COMM_VO_H__ */