cec: added vendor id detection for LG. changed vendorid display to hex
authorLars Op den Kamp <lars@opdenkamp.eu>
Tue, 25 Oct 2011 22:35:06 +0000 (00:35 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Tue, 25 Oct 2011 22:35:06 +0000 (00:35 +0200)
include/cectypes.h
src/lib/CECProcessor.cpp

index e6c953e855221def2abceb9083d336e56ddfda51..5298258050530a61c1000f2a8fe1383198bf33db 100644 (file)
@@ -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;
 
index 31f8803ac3af97dbe2bff32f779ae8befd47ebae..27848252eb7215ecf47536ac9f55e840b8063161 100644 (file)
@@ -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";
   }