diff -Nru libcec-2.1.0/ChangeLog libcec-2.1.1/ChangeLog --- libcec-2.1.0/ChangeLog 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/ChangeLog 2013-03-09 20:14:55.000000000 +0000 @@ -1,4 +1,30 @@ -libcec (2.1.0-1) unstable; urgency=low +libcec (2.1.1-1) unstable; urgency=low + + * changed / added: + * send an alert when the TV does not respond to polls + * fixed: + * LG didn't switch sources after the TV powered up + * always poll a device when the status is unknown, and don't try to + determine whether it needs to be polled by checking the status of other + devices + * don't mark a device as inactive when receiving a routing change message, + only when another device was made acive. fixes the issue that rc + passthrough doesn't work when a tv sends a quick routing change to + another port before requesting the active source when coming out of + standby + * LibCecSharp: fixed 14 char long OSD name (wasn't \0 terminated) + * LibCecSharp: fixed return value of GetActiveDevices(). issue #131 + * cec-tray: fixed index out of range exception in CECSettingNumeric.cs. + bugzid: 2082 + * cec-tray: ensure that the tray app only initialises once. bugzid: 2082 + * rpi: don't set the physical address to 1.0.0.0 when receiving + VC_HDMI_UNPLUGGED. it may wake up device when they were just sent to + standby. issue #142 + * osx: use the correct dylib name in cecloader.h, used by cec-client + + -- Pulse-Eight Packaging Fri, 8 Mar 2013 17:21:00 +0100 + + libcec (2.1.0-1) unstable; urgency=low * changed / added: * added vendor id for Denon diff -Nru libcec-2.1.0/debian/changelog libcec-2.1.1/debian/changelog --- libcec-2.1.0/debian/changelog 2013-02-28 18:56:22.000000000 +0000 +++ libcec-2.1.1/debian/changelog 2013-03-09 20:26:01.000000000 +0000 @@ -1,10 +1,36 @@ -libcec (2.1.0-3~oneiric) oneiric; urgency=low +libcec (2.1.1-5~oneiric) oneiric; urgency=low * Build for Ubuntu 'oneiric' - -- Pulse-Eight Packaging Thu, 28 Feb 2013 19:56:22 +0100 + -- Pulse-Eight Packaging Sat, 09 Mar 2013 21:26:01 +0100 -libcec (2.1.0-1) unstable; urgency=low +libcec (2.1.1-1) unstable; urgency=low + + * changed / added: + * send an alert when the TV does not respond to polls + * fixed: + * LG didn't switch sources after the TV powered up + * always poll a device when the status is unknown, and don't try to + determine whether it needs to be polled by checking the status of other + devices + * don't mark a device as inactive when receiving a routing change message, + only when another device was made acive. fixes the issue that rc + passthrough doesn't work when a tv sends a quick routing change to + another port before requesting the active source when coming out of + standby + * LibCecSharp: fixed 14 char long OSD name (wasn't \0 terminated) + * LibCecSharp: fixed return value of GetActiveDevices(). issue #131 + * cec-tray: fixed index out of range exception in CECSettingNumeric.cs. + bugzid: 2082 + * cec-tray: ensure that the tray app only initialises once. bugzid: 2082 + * rpi: don't set the physical address to 1.0.0.0 when receiving + VC_HDMI_UNPLUGGED. it may wake up device when they were just sent to + standby. issue #142 + * osx: use the correct dylib name in cecloader.h, used by cec-client + + -- Pulse-Eight Packaging Fri, 8 Mar 2013 17:21:00 +0100 + + libcec (2.1.0-1) unstable; urgency=low * changed / added: * added vendor id for Denon diff -Nru libcec-2.1.0/include/cecloader.h libcec-2.1.1/include/cecloader.h --- libcec-2.1.0/include/cecloader.h 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/include/cecloader.h 2013-03-09 20:14:55.000000000 +0000 @@ -130,7 +130,7 @@ if (!g_libCEC) { #if defined(__APPLE__) - g_libCEC = dlopen(strLib ? strLib : "libcec.dylib", RTLD_LAZY); + g_libCEC = dlopen(strLib ? strLib : "libcec." CEC_LIB_VERSION_MAJOR_STR ".dylib", RTLD_LAZY); #else g_libCEC = dlopen(strLib ? strLib : "libcec.so." CEC_LIB_VERSION_MAJOR_STR, RTLD_LAZY); #endif diff -Nru libcec-2.1.0/include/cectypes.h libcec-2.1.1/include/cectypes.h --- libcec-2.1.0/include/cectypes.h 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/include/cectypes.h 2013-03-09 20:14:55.000000000 +0000 @@ -1281,7 +1281,8 @@ CEC_ALERT_CONNECTION_LOST, CEC_ALERT_PERMISSION_ERROR, CEC_ALERT_PORT_BUSY, - CEC_ALERT_PHYSICAL_ADDRESS_ERROR + CEC_ALERT_PHYSICAL_ADDRESS_ERROR, + CEC_ALERT_TV_POLL_FAILED } libcec_alert; typedef enum libcec_parameter_type @@ -1405,7 +1406,8 @@ CEC_CLIENT_VERSION_2_0_4 = 0x2004, CEC_CLIENT_VERSION_2_0_5 = 0x2005, CEC_CLIENT_VERSION_2_1_0 = 0x2100, - CEC_CLIENT_VERSION_CURRENT = 0x2100 + CEC_CLIENT_VERSION_2_1_1 = 0x2101, + CEC_CLIENT_VERSION_CURRENT = 0x2101 } cec_client_version; typedef enum cec_server_version @@ -1434,7 +1436,8 @@ CEC_SERVER_VERSION_2_0_4 = 0x2004, CEC_SERVER_VERSION_2_0_5 = 0x2005, CEC_SERVER_VERSION_2_1_0 = 0x2100, - CEC_SERVER_VERSION_CURRENT = 0x2100 + CEC_SERVER_VERSION_2_1_1 = 0x2101, + CEC_SERVER_VERSION_CURRENT = 0x2101 } cec_server_version; struct libcec_configuration diff -Nru libcec-2.1.0/src/CecSharpTester/Properties/AssemblyInfo.cs libcec-2.1.1/src/CecSharpTester/Properties/AssemblyInfo.cs --- libcec-2.1.0/src/CecSharpTester/Properties/AssemblyInfo.cs 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/src/CecSharpTester/Properties/AssemblyInfo.cs 2013-03-09 20:14:55.000000000 +0000 @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.1.0.0")] -[assembly: AssemblyFileVersion("2.1.0.0")] +[assembly: AssemblyVersion("2.1.1.0")] +[assembly: AssemblyFileVersion("2.1.1.0")] diff -Nru libcec-2.1.0/src/LibCecSharp/AssemblyInfo.cpp libcec-2.1.1/src/LibCecSharp/AssemblyInfo.cpp --- libcec-2.1.0/src/LibCecSharp/AssemblyInfo.cpp 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/src/LibCecSharp/AssemblyInfo.cpp 2013-03-09 20:14:55.000000000 +0000 @@ -13,7 +13,7 @@ [assembly:AssemblyTrademarkAttribute("")]; [assembly:AssemblyCultureAttribute("")]; -[assembly:AssemblyVersionAttribute("2.1.0.0")]; +[assembly:AssemblyVersionAttribute("2.1.1.0")]; [assembly:ComVisible(false)]; [assembly:CLSCompliantAttribute(true)]; diff -Nru libcec-2.1.0/src/LibCecSharp/CecSharpTypes.h libcec-2.1.1/src/LibCecSharp/CecSharpTypes.h --- libcec-2.1.0/src/LibCecSharp/CecSharpTypes.h 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/src/LibCecSharp/CecSharpTypes.h 2013-03-09 20:14:55.000000000 +0000 @@ -1191,7 +1191,11 @@ /// /// v2.1.0 /// - Version2_1_0 = 0x2100 + Version2_1_0 = 0x2100, + /// + /// v2.1.1 + /// + Version2_1_1 = 0x2101 }; /// @@ -1294,7 +1298,11 @@ /// /// v2.1.0 /// - Version2_1_0 = 0x2100 + Version2_1_0 = 0x2100, + /// + /// v2.1.1 + /// + Version2_1_1 = 0x2101 }; /// @@ -1685,8 +1693,8 @@ PhysicalAddress = CEC_DEFAULT_PHYSICAL_ADDRESS; BaseDevice = (CecLogicalAddress)CEC_DEFAULT_BASE_DEVICE; HDMIPort = CEC_DEFAULT_HDMI_PORT; - ClientVersion = CecClientVersion::Version2_1_0; - ServerVersion = CecServerVersion::Version2_1_0; + ClientVersion = CecClientVersion::Version2_1_1; + ServerVersion = CecServerVersion::Version2_1_1; TvVendor = CecVendorId::Unknown; GetSettingsFromROM = false; diff -Nru libcec-2.1.0/src/LibCecSharp/LibCecSharp.cpp libcec-2.1.1/src/LibCecSharp/LibCecSharp.cpp --- libcec-2.1.0/src/LibCecSharp/LibCecSharp.cpp 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/src/LibCecSharp/LibCecSharp.cpp 2013-03-09 20:14:55.000000000 +0000 @@ -377,7 +377,7 @@ for (uint8_t iPtr = 0; iPtr < 16; iPtr++) if (activeDevices[iPtr]) - retVal->Addresses[iDevices++] = (CecLogicalAddress)iPtr; + retVal->Set((CecLogicalAddress)iPtr); return retVal; } @@ -474,7 +474,11 @@ String ^ GetDeviceOSDName(CecLogicalAddress logicalAddress) { cec_osd_name osd = m_libCec->GetDeviceOSDName((cec_logical_address) logicalAddress); - return gcnew String(osd.name); + // we need to terminate with \0, and we only got 14 chars in osd.name + char strOsdName[15]; + memset(strOsdName, 0, sizeof(strOsdName)); + memcpy(strOsdName, osd.name, sizeof(osd.name)); + return gcnew String(strOsdName); } /// diff -Nru libcec-2.1.0/src/LibCecTray/Properties/AssemblyInfo.cs libcec-2.1.1/src/LibCecTray/Properties/AssemblyInfo.cs --- libcec-2.1.0/src/LibCecTray/Properties/AssemblyInfo.cs 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/src/LibCecTray/Properties/AssemblyInfo.cs 2013-03-09 20:14:55.000000000 +0000 @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.1.0.0")] -[assembly: AssemblyFileVersion("2.1.0.0")] +[assembly: AssemblyVersion("2.1.1.0")] +[assembly: AssemblyFileVersion("2.1.1.0")] diff -Nru libcec-2.1.0/src/LibCecTray/Properties/Resources.Designer.cs libcec-2.1.1/src/LibCecTray/Properties/Resources.Designer.cs --- libcec-2.1.0/src/LibCecTray/Properties/Resources.Designer.cs 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/src/LibCecTray/Properties/Resources.Designer.cs 2013-03-09 20:14:55.000000000 +0000 @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.5448 +// Runtime Version:2.0.50727.5466 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -304,7 +304,7 @@ } /// - /// Looks up a localized string similar to Pulse-Eight USB-CEC Adapter - libCECTray BETA3. + /// Looks up a localized string similar to Pulse-Eight USB-CEC Adapter - libCECTray. /// internal static string app_name { get { diff -Nru libcec-2.1.0/src/LibCecTray/Properties/Resources.resx libcec-2.1.1/src/LibCecTray/Properties/Resources.resx --- libcec-2.1.0/src/LibCecTray/Properties/Resources.resx 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/src/LibCecTray/Properties/Resources.resx 2013-03-09 20:14:55.000000000 +0000 @@ -121,7 +121,7 @@ Could not detect to any CEC adapter. Please check your configuration. Do you want to try again? - Pulse-Eight USB-CEC Adapter - libCECTray BETA3 + Pulse-Eight USB-CEC Adapter - libCECTray You have changed the device type. Persist the configuration, and restart the application to use the new setting. diff -Nru libcec-2.1.0/src/LibCecTray/controller/CECController.cs libcec-2.1.1/src/LibCecTray/controller/CECController.cs --- libcec-2.1.0/src/LibCecTray/controller/CECController.cs 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/src/LibCecTray/controller/CECController.cs 2013-03-09 20:14:55.000000000 +0000 @@ -203,6 +203,11 @@ /// public void Initialise() { + // only load once + if (_initialised) + return; + _initialised = true; + CECActions.ConnectToDevice(Config); Applications.Initialise(this); } @@ -215,6 +220,7 @@ Lib.DisableCallbacks(); Lib.StandbyDevices(CecLogicalAddress.Broadcast); Lib.Close(); + _initialised = false; } /// @@ -519,6 +525,7 @@ private readonly CECTray _gui; public Actions CECActions; private bool _deviceChangeWarningDisplayed; + private bool _initialised; #endregion } diff -Nru libcec-2.1.0/src/LibCecTray/settings/CECSettingNumeric.cs libcec-2.1.1/src/LibCecTray/settings/CECSettingNumeric.cs --- libcec-2.1.0/src/LibCecTray/settings/CECSettingNumeric.cs 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/src/LibCecTray/settings/CECSettingNumeric.cs 2013-03-09 20:14:55.000000000 +0000 @@ -158,10 +158,13 @@ ResetItems(BaseItems.Count == 0); - control.SelectedValueChanged += delegate - { - Value = BaseItems[control.SelectedIndex]; - }; + if (BaseItems.Count > 0 && control.SelectedIndex < BaseItems.Count) + { + control.SelectedValueChanged += delegate + { + Value = BaseItems[control.SelectedIndex]; + }; + } } public override Control ValueControl diff -Nru libcec-2.1.0/src/lib/CECProcessor.cpp libcec-2.1.1/src/lib/CECProcessor.cpp --- libcec-2.1.0/src/lib/CECProcessor.cpp 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/src/lib/CECProcessor.cpp 2013-03-09 20:14:55.000000000 +0000 @@ -53,6 +53,7 @@ #define CEC_PROCESSOR_SIGNAL_WAIT_TIME 1000 #define ACTIVE_SOURCE_CHECK_INTERVAL 500 +#define TV_PRESENT_CHECK_INTERVAL 30000 #define ToString(x) CCECTypeUtils::ToString(x) @@ -216,6 +217,7 @@ cec_command command; command.Clear(); CTimeout activeSourceCheck(ACTIVE_SOURCE_CHECK_INTERVAL); + CTimeout tvPresentCheck(TV_PRESENT_CHECK_INTERVAL); // as long as we're not being stopped and the connection is open while (!IsStopped() && m_communication->IsOpen()) @@ -239,6 +241,19 @@ TransmitPendingActiveSourceCommands(); activeSourceCheck.Init(ACTIVE_SOURCE_CHECK_INTERVAL); } + + // check whether the TV is present and responding + if (tvPresentCheck.TimeLeft() == 0) + { + if (!m_busDevices->At(CECDEVICE_TV)->IsPresent()) + { + libcec_parameter param; + param.paramType = CEC_PARAMETER_TYPE_STRING; + param.paramData = (void*)"TV does not respond to CEC polls"; + GetPrimaryClient()->Alert(CEC_ALERT_TV_POLL_FAILED, param); + } + tvPresentCheck.Init(TV_PRESENT_CHECK_INTERVAL); + } } } diff -Nru libcec-2.1.0/src/lib/CECTypeUtils.h libcec-2.1.1/src/lib/CECTypeUtils.h --- libcec-2.1.0/src/lib/CECTypeUtils.h 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/src/lib/CECTypeUtils.h 2013-03-09 20:14:55.000000000 +0000 @@ -571,6 +571,8 @@ return "2.0.5"; case CEC_CLIENT_VERSION_2_1_0: return "2.1.0"; + case CEC_CLIENT_VERSION_2_1_1: + return "2.1.1"; default: return "Unknown"; } @@ -628,6 +630,8 @@ return "2.0.5"; case CEC_SERVER_VERSION_2_1_0: return "2.1.0"; + case CEC_SERVER_VERSION_2_1_1: + return "2.1.1"; default: return "Unknown"; } diff -Nru libcec-2.1.0/src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp libcec-2.1.1/src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp --- libcec-2.1.0/src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/src/lib/adapter/RPi/RPiCECAdapterCommunication.cpp 2013-03-09 20:14:55.000000000 +0000 @@ -118,17 +118,13 @@ { switch(reason) { - case VC_HDMI_UNPLUGGED: - { - m_callback->HandlePhysicalAddressChanged(0x1000); - break; - } case VC_HDMI_ATTACHED: { uint16_t iNewAddress = GetPhysicalAddress(); m_callback->HandlePhysicalAddressChanged(iNewAddress); break; } + case VC_HDMI_UNPLUGGED: case VC_HDMI_DVI: case VC_HDMI_HDMI: case VC_HDMI_HDCP_UNAUTH: diff -Nru libcec-2.1.0/src/lib/devices/CECBusDevice.cpp libcec-2.1.1/src/lib/devices/CECBusDevice.cpp --- libcec-2.1.0/src/lib/devices/CECBusDevice.cpp 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/src/lib/devices/CECBusDevice.cpp 2013-03-09 20:14:55.000000000 +0000 @@ -781,7 +781,7 @@ if (bNeedsPoll) { bool bPollAcked(false); - if (bNeedsPoll && NeedsPoll()) + if (bNeedsPoll) bPollAcked = m_processor->PollDevice(m_iLogicalAddress); status = bPollAcked ? CEC_DEVICE_STATUS_PRESENT : CEC_DEVICE_STATUS_NOT_PRESENT; @@ -1143,17 +1143,6 @@ else newRoute->MarkAsActiveSource(); } - else - { - // get the current active source and it's physical address - CCECBusDevice *device = m_processor->GetDevices()->GetActiveSource(); - uint16_t iPhysicalAddress(device ? device->GetCurrentPhysicalAddress() : CEC_INVALID_PHYSICAL_ADDRESS); - - // check whether the route below the device changed - if (CLibCEC::IsValidPhysicalAddress(iPhysicalAddress) && - !CCECTypeUtils::PhysicalAddressIsIncluded(iPhysicalAddress, iRoute)) - device->MarkAsInactiveSource(); - } } void CCECBusDevice::SetStreamPath(uint16_t iNewAddress, uint16_t iOldAddress /* = CEC_INVALID_PHYSICAL_ADDRESS */) diff -Nru libcec-2.1.0/src/lib/implementations/SLCommandHandler.cpp libcec-2.1.1/src/lib/implementations/SLCommandHandler.cpp --- libcec-2.1.0/src/lib/implementations/SLCommandHandler.cpp 2013-02-28 18:48:29.000000000 +0000 +++ libcec-2.1.1/src/lib/implementations/SLCommandHandler.cpp 2013-03-09 20:14:55.000000000 +0000 @@ -194,6 +194,10 @@ { m_processor->GetPrimaryDevice()->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON); TransmitVendorCommand0205(command.destination, command.initiator); + + CCECBusDevice* dev = m_processor->GetDevice(command.destination); + if (dev && dev->IsHandledByLibCEC() && dev->IsActiveSource()) + dev->TransmitActiveSource(false); } void CSLCommandHandler::TransmitVendorCommand0205(const cec_logical_address iSource, const cec_logical_address iDestination) @@ -204,6 +208,7 @@ response.PushBack(SL_COMMAND_TYPE_HDDRECORDER); Transmit(response, false, true); + SetSLInitialised(); } void CSLCommandHandler::HandleVendorCommandPowerOn(const cec_command &command)