also match to pid 0x1002 in CUSBCECAdapterDetection
authorLars Op den Kamp <lars@opdenkamp.eu>
Wed, 29 Aug 2012 11:31:16 +0000 (13:31 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Wed, 29 Aug 2012 11:49:47 +0000 (13:49 +0200)
src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp

index f9969d83c08c16955250c5e867641751a4eb4cad..9789bf70eb150376bf61ddbd463b5122e3da5ac2 100644 (file)
@@ -61,8 +61,9 @@ extern "C" {
 #include <unistd.h>
 #endif
 
-#define CEC_VID 0x2548
-#define CEC_PID 0x1001
+#define CEC_VID  0x2548
+#define CEC_PID  0x1001
+#define CEC_PID2 0x1002
 
 using namespace CEC;
 using namespace std;
@@ -180,7 +181,7 @@ uint8_t CUSBCECAdapterDetection::FindAdapters(cec_adapter *deviceList, uint8_t i
             kresult = IORegistryEntryGetParentEntry(parent, kIOServicePlane, &parent);
             IOObjectRelease(oldparent);
           }
-          if (strlen(bsdPath) && iVendor == CEC_VID && iProduct == CEC_PID)
+          if (strlen(bsdPath) && iVendor == CEC_VID && (iProduct == CEC_PID || iProduct == CEC_PID2))
           {
             if (!strDevicePath || !strcmp(bsdPath, strDevicePath))
             {
@@ -225,7 +226,7 @@ uint8_t CUSBCECAdapterDetection::FindAdapters(cec_adapter *deviceList, uint8_t i
     int iVendor, iProduct;
     sscanf(udev_device_get_sysattr_value(pdev, "idVendor"), "%x", &iVendor);
     sscanf(udev_device_get_sysattr_value(pdev, "idProduct"), "%x", &iProduct);
-    if (iVendor == CEC_VID && iProduct == CEC_PID)
+    if (iVendor == CEC_VID && (iProduct == CEC_PID || iProduct == CEC_PID2))
     {
       CStdString strPath(udev_device_get_syspath(pdev));
       if (!strDevicePath || !strcmp(strPath.c_str(), strDevicePath))
@@ -311,7 +312,7 @@ uint8_t CUSBCECAdapterDetection::FindAdapters(cec_adapter *deviceList, uint8_t i
     int iVendor, iProduct;
     sscanf(strVendorId, "%x", &iVendor);
     sscanf(strProductId, "%x", &iProduct);
-    if (iVendor != CEC_VID || iProduct != CEC_PID)
+    if (iVendor != CEC_VID || (iProduct != CEC_PID && iProduct != CEC_PID2))
       continue;
 
     HKEY hDeviceKey = SetupDiOpenDevRegKey(hDevHandle, &devInfoData, DICS_FLAG_GLOBAL, 0, DIREG_DEV, KEY_QUERY_VALUE);