From: Lars Op den Kamp Date: Tue, 25 Oct 2011 22:35:06 +0000 (+0200) Subject: cec: added vendor id detection for LG. changed vendorid display to hex X-Git-Tag: upstream/2.2.0~1^2~221 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;ds=sidebyside;h=6a69ddf2f8b32b7d66be1dffafa78fd2af219749;hp=8b7e5ff605864004b8a66520202bf05aecb4fc6c;p=deb_libcec.git cec: added vendor id detection for LG. changed vendorid display to hex --- diff --git a/include/cectypes.h b/include/cectypes.h index e6c953e..5298258 100644 --- a/include/cectypes.h +++ b/include/cectypes.h @@ -689,7 +689,8 @@ typedef struct cec_command typedef enum cec_vendor_id { - CEC_VENDOR_SAMSUNG = 240, + CEC_VENDOR_SAMSUNG = 0x00F0, + CEC_VENDOR_LG = 0xE091, CEC_VENDOR_UNKNOWN = 0 } vendor_id; diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 31f8803..2784825 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -537,7 +537,7 @@ void CCECProcessor::ParseVendorId(cec_logical_address device, const cec_datapack m_vendorClasses[(uint8_t)device] = data.size >= 4 ? data[3] : 0; CStdString strLog; - strLog.Format("device %d: vendor = %s (%lld) class = %2x", (uint8_t)device, CECVendorIdToString(m_vendorIds[(uint8_t)device]), iVendorId, m_vendorClasses[(uint8_t)device]); + strLog.Format("device %d: vendor = %s (%04x) class = %2x", (uint8_t)device, CECVendorIdToString(m_vendorIds[(uint8_t)device]), iVendorId, m_vendorClasses[(uint8_t)device]); m_controller->AddLog(CEC_LOG_DEBUG, strLog.c_str()); } @@ -661,6 +661,8 @@ const char *CCECProcessor::CECVendorIdToString(const uint64_t iVendorId) { case CEC_VENDOR_SAMSUNG: return "Samsung"; + case CEC_VENDOR_LG: + return "LG"; default: return "Unknown"; }