Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Oct 2003 11:01:54 +0200
From:      Andreas Klemm <andreas@klemm.apsfilter.org>
To:        portmgr@freebsd.org
Cc:        ports@freebsd.org
Subject:   Request for Approvel to commit Fix/Patch for Canon PowerShot G5 support for graphics/libgphoto2 port
Message-ID:  <20031020090154.GA60691@titan.klemm.apsfilter.org>

next in thread | raw e-mail | index | archive | help

--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

the Canon PowerShot G5 doesn't work in libgphoto2.
It should be supported by the ptp2 driver, but there seem to be some
rough edges with this.

The G3 driver would work, but you can't select it ...

My patches add PowerShot G5 support in a way like the G3 model
is supported and this way it works.

Please note, you have to select the PowerShot G5 (normal mode)
driver, just for the case gphoto2 should autodetect the camera
with the not working ptp2 driver.

This can be done the easiest way by using digikam's setup menu
and selecting the right driver.

Since FreeBSD ports is in semi-freeze phase I suggest adding
this as a hot fix to fix PowerShot G5 support
and to enhance the functionality of the following ports
	- libgphoto2
	- gphoto2
	- digikam (graphical gphoto2 frontend for KDE)
	- gtkam (graphical gphoto2 frontend for GNOME)

My changes (ChangeLog):
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.

The following problem with the ptp2 driver has been solved this way:

> root# env LANG=C gphoto2 --debug --debug --auto-detect --summary
> [...]
> 2.039509 gphoto2-camera(2): Initializing camera...
> 2.039673 gphoto2-port-usb(1): Looking for USB device (vendor 0x4a9, product 0x3085)... found.
> 2.039717 gphoto2-camera(2): Loading '/usr/local/lib/gphoto2/2.1.2/libgphoto2_ptp2.so'...
> 2.040375 gphoto2-port(2): Opening USB port...
> 2.040653 gphoto2-port(2): Setting timeout to 8000 millisecond(s)...
> 2.040713 ptp(2): PTP: Opening session
> 2.040755 gphoto2-port(2): Writing 16=0x10 byte(s) to port...
> 2.040799 gphoto2-port(3): Hexdump of 16 = 0x10 bytes follows:
> 0000  10 00 00 00 01 00 02 10-00 00 00 00 01 00 00 00  ................
> 
> gp_port_write: No such file or directory
> 2.040993 PTP2/library.c(2): PTP: gp_port_* function returned 0xffffffdd 	 -35
> 2.041070 context(0): PTP I/O error
> 
> *** Error ***              
> PTP I/O error
> 2.041161 gphoto2-port(2): Closing port...
> 2.041348 context(0): An error occurred in the io-library ('Unspecified error'): No error description available
> 
> *** Error ***              
> An error occurred in the io-library ('Unspecified error'): No error description available
> *** Error (-1: 'Unspecified error') ***       
> 
> 2.044118 gp-camera(2): Freeing camera...
> 2.044256 gphoto2-port(2): Freeing port...
> 2.044290 gphoto2-port(2): Closing port...
> 2.044499 libgphoto2/gphoto2-filesys.c(2): Clearing fscache LRU list...
> 2.044560 libgphoto2/gphoto2-filesys.c(2): fscache LRU list already empty
> 2.044589 gphoto2-filesystem(2): Internally deleting all folders from '/'...

Best regards and have fun using the patches

	Andreas ///

-- 
http://www.64bits.de
http://www.apsfilter.org/
http://people.FreeBSD.ORG/~andreas
http://members.ebay.de/aboutme/anklemm/

--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-ChangeLog

--- 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.

--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="patch-camlibs:canon:canon.c"

--- 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",

--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="patch-camlibs:canon:canon.h"

--- 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,

--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="patch-camlibs:canon:usb.c"

--- 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

--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="patch-camlibs:canon:usb.h"

--- 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)

--C7zPtVaVf+AK4Oqc--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031020090154.GA60691>