61 #include <sys/types.h>
68 #include "dsserverlogger.h"
75 #include "safec_lib.h"
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)
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];
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);
109 void _dsHdmiInConnectCB(dsHdmiInPort_t port,
bool isPortConnected);
110 void _dsHdmiInSignalChangeCB(dsHdmiInPort_t port, dsHdmiInSignalStatus_t sigStatus);
113 void _dsHdmiInAllmChangeCB(dsHdmiInPort_t port,
bool allm_mode);
118 #include "hostPersistence.hpp"
125 static dsError_t isHdmiARCPort (
int iPort,
bool* isArcEnabled) {
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);
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());
139 printf(
"%s:%d dsIsHdmiARCPort dsIsHdmiARCPortFunc loaded\r\n", __FUNCTION__,__LINE__);
144 printf(
"%s:%d dsIsHdmiARCPort Opening RDK_DSHAL_NAME[%s] failed %s\r\n",
145 __FUNCTION__,__LINE__, RDK_DSHAL_NAME, dlerror());
149 if (0 != dsIsHdmiARCPortFunc) {
150 *isArcEnabled = dsIsHdmiARCPortFunc (iPort);
151 printf(
"%s: dsIsHdmiARCPort port %d isArcEnabled:%d\r\n", __FUNCTION__, iPort, *isArcEnabled);
154 printf(
"%s: dsIsHdmiARCPort dsIsHdmiARCPortFunc = %p\n", dsIsHdmiARCPortFunc);
159 static dsError_t getEDIDBytesInfo (
int iHdmiPort,
unsigned char **edid,
int *length) {
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);
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());
172 printf(
"%s:%d dsGetEDIDBytesInfoFunc loaded\r\n", __FUNCTION__,__LINE__);
177 printf(
"%s:%d dsGetEDIDBytesInfo Opening RDK_DSHAL_NAME [%] failed %s\r\n",
178 __FUNCTION__,__LINE__, RDK_DSHAL_NAME, dlerror());
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);
189 static dsError_t getHDMISPDInfo (
int iHdmiPort,
unsigned char **spd) {
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);
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());
202 printf(
"%s:%d dsGetHDMISPDInfoFunc loaded\r\n", __FUNCTION__,__LINE__);
207 printf(
"%s:%d dsGetHDMISPDInfo Opening RDK_DSHAL_NAME [%s] failed %s\r\n",
208 __FUNCTION__,__LINE__, RDK_DSHAL_NAME, dlerror());
212 if (0 != dsGetHDMISPDInfoFunc) {
213 eRet = dsGetHDMISPDInfoFunc (iHdmiPort, spd);
214 printf(
"[srv] %s: dsGetHDMISPDInfoFunc eRet: %d \r\n", __FUNCTION__,eRet);
217 printf(
"%s: dsGetHDMISPDInfoFunc = %p\n", __FUNCTION__, dsGetHDMISPDInfoFunc);
222 static dsError_t setEdidVersion (
int iHdmiPort,
int iEdidVersion) {
224 typedef dsError_t (*dsSetEdidVersion_t)(
int iHdmiPort,
int iEdidVersion);
225 static dsSetEdidVersion_t dsSetEdidVersionFunc = 0;
227 sprintf(edidVer,
"%d\0",iEdidVersion);
229 if (dsSetEdidVersionFunc == 0) {
230 void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
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());
237 printf(
"%s:%d dsSetEdidVersionFunc loaded\r\n", __FUNCTION__, __LINE__);
242 printf(
"%s:%d dsSetEdidVersion Opening RDK_DSHAL_NAME [%] failed %s\r\n",
243 __FUNCTION__, __LINE__, RDK_DSHAL_NAME, dlerror());
246 if (0 != dsSetEdidVersionFunc) {
247 eRet = dsSetEdidVersionFunc (iHdmiPort, iEdidVersion);
250 case dsHDMI_IN_PORT_0:
252 printf (
"Port %s: Persist EDID Version: %d\n",
"HDMI0", iEdidVersion);
254 case dsHDMI_IN_PORT_1:
256 printf (
"Port %s: Persist EDID Version: %d\n",
"HDMI1", iEdidVersion);
258 case dsHDMI_IN_PORT_2:
260 printf (
"Port %s: Persist EDID Version: %d\n",
"HDMI2", iEdidVersion);
264 printf(
"[srv] %s: dsSetEdidVersionFunc eRet: %d \r\n", __FUNCTION__, eRet);
267 printf(
"%s: dsSetEdidVersionFunc = %p\n", __FUNCTION__, dsSetEdidVersionFunc);
272 static dsError_t getEdidVersion (
int iHdmiPort,
int *iEdidVersion) {
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);
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());
284 printf(
"%s:%d dsGetEdidVersionFunc loaded\r\n", __FUNCTION__, __LINE__);
289 printf(
"%s:%d dsGetEdidVersion Opening RDK_DSHAL_NAME [%] failed %s\r\n",
290 __FUNCTION__, __LINE__, RDK_DSHAL_NAME, dlerror());
293 if (0 != dsGetEdidVersionFunc) {
294 eRet = dsGetEdidVersionFunc (iHdmiPort, iEdidVersion);
295 printf(
"[srv] %s: dsGetEdidVersionFunc eRet: %d \r\n", __FUNCTION__, eRet);
298 printf(
"%s: dsGetEdidVersionFunc = %p\n", __FUNCTION__, dsGetEdidVersionFunc);
303 static dsError_t getAllmStatus (
int iHdmiPort,
bool *allmStatus) {
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);
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());
315 printf(
"%s:%d dsGetAllmStatusFunc loaded\r\n", __FUNCTION__, __LINE__);
320 printf(
"%s:%d dsGetAllmStatus Opening RDK_DSHAL_NAME [%] failed %s\r\n",
321 __FUNCTION__, __LINE__, RDK_DSHAL_NAME, dlerror());
324 if (0 != dsGetAllmStatusFunc) {
325 eRet = dsGetAllmStatusFunc (iHdmiPort, allmStatus);
326 printf(
"[srv] %s: dsGetAllmStatusFunc eRet: %d \r\n", __FUNCTION__, eRet);
329 printf(
"%s: dsGetAllmStatusFunc = %p\n", __FUNCTION__, dsGetAllmStatusFunc);
337 static dsGetSupportedGameFeaturesList_t dsGetSupportedGameFeaturesListFunc = 0;
338 if (dsGetSupportedGameFeaturesListFunc == 0) {
339 void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
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());
346 printf(
"%s:%d dsGetSupportedGameFeaturesList loaded\r\n", __FUNCTION__, __LINE__);
351 printf(
"%s:%d dsGetSupportedGameFeaturesList Opening RDK_DSHAL_NAME [%] failed %s\r\n",
352 __FUNCTION__, __LINE__, RDK_DSHAL_NAME, dlerror());
355 if (0 != dsGetSupportedGameFeaturesListFunc) {
356 eRet = dsGetSupportedGameFeaturesListFunc (fList);
357 printf(
"[srv] %s: dsGetSupportedGameFeaturesListFunc eRet: %d \r\n", __FUNCTION__, eRet);
360 printf(
"%s: dsGetSupportedGameFeaturesListFunc = %p\n", __FUNCTION__, dsGetSupportedGameFeaturesListFunc);
365 IARM_Result_t dsHdmiInMgr_init()
371 return IARM_RESULT_SUCCESS;
374 IARM_Result_t dsHdmiInMgr_term()
377 return IARM_RESULT_SUCCESS;
380 IARM_Result_t _dsHdmiInInit(
void *arg)
382 printf(
"%s:%d ---> m_isInitialized=%d, m_isPlatInitialized=%d \n",
383 __PRETTY_FUNCTION__,__LINE__, m_isInitialized, m_isPlatInitialized);
387 #ifdef HAS_HDMI_IN_SUPPORT
388 if (!m_isPlatInitialized)
393 m_isPlatInitialized++;
396 if (!m_isInitialized)
398 #ifdef HAS_HDMI_IN_SUPPORT
402 static dsHdmiInRegisterSignalChangeCB_t signalChangeCBFunc = 0;
403 if (signalChangeCBFunc == 0) {
404 void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
406 signalChangeCBFunc = (dsHdmiInRegisterSignalChangeCB_t) dlsym(dllib,
"dsHdmiInRegisterSignalChangeCB");
407 if(signalChangeCBFunc == 0) {
408 printf(
"dsHdmiInRegisterSignalChangeCB(dsHdmiInSignalChangeCB_t) is not defined\r\n");
413 printf(
"Opening RDK_DSHAL_NAME [%s] failed\r\n", RDK_DSHAL_NAME);
417 if(signalChangeCBFunc) {
418 signalChangeCBFunc(_dsHdmiInSignalChangeCB);
422 static dsHdmiInRegisterStatusChangeCB_t statusChangeCBFunc = 0;
423 if (statusChangeCBFunc == 0) {
424 void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
426 statusChangeCBFunc = (dsHdmiInRegisterStatusChangeCB_t) dlsym(dllib,
"dsHdmiInRegisterStatusChangeCB");
427 if(statusChangeCBFunc == 0) {
428 printf(
"dsHdmiInRegisterStatusChangeCB(dsHdmiInStatusChangeCB_t) is not defined\r\n");
433 printf(
"Opening RDK_DSHAL_NAME [%s] failed\r\n", RDK_DSHAL_NAME);
437 if(statusChangeCBFunc) {
438 statusChangeCBFunc(_dsHdmiInStatusChangeCB);
442 static dsHdmiInRegisterVideoModeUpdateCB_t videoModeUpdateCBFunc = 0;
443 if (videoModeUpdateCBFunc == 0) {
444 void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
446 videoModeUpdateCBFunc = (dsHdmiInRegisterVideoModeUpdateCB_t) dlsym(dllib,
"dsHdmiInRegisterVideoModeUpdateCB");
447 if(statusChangeCBFunc == 0) {
448 printf(
"dsHdmiInRegisterStatusChangeCB(dsHdmiInStatusChangeCB_t) is not defined\r\n");
453 printf(
"Opening RDK_DSHAL_NAME [%s] failed\r\n", RDK_DSHAL_NAME);
457 if(videoModeUpdateCBFunc) {
458 videoModeUpdateCBFunc(_dsHdmiInVideoModeUpdateCB);
462 static dsHdmiInRegisterAllmChangeCB_t allmChangeCBFunc = 0;
463 if (allmChangeCBFunc == 0) {
464 void *dllib = dlopen(RDK_DSHAL_NAME, RTLD_LAZY);
466 allmChangeCBFunc = (dsHdmiInRegisterAllmChangeCB_t) dlsym(dllib,
"dsHdmiInRegisterAllmChangeCB");
467 if(statusChangeCBFunc == 0) {
468 printf(
"dsHdmiInRegisterAllmChangeCB(dsHdmiInAllmChangeCB_t) is not defined\r\n");
473 printf(
"Opening RDK_DSHAL_NAME [%s] failed\r\n", RDK_DSHAL_NAME);
477 if(allmChangeCBFunc) {
478 allmChangeCBFunc(_dsHdmiInAllmChangeCB);
496 IARM_Bus_RegisterCall(IARM_BUS_DSMGR_API_dsGetSupportedGameFeaturesList,_dsGetSupportedGameFeaturesList);
499 bool isARCCapable =
false;
500 for (itr = 0; itr < dsHDMI_IN_PORT_MAX; itr++) {
501 isARCCapable =
false;
502 isHdmiARCPort (itr, &isARCCapable);
506 std::string _EdidVersion(
"1");
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]);
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;
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]);
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;
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]);
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;
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]);
542 IARM_BUS_Unlock(lock);
544 return IARM_RESULT_SUCCESS;
548 IARM_Result_t _dsHdmiInTerm(
void *arg)
553 #ifdef HAS_HDMI_IN_SUPPORT
554 if (m_isPlatInitialized)
556 m_isPlatInitialized--;
557 if (!m_isPlatInitialized)
563 IARM_BUS_Unlock(lock);
565 return IARM_RESULT_SUCCESS;
569 IARM_Result_t _dsHdmiInGetNumberOfInputs(
void *arg)
577 #ifdef HAS_HDMI_IN_SUPPORT
582 IARM_BUS_Unlock(lock);
584 return IARM_RESULT_SUCCESS;
587 IARM_Result_t _dsHdmiInGetStatus(
void *arg)
595 #ifdef HAS_HDMI_IN_SUPPORT
601 IARM_BUS_Unlock(lock);
603 return IARM_RESULT_SUCCESS;
606 IARM_Result_t _dsHdmiInSelectPort(
void *arg)
614 #ifdef HAS_HDMI_IN_SUPPORT
620 IARM_BUS_Unlock(lock);
622 return IARM_RESULT_SUCCESS;
625 IARM_Result_t _dsHdmiInScaleVideo(
void *arg)
632 #ifdef HAS_HDMI_IN_SUPPORT
633 param->result =
dsHdmiInScaleVideo(param->videoRect.x, param->videoRect.y, param->videoRect.width, param->videoRect.height);
638 IARM_BUS_Unlock(lock);
640 return IARM_RESULT_SUCCESS;
643 IARM_Result_t _dsHdmiInSelectZoomMode(
void *arg)
649 #ifdef HAS_HDMI_IN_SUPPORT
655 IARM_BUS_Unlock(lock);
657 return IARM_RESULT_SUCCESS;
660 IARM_Result_t _dsHdmiInPauseAudio(
void *arg)
667 #ifdef HAS_HDMI_IN_SUPPORT
673 IARM_BUS_Unlock(lock);
675 return IARM_RESULT_SUCCESS;
678 IARM_Result_t _dsHdmiInResumeAudio(
void *arg)
685 #ifdef HAS_HDMI_IN_SUPPORT
691 IARM_BUS_Unlock(lock);
693 return IARM_RESULT_SUCCESS;
696 IARM_Result_t _dsHdmiInGetCurrentVideoMode(
void *arg)
704 #ifdef HAS_HDMI_IN_SUPPORT
710 IARM_BUS_Unlock(lock);
712 return IARM_RESULT_SUCCESS;
715 void _dsHdmiInConnectCB(dsHdmiInPort_t port,
bool isPortConnected)
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;
725 (
void *)&hdmi_in_hpd_eventData,
726 sizeof(hdmi_in_hpd_eventData));
730 void _dsHdmiInSignalChangeCB(dsHdmiInPort_t port, dsHdmiInSignalStatus_t sigStatus)
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;
740 (
void *)&hdmi_in_sigStatus_eventData,
741 sizeof(hdmi_in_sigStatus_eventData));
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;
755 (
void *)&hdmi_in_status_eventData,
756 sizeof(hdmi_in_status_eventData));
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;
773 (
void *)&hdmi_in_videoMode_eventData,
774 sizeof(hdmi_in_videoMode_eventData));
778 void _dsHdmiInAllmChangeCB(dsHdmiInPort_t port,
bool allm_mode)
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;
788 (
void *)&hdmi_in_allmMode_eventData,
789 sizeof(hdmi_in_allmMode_eventData));
793 IARM_Result_t _dsGetEDIDBytesInfo (
void *arg)
799 memset (param->edid,
'\0', MAX_EDID_BYTES_LEN);
800 unsigned char *edidArg = NULL;
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);
812 IARM_BUS_Unlock(lock);
813 return IARM_RESULT_SUCCESS;
816 IARM_Result_t _dsGetHDMISPDInfo(
void *arg)
820 printf(
"%s:%d [srv] _dsGetHDMISPDInfo \n", __PRETTY_FUNCTION__,__LINE__);
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));
838 IARM_BUS_Unlock(lock);
840 return IARM_RESULT_SUCCESS;
843 IARM_Result_t _dsSetEdidVersion (
void *arg)
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;
855 IARM_Result_t _dsGetEdidVersion (
void *arg)
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;
869 IARM_Result_t _dsGetAllmStatus (
void *arg)
871 bool allmStatus =
false;
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;
883 IARM_Result_t _dsGetSupportedGameFeaturesList (
void *arg)
890 param->result = getSupportedGameFeaturesList (&fList);
891 param->featureList.gameFeatureCount = fList.gameFeatureCount;
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);
897 IARM_BUS_Unlock(lock);
898 return IARM_RESULT_SUCCESS;