+bool CUSBCECAdapterCommunication::GetConfiguration(libcec_configuration *configuration)
+{
+ configuration->iFirmwareVersion = m_iFirmwareVersion;
+ if (m_iFirmwareVersion < 2)
+ return false;
+
+ bool bReturn(true);
+ cec_device_type type;
+ if (GetSettingDeviceType(type))
+ {
+ CLibCEC::AddLog(CEC_LOG_DEBUG, "using persisted device type setting %s", m_processor->ToString(type));
+ configuration->deviceTypes.Clear();
+ configuration->deviceTypes.Add(type);
+ }
+ else
+ {
+ CLibCEC::AddLog(CEC_LOG_DEBUG, "no persisted device type setting");
+ bReturn = false;
+ }
+
+ if (GetSettingPhysicalAddress(configuration->iPhysicalAddress))
+ {
+ CLibCEC::AddLog(CEC_LOG_DEBUG, "using persisted physical address setting %4x", configuration->iPhysicalAddress);
+ }
+ else
+ {
+ CLibCEC::AddLog(CEC_LOG_DEBUG, "no persisted physical address setting");
+ bReturn = false;
+ }
+
+ CStdString strDeviceName;
+ if (GetSettingOSDName(strDeviceName))
+ {
+ snprintf(configuration->strDeviceName, 13, "%s", strDeviceName.c_str());
+ CLibCEC::AddLog(CEC_LOG_DEBUG, "using persisted device name setting %s", configuration->strDeviceName);
+ }
+ else
+ {
+ CLibCEC::AddLog(CEC_LOG_DEBUG, "no persisted device name setting");
+ bReturn = false;
+ }
+
+ // don't read the following settings:
+ // - auto enabled (always enabled)
+ // - default logical address (autodetected)
+ // - logical address mask (autodetected)
+ // - CEC version (1.3a)
+
+ // TODO to be added to the firmware:
+ // - base device (4 bits)
+ // - HDMI port number (4 bits)
+ // - TV vendor id (12 bits)
+ // - wake devices (8 bits)
+ // - standby devices (8 bits)
+ // - use TV menu language (1 bit)
+ // - activate source (1 bit)
+ // - power off screensaver (1 bit)
+ // - power off on standby (1 bit)
+ // - send inactive source (1 bit)
+ return bReturn;
+}
+