From 29d6e04301e1b5c020c5515c787c50b4c497df133161cf25508dc950a5dc1460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Tue, 7 Feb 2012 09:57:59 +0000 Subject: [PATCH] Accepting request 102972 from home:illuusio Re-worked patch thath way that error is only emited if something is really wrong. OBS-URL: https://build.opensuse.org/request/show/102972 OBS-URL: https://build.opensuse.org/package/show/hardware/isight-firmware-tools?expand=0&rev=3 --- isight-firmware-tools-older_isight-1.6.0.diff | 38 +++++++++++++++++++ isight-firmware-tools.changes | 6 +++ isight-firmware-tools.spec | 2 + 3 files changed, 46 insertions(+) create mode 100644 isight-firmware-tools-older_isight-1.6.0.diff diff --git a/isight-firmware-tools-older_isight-1.6.0.diff b/isight-firmware-tools-older_isight-1.6.0.diff new file mode 100644 index 0000000..4bc6060 --- /dev/null +++ b/isight-firmware-tools-older_isight-1.6.0.diff @@ -0,0 +1,38 @@ +diff --git a/src/load.h b/src/load.h +index ac5d354..7dc1b4f 100644 +--- a/src/load.h ++++ b/src/load.h +@@ -40,7 +40,8 @@ + #define _LOAD_H_ + + #define APPLE_VENDOR_ID 0x05AC +-#define ISIGHT_PRODUCT_ID 0x8300 ++#define ISIGHT_PRODUCT_ID1 0x8300 ++#define ISIGHT_PRODUCT_ID2 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..94d43c2 100644 +--- a/src/udev.c ++++ b/src/udev.c +@@ -109,11 +109,18 @@ main(int argc, char *argv[]) + + + dev = find_usb_product(APPLE_VENDOR_ID, +- ISIGHT_PRODUCT_ID); ++ ISIGHT_PRODUCT_ID1); ++ ++ /* If we can't open that device try another one. Older */ ++ if (!dev){ ++ dev = find_usb_product(APPLE_VENDOR_ID, ++ ISIGHT_PRODUCT_ID2); ++ } + + if (!dev) + ift_error(_("No iSight found")); + ++ + if (load_firmware(dev, firmware) == -1) + ift_error(_("Failed to upload firmware to 0x%04X:0x%04X"), + dev->descriptor.idVendor, diff --git a/isight-firmware-tools.changes b/isight-firmware-tools.changes index 2f24856..070dcd3 100644 --- a/isight-firmware-tools.changes +++ b/isight-firmware-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 07 07:35:09 UTC 2012 - tuukka.pasanen@ilmi.fi + +- Added support for older iMac isight + + ------------------------------------------------------------------- Thu Jun 2 07:35:09 UTC 2011 - idonmez@novell.com diff --git a/isight-firmware-tools.spec b/isight-firmware-tools.spec index 1381945..9a27c2e 100644 --- a/isight-firmware-tools.spec +++ b/isight-firmware-tools.spec @@ -25,6 +25,7 @@ Summary: Tools to manipulate firmware for Built-in iSight Url: http://bersace03.free.fr/ift/ Group: Amusements/Toys/Graphics Source: isight-firmware-tools-%{version}.tar.gz +Patch0: isight-firmware-tools-older_isight-1.6.0.diff BuildRequires: gcc BuildRequires: intltool BuildRequires: libgcrypt-devel @@ -38,6 +39,7 @@ found on Apple machine since iMac G5 iSight %prep %setup -q +%patch0 -p1 %build %configure