From: Lars Op den Kamp Date: Wed, 29 Aug 2012 11:31:16 +0000 (+0200) Subject: also match to pid 0x1002 in CUSBCECAdapterDetection X-Git-Tag: upstream/2.2.0~1^2~18^2^2~21 X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=commitdiff_plain;h=afee62c6fe0e19479117115dae8afe174379bb73 also match to pid 0x1002 in CUSBCECAdapterDetection --- diff --git a/src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp b/src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp index f9969d8..9789bf7 100644 --- a/src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp +++ b/src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp @@ -61,8 +61,9 @@ extern "C" { #include #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);