Firmware loader driver for USB Apple iSight camera
PATCH 1/1 Firmware loader driver for USB Apple iSight camera
Uninitialised Apple iSight drivers present with a distinctive USB ID. Once firmware has been uploaded, they disconnect and reconnect with a new ID. At this point they can be driven by the uvcvideo driver. As this is unique to the Apple cameras and not functionality shared by any other UVC devices, it makes sense to provide the firmware loading functionality in a separate driver. This driver will read an isight.fw file extracted from the Apple driver using the tools at
http://bersace03.free.fr/ift/ and upload it to the camera. It will also handle the case where the device loses its firmware during hibernation and must have it reloaded.
---
I think this is a cleaner solution than adding support for the firmware loading directly to the uvcvideo driver, and doing it as a driver rather than a set of userspace callouts simplifies the suspend/resume case. The required firmware is, sadly, non-free and undistributable.
drivers/usb/misc/Kconfig +11 -0
@@ -269,3 +269,14 @@ config USB_TEST See <http://www.linux-usb.org/usbtest/> for more information, including sample test device firmware and "how to use it". +config USB_ISIGHTFW + tristate "iSight firmware loading support" + depends on USB + help + This driver loads firmware for USB Apple iSight cameras, allowing + them to be driven by the USB video class driver available at + http://linux-uvc.berlios.de + + The firmware for this driver must be extracted from the MacOS driver + beforehand. Tools for doing so are available at + http://bersace03.free.fr
drivers/usb/misc/Makefile +1 -0
@@ -14,6 +14,7 @@ obj-$(CONFIG_USB_EMI62) += emi62.o obj-$(CONFIG_USB_FTDI_ELAN) += ftdi-elan.o obj-$(CONFIG_USB_IDMOUSE) += idmouse.o obj-$(CONFIG_USB_IOWARRIOR) += iowarrior.o +obj-$(CONFIG_USB_ISIGHTFW) += isight_firmware.o obj-$(CONFIG_USB_LCD) += usblcd.o obj-$(CONFIG_USB_LD) += ldusb.o obj-$(CONFIG_USB_LED) += usbled.o
drivers/usb/misc/isight_firmware.c new file +131 -0
131 lines not on this page · raw message
Signature · 1 line
Matthew Garrett | [email protected]
Am Dienstag 20 Mai 2008 21:06:28 schrieb Matthew Garrett:
Quoted 3 lines
I think this is a cleaner solution than adding support for the firmware loading directly to the uvcvideo driver, and doing it as a driver rather than a set of userspace callouts simplifies the suspend/resume case. The
How does that simplify suspend/resume?
If the device looses its firmware due to suspend you must implement this support in uvc, or a user space driver will be as good as this solution.
Regards
Oliver
Quoted 3 lines · Oliver Neukum
How does that simplify suspend/resume?
If the device looses its firmware due to suspend you must implement this support in uvc, or a user space driver will be as good as this solution.
If it loses its firmwrare, it'll reattach with the old ID.
Signature · 1 line
Matthew Garrett | [email protected]
Am Mittwoch 21 Mai 2008 00:03:04 schrieb Matthew Garrett:
Quoted 7 lines · Oliver Neukum
Quoted 4 lines
How does that simplify suspend/resume?
If the device looses its firmware due to suspend you must implement this support in uvc, or a user space driver will be as good as this solution.If it loses its firmwrare, it'll reattach with the old ID.
Thereby breaking the binding to the uvc driver. It'll be considered a new device. You might just as well load the firmware through usbfs triggered by udev.
If you really want to fix this you'd have to extend the persist infrastructure first.
Regards
Oliver
Quoted 10 lines · Matthew Garrett
Uninitialised Apple iSight drivers present with a distinctive USB ID. Once firmware has been uploaded, they disconnect and reconnect with a new ID. At this point they can be driven by the uvcvideo driver. As this is unique to the Apple cameras and not functionality shared by any other UVC devices, it makes sense to provide the firmware loading functionality in a separate driver. This driver will read an isight.fw file extracted from the Apple driver using the tools at
http://bersace03.free.fr/ift/ and upload it to the camera. It will also handle the case where the device loses its firmware during hibernation and must have it reloaded.
this caused a build failure - find the fix below. (fix can also be pulled/cherry-picked from -tip's tip/out-of-tree topic branch)
Ingo
-------------------->
commit 1f910d33b2084d03267db20359472891f95b45b4
Author: Ingo Molnar <[email protected]> Date: Mon Jun 2 21:07:27 2008 +0200
USB: fix build bug in USB_ISIGHTFW
-tip tree testing found this build bug:
drivers/built-in.o: In function `isight_firmware_load':
isight_firmware.c:(.text+0x1ade08): undefined reference to request_firmware' isight_firmware.c:(.text+0x1adf9c): undefined reference to release_firmware'
select FW_LOADER in USB_ISIGHTFW.
drivers/usb/misc/Kconfig +1 -0
@@ -272,6 +272,7 @@ config USB_TEST config USB_ISIGHTFW tristate "iSight firmware loading support" depends on USB + select FW_LOADER help This driver loads firmware for USB Apple iSight cameras, allowing them to be driven by the USB video class driver available at
Quoted 26 lines · Ingo Molnar
Quoted 10 lines · Matthew Garrett
Uninitialised Apple iSight drivers present with a distinctive USB ID. Once firmware has been uploaded, they disconnect and reconnect with a new ID. At this point they can be driven by the uvcvideo driver. As this is unique to the Apple cameras and not functionality shared by any other UVC devices, it makes sense to provide the firmware loading functionality in a separate driver. This driver will read an isight.fw file extracted from the Apple driver using the tools at
http://bersace03.free.fr/ift/ and upload it to the camera. It will also handle the case where the device loses its firmware during hibernation and must have it reloaded.this caused a build failure - find the fix below. (fix can also be pulled/cherry-picked from -tip's tip/out-of-tree topic branch)
Ingo
-------------------->
commit1f910d33b2084d03267db20359472891f95b45b4Author: Ingo Molnar <[email protected]> Date: Mon Jun 2 21:07:27 2008 +0200USB: fix build bug in
USB_ISIGHTFW
Quoted 7 lines
-tip tree testing found this build bug:
drivers/built-in.o: In function `isight_firmware_load':
isight_firmware.c:(.text+0x1ade08): undefined reference torequest_firmware' isight_firmware.c:(.text+0x1adf9c): undefined reference torelease_firmware'select
FW_LOADERinUSB_ISIGHTFW.
Thanks, I'll add this to my queue.
greg k-h