xref: /utopia/UTPA2-700.0.x/projects/tmplib/include/apiCEC.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1 //<MStar Software>
2 //******************************************************************************
3 // MStar Software
4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved.
5 // All software, firmware and related documentation herein ("MStar Software") are
6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by
7 // law, including, but not limited to, copyright law and international treaties.
8 // Any use, modification, reproduction, retransmission, or republication of all
9 // or part of MStar Software is expressly prohibited, unless prior written
10 // permission has been granted by MStar.
11 //
12 // By accessing, browsing and/or using MStar Software, you acknowledge that you
13 // have read, understood, and agree, to be bound by below terms ("Terms") and to
14 // comply with all applicable laws and regulations:
15 //
16 // 1. MStar shall retain any and all right, ownership and interest to MStar
17 //    Software and any modification/derivatives thereof.
18 //    No right, ownership, or interest to MStar Software and any
19 //    modification/derivatives thereof is transferred to you under Terms.
20 //
21 // 2. You understand that MStar Software might include, incorporate or be
22 //    supplied together with third party`s software and the use of MStar
23 //    Software may require additional licenses from third parties.
24 //    Therefore, you hereby agree it is your sole responsibility to separately
25 //    obtain any and all third party right and license necessary for your use of
26 //    such third party`s software.
27 //
28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as
29 //    MStar`s confidential information and you agree to keep MStar`s
30 //    confidential information in strictest confidence and not disclose to any
31 //    third party.
32 //
33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any
34 //    kind. Any warranties are hereby expressly disclaimed by MStar, including
35 //    without limitation, any warranties of merchantability, non-infringement of
36 //    intellectual property rights, fitness for a particular purpose, error free
37 //    and in conformity with any international standard.  You agree to waive any
38 //    claim against MStar for any loss, damage, cost or expense that you may
39 //    incur related to your use of MStar Software.
40 //    In no event shall MStar be liable for any direct, indirect, incidental or
41 //    consequential damages, including without limitation, lost of profit or
42 //    revenues, lost or damage of data, and unauthorized system use.
43 //    You agree that this Section 4 shall still apply without being affected
44 //    even if MStar Software has been modified by MStar in accordance with your
45 //    request or instruction for your use, except otherwise agreed by both
46 //    parties in writing.
47 //
48 // 5. If requested, MStar may from time to time provide technical supports or
49 //    services in relation with MStar Software to you for your use of
50 //    MStar Software in conjunction with your or your customer`s product
51 //    ("Services").
52 //    You understand and agree that, except otherwise agreed by both parties in
53 //    writing, Services are provided on an "AS IS" basis and the warranty
54 //    disclaimer set forth in Section 4 above shall apply.
55 //
56 // 6. Nothing contained herein shall be construed as by implication, estoppels
57 //    or otherwise:
58 //    (a) conferring any license or right to use MStar name, trademark, service
59 //        mark, symbol or any other identification;
60 //    (b) obligating MStar or any of its affiliates to furnish any person,
61 //        including without limitation, you and your customers, any assistance
62 //        of any kind whatsoever, or any information; or
63 //    (c) conferring any license or right under any intellectual property right.
64 //
65 // 7. These terms shall be governed by and construed in accordance with the laws
66 //    of Taiwan, R.O.C., excluding its conflict of law rules.
67 //    Any and all dispute arising out hereof or related hereto shall be finally
68 //    settled by arbitration referred to the Chinese Arbitration Association,
69 //    Taipei in accordance with the ROC Arbitration Law and the Arbitration
70 //    Rules of the Association by three (3) arbitrators appointed in accordance
71 //    with the said Rules.
72 //    The place of arbitration shall be in Taipei, Taiwan and the language shall
73 //    be English.
74 //    The arbitration award shall be final and binding to both parties.
75 //
76 //******************************************************************************
77 //<MStar Software>
78 ////////////////////////////////////////////////////////////////////////////////
79 //
80 // Copyright (c) 2008-2009 MStar Semiconductor, Inc.
81 // All rights reserved.
82 //
83 // Unless otherwise stipulated in writing, any and all information contained
84 // herein regardless in any format shall remain the sole proprietary of
85 // MStar Semiconductor Inc. and be kept in strict confidence
86 // ("MStar Confidential Information") by the recipient.
87 // Any unauthorized act including without limitation unauthorized disclosure,
88 // copying, use, reproduction, sale, distribution, modification, disassembling,
89 // reverse engineering and compiling of the contents of MStar Confidential
90 // Information is unlawful and strictly prohibited. MStar hereby reserves the
91 // rights to any and all damages, losses, costs and expenses resulting therefrom.
92 //
93 ////////////////////////////////////////////////////////////////////////////////
94 
95 ///////////////////////////////////////////////////////////////////////////////////////////////////
96 ///
97 /// @file   apiCEC.h
98 /// @brief  CEC Interface
99 /// @author MStar Semiconductor Inc.
100 ///////////////////////////////////////////////////////////////////////////////////////////////////
101 
102 /*! \defgroup MISC HDMI modules
103 
104     <b> CEC (Consumer Electronics Control) </b>\n
105     - In Europe, there was an analog predecessor to HDMI known as the SCART interface. Like HDMI, SCART carried audio and video signals through one cable. The SCART cable had a one-wire bus for controlling a home theater system.  This was branded as AV.link by Philips, among others. This bus supported one touch play, standby, etc.\n
106     For more information,see \link APICEC apiCEC interface (apiCEC.h) \endlink \n
107 
108     <b> DAC(digital-to-analog converter,DAC)</b>\n
109     - Convert digital signal to analog signal.\n
110     For more information,see \link DAC DAC interface (apiDAC.h) \endlink \n
111 
112     <b> MHL interface </b>
113     - Check whether MHL cable is plugged or not in Rx side
114     - Disable R-term and output Vbus
115     - Check whether Cbus is connected(discovery pulse completed)
116     - Sink -> Source: "SET_HPD"
117     - Sink -> Source: Write_Stat - "DCAP_RDY" and Write_INT - "DCAP_CHG"
118     - Sink -> Source: Write_Stat - "PATH_EN"\n
119     For more information,see \link MHL MHL interface (apiMHL.h)  \endlink \n
120 
121     <b> HDMI interface </b>
122     - HDMI Ethernet Channel
123     Support Ethernet communication through HDMI
124     - Audio Return Channel
125     - 3D support
126     - Frame packing, Side-by-Side half, Top-Buttom and etc.
127     - 4Kx2K support
128     3840x2160@24/25/30Hz, 4096x2160@24Hz
129     - Additional Color Spaces
130     sYCC601, AdobeRGB, AdobeYCC601
131     - HDMI Micro Connector
132     19-pin/1080p\n
133     For more information,see \link APICEC apiCEC interface (apiCEC.h)  \endlink \n
134 
135  * \defgroup APICEC apiCEC interface (apiCEC.h)
136  * \ingroup MISC
137 
138    <b> CEC (Consumer Electronics Control) </b>
139     In Europe, there was an analog predecessor to HDMI known as the SCART interface. Like HDMI, SCART carried audio and video signals through one cable. The SCART cable had a one-wire bus for controlling a home theater system.  This was branded as AV.link by Philips, among others. This bus supported one touch play, standby, etc.
140 
141 
142    <b> CEC layout </b>
143    \image html apiCEC_pic1.png
144    \image html apiCEC_pic2.png
145 
146    <b>Feature </b>
147    - Device OSD Name Transfer - Enables devices to upload their preferred OSD name to the TV. The TV can then use this name in any menus associated with that device.
148    - Device Power Status ?Allows the current power status of a device to be discovered.
149    - OSD Display - Enables a device to use the on-screen display of the TV to display text strings.
150    - Routing Control - Allows the control of CEC Switches for streaming of a new source device.
151    - System Information - Queries the system to determine device addresses and language.
152    - Vendor Specific Commands - Allows a set of vendor-defined commands to be used between devices of that vendor.
153    - Audio Rate Control ?Allows an Amplifier to fractionally increase or decrease the playback rate of an audio source.
154 
155    \image html apiCEC_pic3.png
156    \image html apiCEC_pic4.png
157 
158 
159  * \defgroup apiCEC_BASIC apiCEC Module basic
160  * \ingroup APICEC
161 
162  * \dergroup apiCEC_Message send messge
163  * \ingroup APICEC
164 
165 *! \dergroup apiCEC_STATUS CEC status
166 * \ingroup APICEC
167 
168 *! \dergroup apiCEC_SECOND support second LA
169 * \ingroup APICEC
170 
171 *! \dergroup apiCEC_ToBeRemove apiCEC api to be removed
172 * \ingroup APICEC
173 
174 *! \dergroup apiCEC_ToBeAdd apiCEC api to be added
175 * \ingroup APICEC
176 
177 */
178 
179 #ifndef _APICEC_H_
180 #define _APICEC_H_
181 
182 #ifdef __cplusplus
183 extern "C"
184 {
185 #endif
186 
187 #include "MsTypes.h"
188 #include "MsDevice.h"
189 #include "MsCommon.h"
190 
191 
192 //-------------------------------------------------------------------------------------------------
193 //  Macro and Define
194 //-------------------------------------------------------------------------------------------------
195 #define MSIF_CEC_LIB_CODE               {'C','E','C','_'}
196 #define MSIF_CEC_LIBVER                 {'0','0'}                         /* 0.0 ~ Z.Z */
197 #define MSIF_CEC_BUILDNUM               {'0','8'}                         /* 00 ~ 99   */
198 #define MSIF_CEC_CHANGELIST             {'0','0','4','4','9','9','9','1'} /* CL#       */
199 #define CEC_API_VERSION                  /* Character String for DRV/API version             */  \
200     MSIF_TAG,                           /* 'MSIF'                                           */  \
201     MSIF_CLASS,                         /* '00'                                             */  \
202     MSIF_CUS,                           /* 0x0000                                           */  \
203     MSIF_MOD,                           /* 0x0000                                           */  \
204     MSIF_CHIP,                                                                                  \
205     MSIF_CPU,                                                                                   \
206     MSIF_CEC_LIB_CODE,                  /* IP__                                             */  \
207     MSIF_CEC_LIBVER,                    /* 0.0 ~ Z.Z                                        */  \
208     MSIF_CEC_BUILDNUM,                  /* 00 ~ 99                                          */  \
209     MSIF_CEC_CHANGELIST,                /* CL#                                              */  \
210     MSIF_OS
211 
212 #define CEC_VERSION_11      0UL   //CEC1.1
213 #define CEC_VERSION_12      1UL   //CEC1.2
214 #define CEC_VERSION_12a     2UL   //CEC1.2a
215 #define CEC_VERSION_13      3UL   //CEC1.3
216 #define CEC_VERSION_13a     4UL   //CEC1.3a
217 #define CEC_VERSION_14      5UL   //CEC1.4
218 
219 #define HDMI_CEC_VERSION    CEC_VERSION_14
220 
221 #define CEC_FIFO_CNT       4UL
222 #define RETRY_CNT          1UL
223 #define FrameInterval      7UL
224 #define BusFreeTime        6UL//5 // Free bit time by IC design has a little difference than spec, set to 6 instead of 5
225 #define ReTxInterval       3UL
226 
227 #define ENABLE_CEC_INT                  ENABLE
228 #define ENABLE_CUST01_CEC               ENABLE
229 #define ENABLE_SW_CEC_WAKEUP            ENABLE
230 #define ENABLE_CEC_MULTIPLE             DISABLE
231 
232 //-------------------------------------------------------------------------------------------------
233 //  Type and Structure
234 //-------------------------------------------------------------------------------------------------
235 
236 typedef enum _MsCEC_INPUT_PORT
237 {
238     INPUT_PORT0 = 0x00,
239     INPUT_PORT1 = 0x01,
240     INPUT_PORT2 = 0x02,
241     INPUT_PORT3 = 0x03,
242 }MsCEC_INPUT_PORT;
243 
244 typedef enum _CEC_ERROR_CODE
245 {
246     E_CEC_FEATURE_ABORT = 0x00,
247     E_CEC_RX_SUCCESS    = 0x01,
248     E_CEC_TX_SUCCESS    = 0x02,
249     E_CEC_RF            = 0x04,
250     E_CEC_LOST_ABT      = 0x08,
251     E_CEC_BIT_SHORT     = 0x10,
252     E_CEC_BIT_LONG      = 0x20,
253     E_CEC_NACK          = 0x40,
254     E_CEC_SYSTEM_BUSY   = 0x80,
255 } CEC_ERROR_CODE;
256 
257 //Logical Address
258 typedef enum _MsCEC_DEVICELA
259 {
260     E_LA_TV              =0,
261     E_LA_RECORDER1       =1,
262     E_LA_RECORDER2       =2,
263     E_LA_TUNER1          =3,
264     E_LA_PLAYBACK1       =4,
265     E_LA_AUDIO_SYS       =5,
266     E_LA_TUNER2          =6,
267     E_LA_TUNER3          =7,
268     E_LA_PLAYBACK2       =8,
269     E_LA_RECORER3        =9,
270 #if(HDMI_CEC_VERSION >= CEC_VERSION_13a)
271     E_LA_TUNER4          =10,
272     E_LA_PLYBACK3        =11,
273 #endif
274     RESERVED_1            =12,
275     RESERVED_2            =13,
276     E_LA_FREE_USE        =14,
277     E_LA_UNREGISTERED    =15,
278     E_LA_BROADCAST       =15,
279     E_LA_MAX =15,
280 } MsCEC_DEVICELA;
281 
282 //the opcode is referenced from CEC1.3a table 7 ~ 27
283 typedef enum _MsCEC_MSGLIST
284 {
285 //----- One Touch Play ----------------------------
286     E_MSG_ACTIVE_SOURCE                         = 0x82,
287     E_MSG_OTP_IMAGE_VIEW_ON                     = 0x04,
288     E_MSG_OTP_TEXT_VIEW_ON                      = 0x0D,
289 
290 
291 //----- Routing Control ---------------------------
292     //E_MSG_RC_ACTIVE_SOURCE                      = 0x82,
293     E_MSG_RC_INACTIVE_SOURCE                    = 0x9D,
294 
295     E_MSG_RC_REQ_ACTIVE_SOURCE                  = 0x85, // should be removed
296     E_MSG_RC_REQUEST_ACTIVE_SOURCE              = 0x85,
297 
298     E_MSG_RC_ROUTING_CHANGE                     = 0x80,
299 
300     E_MSG_RC_ROUTING_INFO                       = 0x81, // should be removed
301     E_MSG_RC_ROUTING_INFORMATION                = 0x81,
302 
303     E_MSG_RC_SET_STREM_PATH                     = 0x86,
304 
305 
306 //----- Standby Command ---------------------------
307     E_MSG_STANDBY                               = 0x36,
308 
309 
310 //----- One Touch Record---------------------------
311     E_MSG_OTR_RECORD_OFF                        = 0x0B,
312     E_MSG_OTR_RECORD_ON                         = 0x09,
313     E_MSG_OTR_RECORD_STATUS                     = 0x0A,
314     E_MSG_OTR_RECORD_TV_SCREEN                  = 0x0F,
315 
316 
317 //----- Timer programmer -------------------------- CEC1.3a
318     E_MSG_TP_CLEAR_ANALOG_TIMER                 = 0x33, // should be removed
319     E_MSG_TP_CLEAR_ANALOGUE_TIMER               = 0x33,
320 
321     E_MSG_TP_CLEAR_DIGITAL_TIMER                = 0x99,
322 
323     E_MSG_TP_CLEAR_EXT_TIMER                    = 0xA1, // should be removed
324     E_MSG_TP_CLEAR_EXTERNAL_TIMER               = 0xA1,
325 
326     E_MSG_TP_SET_ANALOG_TIMER                   = 0x34, // should be removed
327     E_MSG_TP_SET_ANALOGUE_TIMER                 = 0x34,
328 
329     E_MSG_TP_SET_DIGITAL_TIMER                  = 0x97,
330 
331     E_MSG_TP_SET_EXT_TIMER                      = 0xA2, // should be removed
332     E_MSG_TP_SET_EXTERNAL_TIMER                 = 0xA2,
333 
334     E_MSG_TP_SET_TIMER_PROGRAM_TITLE            = 0x67,
335     E_MSG_TP_TIMER_CLEARD_STATUS                = 0x43,
336     E_MSG_TP_TIMER_STATUS                       = 0x35,
337 
338 
339 //----- System Information ------------------------
340     E_MSG_SI_CEC_VERSION                        = 0x9E,       //1.3a
341     E_MSG_SI_GET_CEC_VERSION                    = 0x9F,       //1.3a
342 
343     E_MSG_SI_REQUEST_PHY_ADDR                   = 0x83, // should be removed
344     E_MSG_SI_GIVE_PHYSICAL_ADDRESS              = 0x83,
345 
346     E_MSG_SI_GET_MENU_LANGUAGE                  = 0x91,
347     //E_MSG_SI_POLLING_MESSAGE                    = ?,
348 
349     E_MSG_SI_REPORT_PHY_ADDR                    = 0x84, // should be removed
350     E_MSG_SI_REPORT_PHYSICAL_ADDRESS            = 0x84,
351 
352     E_MSG_SI_SET_MENU_LANGUAGE                  = 0x32,
353 
354     //E_MSG_SI_REC_TYPE_PRESET                    = 0x00,  //parameter   ?
355     //E_MSG_SI_REC_TYPE_OWNSRC                    = 0x01,  //parameter   ?
356 
357 
358 //----- Deck Control Feature-----------------------
359     E_MSG_DC_DECK_CTRL                          = 0x42, // should be removed
360     E_MSG_DC_DECK_CONTROL                       = 0x42,
361 
362     E_MSG_DC_DECK_STATUS                        = 0x1B,
363     E_MSG_DC_GIVE_DECK_STATUS                   = 0x1A,
364     E_MSG_DC_PLAY                               = 0x41,
365 
366 
367 //----- Tuner Control ------------------------------
368     E_MSG_TC_GIVE_TUNER_STATUS                  = 0x08, // should be removed
369     E_MSG_TC_GIVE_TUNER_DEVICE_STATUS           = 0x08,
370 
371     E_MSG_TC_SEL_ANALOG_SERVICE                 = 0x92, // should be removed
372     E_MSG_TC_SEL_ANALOGUE_SERVICE               = 0x92,
373 
374     E_MSG_TC_SEL_DIGITAL_SERVICE                = 0x93, // should be removed
375     E_MSG_TC_SELECT_DIGITAL_SERVICE             = 0x93,
376 
377     E_MSG_TC_TUNER_DEVICE_STATUS                = 0x07,
378 
379     E_MSG_TC_TUNER_STEP_DEC                     = 0x06, // should be removed
380     E_MSG_TC_TUNER_STEP_DECREMENT               = 0x06,
381 
382     E_MSG_TC_TUNER_STEP_INC                     = 0x05, // should be removed
383     E_MSG_TC_TUNER_STEP_INCREMENT               = 0x05,
384 
385 
386 //---------Vendor Specific -------------------------
387     //E_MSG_VS_CEC_VERSION                        = 0x9E,       //1.3a
388     E_MSG_VS_DEVICE_VENDOR_ID                   = 0x87,
389     //E_MSG_VS_GET_CEC_VERSION                    = 0x9F,       //1.3a
390 
391     E_MSG_VS_GIVE_VENDOR_ID                     = 0x8C, // should be removed
392     E_MSG_VS_GIVE_DEVICE_VENDOR_ID              = 0x8C,
393 
394     E_MSG_VS_VENDOR_COMMAND                     = 0x89,
395     E_MSG_VS_VENDOR_COMMAND_WITH_ID             = 0xA0,      //1.3a
396 
397     E_MSG_VS_VENDOR_RC_BUT_DOWN                 = 0x8A, // should be removed
398     E_MSG_VS_VENDOR_REMOTE_BUTTON_DOWN          = 0x8A,
399 
400     E_MSG_VS_VENDOR_RC_BUT_UP                   = 0x8B, // should be removed
401     E_MSG_VS_VENDOR_REMOTE_BUTTON_UP            = 0x8B,
402 
403 
404 //----- OSD Display --------------------------------
405     E_MSG_SET_OSD_STRING                        = 0x64,
406 
407 
408 //----- Device OSD Name Transfer  -------------------------
409     E_MSG_OSDNT_GIVE_OSD_NAME                   = 0x46,
410     E_MSG_OSDNT_SET_OSD_NAME                    = 0x47,
411 
412 
413 //----- Device Menu Control ------------------------
414     E_MSG_DMC_MENU_REQUEST                      = 0x8D,
415     E_MSG_DMC_MENU_STATUS                       = 0x8E,
416     //E_MSG_DMC_MENU_ACTIVATED                    = 0x00,   //parameter
417     //E_MSG_DMC_MENU_DEACTIVATED                  = 0x01,   //parameter
418 
419     E_MSG_UI_PRESS                              = 0x44, // should be removed
420     E_MSG_DMC_USER_CONTROL_PRESSED              = 0x44,
421 
422     E_MSG_UI_RELEASE                            = 0x45, // should be removed
423     E_MSG_DMC_USER_CONTROL_RELEASED             = 0x45,
424 
425 
426 //----- Remote Control Passthrough ----------------
427 //----- UI Message --------------------------------
428 //    E_MSG_RCP_USER_CONTROL_PRESSED              = 0x44,
429 //    E_MSG_RCP_USER_CONTROL_RELEASED             = 0x45,
430 
431 
432 //----- Power Status  ------------------------------
433     E_MSG_PS_GIVE_POWER_STATUS                  = 0x8F, // should be removed
434     E_MSG_PS_GIVE_DEVICE_POWER_STATUS           = 0x8F,
435 
436     E_MSG_PS_REPORT_POWER_STATUS                = 0x90,
437 
438 
439 //----- General Protocal Message ------------------
440 
441 //----- Feature Abort -----------------------------
442     E_MSG_FEATURE_ABORT                         = 0x00,
443 
444 //----- Abort Message -----------------------------
445     E_MSG_ABORT_MESSAGE                         = 0xFF,
446 
447 
448 //----- System Audio Control ------------------
449     E_MSG_SAC_GIVE_AUDIO_STATUS                 = 0x71,
450     E_MSG_SAC_GIVE_SYSTEM_AUDIO_MODE_STATUS     = 0x7D,
451     E_MSG_SAC_REPORT_AUDIO_STATUS               = 0x7A,
452 
453     E_MSG_SAC_REPORT_SHORT_AUDIO_DESCRIPTOR     = 0xA3,
454     E_MSG_SAC_REQUEST_SHORT_AUDIO_DESCRIPTOR    = 0xA4,
455 
456     E_MSG_SAC_SET_SYSTEM_AUDIO_MODE             = 0x72,
457     E_MSG_SAC_SYSTEM_AUDIO_MODE_REQUEST         = 0x70,
458     E_MSG_SAC_SYSTEM_AUDIO_MODE_STATUS          = 0x7E,
459 
460 
461 //----- System Audio Control ------------------
462     E_MSG_SAC_SET_AUDIO_RATE                    = 0x9A,
463 
464 
465 //----- Audio Return Channel  Control ------------------
466     E_MSG_ARC_INITIATE_ARC                      = 0xC0,
467     E_MSG_ARC_REPORT_ARC_INITIATED              = 0xC1,
468     E_MSG_ARC_REPORT_ARC_TERMINATED             = 0xC2,
469 
470     E_MSG_ARC_REQUEST_ARC_INITATION             = 0xC3, // should be removed
471     E_MSG_ARC_REQUEST_ARC_INITIATION            = 0xC3,
472 
473     E_MSG_ARC_REQUEST_ARC_TERMINATION           = 0xC4,
474 
475     E_MSG_ARC_TERMINATED_ARC                    = 0xC5, // should be removed
476     E_MSG_ARC_TERMINATE_ARC                     = 0xC5,
477 
478 
479 //----- Capability Discovery and Control ------------------
480     E_MSG_CDC_CDC_MESSAGE                       = 0xF8,
481 
482 } MsCEC_MSGLIST;
483 
484 typedef enum _MsCEC_MSG_TRANS_TYPE
485 {
486     E_TRANS_BROADCAST_MSG   = 0,
487     E_TRANS_DIRECT_MSG      = 1,
488     E_TRANS_BOTHTYPE_MSG    = 2,
489 } MsCEC_MSG_TRANS_TYPE;
490 
491 
492 //Device Type, 1byte
493 typedef enum _MsCEC_DEVICE_TYPE
494 {
495     E_DEVICE_TYPE_TV                    =0,
496     E_DEVICE_TYPE_RECORDING_DEVICE      =1,
497     E_DEVICE_TYPE_RESERVED              =2,
498     E_DEVICE_TYPE_TUNER                 =3,
499     E_DEVICE_TYPE_PLAYBACK_DEVICE       =4,
500     E_DEVICE_TYPE_AUDIO_SYSTEM          =5,
501 } MsCEC_DEVICE_TYPE;
502 
503 
504 //Deck Control, Deck Control Mode 1 byte
505 typedef enum _MsCEC_MSG_DC_DECK_CTRL_PARM
506 {
507     E_MSG_DCM_CMD_SKIP_FORWARD          = 1,  //parameter
508     E_MSG_DCM_CMD_SKIP_REVERSE          = 2,  //parameter
509     E_MSG_DCM_CMD_STOP                  = 3,  //parameter
510     E_MSG_DCM_CMD_EJECT                 = 4,  //parameter
511 } MsCEC_MSG_DC_DECK_CTRL_PARM;
512 
513 //Deck status, Deck info 1 byte
514 typedef enum _MsCEC_MSG_DC_DECK_STATUS_PARM
515 {
516     E_MSG_DI_CMD_PLAY                   = 0x11,  //parameter
517     E_MSG_DI_CMD_RECORD                 = 0x12,  //parameter
518     E_MSG_DI_CMD_PLAY_REVERSE           = 0x13,  //parameter
519     E_MSG_DI_CMD_STILL                  = 0x14,  //parameter
520     E_MSG_DI_CMD_SLOW                   = 0x15,  //parameter
521     E_MSG_DI_CMD_SLOW_REVERSE           = 0x16,  //parameter
522     E_MSG_DI_CMD_FAST_FORWARD           = 0x17,  //parameter
523     E_MSG_DI_CMD_FAST_REVERSE           = 0x18,  //parameter
524     E_MSG_DI_CMD_NO_MEDIA               = 0x19,  //parameter
525     E_MSG_DI_CMD_STOP                   = 0x1A,  //parameter
526     E_MSG_DI_CMD_SKIP_FORWARD           = 0x1B,  //parameter
527     E_MSG_DI_CMD_SKIP_REVERSE           = 0x1C,  //parameter
528     E_MSG_DI_CMD_INDEX_SEARCH_FORWARD   = 0x1D,  //parameter
529     E_MSG_DI_CMD_INDEX_SEARCH_REVERSE   = 0x1E,  //parameter
530     E_MSG_DI_CMD_OTHER_STATUS           = 0x1F,  //parameter
531 } MsCEC_MSG_DC_DECK_STATUS_PARM;
532 
533 
534 //Give deck status, Status request 1 byte
535 typedef enum _MsCEC_MSG_STATUS_REQUEST_PARM
536 {
537     E_MSG_SR_CMD_ON                     = 1,  //parameter
538     E_MSG_SR_CMD_OFF                    = 2,  //parameter
539     E_MSG_SR_CMD_ONCE                   = 3,  //parameter
540 } MsCEC_MSG_STATUS_REQUEST_PARM;
541 
542 
543 //Play, [Play Mode] 1 byte
544 typedef enum _MsCEC_MSG_DC_PLAY_PARM
545 {
546     E_MSG_PM_CMD_PLAY_FORWARD               = 0x24,  //parameter
547     E_MSG_PM_CMD_PLAY_REVERSE               = 0x20,  //parameter
548     E_MSG_PM_CMD_PLAY_STILL                 = 0x25,  //parameter
549     E_MSG_PM_CMD_FAST_FORWARD_MINI_SPEED    = 0x05,  //parameter
550     E_MSG_PM_CMD_FAST_FORWARD_MEDIUM_SPEED  = 0x06,  //parameter
551     E_MSG_PM_CMD_FAST_FORWARD_MAXI_SPEED    = 0x07,  //parameter
552     E_MSG_PM_CMD_FAST_REVERSE_MINI_SPEED    = 0x09,  //parameter
553     E_MSG_PM_CMD_FAST_REVERSE_MEDIUM_SPEED  = 0x0A,  //parameter
554     E_MSG_PM_CMD_FAST_REVERSE_MAXI_SPEED    = 0x0B,  //parameter
555     E_MSG_PM_CMD_SLOW_FORWARD_MINI_SPEED    = 0x15,  //parameter
556     E_MSG_PM_CMD_SLOW_FORWARD_MEDIUM_SPEED  = 0x16,  //parameter
557     E_MSG_PM_CMD_SLOW_FORWARD_MAXI_SPEED    = 0x17,  //parameter
558     E_MSG_PM_CMD_SLOW_REVERSE_MINI_SPEED    = 0x19,  //parameter
559     E_MSG_PM_CMD_SLOW_REVERSE_MEDIUM_SPEED  = 0x1A,  //parameter
560     E_MSG_PM_CMD_SLOW_REVERSE_MAXI_SPEED    = 0x1B,  //parameter
561 } MsCEC_MSG_DC_PLAY_PARM;
562 
563 
564 //Power status 1 byte
565 typedef enum _MsCEC_MSG_POWER_STATUS_PARM
566 {
567     E_MSG_PWRSTA_ON             = 0x00,
568     E_MSG_PWRSTA_STANDBY        = 0x01,
569     E_MSG_PWRSTA_STANDBY2ON     = 0x02,
570     E_MSG_PWRSTA_ON2STANDBY     = 0x03,
571     E_MSG_PWRSTA_UNKNOW                 = 0x04,
572 } MsCEC_MSG_POWER_STATUS_PARM;
573 
574 
575 typedef enum _MsCEC_MSG_ABORT_REASON
576 {
577     E_MSG_AR_UNRECOGNIZE_OPCDE  = 0x00,  // abort reason
578     E_MSG_AR_CANNOTRESPOND      = 0x01,  // abort reason
579     E_MSG_AR_CANNOTPROVIDESCR   = 0x02,  // abort reason
580     E_MSG_AR_INVALID_OPCODE     = 0x03,  // abort reason
581     E_MSG_AR_REFUSED            = 0x04,  // abort reason
582     E_MSG_AR_IGNORED            = 0x05,
583     E_MSG_AR_SUCCESSED        = 0x06,
584 } MsCEC_MSG_ABORT_REASON;
585 
586 
587 typedef enum _MsCEC_MSG_MENU_REQ_TYPE
588 {
589     E_MSG_MENU_REQ_ACTIVATED    = 0,  // menu request activated status
590     E_MSG_MENU_REQ_DEACTIVATED  = 1,  // menu request deactivated status
591     E_MSG_MENU_REQ_QUERY        = 2,  // menu request query status
592 } MsCEC_MSG_MENU_REQ_TYPE;
593 
594 
595 typedef enum _MsCEC_MSG_MENU_STATE
596 {
597     E_MSG_MENU_ACTIVATED    = 0,  // menu activated
598     E_MSG_MENU_DEACTIVATED  = 1,  // menu deactivated
599 } MsCEC_MSG_MENU_STATE;
600 
601 
602 typedef enum _MsCEC_MSG_RECORD_SOURCE_TYPE
603 {
604     E_MSG_RECORD_TYPE_OWN_SOURCE                = 1,  // own source
605     E_MSG_RECORD_TYPE_DIGITAL_SERVICE           = 2,  // digital service
606 #if(HDMI_CEC_VERSION >= CEC_VERSION_13a)
607     E_MSG_RECORD_TYPE_ANALOGUE_SERVICE          = 3,  // Analogue Service
608     E_MSG_RECORD_TYPE_EXTERNAL_PLUG             = 4,  // External Plug
609     E_MSG_RECORD_TYPE_EXTERNAL_PHYSICAL_ADDRESS = 5,  // External Physical Address
610 #endif
611 } MsCEC_MSG_RECORD_SOURCE_TYPE;
612 
613 
614 typedef enum _MsCEC_MSG_RECORD_STATUS_INFO
615 {
616     E_MSG_RECORD_INFO_RECORDING_OWN_SOURCE   = 0x01,  // Recording currently selected source
617     E_MSG_RECORD_INFO_RECORDING_DIGITAL_SERVICE   = 0x02,  // Recording Digital Service
618 #if(HDMI_CEC_VERSION >= CEC_VERSION_13a)
619     E_MSG_RECORD_INFO_RECORDING_ANALOGUE_SERVICE   = 0x03,  // Recording Analogue Service
620     E_MSG_RECORD_INFO_RECORDING_EXTERNAL_INPUT   = 0x04,  // Recording External input
621 #endif
622     E_MSG_RECORD_INFO_NO_RECORDING_DIGITAL_SERVICE   = 0x05,  // unable to record Digital Service, no suitable tuner.
623 #if(HDMI_CEC_VERSION >= CEC_VERSION_13a)
624     E_MSG_RECORD_INFO_NO_RECORDING_ANALOGUE_SERVICE   = 0x06,  // unable to record Analogue Service, no suitable tuner.
625     E_MSG_RECORD_INFO_NO_RECORDING_REQ_SERVICE   = 0x07,  // unable to select required service, Has suitable tuner, but the requested parameters are invalid or out of range for that tuner.
626     E_MSG_RECORD_INFO_NO_RECORDING_INVALID_EXTERNAL_PLUG_NUMBER   = 0x09,  // invalid External plug number
627     E_MSG_RECORD_INFO_NO_RECORDING_INVALID_EXTERNAL_PHYSICAL_ADDRESS   = 0x0A,  // invalid External Physical Address
628     E_MSG_RECORD_INFO_NO_RECORDING_CA_NOT_SUPPORT   = 0x0B,  // CA system not supported
629     E_MSG_RECORD_INFO_NO_RECORDING_CA_NO   = 0x0C,  // No or Insufficient CA Entitlements
630     E_MSG_RECORD_INFO_NO_RECORDING_COPY_NEVER   = 0x0D,  // Not allowed to copy source, source is ��copy never��.
631     E_MSG_RECORD_INFO_NO_RECORDING_NO_FURTHER_COPY   = 0x0E,  // No further copies allowed
632 #endif
633     E_MSG_RECORD_INFO_NO_RECORDING_NO_MEDIA   = 0x10,  // no media
634     E_MSG_RECORD_INFO_NO_RECORDING_PLAYING   = 0x11,  // Playing
635     E_MSG_RECORD_INFO_NO_RECORDING_ALREADY_RECORDING   = 0x12,  // already recording
636     E_MSG_RECORD_INFO_NO_RECORDING_MEDIA_PROTECTED   = 0x13,  // media protected
637     E_MSG_RECORD_INFO_NO_RECORDING_NO_SOURCE  = 0x14,  // no source signal
638     E_MSG_RECORD_INFO_NO_RECORDING_MEDIA_PROBLEM  = 0x15,  // media problem
639 #if(HDMI_CEC_VERSION >= CEC_VERSION_13a)
640     E_MSG_RECORD_INFO_NO_RECORDING_NOT_ENOUGH_SPACE  = 0x16,  // not enough space available
641     E_MSG_RECORD_INFO_NO_RECORDING_PARENTAL_LOCK  = 0x17,  // Parental Lock On
642     E_MSG_RECORD_INFO_RECORDING_TERMINATED_NORMALLY  = 0x1A,  // Recording terminated normally, can optionally be sent in response to a <Record Off> message.
643     E_MSG_RECORD_INFO_RECORDING_ALREADY_TERMINATED  = 0x1B,  // Recording has already terminated, can optionally be sent in response to a <Record Off> message.
644 #endif
645     E_MSG_RECORD_INFO_NO_RECORDING_OTHER_REASON  = 0x1F,  // No recording �V other reason
646 } MsCEC_MSG_RECORD_STATUS_INFO;
647 
648 
649 //UI command parameter: Table 27 User Control Codes
650 typedef enum _MsCEC_MSG_USER_CTRL_PARM
651 {
652     E_MSG_UI_SELECT             = 0x00,
653     E_MSG_UI_UP                 = 0x01,
654     E_MSG_UI_DOWN               = 0x02,
655     E_MSG_UI_LEFT               = 0x03,
656     E_MSG_UI_RIGHT              = 0x04,
657     E_MSG_UI_RIGHT_UP           = 0x05,
658     E_MSG_UI_RIGHT_DOWN         = 0x06,
659     E_MSG_UI_LEFT_UP            = 0x07,
660     E_MSG_UI_LEFT_DOWN          = 0x08,
661     E_MSG_UI_ROOTMENU           = 0x09,
662     E_MSG_UI_SETUP_MENU         = 0x0A,
663     E_MSG_UI_CONTENTS_MENU      = 0x0B,
664     E_MSG_UI_FAVORITE_MENU      = 0x0C,
665     E_MSG_UI_EXIT               = 0x0D,
666 
667 // 0x0E ~ 0x1F  reserved
668 
669     E_MSG_UI_NUMBER_0           = 0x20,
670     E_MSG_UI_NUMBER_1           = 0x21,
671     E_MSG_UI_NUMBER_2           = 0x22,
672     E_MSG_UI_NUMBER_3           = 0x23,
673     E_MSG_UI_NUMBER_4           = 0x24,
674     E_MSG_UI_NUMBER_5           = 0x25,
675     E_MSG_UI_NUMBER_6           = 0x26,
676     E_MSG_UI_NUMBER_7           = 0x27,
677     E_MSG_UI_NUMBER_8           = 0x28,
678     E_MSG_UI_NUMBER_9           = 0x29,
679 
680     E_MSG_UI_DOT                = 0x2A,
681     E_MSG_UI_ENTER              = 0x2B,
682     E_MSG_UI_CLEAR              = 0x2C,
683 
684 // 0x2D ~ 0x2E reserved
685     E_MSG_UI_NEXT_FAVORITE      = 0x2F,
686 
687     E_MSG_UI_CHANNEL_UP         = 0x30,
688     E_MSG_UI_CHANNEL_DOWN       = 0x31,
689     E_MSG_UI_PREVIOUS_CHANNEL   = 0x32,
690     E_MSG_UI_SOUND_SELECT       = 0x33,
691     E_MSG_UI_INPUT_SELECT       = 0x34,
692     E_MSG_UI_DISPLAY_INFO       = 0x35,
693     E_MSG_UI_HELP               = 0x36,
694     E_MSG_UI_PAGE_UP            = 0x37,
695     E_MSG_UI_PAGE_DOWN          = 0x38,
696 
697 // 0x39 ~ 0x3F reserved
698 
699     E_MSG_UI_POWER              = 0x40,
700     E_MSG_UI_VOLUME_UP          = 0x41,
701     E_MSG_UI_VOLUME_DOWN        = 0x42,
702     E_MSG_UI_MUTE               = 0x43,
703     E_MSG_UI_PLAY               = 0x44,
704     E_MSG_UI_STOP               = 0x45,
705     E_MSG_UI_PAUSE              = 0x46,
706     E_MSG_UI_RECORD             = 0x47,
707     E_MSG_UI_REWIND             = 0x48,
708     E_MSG_UI_FAST_FORWARD       = 0x49,
709     E_MSG_UI_EJECT              = 0x4A,
710     E_MSG_UI_FORWARD            = 0x4B,
711     E_MSG_UI_BACKWARD           = 0x4C,
712     E_MSG_UI_STOP_RECORD        = 0x4D,
713     E_MSG_UI_PAUSE_RECORD       = 0x4E,
714 
715 // 0x4F reserved
716 
717     E_MSG_UI_ANGLE                      = 0x50,
718     E_MSG_UI_SUB_PICTURE                = 0x51,
719     E_MSG_UI_VIDEO_ON_DEMAND            = 0x52,
720     E_MSG_UI_ELECTRONIC_PROGRAM_GUIDE   = 0x53,
721     E_MSG_UI_TIMER_PROGRAMMING          = 0x54,
722     E_MSG_UI_INITIAL_CONFIGURATION      = 0x55,
723 
724 // 0x56 ~ 0x5F reserved
725 
726   //0x60 ~ 0x6D, identified as function
727     E_MSG_UI_PLAY_FUN               = 0x60,
728     E_MSG_UI_PSUSE_PLAY_FUN         = 0x61,
729     E_MSG_UI_RECORD_FUN             = 0x62,
730     E_MSG_UI_PAUSE_RECORD_FUN       = 0x63,
731     E_MSG_UI_STOP_FUN               = 0x64,
732     E_MSG_UI_MUTE_FUN               = 0x65,
733     E_MSG_UI_RESTORE_VOLUME_FUN     = 0x66,
734     E_MSG_UI_TUNE_FUN               = 0x67,
735     E_MSG_UI_SELECT_MEDIA_FUN       = 0x68,
736     E_MSG_UI_SELECT_AV_INPUT_FUN    = 0x69,
737     E_MSG_UI_SELECT_AUDIO_INPUT_FUN = 0x6A,
738     E_MSG_UI_POWER_TOGGLE_FUN       = 0x6B,
739     E_MSG_UI_POWER_OFF_FUN          = 0x6C,
740     E_MSG_UI_POWER_ON_FUN           = 0x6D,
741 
742 // 0x6E ~ 0x70 reserved
743 
744     E_MSG_UI_F1_BLUE            = 0x71,
745     E_MSG_UI_F2_RED             = 0x72,
746     E_MSG_UI_F3_GREEN           = 0x73,
747     E_MSG_UI_F4_YELLOW          = 0x74,
748     E_MSG_UI_F5                 = 0x75,
749     E_MSG_UI_DATA               = 0x76,
750 
751 // 0x77 ~ 0xFF reserved
752 } MsCEC_MSG_USER_CTRL_PARM;
753 
754 //query the power on mode through mailbox
755 #define CP_READ_POWERON_MODE  0x9A
756 
757 //mailbox report CEC wake up system
758 #define M_POWER_ON_BY_HDMI_CEC  0x2F
759 
760 
761 typedef struct _MDrv_Cec_RxData_Info
762 {
763     MS_U8 ucLength;
764     MS_U8 tRxData[16];
765 } MS_CEC_RxData_Info;
766 
767 typedef struct _MDrv_CEC_INFO_LIST
768 {
769     MS_U8 CecFifoIdxS;
770     MS_U8 CecFifoIdxE;
771     MS_U8 bCecMsgCnt;
772     MS_BOOL fCecInitFinish;
773     MS_CEC_RxData_Info CecRxBuf[CEC_FIFO_CNT];   //TV CEC H/W part
774     MsCEC_DEVICELA MyLogicalAddress;                         //TV related
775     MS_U8 MyPhysicalAddress[2];
776     MsCEC_DEVICE_TYPE MyDeviceType;
777     MsCEC_MSG_POWER_STATUS_PARM MyPowerStatus;
778     MS_BOOL CecDevicesExisted[15];
779 
780     MS_U8 ActiveDeviceCECVersion;
781     MsCEC_DEVICE_TYPE ActiveDeviceType;
782     MsCEC_DEVICELA ActiveLogicalAddress;    //the remoter controller's active device
783     MS_U8 ActivePhysicalAddress[2];
784     MsCEC_MSG_POWER_STATUS_PARM ActivePowerStatus;
785 
786 #if ENABLE_CEC_MULTIPLE
787     MsCEC_DEVICELA MyLogicalAddress2;
788     MS_U8 MyPhysicalAddress2[2];
789     MsCEC_DEVICE_TYPE MyDeviceType2;
790     MsCEC_DEVICE_TYPE IniLogicalAddress;
791 #endif
792 } MS_CEC_INFO_LIST;
793 
794 typedef struct
795 {
796     MS_U32 u32XTAL_CLK_Hz;
797 }MS_CEC_INIT_INFO;
798 
799 
800 
801 //-------------------------------------------------------------------------------------------------
802 //  Function and Variable
803 //-------------------------------------------------------------------------------------------------
804 /**
805 *   @brief HDMI Status
806 */
807 typedef struct
808 {
809     MS_BOOL bIsInitialized;
810     MS_BOOL bIsRunning;
811 }MS_CEC_Status;
812 
813 //-------------------------------------------------------------------------------------------------
814 /// Assign which HDMI port connect to CEC
815 /// @ingroup apiCEC_BASIC
816 /// @param  InputPort          \b IN: CEC connect port
817 /// @return None
818 //-------------------------------------------------------------------------------------------------
819 void SYMBOL_WEAK MApi_CEC_PortSelcet(MsCEC_INPUT_PORT InputPort);
820 
821 //-------------------------------------------------------------------------------------------------
822 /// Get version (without Mutex protect)
823 /// @ingroup apiCEC_BASIC
824 /// @param  ppVersion          \b IN: version
825 /// @return TRUE: have version
826 /// @return FALSE: no version
827 //-------------------------------------------------------------------------------------------------
828 //  MS_BOOL  MApi_CEC_GetLibVer(const MSIF_Version **ppVersion);
829 
830 //-------------------------------------------------------------------------------------------------
831 /// Get cec info
832 /// @ingroup apiCEC_BASIC
833 /// @param  pInfo          \b IN: info list
834 /// @return TRUE: have info list
835 /// @return FALSE: no info list
836 //-------------------------------------------------------------------------------------------------
837 //  MS_BOOL  MApi_DDC2BI_GetInfo(MS_CEC_INFO_LIST *pInfo);
838 
839 //-------------------------------------------------------------------------------------------------
840 /// Get cec status
841 /// @ingroup apiCEC_BASIC
842 /// @param  pStatus          \b IN: status
843 /// @return TRUE: have status
844 /// @return FALSE: no status
845 //-------------------------------------------------------------------------------------------------
846 //  MS_BOOL  MApi_DDC2BI_GetStatus(MS_CEC_Status *pStatus);
847 
848 //-------------------------------------------------------------------------------------------------
849 /// Set debug level
850 /// @ingroup apiCEC_BASIC
851 /// @param  u16DbgSwitch          \b IN: switch or not
852 /// @return TRUE: do switch
853 /// @return FALSE: no switch
854 //-------------------------------------------------------------------------------------------------
855 MS_BOOL  MApi_DDC2BI_SetDbgLevel(MS_U16 u16DbgSwitch);
856 
857 //-------------------------------------------------------------------------------------------------
858 /// CEC do not work
859 /// @ingroup apiCEC_BASIC
860 /// @return None
861 //------------------------------------------------------------------------------------------------
862 void MApi_CEC_Exit(void);
863 
864 //-------------------------------------------------------------------------------------------------
865 /// CEC initial sequence
866 /// @ingroup apiCEC_BASIC
867 /// @param  pCECInfo          \b IN: CEC info
868 /// @return None
869 //-------------------------------------------------------------------------------------------------
870 
871 void MApi_CEC_Init(MS_CEC_INIT_INFO *pCECInfo);
872 
873 //-------------------------------------------------------------------------------------------------
874 /// CEC initial chip relatived part
875 /// @ingroup apiCEC_BASIC
876 /// @param  pCECInfo          \b IN: CEC info
877 /// @return None
878 //-------------------------------------------------------------------------------------------------
879 void MApi_CEC_InitChip(MS_CEC_INIT_INFO *pCECInfo);
880 
881 //-------------------------------------------------------------------------------------------------
882 /// CEC set own logical address
883 /// @ingroup apiCEC_STATUS
884 /// @param  myLA          \b IN: logical address
885 /// @return None
886 //-------------------------------------------------------------------------------------------------
887 void MApi_CEC_SetMyLogicalAddress(MsCEC_DEVICELA myLA);
888 
889 //-------------------------------------------------------------------------------------------------
890 /// Use to store CEC received messages
891 /// @ingroup apiCEC_STATUS
892 /// @return None
893 //------------------------------------------------------------------------------------------------
894 void MApi_CEC_ChkRxBuf(void);
895 
896 //-------------------------------------------------------------------------------------------------
897 /// Use to send any CEC message by user defined
898 /// @ingroup apiCEC_STATUS
899 /// @param  header          \b IN: destination logical address
900 /// @param  opcode          \b IN: opcode
901 /// @param  operand_ptr          \b IN: operand
902 /// @param  len          \b IN: length
903 /// @return CEC_ERROR_CODE
904 //-------------------------------------------------------------------------------------------------
905 CEC_ERROR_CODE MApi_CEC_TxSendMsg(MsCEC_DEVICELA header,MsCEC_MSGLIST opcode,MS_U8* operand_ptr,MS_U8 len);
906 
907 //-------------------------------------------------------------------------------------------------
908 /// Use to send any CEC message by user defined
909 /// @ingroup apiCEC_ToBeRemove
910 /// @param  dst_address          \b IN: destination logical address
911 /// @param  opcode          \b IN: opcode
912 /// @param  operand_ptr          \b IN: operand
913 /// @param  len          \b IN: length
914 /// @return CEC_ERROR_CODE
915 //-------------------------------------------------------------------------------------------------
916 CEC_ERROR_CODE MApi_CEC_TxSendMsg2(MsCEC_DEVICELA dst_address, MsCEC_MSGLIST msg, MS_U8* operand_ptr, MS_U8 len);
917 
918 //-------------------------------------------------------------------------------------------------
919 /// Use to send CEC polling msg
920 /// @ingroup apiCEC_BASIC
921 /// @param  dst_address       \b IN: destination logical address
922 /// @return CEC_ERROR_CODE
923 //-------------------------------------------------------------------------------------------------
924 CEC_ERROR_CODE MsAPI_CecTxSendPollingMsg(MsCEC_DEVICELA dst_address);
925 
926 //*****************************//
927 //    One Touch Play &
928 //    Routing Control Feature
929 //*****************************//
930 
931 //-------------------------------------------------------------------------------------------------
932 /// Used by a new source to indicate that it has started to transmit a stream or used in response to a <Request Active Source>
933 /// @ingroup apiCEC_Message
934 /// @return CEC_ERROR_CODE
935 //-------------------------------------------------------------------------------------------------
936 //  CEC_ERROR_CODE MApi_CEC_Msg_ActiveSource(void);
937 
938 
939 //*****************************//
940 //    Routing Control Feature
941 //*****************************//
942 
943 //-------------------------------------------------------------------------------------------------
944 /// Used by a CEC switch when it's manually switched to inform akk other devices
945 /// @ingroup apiCEC_Message
946 /// @param  orig_address       \b IN: the original physicall address
947 /// @param  new_address       \b IN: the new physical address
948 /// @return CEC_ERROR_CODE
949 //-------------------------------------------------------------------------------------------------
950 //  CEC_ERROR_CODE MApi_CEC_Msg_RoutingChange(MS_U8* orig_address, MS_U8* new_address);
951 
952 //-------------------------------------------------------------------------------------------------
953 /// Used by a new device to discover the status of the system.
954 /// @ingroup apiCEC_Message
955 /// @return CEC_ERROR_CODE
956 //-------------------------------------------------------------------------------------------------
957 // CEC_ERROR_CODE MApi_CEC_Msg_ReqActiveSource(void);
958 
959 //-------------------------------------------------------------------------------------------------
960 /// Used by the TV to request a streaming path from the specified physical address.
961 /// @ingroup apiCEC_Message
962 /// @param  new_address       \b IN: the new physical address
963 /// @return CEC_ERROR_CODE
964 //-------------------------------------------------------------------------------------------------
965 //  CEC_ERROR_CODE MApi_CEC_Msg_SetStreamPath(MS_U8* new_address);
966 
967 
968 //*****************************//
969 //    Standby Feature
970 //*****************************//
971 
972 //-------------------------------------------------------------------------------------------------
973 /// Use to switch one or all devices into standby mode.
974 /// One device: it's specific logical address, like "E_LA_RECORDER1"
975 /// All device:   Use broadcast logical address, "E_LA_BROADCAST"
976 /// @ingroup apiCEC_Message
977 /// @param  dst_address       \b IN: destination logical address
978 /// @return CEC_ERROR_CODE
979 //-------------------------------------------------------------------------------------------------
980 //  CEC_ERROR_CODE MApi_CEC_Msg_Standby(MsCEC_DEVICELA dst_address);
981 
982 
983 //*****************************//
984 //    On Touch Record
985 //*****************************//
986 
987 //-------------------------------------------------------------------------------------------------
988 /// Requests a device to stop a recording.
989 /// @ingroup apiCEC_Message
990 /// @param  dst_address       \b IN: destination logical address
991 /// @return CEC_ERROR_CODE
992 //-------------------------------------------------------------------------------------------------
993 //  CEC_ERROR_CODE MApi_CEC_Msg_RecordOff(MsCEC_DEVICELA dst_address);
994 
995 //-------------------------------------------------------------------------------------------------
996 /// Attempt to record the specified source.
997 /// @ingroup apiCEC_Message
998 /// @param  dst_address       \b IN: destination logical address
999 /// @param  cmd       \b IN: record source command
1000 /// @return CEC_ERROR_CODE
1001 //-------------------------------------------------------------------------------------------------
1002 //  CEC_ERROR_CODE MsAPI_CEC_Msg_RecordOn(MsCEC_DEVICELA dst_address, MsCEC_MSG_RECORD_SOURCE_TYPE cmd);
1003 
1004 
1005 //*****************************//
1006 //    System Information Feature
1007 //*****************************//
1008 
1009 //-------------------------------------------------------------------------------------------------
1010 /// Used to indicate the supported CEC version, in response to a <Get CEC Version>
1011 /// @ingroup apiCEC_Message
1012 /// @param  dst_address       \b IN: destination logical address
1013 /// @param  version       \b IN: cec version
1014 /// @return CEC_ERROR_CODE
1015 //-------------------------------------------------------------------------------------------------
1016 //  CEC_ERROR_CODE MApi_CEC_Msg_ReportCECVersion(MsCEC_DEVICELA dst_address, MS_U8 version);
1017 
1018 //-------------------------------------------------------------------------------------------------
1019 /// Used by a device to enquire which version of CEC the target supports
1020 /// @ingroup apiCEC_Message
1021 /// @param  dst_address       \b IN: destination logical address
1022 /// @return CEC_ERROR_CODE
1023 //-------------------------------------------------------------------------------------------------
1024 // CEC_ERROR_CODE MApi_CEC_Msg_ReqCECVersion(MsCEC_DEVICELA dst_address);
1025 
1026 //-------------------------------------------------------------------------------------------------
1027 ///  Use to inform all other devices of the mapping between physical and logical address of the initiator
1028 /// @ingroup apiCEC_Message
1029 /// @return CEC_ERROR_CODE
1030 //-------------------------------------------------------------------------------------------------
1031 //  CEC_ERROR_CODE MApi_CEC_Msg_ReportPhycalAddress(void);
1032 
1033 //-------------------------------------------------------------------------------------------------
1034 /// A request to a device to return its physical address
1035 /// @ingroup apiCEC_Message
1036 /// @param  dst_address       \b IN: destination logical address
1037 /// @return CEC_ERROR_CODE
1038 //-------------------------------------------------------------------------------------------------
1039 //  CEC_ERROR_CODE MApi_CEC_Msg_ReqPhycalAddress(MsCEC_DEVICELA dst_address);
1040 
1041 
1042 //*****************************//
1043 //    Deck Control Feature
1044 //*****************************//
1045 
1046 //-------------------------------------------------------------------------------------------------
1047 ///  Use to control a device's media functions
1048 /// @ingroup apiCEC_Message
1049 /// @param  dst_address       \b IN: destination logical address
1050 /// @param  cmd       \b IN: deck control mode command
1051 /// @return CEC_ERROR_CODE
1052 //-------------------------------------------------------------------------------------------------
1053 //  CEC_ERROR_CODE MApi_CEC_Msg_DeckControl(MsCEC_DEVICELA dst_address, MsCEC_MSG_DC_DECK_CTRL_PARM cmd);
1054 
1055 //-------------------------------------------------------------------------------------------------
1056 ///  Use to provide a device's status when received "Give Deck Status"
1057 /// @ingroup apiCEC_Message
1058 /// @param  dst_address       \b IN: destination logical address
1059 /// @param  cmd       \b IN: deck info command
1060 /// @return CEC_ERROR_CODE
1061 //-------------------------------------------------------------------------------------------------
1062 //  CEC_ERROR_CODE MApi_CEC_Msg_DecStatus(MsCEC_DEVICELA dst_address, MsCEC_MSG_DC_DECK_STATUS_PARM cmd);
1063 
1064 //-------------------------------------------------------------------------------------------------
1065 ///  Use to request device's status
1066 /// @ingroup apiCEC_Message
1067 /// @param  dst_address       \b IN: destination logical address
1068 /// @param  cmd       \b IN: status request command
1069 /// @return CEC_ERROR_CODE
1070 //-------------------------------------------------------------------------------------------------
1071 //  CEC_ERROR_CODE MApi_CEC_MSg_GiveDeckStatus(MsCEC_DEVICELA dst_address, MsCEC_MSG_STATUS_REQUEST_PARM cmd);
1072 
1073 //-------------------------------------------------------------------------------------------------
1074 ///  Use to control the playback behaviour of a source device
1075 /// @ingroup apiCEC_Message
1076 /// @param  dst_address       \b IN: destination logical address
1077 /// @param  cmd       \b IN: play mode command
1078 /// @return CEC_ERROR_CODE
1079 //-------------------------------------------------------------------------------------------------
1080 //  CEC_ERROR_CODE MApi_CEC_MSg_DCPlay(MsCEC_DEVICELA dst_address, MsCEC_MSG_DC_PLAY_PARM cmd);
1081 
1082 
1083 //*****************************//
1084 //    Device Menu Control &
1085 //    Remote Control Passthrough Feature
1086 //*****************************//
1087 
1088 //-------------------------------------------------------------------------------------------------
1089 ///  Request from TV for a device to show/remove a menu or to query status
1090 /// @ingroup apiCEC_Message
1091 /// @param  dst_address       \b IN: destination logical address
1092 /// @param  cmd       \b IN: menu request type command
1093 /// @return CEC_ERROR_CODE
1094 //-------------------------------------------------------------------------------------------------
1095 //  CEC_ERROR_CODE MApi_CEC_Msg_ReqMenuStatus(MsCEC_DEVICELA dst_address, MsCEC_MSG_MENU_REQ_TYPE cmd);
1096 
1097 //-------------------------------------------------------------------------------------------------
1098 /// Use to indicated that user pressed which control button
1099 /// @ingroup apiCEC_Message
1100 /// @param  bUserCtrlEn       \b IN: menu status is activated or not
1101 /// @param  dst_address       \b IN: destination logical address
1102 /// @param  cmd       \b IN: UI command
1103 /// @return CEC_ERROR_CODE
1104 //-------------------------------------------------------------------------------------------------
1105 //  CEC_ERROR_CODE MApi_CEC_Msg_UserCtrlPressed(MS_BOOL bUserCtrlEn, MsCEC_DEVICELA dst_address, MsCEC_MSG_USER_CTRL_PARM cmd);
1106 
1107 //-------------------------------------------------------------------------------------------------
1108 /// Use to indicated that user released which control button
1109 /// @ingroup apiCEC_Message
1110 /// @param  dst_address       \b IN: destination logical address
1111 /// @return CEC_ERROR_CODE
1112 //-------------------------------------------------------------------------------------------------
1113 //  CEC_ERROR_CODE MApi_CEC_Msg_UserCtrlReleased(MsCEC_DEVICELA dst_address);
1114 
1115 
1116 //*****************************//
1117 //    Power Status Feature
1118 //*****************************//
1119 
1120 //-------------------------------------------------------------------------------------------------
1121 /// Use to inform a requesting device of the current power status
1122 /// @ingroup apiCEC_Message
1123 /// @param  dst_address       \b IN: destination logical address
1124 /// @return CEC_ERROR_CODE
1125 //-------------------------------------------------------------------------------------------------
1126 //  CEC_ERROR_CODE MApi_CEC_Msg_ReportPowerStatus(MsCEC_DEVICELA dst_address);
1127 
1128 //-------------------------------------------------------------------------------------------------
1129 /// Use to determine the current power status of a target device
1130 /// @ingroup apiCEC_Message
1131 /// @param  dst_address       \b IN: destination logical address
1132 /// @return CEC_ERROR_CODE
1133 //-------------------------------------------------------------------------------------------------
1134 //  CEC_ERROR_CODE MApi_CEC_Msg_ReqPowerStatus(MsCEC_DEVICELA dst_address);
1135 
1136 
1137 //*****************************//
1138 //    General Protocol Feature
1139 //*****************************//
1140 
1141 //-------------------------------------------------------------------------------------------------
1142 /// Use to indicate that device doesn't support message type
1143 /// @ingroup apiCEC_Message
1144 /// @param  dst_address       \b IN: destination logical address
1145 /// @param  msg       \b IN: feature opcode
1146 /// @param  cmd       \b IN: abort reason
1147 /// @return CEC_ERROR_CODE
1148 //-------------------------------------------------------------------------------------------------
1149 //  CEC_ERROR_CODE MApi_CEC_Msg_FeatureAbort(MsCEC_DEVICELA dst_address, MsCEC_MSGLIST msg, MsCEC_MSG_ABORT_REASON cmd);
1150 
1151 //-------------------------------------------------------------------------------------------------
1152 /// This message is reserved for testing purposes.
1153 /// @ingroup apiCEC_Message
1154 /// @param  dst_address       \b IN: destination logical address
1155 /// @return CEC_ERROR_CODE
1156 //-------------------------------------------------------------------------------------------------
1157 //  CEC_ERROR_CODE MApi_CEC_Msg_Abort(MsCEC_DEVICELA dst_address);
1158 
1159 //-------------------------------------------------------------------------------------------------
1160 /// Used by a TV to indicate its currently selected menu language
1161 /// @ingroup apiCEC_Message
1162 /// @param  pu8MenuLanguageCode       \b IN: menu language code
1163 /// @return CEC_ERROR_CODE
1164 //-------------------------------------------------------------------------------------------------
1165 //  CEC_ERROR_CODE MApi_CEC_Msg_SendMenuLanguage(MS_U8* pu8MenuLanguageCode);
1166 
1167 //-------------------------------------------------------------------------------------------------
1168 /// Used by an ARC TX device to request an ARC RX device to activate the ARC functionility in ARC TX device
1169 /// @ingroup apiCEC_Message
1170 /// @param  dst_address       \b IN: destination logical address
1171 /// @return CEC_ERROR_CODE
1172 //-------------------------------------------------------------------------------------------------
1173 //  CEC_ERROR_CODE MsAPI_CecMsg_ReqARCInitiation(MsCEC_DEVICELA dst_address);
1174 
1175 //-------------------------------------------------------------------------------------------------
1176 /// Used by an ARC TX device to request an ARC RX device to deactivate the ARC functionility in ARC TX device
1177 /// @ingroup apiCEC_Message
1178 /// @param  dst_address       \b IN: destination logical address
1179 /// @return CEC_ERROR_CODE
1180 //-------------------------------------------------------------------------------------------------
1181 //  CEC_ERROR_CODE MsAPI_CecMsg_ReqARCTermination(MsCEC_DEVICELA dst_address);
1182 
1183 //-------------------------------------------------------------------------------------------------
1184 /// A device implementing System Audio Control and which has volume control  RC buttons request to use System Audio Mode to the Amplifier
1185 /// @ingroup apiCEC_Message
1186 /// @param  dst_address       \b IN: destination logical address
1187 /// @param  amp_switch       \b IN: 1: unmute amplifier. 0: mute amplifier
1188 /// @param  my_address       \b IN: source to be used is the device specified at this address
1189 /// @return CEC_ERROR_CODE
1190 //-------------------------------------------------------------------------------------------------
1191 //  CEC_ERROR_CODE MsAPI_CecMsg_AudioModeReq(MsCEC_DEVICELA dst_address, MS_BOOL amp_switch, MS_U8* my_address );
1192 
1193 //-------------------------------------------------------------------------------------------------
1194 /// Use to request an Amplifier to send its volume and mute status
1195 /// @ingroup apiCEC_Message
1196 /// @param  dst_address       \b IN: destination logical address
1197 /// @return CEC_ERROR_CODE
1198 //-------------------------------------------------------------------------------------------------
1199 //  CEC_ERROR_CODE MApi_CEC_Msg_GiveAudioStatus(MsCEC_DEVICELA dst_address);
1200 
1201 //-------------------------------------------------------------------------------------------------
1202 /// Get RX header
1203 /// @ingroup apiCEC_STATUS
1204 /// @return header
1205 //-------------------------------------------------------------------------------------------------
1206 MS_U8 MApi_CEC_Get_Header(void);
1207 
1208 //-------------------------------------------------------------------------------------------------
1209 /// Get RX opcode
1210 /// @ingroup apiCEC_STATUS
1211 /// @return opcode
1212 //-------------------------------------------------------------------------------------------------
1213 MS_U8 MApi_CEC_Get_OpCode(void);
1214 
1215 //-------------------------------------------------------------------------------------------------
1216 /// Get RX parameter
1217 /// @ingroup apiCEC_STATUS
1218 /// @param  u8Idx       \b IN: parameter index
1219 /// @return parameter
1220 //-------------------------------------------------------------------------------------------------
1221 MS_U8 MApi_CEC_Get_Para(MS_U8 u8Idx);
1222 
1223 //-------------------------------------------------------------------------------------------------
1224 /// Get RX command length
1225 /// @ingroup apiCEC_STATUS
1226 /// @return comand length
1227 //-------------------------------------------------------------------------------------------------
1228 MS_U8 MApi_CEC_GetCmdLen(void);
1229 
1230 //-------------------------------------------------------------------------------------------------
1231 /// Set active logical address
1232 /// @ingroup apiCEC_STATUS
1233 /// @param  Addr       \b IN: logical address
1234 /// @return None
1235 //-------------------------------------------------------------------------------------------------
1236 //  void MApi_CEC_SetActiveLogicalAddress(MsCEC_DEVICELA Addr);
1237 
1238 //-------------------------------------------------------------------------------------------------
1239 /// Get active logical address
1240 /// @ingroup apiCEC_STATUS
1241 /// @return logical address
1242 //-------------------------------------------------------------------------------------------------
1243 //  MsCEC_DEVICELA MApi_CEC_GetActiveLogicalAddress(void);
1244 
1245 //-------------------------------------------------------------------------------------------------
1246 /// Get power status
1247 /// @ingroup apiCEC_STATUS
1248 /// @return power status
1249 //-------------------------------------------------------------------------------------------------
1250 //  MsCEC_MSG_POWER_STATUS_PARM MApi_CEC_GetPowerStatus(void);
1251 
1252 //-------------------------------------------------------------------------------------------------
1253 /// Get fifo index
1254 /// @ingroup apiCEC_BASIC
1255 /// @return fifo index
1256 //-------------------------------------------------------------------------------------------------
1257 MS_U8 MApi_CEC_GetFifoIdx(void);
1258 
1259 //-------------------------------------------------------------------------------------------------
1260 /// Set fifo index
1261 /// @ingroup apiCEC_BASIC
1262 /// @param  u8Idx       \b IN: fifo index
1263 /// @return None
1264 //-------------------------------------------------------------------------------------------------
1265 void MApi_CEC_SetFifoIdx(MS_U8 u8Idx);
1266 
1267 //-------------------------------------------------------------------------------------------------
1268 /// Set active power status
1269 /// @ingroup apiCEC_STATUS
1270 /// @param  Status       \b IN: active power status
1271 /// @return None
1272 //-------------------------------------------------------------------------------------------------
1273 //  void MApi_CEC_SetActivePowerStatus(MsCEC_MSG_POWER_STATUS_PARM Status);
1274 
1275 //-------------------------------------------------------------------------------------------------
1276 /// Get active power status
1277 /// @ingroup apiCEC_STATUS
1278 /// @return power status
1279 //-------------------------------------------------------------------------------------------------
1280 //  MsCEC_MSG_POWER_STATUS_PARM MApi_CEC_GetActivePowerStatus(void);
1281 
1282 //-------------------------------------------------------------------------------------------------
1283 /// Set active physical address
1284 /// @ingroup apiCEC_STATUS
1285 /// @param  u8Para1       \b IN: physical address lower byte
1286 /// @param  u8Para2       \b IN: physical address higer byte
1287 /// @return None
1288 //-------------------------------------------------------------------------------------------------
1289 //  void MApi_CEC_SetActivePhysicalAddress(MS_U8 u8Para1, MS_U8 u8Para2);
1290 
1291 //-------------------------------------------------------------------------------------------------
1292 /// Set active device CEC version
1293 /// @ingroup apiCEC_STATUS
1294 /// @param  u8Ver       \b IN: active cec version
1295 /// @return None
1296 //-------------------------------------------------------------------------------------------------
1297 //  void MApi_CEC_SetActiveDeviceCECVersion(MS_U8 u8Ver);
1298 
1299 //-------------------------------------------------------------------------------------------------
1300 /// Set active device type
1301 /// @ingroup apiCEC_STATUS
1302 /// @param  Type       \b IN: active device type
1303 /// @return None
1304 //-------------------------------------------------------------------------------------------------
1305 void MApi_CEC_SetActiveDeviceType(MsCEC_DEVICE_TYPE Type);
1306 
1307 //-------------------------------------------------------------------------------------------------
1308 /// Get message count
1309 /// @ingroup apiCEC_STATUS
1310 /// @return message count
1311 //-------------------------------------------------------------------------------------------------
1312 MS_U8 MApi_CEC_GetMsgCnt(void);
1313 
1314 //-------------------------------------------------------------------------------------------------
1315 /// Set message count
1316 /// @ingroup apiCEC_STATUS
1317 /// @param  u8Cnt       \b IN: message count
1318 /// @return None
1319 //-------------------------------------------------------------------------------------------------
1320 void MApi_CEC_SetMsgCnt(MS_U8 u8Cnt);
1321 
1322 //-------------------------------------------------------------------------------------------------
1323 /// Get Rx data
1324 /// @ingroup apiCEC_STATUS
1325 /// @param  u8Fifoidx       \b IN: fifo index
1326 /// @param  u8Idx       \b IN: data index
1327 /// @return data
1328 //-------------------------------------------------------------------------------------------------
1329 MS_U8 MApi_CEC_GetRxData(MS_U8 u8Fifoidx, MS_U8 u8Idx);
1330 
1331 //-------------------------------------------------------------------------------------------------
1332 /// Use to check CEC frame is valid or not
1333 /// @ingroup apiCEC_BASIC
1334 /// @param  msg_type       \b IN: CEC message type
1335 /// @param  ucLen       \b IN: message length, include header and opcode
1336 /// @return TRUE: CEC frame is valid
1337 /// @return FALSE: CEC frame is not valid
1338 //-------------------------------------------------------------------------------------------------
1339 MS_BOOL MApi_CEC_CheckFrame(MsCEC_MSG_TRANS_TYPE msg_type, MS_U8 ucLen);
1340 
1341 //-------------------------------------------------------------------------------------------------
1342 /// Use to check exist devices
1343 /// @ingroup apiCEC_BASIC
1344 /// @return None
1345 //-------------------------------------------------------------------------------------------------
1346 void MApi_CEC_CheckExistDevices(void);
1347 
1348 //-------------------------------------------------------------------------------------------------
1349 /// Use to config wake up
1350 /// @ingroup apiCEC_BASIC
1351 /// @return None
1352 //-------------------------------------------------------------------------------------------------
1353 void MApi_CEC_ConfigWakeUp(void);
1354 
1355 //-------------------------------------------------------------------------------------------------
1356 /// Enable CEC
1357 /// @ingroup apiCEC_BASIC
1358 /// @param  bEnableFlag       \b IN: enable CEC or not
1359 /// @return None
1360 //-------------------------------------------------------------------------------------------------
1361 void MApi_CEC_Enabled(MS_BOOL bEnableFlag);
1362 
1363 //-------------------------------------------------------------------------------------------------
1364 /// Set physical address
1365 /// @ingroup apiCEC_STATUS
1366 /// @param  pdata       \b IN: physical address
1367 /// @return None
1368 //-------------------------------------------------------------------------------------------------
1369 void MApi_CEC_SetMyPhysicalAddress(MS_U8 *pdata);
1370 
1371 #if ENABLE_CEC_MULTIPLE
1372 //-------------------------------------------------------------------------------------------------
1373 /// Set second logical address
1374 /// @ingroup apiCEC_SECOND
1375 /// @param  myLA       \b IN: second logical address
1376 /// @return None
1377 //-------------------------------------------------------------------------------------------------
1378 void MApi_CEC_SetMyLogicalAddress2(MsCEC_DEVICELA myLA);
1379 
1380 //-------------------------------------------------------------------------------------------------
1381 /// Report second physical address
1382 /// @ingroup apiCEC_SECOND
1383 /// @return CEC_ERROR_CODE
1384 //-------------------------------------------------------------------------------------------------
1385 CEC_ERROR_CODE MApi_CEC_Msg_ReportPhycalAddress2(void);
1386 
1387 //-------------------------------------------------------------------------------------------------
1388 /// Set second physical address
1389 /// @ingroup apiCEC_SECOND
1390 /// @param  pdata       \b IN: second physical address
1391 /// @return None
1392 //-------------------------------------------------------------------------------------------------
1393 void MApi_CEC_SetMyPhysicalAddress2(MS_U8 *pdata);
1394 
1395 //-------------------------------------------------------------------------------------------------
1396 /// Set initiator logical address
1397 /// @ingroup apiCEC_SECOND
1398 /// @param  IniLA       \b IN: initiator logical address
1399 /// @return None
1400 //-------------------------------------------------------------------------------------------------
1401 void MApi_CEC_SetInitiator(MsCEC_DEVICELA IniLA);
1402 #endif
1403 
1404 //-------------------------------------------------------------------------------------------------
1405 /// Get Tx status
1406 /// @ingroup apiCEC_STATUS
1407 /// @return status
1408 ///[Bit0]: CEC receives a new message.
1409 ///[Bit1]: CEC transmits a message successfully.
1410 ///[Bit2]: CEC retry fail for TX.
1411 ///[Bit3]: CEC lost arbitration to the second initiator.
1412 //-------------------------------------------------------------------------------------------------
1413 // MS_U8 MApi_CEC_GetTxStatus(void);
1414 
1415 //-------------------------------------------------------------------------------------------------
1416 /// Set power state
1417 /// @ingroup apiCEC_STATUS
1418 /// @param  u16PowerState       \b IN: power state
1419 /// @return 0: success
1420 /// @return 1: fail
1421 //-------------------------------------------------------------------------------------------------
1422 MS_U32 MApi_CEC_SetPowerState(EN_POWER_MODE u16PowerState);
1423 
1424 #ifdef __cplusplus
1425 }
1426 #endif
1427 
1428 #endif //_API_CEC_H_
1429 
1430