You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

258 lines
10 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*
* Copyright (c) Hisilicon Technologies Co., Ltd.. 2012-2019. All rights reserved.
* Description:
* Author:
* Create:
*/
#ifndef IHDMICEC_H
#define IHDMICEC_H
#include <utils/RefBase.h>
#include "tv_common.h"
/* ****************************** API Declaration **************************** */
/* * \addtogroup TVMW */
/* * @{ */ /* * <!-- [TVMW] */
namespace android {
class IHdmiCEC : virtual public RefBase {
public:
/**
\brief get CEC UI Status. CNcomment:获取CEC菜单选项的开关 CNend
\attention this func can be called for user getting CEC UI Status. CNcomment:用户可以调用该接口获取CEC菜单选项的开关 CNend
\param CNcomment:传入CEC菜单选项对应的枚举参数CNend
\param TV_CEC_UI_MENU_ENABLE -> 0;
\param TV_CEC_UI_MENU_ONETCHPLY -> 1;
\param TV_CEC_UI_MENU_STANDBY -> 2;
\param TV_CEC_UI_MENU_DEVMENUCTRL -> 3;
\param TV_CEC_UI_MENU_AMPLIFIER -> 4;
\param TV_CEC_UI_MENU_ARC -> 5;
\retval boolean bState,TRUE:on,FALSE:off. CNcomment:CEC某个菜单选项的状态标志, TRUE:该选项开,FALSE:该选项关 CNend
\see \n
CNcomment:CNend
*/
virtual bool getUIStatus(int uiMenu) = 0;
/**
\brief set CEC UI Status. CNcomment:设置CEC菜单选项的开关 CNend
\attention this func can be called for user setting CEC UI Status. CNcomment:用户可以调用该接口设置CEC菜单选项的开关 CNend
\param CNcomment:传入CEC菜单选项对应的枚举参数CNend
\param TV_CEC_UI_MENU_ENABLE -> 0;
\param TV_CEC_UI_MENU_ONETCHPLY -> 1;
\param TV_CEC_UI_MENU_STANDBY -> 2;
\param TV_CEC_UI_MENU_DEVMENUCTRL -> 3;
\param TV_CEC_UI_MENU_AMPLIFIER -> 4;
\param TV_CEC_UI_MENU_ARC -> 5;
\param boolean bState,TRUE:on,FALSE:off. CNcomment:状态标志, TRUE:开,FALSE:关 CNend
\retval 0:success,-1:failure CNcomment:0 成功,-1 失败CNend
\see \n
CNcomment:CNend
*/
virtual int setUIStatus(int uiMenu, bool bStat) = 0;
/**
\brief set CEC UI Command. CNcomment:用遥控器向hdmi设备发送按键指令 CNend
\attention this func can be called for user setting CEC UI Command. CNcomment:用户可以调用该接口用遥控器向hdmi设备发送按键指令 CNend
\param CNcomment:传入CEC命令对应的枚举参数CNend
\param TV_CEC_UI_CMD_SELECT -> 0
\param TV_CEC_UI_CMD_UP -> 1
\param TV_CEC_UI_CMD_DOWN -> 2
\param TV_CEC_UI_CMD_LEFT -> 3
\param TV_CEC_UI_CMD_RIGHT -> 4
\param TV_CEC_UI_CMD_EXIT -> 5
\param TV_CEC_UI_CMD_ENTER -> 6
\param TV_CEC_UI_CMD_PLAY -> 7
\param TV_CEC_UI_CMD_VOLUP -> 8
\param TV_CEC_UI_CMD_VOLDOWN -> 9
\param TV_CEC_UI_CMD_MUTE -> 10
\param TV_CEC_UI_CMD_STOP -> 11
\param TV_CEC_UI_CMD_PAUSE -> 12
\param TV_CEC_UI_CMD_REWIND -> 13
\param TV_CEC_UI_CMD_FASTFORWARD -> 14
\param TV_CEC_UI_CMD_FORWARD -> 15
\param TV_CEC_UI_CMD_BACKWARD -> 16
\param TV_CEC_UI_CMD_ROOTMENU -> 17
\retval 0:success,-1:failure CNcomment:0 成功,-1 失败CNend
\see \n
CNcomment:当Device Menu Ctrl 打开时,该接口才有效CNend
*/
virtual int setUICommand(int uiCommand) = 0;
/**
\brief get Device List. CNcomment:获取设备列表 CNend
\attention this func can be called for user getting Device List. CNcomment:用户可以调用该接口获取设备列表 CNend
\param CNcomment:CNend
\retval TV_CEC_DEV_INFO_LIST, a list of <TV_CEC_DEV_INFO_S> CNcomment: 设备列表信息CNend
\retval int s32HdmiDevPort;
\retval int s32LogicAddr;
\retval char aszOsdName[14];
\retval int s32DevVendID;
\see \n
CNcomment:CNend
*/
virtual TV_CEC_DEV_INFO_LIST getDeviceList() = 0;
/**
\brief set HDMI device Menu Status. CNcomment:使能hdmi设备的菜单状态 CNend
\attention this func can be called for user setting HDMI device Menu Status. CNcomment:用户可以调用该接口使能hdmi设备的菜单状态 CNend
\param CNcomment:传入某个HDMI设备的地址 CNend
\param TV_CEC_LOGICAL_ADDR_TV -> 0;
\param TV_CEC_LOGICAL_ADDR_RECDEV1 -> 1;
\param TV_CEC_LOGICAL_ADDR_RECDEV2 -> 2;
\param TV_CEC_LOGICAL_ADDR_TUNER1 -> 3;
\param TV_CEC_LOGICAL_ADDR_PLAYBACK1 -> 4;
\param TV_CEC_LOGICAL_ADDR_AUDSYS -> 5;
\param TV_CEC_LOGICAL_ADDR_TUNER2 -> 6;
\param TV_CEC_LOGICAL_ADDR_TUNER3 -> 7;
\param TV_CEC_LOGICAL_ADDR_PLAYBACK2 -> 8;
\param TV_CEC_LOGICAL_ADDR_RECDEV3 -> 9;
\param TV_CEC_LOGICAL_ADDR_TUNER4 -> 10;
\param TV_CEC_LOGICAL_ADDR_PLAYBACK3 -> 11;
\param TV_CEC_LOGICAL_ADDR_RES3 -> 12;
\param TV_CEC_LOGICAL_ADDR_RES4 -> 13;
\param TV_CEC_LOGICAL_ADDR_FREEUSE -> 14;
\param TV_CEC_LOGICAL_ADDR_UNREGORBC -> 15;
\param boolean bMenuActived,TRUE:on,FALSE:off. CNcomment:状态标志, TRUE:开,FALSE:关 CNend
\retval 0:success,-1:failure CNcomment:0 成功,-1 失败CNend
\see \n
CNcomment:CNend
*/
virtual int requestMenuStat(int logicAddr, bool bMenuActived) = 0;
/**
\brief Select one of HDMI Devices. CNcomment:选中HDMI其中一个设备 CNend
\attention this func can be called for user Selecting one of HDMI Devices. CNcomment:用户可以调用该接口选中HDMI其中一个设备 CNend
\param CNcomment:传入多个HDMI设备中其中一个的地址 CNend
\param TV_CEC_LOGICAL_ADDR_TV -> 0;
\param TV_CEC_LOGICAL_ADDR_RECDEV1 -> 1;
\param TV_CEC_LOGICAL_ADDR_RECDEV2 -> 2;
\param TV_CEC_LOGICAL_ADDR_TUNER1 -> 3;
\param TV_CEC_LOGICAL_ADDR_PLAYBACK1 -> 4;
\param TV_CEC_LOGICAL_ADDR_AUDSYS -> 5;
\param TV_CEC_LOGICAL_ADDR_TUNER2 -> 6;
\param TV_CEC_LOGICAL_ADDR_TUNER3 -> 7;
\param TV_CEC_LOGICAL_ADDR_PLAYBACK2 -> 8;
\param TV_CEC_LOGICAL_ADDR_RECDEV3 -> 9;
\param TV_CEC_LOGICAL_ADDR_TUNER4 -> 10;
\param TV_CEC_LOGICAL_ADDR_PLAYBACK3 -> 11;
\param TV_CEC_LOGICAL_ADDR_RES3 -> 12;
\param TV_CEC_LOGICAL_ADDR_RES4 -> 13;
\param TV_CEC_LOGICAL_ADDR_FREEUSE -> 14;
\param TV_CEC_LOGICAL_ADDR_UNREGORBC -> 15;
\retval 0:success,-1:failure CNcomment:0 成功,-1 失败CNend
\see \n
CNcomment:CNend
*/
virtual int selectDevice(int logicAddr) = 0;
/**
\brief set Menu Language. CNcomment:设置菜单语言类型 CNend
\attention this func can be called for user setting Menu Language. CNcomment:用户可以调用该接口设置菜单语言类型 CNend
\param CNcomment:传入支持的语言类型对应枚举 CNend
\param TV_LANG_CHINESE -> 0;
\param TV_LANG_ENGLISH -> 1;
\retval 0:success,-1:failure CNcomment:0 成功,-1 失败CNend
\see \n
CNcomment:CNend
*/
virtual int setMenuLag(int menuLanguage) = 0;
/**
\brief broadcast Vendor ID. CNcomment:发送Vendor ID CNend
\attention this func can be called for user broadcasting Vendor ID. CNcomment:用户可以调用该接口发送Vendor ID CNend
\param CNcomment:传入Vendor ID CNend
\retval 0:success,-1:failure CNcomment:0 成功,-1 失败CNend
\see \n
CNcomment:CNend
*/
virtual int broadcastVendorID(int VendorID) = 0;
/**
\brief broadcast Vendor ID. CNcomment:发送cec消息 CNend
\attention this func can be called for user send cec message. CNcomment:用户可以调用该接口发送cec消息 CNend
\param CNcomment:传入CEC消息 CNend
\retval 0:success,-1:failure CNcomment:0 成功,-1 失败CNend
\see \n
CNcomment:CNend
*/
virtual int sendMessage(TV_CEC_CMD_S stCecCmd) = 0;
/**
\brief broadcast Vendor ID. CNcomment:发送tif cec消息 CNend
\attention this func can be called for user send cec message. CNcomment:用户可以调用该接口发送cec消息 CNend
\param CNcomment:传入tif CEC消息 CNend
\retval 0:success,-1:failure CNcomment:0 成功,-1 失败CNend
\see \n
CNcomment:CNend
*/
virtual int sendTifCecMessage(TV_CEC_CMD_S stCecCmd) = 0;
/**
\brief set Arc Available. CNcomment: HAL层告知MWARC是否可用 CNend
\attention this func can be called for user to set Arc Available. CNcomment:用户可以调用该接口设置ARC是否可用 CNend
\param CNcomment:ARC是否可用标志 CNend
\retval 0:success,-1:failure CNcomment:0 成功,-1 失败CNend
\see \n
CNcomment:CNend
*/
virtual int setArcAvailable(bool bFlag) = 0;
/**
\brief get Hdmi Rx Cec Address. CNcomment: 获取HDMI源物理地址 CNend
\attention this func can be called for user to get HDMI CEC address. CNcomment:用户可以调用该接口获取HDMI源物理地址 CNend
\param source CNcomment: 需要获取物理地址的源 CNend
\retval CNcomment: HDMI源对应的物理地址列表 CNend
\see \n
CNcomment:CNend
*/
virtual int getHdmiRxCecAddr(int source, int *cecAddr) = 0;
/**
\brief get Hdmi Arc Source. CNcomment: 获取支持ARC的HDMI源 CNend
\attention this func can be called for user to get Hdmi Arc source. CNcomment:用户可以调用该接口获取支持ARC的HDMI源 CNend
\param CNcomment: CNend
\retval CNcomment: 支持ARC的HDMI源 CNend
\retval MW_SRC_HDMI1
\retval MW_SRC_HDMI2
\retval MW_SRC_HDMI3
\retval MW_SRC_HDMI4
\see \n
CNcomment:CNend
*/
virtual int getHdmiArcSrc(int *arcSource) = 0;
/**
\brief get hdmi port number. CNcomment: 获取HDMI源的port端口 CNend
\attention this func can be called for user to get Hdmi Arc source. CNcomment:用户可以调用该接口获取HDMI源的port端口号 CNend
\param source CNcomment: 需要获取port端口号的源 CNend
\retval CNcomment: HDMI源的port端口号 CNend
\retval MW_HDMIRX_PORT0
\retval MW_HDMIRX_PORT2
\retval MW_HDMIRX_PORT1
\retval MW_HDMIRX_PORT3
\see \n
CNcomment:CNend
*/
virtual int getHdmiPortNum(int source, int *portNum)=0;
/**
\brief set tif cec option. CNcomment:设置TIF CEC中的选项 CNend
\attention this func can be called for user to set cec option. CNcomment:用户可以调用该接口设置TIF CEC选项 CNend
\param CNcomment:传入TIF CEC选项对应的枚举参数CNend
\param TV_TIF_CEC_OPTION_WAKEUP -> 0;
\param TV_TIF_CEC_OPTION_ENABLE_CEC -> 1;
\param TV_TIF_CEC_OPTION_SYSTEM_CEC_CONTROL -> 2;
\param bool enable,TRUE:on,FALSE:off. CNcomment:状态标志, TRUE:开,FALSE:关 CNend
\retval 0:success,-1:failure CNcomment:0 成功,-1 失败CNend
\see \n
CNcomment:CNend
*/
virtual int setTifCecOption(TV_TIF_CEC_OPTION flag, bool enable) = 0;
};
}; // namespace android
/* * @} */ /* * <!-- ==== API declaration end ==== */
#endif