Hi Michael,
the function ADL_Workstation_AdapterNumOfGLSyncConnectors_Get(index, &count) actually returns the number of connectors between the GPU and the S400 board. Current GPUs have only 1 connector that is why this function always returns 1.
To get the state of a port you should use the constants: ADL_GLSYNC_PORT_BNC, ADL_GLSYNC_PORT_RJ45PORT1 or ADL_GLSYNC_PORT_RJ45PORT2
your call would look like:
ADL_Workstation_GLSyncPortState_Get(uiAdapterId, 0, ADL_GLSYNC_PORT_RJ45PORT1, 0, &m_adlGLSyncPortInfo, &pLEDs)
As uiAdapterId you can take any AdapterId from the GPU connected to the S400.
To genlock both displays on a gpu, you first need to enumerate all adapters and display. Then you will have for each display an AdapterId and a DisplayId (ADLDisplayInfo.displayID.iDisplayLogicalIndex) using those you can apply the following commands to genlock the display.
For the TimingServer you need first to configure the BNC as signal source (of course only if you use a house sync):
ADLGLSyncGenlockConfig adlGlSyncGenlockConfig;
memset(&adlGlSyncGenlockConfig, 0, sizeof(ADLGLSyncGenlockConfig));
adlGlSyncGenlockConfig.iSignalSource =ADL_GLSYNC_SIGNALSOURCE_BNCPORT;
ADL_Workstation_GLSyncGenlockConfiguration_Set(AdapterId, 0, adlGlSyncGenlockConfig)
Then you configure one display as TimingServer:
ADLGLSyncMode mode;
mode.iControlVector = ADL_GLSYNC_MODECNTL_TIMINGSERVER;
ADL_Workstation_DisplayGLSyncMode_Set(AdapterId, DisplayId, mode);
For the TiminClient:
ADLGLSyncMode mode;
mode.iControlVector = ADL_GLSYNC_MODECNTL_GENLOCK;
ADL_Workstation_DisplayGLSyncMode_Set(AdapterId, DisplayId, mode);
Before applying the mode it might be a good idea to check if genlock is allowed by calling:
ADL_Workstation_DisplayGLSyncMode_Get(AdapterId, DisplayId, &mode)
if (mode & ADL_GLSYNC_MODECNTL_STATUS_GENLOCK_ALLOWED)
.. Apply genlock
If you have multiple monitors connected to one GPU the monitors need to be identical in order to get genlocked. If they are not you can genlock one bit then the other monitor is no longer allowed to be genlocked. Monitors that are connected to different GPUs do not need to be identical.