From 421b13e5cccefa98291b079eb25db8f6d583946b Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sun, 21 Aug 2011 19:07:11 +0200 Subject: [PATCH] try to use a alternate product id if the first one fail as said on https://bugs.launchpad.net/isight-firmware-tools/+bug/798610 on some mac and in some case, the usb product id is different. it seems that the firmware initialisation change the product id, and so this depend on wether the camera was used before or not. --- src/load.h | 3 +++ src/udev.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/load.h b/src/load.h index ac5d354..8ad6191 100644 --- a/src/load.h +++ b/src/load.h @@ -41,6 +41,9 @@ #define APPLE_VENDOR_ID 0x05AC #define ISIGHT_PRODUCT_ID 0x8300 +// according to https://bugs.launchpad.net/isight-firmware-tools/+bug/798610 +// the webcam have a different product ID on some mac, when doing a cold boot +#define ISIGHT_PRODUCT_ID_COLDBOOT 0x8501 #define ift_debug(args...) syslog(LOG_DEBUG, args) #define ift_message(args...) syslog(LOG_INFO, args) diff --git a/src/udev.c b/src/udev.c index 004e773..46ee0f6 100644 --- a/src/udev.c +++ b/src/udev.c @@ -108,8 +108,11 @@ main(int argc, char *argv[]) } - dev = find_usb_product(APPLE_VENDOR_ID, - ISIGHT_PRODUCT_ID); + dev = find_usb_product(APPLE_VENDOR_ID, ISIGHT_PRODUCT_ID); + // try to find the webcam after a coldboot, as said on + // https://bugs.launchpad.net/bugs/798610 + if (!dev) + dev = find_usb_product(APPLE_VENDOR_ID, ISIGHT_PRODUCT_ID_COLDBOOT); if (!dev) ift_error(_("No iSight found")); -- 1.7.6