RDK Documentation (Open Sourced RDK Components)
dsHdmiIn.c
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 /*
20  * If not stated otherwise in this file or this component's Licenses.txt file the
21  * following copyright and licenses apply:
22  *
23  * Copyright ARRIS Enterprises, Inc. 2015.
24  *
25  * Licensed under the Apache License, Version 2.0 (the "License");
26  * you may not use this file except in compliance with the License.
27  * You may obtain a copy of the License at
28  *
29  * http://www.apache.org/licenses/LICENSE-2.0
30  *
31  * Unless required by applicable law or agreed to in writing, software
32  * distributed under the License is distributed on an "AS IS" BASIS,
33  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34  * See the License for the specific language governing permissions and
35  * limitations under
36 */
37 
38 
39 /**
40 * @defgroup devicesettings
41 * @{
42 * @defgroup rpc
43 * @{
44 **/
45 
46 
47 
48 
49 /**
50 * @defgroup devicesettings
51 * @{
52 * @defgroup rpc
53 * @{
54 **/
55 
56 
57 #include <stdio.h>
58 #include <string.h>
59 #include <unistd.h>
60 #include <fcntl.h>
61 #include <sys/types.h>
62 #include <sys/stat.h>
63 #include <pthread.h>
64 #include <dlfcn.h>
65 #include "dsHdmiIn.h"
66 #include "dsRpc.h"
67 #include "dsTypes.h"
68 #include "dsserverlogger.h"
69 #include "dsMgr.h"
70 
71 #include "iarmUtil.h"
72 #include "libIARM.h"
73 #include "libIBus.h"
74 
75 #include "safec_lib.h"
76 
77 #define direct_list_top(list) ((list))
78 #define IARM_BUS_Lock(lock) pthread_mutex_lock(&fpLock)
79 #define IARM_BUS_Unlock(lock) pthread_mutex_unlock(&fpLock)
80 
81 static int m_isInitialized = 0;
82 static int m_isPlatInitialized=0;
83 static pthread_mutex_t fpLock = PTHREAD_MUTEX_INITIALIZER;
84 static int m_edidversion[dsHDMI_IN_PORT_MAX];
85 
86 IARM_Result_t dsHdmiInMgr_init();
87 IARM_Result_t dsHdmiInMgr_term();
88 IARM_Result_t _dsHdmiInInit(void *arg);
89 IARM_Result_t _dsHdmiInTerm(void *arg);
90 IARM_Result_t _dsHdmiInLoadKsvs(void *arg);
91 IARM_Result_t _dsHdmiInGetNumberOfInputs(void *arg);
92 IARM_Result_t _dsHdmiInGetStatus(void *arg);
93 IARM_Result_t _dsHdmiInSelectPort(void *arg);
94 IARM_Result_t _dsHdmiInToggleHotPlug(void *arg);
95 IARM_Result_t _dsHdmiInLoadEdidData(void *arg);
96 IARM_Result_t _dsHdmiInSetRepeater(void *arg);
97 IARM_Result_t _dsHdmiInScaleVideo(void *arg);
98 IARM_Result_t _dsHdmiInSelectZoomMode(void *arg);
99 IARM_Result_t _dsHdmiInPauseAudio(void *arg);
100 IARM_Result_t _dsHdmiInResumeAudio(void *arg);
101 IARM_Result_t _dsHdmiInGetCurrentVideoMode(void *arg);
102 IARM_Result_t _dsGetEDIDBytesInfo (void *arg);
103 IARM_Result_t _dsGetHDMISPDInfo (void *arg);
104 IARM_Result_t _dsSetEdidVersion (void *arg);
105 IARM_Result_t _dsGetEdidVersion (void *arg);
106 IARM_Result_t _dsGetAllmStatus (void *arg);
107 IARM_Result_t _dsGetSupportedGameFeaturesList (void *arg);
108 
109 void _dsHdmiInConnectCB(dsHdmiInPort_t port, bool isPortConnected);
110 void _dsHdmiInSignalChangeCB(dsHdmiInPort_t port, dsHdmiInSignalStatus_t sigStatus);
111 void _dsHdmiInStatusChangeCB(dsHdmiInStatus_t inputStatus);
112 void _dsHdmiInVideoModeUpdateCB(dsHdmiInPort_t port, dsVideoPortResolution_t videoResolution);
113 void _dsHdmiInAllmChangeCB(dsHdmiInPort_t port, bool allm_mode);
114 
115 static dsHdmiInCap_t hdmiInCap_gs;
116 
117 #include <iostream>
118 #include "hostPersistence.hpp"
119 #include <sstream>
120 
121 
122 using namespace std;
123 
124 
125 static dsError_t isHdmiARCPort (int iPort, bool* isArcEnabled) {
126  dsError_t eRet = dsERR_GENERAL;
127 
128  typedef bool (*dsIsHdmiARCPort_t)(int iPortArg);
129  static dsIsHdmiARCPort_t dsIsHdmiARCPortFunc = 0;
130  if (dsIsHdmiARCPortFunc == 0) {
131  void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
132  if (dllib) {
133  dsIsHdmiARCPortFunc = (dsIsHdmiARCPort_t) dlsym(dllib, "dsIsHdmiARCPort");
134  if(dsIsHdmiARCPortFunc == 0) {
135  printf("%s:%d dsIsHdmiARCPort (int) is not defined %s\r\n", __FUNCTION__,__LINE__, dlerror());
136  eRet = dsERR_GENERAL;
137  }
138  else {
139  printf("%s:%d dsIsHdmiARCPort dsIsHdmiARCPortFunc loaded\r\n", __FUNCTION__,__LINE__);
140  }
141  dlclose(dllib);
142  }
143  else {
144  printf("%s:%d dsIsHdmiARCPort Opening RDK_DSHAL_NAME[%s] failed %s\r\n",
145  __FUNCTION__,__LINE__, RDK_DSHAL_NAME, dlerror()); //CID 168096 - Print Args
146  eRet = dsERR_GENERAL;
147  }
148  }
149  if (0 != dsIsHdmiARCPortFunc) {
150  *isArcEnabled = dsIsHdmiARCPortFunc (iPort);
151  printf("%s: dsIsHdmiARCPort port %d isArcEnabled:%d\r\n", __FUNCTION__, iPort, *isArcEnabled);
152  }
153  else {
154  printf("%s: dsIsHdmiARCPort dsIsHdmiARCPortFunc = %p\n", dsIsHdmiARCPortFunc);
155  }
156  return eRet;
157 }
158 
159 static dsError_t getEDIDBytesInfo (int iHdmiPort, unsigned char **edid, int *length) {
160  dsError_t eRet = dsERR_GENERAL;
161  typedef dsError_t (*dsGetEDIDBytesInfo_t)(int iHdmiPort, unsigned char **edid, int *length);
162  static dsGetEDIDBytesInfo_t dsGetEDIDBytesInfoFunc = 0;
163  if (dsGetEDIDBytesInfoFunc == 0) {
164  void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
165  if (dllib) {
166  dsGetEDIDBytesInfoFunc = (dsGetEDIDBytesInfo_t) dlsym(dllib, "dsGetEDIDBytesInfo");
167  if(dsGetEDIDBytesInfoFunc == 0) {
168  printf("%s:%d dsGetEDIDBytesInfo (int) is not defined %s\r\n", __FUNCTION__,__LINE__, dlerror());
169  eRet = dsERR_GENERAL;
170  }
171  else {
172  printf("%s:%d dsGetEDIDBytesInfoFunc loaded\r\n", __FUNCTION__,__LINE__);
173  }
174  dlclose(dllib);
175  }
176  else {
177  printf("%s:%d dsGetEDIDBytesInfo Opening RDK_DSHAL_NAME [%] failed %s\r\n",
178  __FUNCTION__,__LINE__, RDK_DSHAL_NAME, dlerror());
179  eRet = dsERR_GENERAL;
180  }
181  }
182  if (0 != dsGetEDIDBytesInfoFunc) {
183  eRet = dsGetEDIDBytesInfoFunc (iHdmiPort, edid, length);
184  printf("[srv] %s: dsGetEDIDBytesInfoFunc eRet: %d data len: %d \r\n", __FUNCTION__,eRet, *length);
185  }
186  return eRet;
187 }
188 
189 static dsError_t getHDMISPDInfo (int iHdmiPort, unsigned char **spd) {
190  dsError_t eRet = dsERR_GENERAL;
191  typedef dsError_t (*dsGetHDMISPDInfo_t)(int iHdmiPort, unsigned char **data);
192  static dsGetHDMISPDInfo_t dsGetHDMISPDInfoFunc = 0;
193  if (dsGetHDMISPDInfoFunc == 0) {
194  void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
195  if (dllib) {
196  dsGetHDMISPDInfoFunc = (dsGetHDMISPDInfo_t) dlsym(dllib, "dsGetHDMISPDInfo");
197  if(dsGetHDMISPDInfoFunc == 0) {
198  printf("%s:%d dsGetHDMISPDInfo (int) is not defined %s\r\n", __FUNCTION__,__LINE__, dlerror());
199  eRet = dsERR_GENERAL;
200  }
201  else {
202  printf("%s:%d dsGetHDMISPDInfoFunc loaded\r\n", __FUNCTION__,__LINE__);
203  }
204  dlclose(dllib);
205  }
206  else {
207  printf("%s:%d dsGetHDMISPDInfo Opening RDK_DSHAL_NAME [%s] failed %s\r\n",
208  __FUNCTION__,__LINE__, RDK_DSHAL_NAME, dlerror());
209  eRet = dsERR_GENERAL;
210  }
211  }
212  if (0 != dsGetHDMISPDInfoFunc) {
213  eRet = dsGetHDMISPDInfoFunc (iHdmiPort, spd);
214  printf("[srv] %s: dsGetHDMISPDInfoFunc eRet: %d \r\n", __FUNCTION__,eRet);
215  }
216  else {
217  printf("%s: dsGetHDMISPDInfoFunc = %p\n", __FUNCTION__, dsGetHDMISPDInfoFunc);
218  }
219  return eRet;
220 }
221 
222 static dsError_t setEdidVersion (int iHdmiPort, int iEdidVersion) {
223  dsError_t eRet = dsERR_GENERAL;
224  typedef dsError_t (*dsSetEdidVersion_t)(int iHdmiPort, int iEdidVersion);
225  static dsSetEdidVersion_t dsSetEdidVersionFunc = 0;
226  char edidVer[2];
227  sprintf(edidVer,"%d\0",iEdidVersion);
228 
229  if (dsSetEdidVersionFunc == 0) {
230  void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
231  if (dllib) {
232  dsSetEdidVersionFunc = (dsSetEdidVersion_t) dlsym(dllib, "dsSetEdidVersion");
233  if(dsSetEdidVersionFunc == 0) {
234  printf("%s:%d dsSetEdidVersion (int) is not defined %s\r\n", __FUNCTION__, __LINE__, dlerror());
235  }
236  else {
237  printf("%s:%d dsSetEdidVersionFunc loaded\r\n", __FUNCTION__, __LINE__);
238  }
239  dlclose(dllib);
240  }
241  else {
242  printf("%s:%d dsSetEdidVersion Opening RDK_DSHAL_NAME [%] failed %s\r\n",
243  __FUNCTION__, __LINE__, RDK_DSHAL_NAME, dlerror());
244  }
245  }
246  if (0 != dsSetEdidVersionFunc) {
247  eRet = dsSetEdidVersionFunc (iHdmiPort, iEdidVersion);
248  if (eRet == dsERR_NONE) {
249  switch (iHdmiPort) {
250  case dsHDMI_IN_PORT_0:
251  device::HostPersistence::getInstance().persistHostProperty("HDMI0.edidversion", edidVer);
252  printf ("Port %s: Persist EDID Version: %d\n", "HDMI0", iEdidVersion);
253  break;
254  case dsHDMI_IN_PORT_1:
255  device::HostPersistence::getInstance().persistHostProperty("HDMI1.edidversion", edidVer);
256  printf ("Port %s: Persist EDID Version: %d\n", "HDMI1", iEdidVersion);
257  break;
258  case dsHDMI_IN_PORT_2:
259  device::HostPersistence::getInstance().persistHostProperty("HDMI2.edidversion", edidVer);
260  printf ("Port %s: Persist EDID Version: %d\n", "HDMI2", iEdidVersion);
261  break;
262  }
263  }
264  printf("[srv] %s: dsSetEdidVersionFunc eRet: %d \r\n", __FUNCTION__, eRet);
265  }
266  else {
267  printf("%s: dsSetEdidVersionFunc = %p\n", __FUNCTION__, dsSetEdidVersionFunc);
268  }
269  return eRet;
270 }
271 
272 static dsError_t getEdidVersion (int iHdmiPort, int *iEdidVersion) {
273  dsError_t eRet = dsERR_GENERAL;
274  typedef dsError_t (*dsGetEdidVersion_t)(int iHdmiPort, int *iEdidVersion);
275  static dsGetEdidVersion_t dsGetEdidVersionFunc = 0;
276  if (dsGetEdidVersionFunc == 0) {
277  void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
278  if (dllib) {
279  dsGetEdidVersionFunc = (dsGetEdidVersion_t) dlsym(dllib, "dsGetEdidVersion");
280  if(dsGetEdidVersionFunc == 0) {
281  printf("%s:%d dsGetEdidVersion (int) is not defined %s\r\n", __FUNCTION__, __LINE__, dlerror());
282  }
283  else {
284  printf("%s:%d dsGetEdidVersionFunc loaded\r\n", __FUNCTION__, __LINE__);
285  }
286  dlclose(dllib);
287  }
288  else {
289  printf("%s:%d dsGetEdidVersion Opening RDK_DSHAL_NAME [%] failed %s\r\n",
290  __FUNCTION__, __LINE__, RDK_DSHAL_NAME, dlerror());
291  }
292  }
293  if (0 != dsGetEdidVersionFunc) {
294  eRet = dsGetEdidVersionFunc (iHdmiPort, iEdidVersion);
295  printf("[srv] %s: dsGetEdidVersionFunc eRet: %d \r\n", __FUNCTION__, eRet);
296  }
297  else {
298  printf("%s: dsGetEdidVersionFunc = %p\n", __FUNCTION__, dsGetEdidVersionFunc);
299  }
300  return eRet;
301 }
302 
303 static dsError_t getAllmStatus (int iHdmiPort, bool *allmStatus) {
304  dsError_t eRet = dsERR_GENERAL;
305  typedef dsError_t (*dsGetAllmStatus_t)(int iHdmiPort, bool *allmStatus);
306  static dsGetAllmStatus_t dsGetAllmStatusFunc = 0;
307  if (dsGetAllmStatusFunc == 0) {
308  void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
309  if (dllib) {
310  dsGetAllmStatusFunc = (dsGetAllmStatus_t) dlsym(dllib, "dsGetAllmStatus");
311  if(dsGetAllmStatusFunc == 0) {
312  printf("%s:%d dsGetAllmStatus (int) is not defined %s\r\n", __FUNCTION__, __LINE__, dlerror());
313  }
314  else {
315  printf("%s:%d dsGetAllmStatusFunc loaded\r\n", __FUNCTION__, __LINE__);
316  }
317  dlclose(dllib);
318  }
319  else {
320  printf("%s:%d dsGetAllmStatus Opening RDK_DSHAL_NAME [%] failed %s\r\n",
321  __FUNCTION__, __LINE__, RDK_DSHAL_NAME, dlerror());
322  }
323  }
324  if (0 != dsGetAllmStatusFunc) {
325  eRet = dsGetAllmStatusFunc (iHdmiPort, allmStatus);
326  printf("[srv] %s: dsGetAllmStatusFunc eRet: %d \r\n", __FUNCTION__, eRet);
327  }
328  else {
329  printf("%s: dsGetAllmStatusFunc = %p\n", __FUNCTION__, dsGetAllmStatusFunc);
330  }
331  return eRet;
332 }
333 
334 static dsError_t getSupportedGameFeaturesList (dsSupportedGameFeatureList_t *fList) {
335  dsError_t eRet = dsERR_GENERAL;
336  typedef dsError_t (*dsGetSupportedGameFeaturesList_t)(dsSupportedGameFeatureList_t *fList);
337  static dsGetSupportedGameFeaturesList_t dsGetSupportedGameFeaturesListFunc = 0;
338  if (dsGetSupportedGameFeaturesListFunc == 0) {
339  void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
340  if (dllib) {
341  dsGetSupportedGameFeaturesListFunc = (dsGetSupportedGameFeaturesList_t) dlsym(dllib, "dsGetSupportedGameFeaturesList");
342  if(dsGetSupportedGameFeaturesListFunc == 0) {
343  printf("%s:%d dsGetSupportedGameFeaturesList (int) is not defined %s\r\n", __FUNCTION__, __LINE__, dlerror());
344  }
345  else {
346  printf("%s:%d dsGetSupportedGameFeaturesList loaded\r\n", __FUNCTION__, __LINE__);
347  }
348  dlclose(dllib);
349  }
350  else {
351  printf("%s:%d dsGetSupportedGameFeaturesList Opening RDK_DSHAL_NAME [%] failed %s\r\n",
352  __FUNCTION__, __LINE__, RDK_DSHAL_NAME, dlerror());
353  }
354  }
355  if (0 != dsGetSupportedGameFeaturesListFunc) {
356  eRet = dsGetSupportedGameFeaturesListFunc (fList);
357  printf("[srv] %s: dsGetSupportedGameFeaturesListFunc eRet: %d \r\n", __FUNCTION__, eRet);
358  }
359  else {
360  printf("%s: dsGetSupportedGameFeaturesListFunc = %p\n", __FUNCTION__, dsGetSupportedGameFeaturesListFunc);
361  }
362  return eRet;
363 }
364 
365 IARM_Result_t dsHdmiInMgr_init()
366 {
367  _dsHdmiInInit(NULL);
368 
369  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsHdmiInInit, _dsHdmiInInit);
370 
371  return IARM_RESULT_SUCCESS;
372 }
373 
374 IARM_Result_t dsHdmiInMgr_term()
375 {
376  _dsHdmiInTerm(NULL);
377  return IARM_RESULT_SUCCESS;
378 }
379 
380 IARM_Result_t _dsHdmiInInit(void *arg)
381 {
382  printf("%s:%d ---> m_isInitialized=%d, m_isPlatInitialized=%d \n",
383  __PRETTY_FUNCTION__,__LINE__, m_isInitialized, m_isPlatInitialized);
384 
385  IARM_BUS_Lock(lock);
386 
387 #ifdef HAS_HDMI_IN_SUPPORT
388  if (!m_isPlatInitialized)
389  {
390  /* Nexus init, if any here */
391  dsError_t eError = dsHdmiInInit();
392  }
393  m_isPlatInitialized++;
394 #endif
395 
396  if (!m_isInitialized)
397  {
398 #ifdef HAS_HDMI_IN_SUPPORT
399  dsHdmiInRegisterConnectCB(_dsHdmiInConnectCB);
400 
401  typedef dsError_t (*dsHdmiInRegisterSignalChangeCB_t)(dsHdmiInSignalChangeCB_t CBFunc);
402  static dsHdmiInRegisterSignalChangeCB_t signalChangeCBFunc = 0;
403  if (signalChangeCBFunc == 0) {
404  void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
405  if (dllib) {
406  signalChangeCBFunc = (dsHdmiInRegisterSignalChangeCB_t) dlsym(dllib, "dsHdmiInRegisterSignalChangeCB");
407  if(signalChangeCBFunc == 0) {
408  printf("dsHdmiInRegisterSignalChangeCB(dsHdmiInSignalChangeCB_t) is not defined\r\n");
409  }
410  dlclose(dllib);
411  }
412  else {
413  printf("Opening RDK_DSHAL_NAME [%s] failed\r\n", RDK_DSHAL_NAME);
414  }
415  }
416 
417  if(signalChangeCBFunc) {
418  signalChangeCBFunc(_dsHdmiInSignalChangeCB);
419  }
420 
421  typedef dsError_t (*dsHdmiInRegisterStatusChangeCB_t)(dsHdmiInStatusChangeCB_t CBFunc);
422  static dsHdmiInRegisterStatusChangeCB_t statusChangeCBFunc = 0;
423  if (statusChangeCBFunc == 0) {
424  void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
425  if (dllib) {
426  statusChangeCBFunc = (dsHdmiInRegisterStatusChangeCB_t) dlsym(dllib, "dsHdmiInRegisterStatusChangeCB");
427  if(statusChangeCBFunc == 0) {
428  printf("dsHdmiInRegisterStatusChangeCB(dsHdmiInStatusChangeCB_t) is not defined\r\n");
429  }
430  dlclose(dllib);
431  }
432  else {
433  printf("Opening RDK_DSHAL_NAME [%s] failed\r\n", RDK_DSHAL_NAME);
434  }
435  }
436 
437  if(statusChangeCBFunc) {
438  statusChangeCBFunc(_dsHdmiInStatusChangeCB);
439  }
440 
441  typedef dsError_t (*dsHdmiInRegisterVideoModeUpdateCB_t)(dsHdmiInVideoModeUpdateCB_t CBFunc);
442  static dsHdmiInRegisterVideoModeUpdateCB_t videoModeUpdateCBFunc = 0;
443  if (videoModeUpdateCBFunc == 0) {
444  void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
445  if (dllib) {
446  videoModeUpdateCBFunc = (dsHdmiInRegisterVideoModeUpdateCB_t) dlsym(dllib, "dsHdmiInRegisterVideoModeUpdateCB");
447  if(statusChangeCBFunc == 0) {
448  printf("dsHdmiInRegisterStatusChangeCB(dsHdmiInStatusChangeCB_t) is not defined\r\n");
449  }
450  dlclose(dllib);
451  }
452  else {
453  printf("Opening RDK_DSHAL_NAME [%s] failed\r\n", RDK_DSHAL_NAME);
454  }
455  }
456 
457  if(videoModeUpdateCBFunc) {
458  videoModeUpdateCBFunc(_dsHdmiInVideoModeUpdateCB);
459  }
460 
461  typedef dsError_t (*dsHdmiInRegisterAllmChangeCB_t)(dsHdmiInAllmChangeCB_t CBFunc);
462  static dsHdmiInRegisterAllmChangeCB_t allmChangeCBFunc = 0;
463  if (allmChangeCBFunc == 0) {
464  void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
465  if (dllib) {
466  allmChangeCBFunc = (dsHdmiInRegisterAllmChangeCB_t) dlsym(dllib, "dsHdmiInRegisterAllmChangeCB");
467  if(statusChangeCBFunc == 0) {
468  printf("dsHdmiInRegisterAllmChangeCB(dsHdmiInAllmChangeCB_t) is not defined\r\n");
469  }
470  dlclose(dllib);
471  }
472  else {
473  printf("Opening RDK_DSHAL_NAME [%s] failed\r\n", RDK_DSHAL_NAME);
474  }
475  }
476 
477  if(allmChangeCBFunc) {
478  allmChangeCBFunc(_dsHdmiInAllmChangeCB);
479  }
480 
481 #endif
482  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsHdmiInTerm, _dsHdmiInTerm);
483  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsHdmiInGetNumberOfInputs, _dsHdmiInGetNumberOfInputs);
484  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsHdmiInGetStatus, _dsHdmiInGetStatus);
485  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsHdmiInSelectPort, _dsHdmiInSelectPort);
486  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsHdmiInScaleVideo, _dsHdmiInScaleVideo);
487  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsHdmiInSelectZoomMode, _dsHdmiInSelectZoomMode);
488  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsHdmiInPauseAudio, _dsHdmiInPauseAudio);
489  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsHdmiInResumeAudio, _dsHdmiInResumeAudio);
490  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsHdmiInGetCurrentVideoMode, _dsHdmiInGetCurrentVideoMode);
491  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsGetEDIDBytesInfo, _dsGetEDIDBytesInfo);
492  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsGetHDMISPDInfo, _dsGetHDMISPDInfo);
493  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsSetEdidVersion, _dsSetEdidVersion);
494  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsGetEdidVersion, _dsGetEdidVersion);
495  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsGetAllmStatus, _dsGetAllmStatus);
496  IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsGetSupportedGameFeaturesList,_dsGetSupportedGameFeaturesList);
497 
498  int itr = 0;
499  bool isARCCapable = false;
500  for (itr = 0; itr < dsHDMI_IN_PORT_MAX; itr++) {
501  isARCCapable = false;
502  isHdmiARCPort (itr, &isARCCapable);
503  hdmiInCap_gs.isPortArcCapable[itr] = isARCCapable;
504  }
505 
506  std::string _EdidVersion("1");
507  try {
508  _EdidVersion = device::HostPersistence::getInstance().getProperty("HDMI0.edidversion");
509  m_edidversion[dsHDMI_IN_PORT_0] = atoi (_EdidVersion.c_str());
510  printf ("Port %s: _EdidVersion: %s , m_edidversion: %d\n", "HDMI0", _EdidVersion.c_str(), m_edidversion[0]);
511  }
512  catch(...) {
513  printf ("Port %s: Exception in Getting the HDMI0 EDID version from persistence storage..... \r\n", "HDMI0");
514  m_edidversion[dsHDMI_IN_PORT_0] = HDMI_EDID_VER_20;
515  }
516  try {
517  _EdidVersion = device::HostPersistence::getInstance().getProperty("HDMI1.edidversion");
518  m_edidversion[dsHDMI_IN_PORT_1] = atoi (_EdidVersion.c_str());
519  printf ("Port %s: _EdidVersion: %s , m_edidversion: %d\n", "HDMI1", _EdidVersion.c_str(), m_edidversion[1]);
520  }
521  catch(...) {
522  printf ("Port %s: Exception in Getting the HDMI0 EDID version from persistence storage..... \r\n", "HDMI1");
523  m_edidversion[dsHDMI_IN_PORT_1] = HDMI_EDID_VER_20;
524  }
525  try {
526  _EdidVersion = device::HostPersistence::getInstance().getProperty("HDMI2.edidversion");
527  m_edidversion[dsHDMI_IN_PORT_2] = atoi (_EdidVersion.c_str());
528  printf ("Port %s: _EdidVersion: %s , m_edidversion: %d\n", "HDMI2", _EdidVersion.c_str(), m_edidversion[2]);
529  }
530  catch(...) {
531  printf ("Port %s: Exception in Getting the HDMI0 EDID version from persistence storage..... \r\n", "HDMI2");
532  m_edidversion[dsHDMI_IN_PORT_2] = HDMI_EDID_VER_20;
533  }
534  for (itr = 0; itr < dsHDMI_IN_PORT_MAX; itr++) {
535  if (setEdidVersion (itr, m_edidversion[itr]) >= 0) {
536  printf ("Port HDMI%d: Initialized EDID Version : %d\n", itr, m_edidversion[itr]);
537  }
538  }
539  m_isInitialized = 1;
540  }
541 
542  IARM_BUS_Unlock(lock);
543 
544  return IARM_RESULT_SUCCESS;
545 }
546 
547 
548 IARM_Result_t _dsHdmiInTerm(void *arg)
549 {
550  _DEBUG_ENTER();
551 
552  IARM_BUS_Lock(lock);
553 #ifdef HAS_HDMI_IN_SUPPORT
554  if (m_isPlatInitialized)
555  {
556  m_isPlatInitialized--;
557  if (!m_isPlatInitialized)
558  {
559  dsHdmiInTerm();
560  }
561  }
562 #endif
563  IARM_BUS_Unlock(lock);
564 
565  return IARM_RESULT_SUCCESS;
566 }
567 
568 
569 IARM_Result_t _dsHdmiInGetNumberOfInputs(void *arg)
570 {
571  _DEBUG_ENTER();
572 
574 
575  IARM_BUS_Lock(lock);
576 
577 #ifdef HAS_HDMI_IN_SUPPORT
578  param->result = dsHdmiInGetNumberOfInputs(&param->numHdmiInputs);
579 #else
580  param->result = dsERR_GENERAL;
581  #endif
582  IARM_BUS_Unlock(lock);
583 
584  return IARM_RESULT_SUCCESS;
585 }
586 
587 IARM_Result_t _dsHdmiInGetStatus(void *arg)
588 {
589  _DEBUG_ENTER();
590 
592 
593  IARM_BUS_Lock(lock);
594 
595 #ifdef HAS_HDMI_IN_SUPPORT
596  param->result = dsHdmiInGetStatus(&param->status);
597 #else
598  param->result = dsERR_GENERAL;
599 #endif
600 
601  IARM_BUS_Unlock(lock);
602 
603  return IARM_RESULT_SUCCESS;
604 }
605 
606 IARM_Result_t _dsHdmiInSelectPort(void *arg)
607 {
608  _DEBUG_ENTER();
609 
611 
612  IARM_BUS_Lock(lock);
613 
614 #ifdef HAS_HDMI_IN_SUPPORT
615  param->result = dsHdmiInSelectPort(param->port);
616 #else
617  param->result = dsERR_GENERAL;
618 #endif
619 
620  IARM_BUS_Unlock(lock);
621 
622  return IARM_RESULT_SUCCESS;
623 }
624 
625 IARM_Result_t _dsHdmiInScaleVideo(void *arg)
626 {
627  _DEBUG_ENTER();
628 
629  IARM_BUS_Lock(lock);
631 
632 #ifdef HAS_HDMI_IN_SUPPORT
633  param->result = dsHdmiInScaleVideo(param->videoRect.x, param->videoRect.y, param->videoRect.width, param->videoRect.height);
634 #else
635  param->result = dsERR_GENERAL;
636 #endif
637 
638  IARM_BUS_Unlock(lock);
639 
640  return IARM_RESULT_SUCCESS;
641 }
642 
643 IARM_Result_t _dsHdmiInSelectZoomMode(void *arg)
644 {
645  _DEBUG_ENTER();
646  IARM_BUS_Lock(lock);
648 
649 #ifdef HAS_HDMI_IN_SUPPORT
650  param->result = dsHdmiInSelectZoomMode(param->zoomMode);
651 #else
652  param->result = dsERR_GENERAL;
653 #endif
654 
655  IARM_BUS_Unlock(lock);
656 
657  return IARM_RESULT_SUCCESS;
658 }
659 
660 IARM_Result_t _dsHdmiInPauseAudio(void *arg)
661 {
662  _DEBUG_ENTER();
663 
664  IARM_BUS_Lock(lock);
665  dsError_t *param = (dsError_t *)arg;
666 
667 #ifdef HAS_HDMI_IN_SUPPORT
668  *param = dsHdmiInPauseAudio();
669 #else
670  *param = dsERR_GENERAL;
671 #endif
672 
673  IARM_BUS_Unlock(lock);
674 
675  return IARM_RESULT_SUCCESS;
676 }
677 
678 IARM_Result_t _dsHdmiInResumeAudio(void *arg)
679 {
680  _DEBUG_ENTER();
681 
682  IARM_BUS_Lock(lock);
683  dsError_t *param = (dsError_t *)arg;
684 
685 #ifdef HAS_HDMI_IN_SUPPORT
686  *param = dsHdmiInResumeAudio();
687 #else
688  *param = dsERR_GENERAL;
689 #endif
690 
691  IARM_BUS_Unlock(lock);
692 
693  return IARM_RESULT_SUCCESS;
694 }
695 
696 IARM_Result_t _dsHdmiInGetCurrentVideoMode(void *arg)
697 {
698  _DEBUG_ENTER();
699 
701 
702  IARM_BUS_Lock(lock);
703 
704 #ifdef HAS_HDMI_IN_SUPPORT
705  param->result = dsHdmiInGetCurrentVideoMode(&param->resolution);
706 #else
707  param->result = dsERR_GENERAL;
708 #endif
709 
710  IARM_BUS_Unlock(lock);
711 
712  return IARM_RESULT_SUCCESS;
713 }
714 
715 void _dsHdmiInConnectCB(dsHdmiInPort_t port, bool isPortConnected)
716 {
717  IARM_Bus_DSMgr_EventData_t hdmi_in_hpd_eventData;
718  __TIMESTAMP();
719  printf("%s:%d - HDMI In hotplug update!!!!!!..Port: %d, isPort: %d\r\n",__PRETTY_FUNCTION__,__LINE__, port, isPortConnected);
720  hdmi_in_hpd_eventData.data.hdmi_in_connect.port = port;
721  hdmi_in_hpd_eventData.data.hdmi_in_connect.isPortConnected = isPortConnected;
722 
723  IARM_Bus_BroadcastEvent(IARM_BUS_DSMGR_NAME,
724  (IARM_EventId_t)IARM_BUS_DSMGR_EVENT_HDMI_IN_HOTPLUG,
725  (void *)&hdmi_in_hpd_eventData,
726  sizeof(hdmi_in_hpd_eventData));
727 
728 }
729 
730 void _dsHdmiInSignalChangeCB(dsHdmiInPort_t port, dsHdmiInSignalStatus_t sigStatus)
731 {
732  IARM_Bus_DSMgr_EventData_t hdmi_in_sigStatus_eventData;
733  __TIMESTAMP();
734  printf("%s:%d - HDMI In signal status change update!!!!!! Port: %d, Signal Status: %d\r\n", __PRETTY_FUNCTION__,__LINE__,port, sigStatus);
735  hdmi_in_sigStatus_eventData.data.hdmi_in_sig_status.port = port;
736  hdmi_in_sigStatus_eventData.data.hdmi_in_sig_status.status = sigStatus;
737 
738  IARM_Bus_BroadcastEvent(IARM_BUS_DSMGR_NAME,
740  (void *)&hdmi_in_sigStatus_eventData,
741  sizeof(hdmi_in_sigStatus_eventData));
742 
743 }
744 
745 void _dsHdmiInStatusChangeCB(dsHdmiInStatus_t inputStatus)
746 {
747  IARM_Bus_DSMgr_EventData_t hdmi_in_status_eventData;
748  __TIMESTAMP();
749  printf("%s:%d - HDMI In status change update!!!!!! Port: %d, isPresented: %d\r\n", __PRETTY_FUNCTION__,__LINE__, inputStatus.activePort, inputStatus.isPresented);
750  hdmi_in_status_eventData.data.hdmi_in_status.port = inputStatus.activePort;
751  hdmi_in_status_eventData.data.hdmi_in_status.isPresented = inputStatus.isPresented;
752 
753  IARM_Bus_BroadcastEvent(IARM_BUS_DSMGR_NAME,
754  (IARM_EventId_t)IARM_BUS_DSMGR_EVENT_HDMI_IN_STATUS,
755  (void *)&hdmi_in_status_eventData,
756  sizeof(hdmi_in_status_eventData));
757 
758 }
759 
760 void _dsHdmiInVideoModeUpdateCB(dsHdmiInPort_t port, dsVideoPortResolution_t videoResolution)
761 {
762  IARM_Bus_DSMgr_EventData_t hdmi_in_videoMode_eventData;
763  __TIMESTAMP();
764  printf("%s:%d - HDMI In video mode info update, Port: %d, Pixel Resolution: %d, Interlaced: %d, Frame Rate: %d \n", __PRETTY_FUNCTION__,__LINE__,port, videoResolution.pixelResolution, videoResolution.interlaced, videoResolution.frameRate);
765  hdmi_in_videoMode_eventData.data.hdmi_in_video_mode.port = port;
766  hdmi_in_videoMode_eventData.data.hdmi_in_video_mode.resolution.pixelResolution = videoResolution.pixelResolution;
767  hdmi_in_videoMode_eventData.data.hdmi_in_video_mode.resolution.interlaced = videoResolution.interlaced;
768  hdmi_in_videoMode_eventData.data.hdmi_in_video_mode.resolution.frameRate = videoResolution.frameRate;
769 
770 
771  IARM_Bus_BroadcastEvent(IARM_BUS_DSMGR_NAME,
773  (void *)&hdmi_in_videoMode_eventData,
774  sizeof(hdmi_in_videoMode_eventData));
775 
776 }
777 
778 void _dsHdmiInAllmChangeCB(dsHdmiInPort_t port, bool allm_mode)
779 {
780  IARM_Bus_DSMgr_EventData_t hdmi_in_allmMode_eventData;
781  __TIMESTAMP();
782  printf("%s:%d - HDMI In ALLM Mode update!!!!!! Port: %d, ALLM Mode: %d\r\n", __FUNCTION__,__LINE__,port, allm_mode);
783  hdmi_in_allmMode_eventData.data.hdmi_in_allm_mode.port = port;
784  hdmi_in_allmMode_eventData.data.hdmi_in_allm_mode.allm_mode = allm_mode;
785 
786  IARM_Bus_BroadcastEvent(IARM_BUS_DSMGR_NAME,
788  (void *)&hdmi_in_allmMode_eventData,
789  sizeof(hdmi_in_allmMode_eventData));
790 
791 }
792 
793 IARM_Result_t _dsGetEDIDBytesInfo (void *arg)
794 {
795  errno_t rc = -1;
796  dsError_t eRet = dsERR_GENERAL;
797 
799  memset (param->edid, '\0', MAX_EDID_BYTES_LEN);
800  unsigned char *edidArg = NULL;
801  IARM_BUS_Lock(lock);
802  eRet = getEDIDBytesInfo (param->iHdmiPort, (unsigned char **)(&edidArg), &(param->length));
803  param->result = eRet;
804  printf("[srv] %s: getEDIDBytesInfo eRet: %d\r\n", __FUNCTION__, param->result);
805  if (edidArg != NULL) {
806  rc = memcpy_s(param->edid,sizeof(param->edid), edidArg, param->length);
807  if(rc!=EOK)
808  {
809  ERR_CHK(rc);
810  }
811  }
812  IARM_BUS_Unlock(lock);
813  return IARM_RESULT_SUCCESS;
814 }
815 
816 IARM_Result_t _dsGetHDMISPDInfo(void *arg)
817 {
818  errno_t rc = -1;
819  _DEBUG_ENTER();
820  printf("%s:%d [srv] _dsGetHDMISPDInfo \n", __PRETTY_FUNCTION__,__LINE__);
821 
823 
824  IARM_BUS_Lock(lock);
825 
826  memset (param->spdInfo, '\0', sizeof(struct dsSpd_infoframe_st));
827  unsigned char *spdArg = NULL;
828  param->result = getHDMISPDInfo(param->iHdmiPort, (unsigned char **)(&spdArg));
829  printf("[srv] %s: dsGetHDMISPDInfo eRet: %d\r\n", __FUNCTION__, param->result);
830  if (spdArg != NULL) {
831  rc = memcpy_s(param->spdInfo,sizeof(param->spdInfo), spdArg, sizeof(struct dsSpd_infoframe_st));
832  if(rc!=EOK)
833  {
834  ERR_CHK(rc);
835  }
836  }
837 
838  IARM_BUS_Unlock(lock);
839 
840  return IARM_RESULT_SUCCESS;
841 }
842 
843 IARM_Result_t _dsSetEdidVersion (void *arg)
844 {
845  _DEBUG_ENTER();
846 
848  IARM_BUS_Lock(lock);
849  param->result = setEdidVersion (param->iHdmiPort, param->iEdidVersion);
850  printf("[srv] %s: dsSetEdidVersion Port: %d EDID: %d eRet: %d\r\n", __FUNCTION__, param->iHdmiPort, param->iEdidVersion, param->result);
851  IARM_BUS_Unlock(lock);
852  return IARM_RESULT_SUCCESS;
853 }
854 
855 IARM_Result_t _dsGetEdidVersion (void *arg)
856 {
857  int edidVer = -1;
858  _DEBUG_ENTER();
859 
861  IARM_BUS_Lock(lock);
862  param->result = getEdidVersion (param->iHdmiPort, &edidVer);
863  param->iEdidVersion = edidVer;
864  printf("[srv] %s: dsGetEdidVersion edidVer: %d\r\n", __FUNCTION__, param->iEdidVersion);
865  IARM_BUS_Unlock(lock);
866  return IARM_RESULT_SUCCESS;
867 }
868 
869 IARM_Result_t _dsGetAllmStatus (void *arg)
870 {
871  bool allmStatus = false;
872  _DEBUG_ENTER();
873 
874  dsAllmStatusParam_t *param = (dsAllmStatusParam_t *) arg;
875  IARM_BUS_Lock(lock);
876  param->result = getAllmStatus (param->iHdmiPort, &allmStatus);
877  param->allmStatus = allmStatus;
878  printf("[srv] %s: dsGetAllmStatus allmStatus: %d\r\n", __FUNCTION__, param->allmStatus);
879  IARM_BUS_Unlock(lock);
880  return IARM_RESULT_SUCCESS;
881 }
882 
883 IARM_Result_t _dsGetSupportedGameFeaturesList (void *arg)
884 {
886  _DEBUG_ENTER();
887 
889  IARM_BUS_Lock(lock);
890  param->result = getSupportedGameFeaturesList (&fList);
891  param->featureList.gameFeatureCount = fList.gameFeatureCount;
892  strncpy(param->featureList.gameFeatureList,fList.gameFeatureList,MAX_PROFILE_LIST_BUFFER_LEN);
893 
894  printf("%s: Total number of supported game features: %d\n",__FUNCTION__, fList.gameFeatureCount);
895  printf("%s: Supported Game Features List: %s\n",__FUNCTION__, fList.gameFeatureList);
896 
897  IARM_BUS_Unlock(lock);
898  return IARM_RESULT_SUCCESS;
899 }
900 
901 /** @} */
902 /** @} */
_dsSupportedGameFeatureListParam_t
Definition: dsRpc.h:985
dsSpd_infoframe_st
Definition: dsTypes.h:1117
IARM_BUS_DSMGR_EVENT_HDMI_IN_HOTPLUG
@ IARM_BUS_DSMGR_EVENT_HDMI_IN_HOTPLUG
Definition: dsMgr.h:54
dsHdmiInSelectZoomMode
dsError_t dsHdmiInSelectZoomMode(dsVideoZoom_t requestedZoomMode)
Select the HDMI Input zoom mode.
Definition: dsHdmiIn.c:202
dsHdmiInAllmChangeCB_t
void(* dsHdmiInAllmChangeCB_t)(dsHdmiInPort_t port, bool allm_mode)
Callback function used to notify applications of HDMI Input ALLM Mode.
Definition: dsHdmiIn.h:281
_dsGetHDMISPDInfoParam_t
Definition: dsRpc.h:947
_dsSupportedGameFeatureList_t
Definition: dsTypes.h:1141
dsTypes.h
Device Settings HAL types.
_dsHdmiInStatus_t::activePort
dsHdmiInPort_t activePort
Definition: dsTypes.h:1033
_dsAllmStatusParam_t
Definition: dsRpc.h:978
dsHdmiInScaleVideo
dsError_t dsHdmiInScaleVideo(int32_t x, int32_t y, int32_t width, int32_t height)
Scale the HDMI In video This function is used to scale the HDMI In video.
Definition: dsHdmiIn.c:176
IARM_BUS_DSMGR_EVENT_HDMI_IN_VIDEO_MODE_UPDATE
@ IARM_BUS_DSMGR_EVENT_HDMI_IN_VIDEO_MODE_UPDATE
Definition: dsMgr.h:57
dsHdmiInVideoModeUpdateCB_t
void(* dsHdmiInVideoModeUpdateCB_t)(dsHdmiInPort_t port, dsVideoPortResolution_t videoResolution)
Callback function used to notify applications of HDMI In video mode changes.
Definition: dsHdmiIn.h:267
_dsHdmiInSelectPortParam_t
Definition: dsRpc.h:724
_dsVideoPortResolution_t::pixelResolution
dsVideoResolution_t pixelResolution
Definition: dsTypes.h:644
device::HostPersistence::persistHostProperty
void persistHostProperty(const std::string &key, const std::string &value)
Definition: hostPersistence.cpp:273
IARM_Bus_RegisterCall
IARM_Result_t IARM_Bus_RegisterCall(const char *methodName, IARM_BusCall_t handler)
This API is used to register an RPC method that can be invoked by other applications.
dsHdmiInStatusChangeCB_t
void(* dsHdmiInStatusChangeCB_t)(dsHdmiInStatus_t inputStatus)
Callback function used to notify applications of HDMI Input status.
Definition: dsHdmiIn.h:253
_dsEdidVersionParam_t
Definition: dsRpc.h:966
_dsHdmiInStatus_t::isPresented
bool isPresented
Definition: dsTypes.h:1031
dsERR_GENERAL
@ dsERR_GENERAL
Definition: dsError.h:86
_dsHdmiInGetResolutionParam_t
Definition: dsRpc.h:742
dsERR_NONE
@ dsERR_NONE
Definition: dsError.h:85
IARM_Bus_BroadcastEvent
IARM_Result_t IARM_Bus_BroadcastEvent(const char *ownerName, IARM_EventId_t eventId, void *data, size_t len)
This API is used to publish an Asynchronous event to all IARM client registered for this perticular e...
dsHdmiInPauseAudio
dsError_t dsHdmiInPauseAudio()
Stop the output of HDMI Input audio.
Definition: dsHdmiIn.c:225
libIBus.h
RDK IARM-Bus API Declarations.
_dsHdmiInGetStatusParam_t
Definition: dsRpc.h:718
dsHdmiInGetStatus
dsError_t dsHdmiInGetStatus(dsHdmiInStatus_t *pStatus)
Get the HDMI Inpuut Status.
Definition: dsHdmiIn.c:125
dsHdmiInRegisterConnectCB
dsError_t dsHdmiInRegisterConnectCB(dsHdmiInConnectCB_t CBFunc)
Register for the HDMI Input hot plug event.
_dsHdmiInCap_t::isPortArcCapable
bool isPortArcCapable[dsHDMI_IN_PORT_MAX]
Definition: dsTypes.h:1039
_dsHdmiInStatus_t
Definition: dsTypes.h:1029
dsHdmiInSignalChangeCB_t
void(* dsHdmiInSignalChangeCB_t)(dsHdmiInPort_t port, dsHdmiInSignalStatus_t sigStatus)
Callback function used to notify applications of HDMI In signal change status.
Definition: dsHdmiIn.h:240
dsHdmiIn.h
Device Settings HAL HDMI Input Public API. This API defines the HAL for the Device Settings HDMI Inpu...
dsHdmiInGetCurrentVideoMode
dsError_t dsHdmiInGetCurrentVideoMode(dsVideoPortResolution_t *resolution)
Get the current HDMI Input video mode.
Definition: dsHdmiIn.c:269
_dsGetEDIDBytesInfoParam_t
Definition: dsRpc.h:939
_dsVideoPortResolution_t
Structure that defines video port resolution settings of output video device.
Definition: dsTypes.h:642
_dsHdmiInScaleVideoParam_t
Definition: dsRpc.h:730
IARM_BUS_DSMGR_EVENT_HDMI_IN_STATUS
@ IARM_BUS_DSMGR_EVENT_HDMI_IN_STATUS
Definition: dsMgr.h:56
_dsHdmiInSelectZoomModeParam_t
Definition: dsRpc.h:736
IARM_BUS_DSMGR_EVENT_HDMI_IN_ALLM_STATUS
@ IARM_BUS_DSMGR_EVENT_HDMI_IN_ALLM_STATUS
Definition: dsMgr.h:58
_dsHdmiInGetNumberOfInputsParam_t
Definition: dsRpc.h:712
_dsHdmiInCap_t
Definition: dsTypes.h:1037
IARM_BUS_DSMGR_EVENT_HDMI_IN_SIGNAL_STATUS
@ IARM_BUS_DSMGR_EVENT_HDMI_IN_SIGNAL_STATUS
Definition: dsMgr.h:55
_dsVideoPortResolution_t::frameRate
dsVideoFrameRate_t frameRate
Definition: dsTypes.h:647
MAX_PROFILE_LIST_BUFFER_LEN
#define MAX_PROFILE_LIST_BUFFER_LEN
Structure that captures MS12 Audio Profile list.
Definition: dsTypes.h:333
device::HostPersistence::getInstance
static HostPersistence & getInstance(void)
Definition: hostPersistence.cpp:122
dsError_t
dsError_t
Device Settings API Error return codes.
Definition: dsError.h:84
dsHdmiInResumeAudio
dsError_t dsHdmiInResumeAudio()
Start the output of HDMI Input audio.
Definition: dsHdmiIn.c:247
dsHdmiInInit
dsError_t dsHdmiInInit(void)
Initialize the underlying HDMI Input sub-system.
Definition: dsHdmiIn.c:58
dsHdmiInTerm
dsError_t dsHdmiInTerm(void)
Terminate the underlying HDMI Input sub-system.
Definition: dsHdmiIn.c:78
_DSMgr_EventData_t
Definition: dsMgr.h:81
dsHdmiInGetNumberOfInputs
dsError_t dsHdmiInGetNumberOfInputs(uint8_t *pNumHdmiInputs)
Get the number of HDMI Input ports on the set-top.
Definition: dsHdmiIn.c:99
dsHdmiInSelectPort
dsError_t dsHdmiInSelectPort(dsHdmiInPort_t ePort)
Select the HDMI Input port to be presented.
Definition: dsHdmiIn.c:152
_dsVideoPortResolution_t::interlaced
bool interlaced
Definition: dsTypes.h:648