<string id="36012">Could not detect the CEC adapter.</string>
<string id="36013">Unsupported libcec interface version. %d is greater than the version XBMC supports (%d)</string>
<string id="36014">Put this PC in standby mode when the TV is switched off</string>
+ <string id="36015">HDMI port number</string>
</strings>
<peripheral vendor="2548" product="1001" bus="usb" name="Pulse-Eight CEC Adaptor" mapTo="cec">
<setting key="enabled" type="bool" value="1" label="305" />
<setting key="port" type="string" value="" label="792" />
+ <setting key="cec_hdmi_port" type="int" value="1" min="1" max="16" label="36015" />
<setting key="cec_power_on_startup" type="bool" value="1" label="36007" />
<setting key="cec_power_off_shutdown" type="bool" value="1" label="36008" />
<setting key="cec_standby_screensaver" type="bool" value="1" label="36009" />
}
}
+ // set the correct physical address
+ int iHdmiPort = GetSettingInt("cec_hdmi_port");
+ if (iHdmiPort <= 0 || iHdmiPort > 16)
+ iHdmiPort = 1;
+ m_cecAdapter->SetPhysicalAddress(iHdmiPort << 12);
+
// open the CEC adapter
CLog::Log(LOGDEBUG, "%s - opening a connection to the CEC adapter: %s", __FUNCTION__, strPort.c_str());
return bReturn;
}
+bool CPeripheralCecAdapter::SetHdmiPort(int iHdmiPort)
+{
+ bool bReturn(false);
+ if (m_cecAdapter && m_bIsReady)
+ {
+ if (iHdmiPort <= 0 || iHdmiPort > 16)
+ iHdmiPort = 1;
+ CLog::Log(LOGDEBUG, "%s - changing active HDMI port to %d", __FUNCTION__, iHdmiPort);
+ bReturn = m_cecAdapter->SetPhysicalAddress(iHdmiPort << 12);
+ }
+
+ return bReturn;
+}
+
void CPeripheralCecAdapter::ProcessNextCommand(void)
{
cec_command command;
else if (bEnabled && !m_cecAdapter && m_bStarted)
InitialiseFeature(FEATURE_CEC);
}
+ else if (strChangedSetting.Equals("cec_hdmi_port"))
+ {
+ SetHdmiPort(GetSettingInt("cec_hdmi_port"));
+ }
}
void CPeripheralCecAdapter::FlushLog(void)