Request for review: libifp

Per Bjornsson perbj at stanford.edu
Thu Jul 7 21:46:14 UTC 2005


On Thu, 2005-07-07 at 16:50 -0400, Ignacio Vazquez-Abrams wrote:
> libifp: A general-purpose library-driver for iRiver's iFP portable audio
> players

Cool! This is one of the things I have been looking at but I have been
way too sidetracked with writing my thesis to get anywhere with Fedora
stuff yet... 

I have one question though: Does this actually work correctly nowadays
as a regular user without any tricky chowning of the device file
in /proc/bus/usb/<whatever> ? I stole the scripts that do this for
digital cameras (shipped with gphoto) and adjusted for iriver players.
(I may still be missing some relevant USB IDs in the usermap file but
that's a pretty easy fix.) The developer told me that it seemed to work
without any trickery on FC3 but I never ever got that to work. (I
suspected that he had forgotten that he hacked his usb.usermap file at
some point... ;) ) I haven't tried on FC4 yet.

Unfortunately I don't have an iriver here to test with so I may be off
base. Perhaps HAL actually deals with handing the device over to the
console owner nowadays?

In any case, attached is a ever-so-slightly hacked copy of the hotplug
script from the gphoto package, and the "usermap" file which identifies
the iriver devices. If your package doesn't work without being root you
can put these in /etc/hotplug/usb and that should hand the device over
to the current console owner when it is plugged in, just like a digital
camera is.

On another note, if this is not necessary, the gphoto package should
probably be changed not to do this either, I can't see where ther
difference is...

I'll test at home tonight if these are necessary, using your package.

Cheers,
Per

-- 
Per Bjornsson <perbj at stanford.edu>
Ph.D. Candidate, Department of Applied Physics, Stanford University
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libifp
Type: application/x-shellscript
Size: 1846 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-extras-list/attachments/20050707/bf948766/attachment.bin>
-------------- next part --------------
# This file is shipped with libifp (based on a similar file in
# the libsane package as shipped by Red Hat).
#
# The entries below are used to detect an iRiver iFP portable music
# player when it is plugged in and then run the libifp hotplug script to 
# change the ownership and permissions on the "device node" used by
# libusb.
#
# The 0x0003 match flag means the device is matched by its vendor and
# product IDs.
#
# Sample entry (replace 0xVVVV and 0xPPPP with vendor ID and product ID respectively) :
# libiriver      0x0003      0xVVVV   0xPPPP    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
#
# usb module         match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
#
#
# The following list already contains the known iRiver iFP devices, with the
# product IDs copied from the header file for libifp.
# If it doesn't work for yours, try adding an appropriate entry.

# iRiver iFP-1XX
libifp 0x0003 0x4102 0x1001 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
#iRiver iFP-3XX
libifp 0x0003 0x4102 0x1003 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
#iRiver iFP-5XX
libifp 0x0003 0x4102 0x1005 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
#iRiver iFP-7XX
libifp 0x0003 0x4102 0x1007 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
#iRiver iFP-8XX
libifp 0x0003 0x4102 0x1008 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
#iRiver iFP-9XX
libifp 0x0003 0x4102 0x1009 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
#iRiver iFP-10XX
libifp 0x0003 0x4102 0x1010 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
#iRiver N10
libifp 0x0003 0x4102 0x1011 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000


More information about the fedora-extras-list mailing list