Fix to support Canon PowerShot G5

Situation:
- The PTP2 driver doesn't work for G5
- The G3 driver can't be used a G5
- So the canon native driver has been tought the G5's id etc ...

- Bumped port revision, since the G5 PTP2 support was in
  test status and the G5 canon native driver support
  - fixes G5 PTP2 flaws and
  - is kind of new functionality

These patches have been sent to the gphoto devel team and
have been included into CVS today. Since yestarday 2.1.3
has been releases this fix will show up in later versions of
libgphoto.

Note 1: when using gphoto --auto-detect unluckily the buggy PTP2 driver
will be autodetected. You then have to choose manually the correct
driver. Easiest way is to use digikam->Setup and to Choose driver called
"Canon PowerShot G5 (normal mode)".

Note 2: If you want to use digikam as non-root user, you have to tweak
permissions of /dev/ugenX and /dev/ugenX.{1,2,3}

I succeded by using the following commands which I put into /etc/rc.local,
thanks to Poul-Henning Kamp:
/sbin/devfs ruleset 10
/sbin/devfs rule applyset
/sbin/devfs rule add path ugen1* mode 666
/sbin/devfs rule show

A working solution for /etc/devfs.rules I didn't find yet.

Approved by:	 portmgr@freebsd.org (Joe)
This commit is contained in:
Andreas Klemm 2003-10-20 17:49:40 +00:00
parent 2b69782834
commit 95849a2bcf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=91747
6 changed files with 75 additions and 1 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= libgphoto2
PORTVERSION= 2.1.2
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= gphoto

View File

@ -0,0 +1,16 @@
--- ChangeLog.orig Mon Oct 20 10:31:35 2003
+++ ChangeLog Mon Oct 20 10:31:06 2003
@@ -1,3 +1,13 @@
+2003-10-20 Andreas Klemm <andreas@FreeBSD.org>
+ * Canon PowerShot G5 added
+ * camlibs/canon/canon.c: add G5 to struct canonCamModelData models[]
+ add G5 support in canon_int_filename2audioname
+ * camlibs/canon/canon.h: add G5 to enum canonCamModel
+ * camlibs/canon/usb.c: same behaviour as for G3 in canon_usb_lock_keys,
+ lock the keys on the camera and turn off display
+ * camlibs/canon/usb.h: CANON_USB_FUNCTION_GET_PIC_ABILITIES, expand
+ comment, add G5 after G3.
+
2003-08-10 gettextize <bug-gnu-gettext@gnu.org>
* Makefile.am (SUBDIRS): Add intl.

View File

@ -0,0 +1,19 @@
--- camlibs/canon/canon.c.orig Sun Aug 10 20:51:13 2003
+++ camlibs/canon/canon.c Mon Oct 20 10:17:48 2003
@@ -138,6 +138,8 @@
/* 0x306D is S45 in PTP mode */
{"Canon:PowerShot G3 (normal mode)", CANON_PS_G3, 0x04A9, 0x306E, CAP_SUP, S99M, S32K, NULL},
/* 0x306F is G3 in PTP mode */
+ {"Canon:PowerShot G5 (normal mode)", CANON_PS_G5, 0x04A9, 0x3085, CAP_SUP, S99M, S32K, NULL},
+ /* XXX 0x???? is G5 in PTP mode */
{"Canon:PowerShot S230 (normal mode)", CANON_PS_S230, 0x04A9, 0x3070, CAP_SUP, S99M, S32K, NULL},
/* 0x3071 is S230 in PTP mode */
{"Canon:Digital IXUS v3 (normal mode)", CANON_PS_S230, 0x04A9, 0x3070, CAP_SUP, S99M, S32K, NULL},
@@ -250,6 +252,7 @@
case CANON_PS_S40:
case CANON_PS_S45:
case CANON_PS_G3:
+ case CANON_PS_G5:
break;
default:
GP_DEBUG ("canon_int_filename2audioname: camera model doesn't support audio files",

View File

@ -0,0 +1,18 @@
--- camlibs/canon/canon.h.orig Sun Aug 10 20:51:13 2003
+++ camlibs/canon/canon.h Mon Oct 20 10:17:51 2003
@@ -86,6 +86,7 @@
* @CANON_PS_S330: Digital IXUS 330
* @CANON_PS_S45: PowerShot S45
* @CANON_PS_G3: PowerShot G3
+ * @CANON_PS_G5: PowerShot G5
* @CANON_PS_S230: PowerShot S230, Digital IXUS v3
* @CANON_PS_A60: PowerShot A60
* @CANON_EOS_10D: EOS 10D
@@ -123,6 +124,7 @@
CANON_PS_A300,
CANON_PS_S45,
CANON_PS_G3,
+ CANON_PS_G5,
CANON_PS_S50,
CANON_PS_S230,
CANON_EOS_10D,

View File

@ -0,0 +1,10 @@
--- camlibs/canon/usb.c.orig Sun Aug 10 20:51:13 2003
+++ camlibs/canon/usb.c Mon Oct 20 10:17:55 2003
@@ -356,6 +356,7 @@
case CANON_PS_S45:
case CANON_PS_G3:
+ case CANON_PS_G5:
default:
/* Special case: doesn't implement "get
picture abilities", but isn't an EOS

View File

@ -0,0 +1,11 @@
--- camlibs/canon/usb.h.orig Sun Aug 10 20:51:13 2003
+++ camlibs/canon/usb.h Mon Oct 20 10:17:57 2003
@@ -38,7 +38,7 @@
* @CANON_USB_FUNCTION_GET_PIC_ABILITIES: Command to "get picture abilities", which
* seems to be a list of the different sizes and quality of images that are available on
* this camera. Not implemented (and will cause an error) on the EOS cameras
- * or on newer PowerShot cameras such as the S45 and G3.
+ * or on newer PowerShot cameras such as the S45, G3 and G5.
* @CANON_USB_FUNCTION_GENERIC_LOCK_KEYS: Command to lock keys (and turn on "PC" indicator)
* on non-EOS cameras.
* @CANON_USB_FUNCTION_EOS_LOCK_KEYS: Lock keys (EOS cameras)