Creative Zen Touch not properly detected

Bug #478789 reported by Francois Jaouen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
media-player-info (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

Binary package hint: media-player-info

While hacking on rhythmbox to make it recognize my MTP Creative Zen Touch already mounted by gvfs/libgphoto2, I found 2 problems in media-player-info package :

1/ Creative Zen Touch is missing in 90-usb-media-players.rules. IdVendor="041e", idProduct="4131"
I added it to :
ATTRS{idVendor}=="041e" , ATTRS{idProduct}=="4115|4116|4117|4120|411e|4128|412b|4130|4131" , ENV{ID_MEDIA_PLAYER}="creative-4115_4116_4117_4120_411e_4128_412b_4130"
Rq : 40-libgphoto2-2.rules is ok.

2/ Line 2 of 90-usb-media-players.rules prevents MTP devices rules to be triggered (at least for Creative ZT). I guess MTP devices are not block devices :
SUBSYSTEM!="block", GOTO="media_player_end"
Everything run smoother since this line is commented out.

Hope this help.

Related branches

Revision history for this message
Martin Pitt (pitti) wrote :

1) fixed in http://cgit.freedesktop.org/media-player-info/commit/?id=e0980bfa454e0d4bfeeb0495d85079c54f58419d

For (2) I'd appreciate if you could do

 udevadm info --export-db > /tmp/udev.txt

and attach /tmp/udev.txt here, so that I can fix the rules for mtp devices?

Changed in media-player-info (Ubuntu):
status: New → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

Nevermind, I found an MTP player and can do it myself.

Changed in media-player-info (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Incomplete → In Progress
Revision history for this message
Francois Jaouen (francois-jaouen) wrote : Re: [Bug 478789] Re: Creative Zen Touch not properly detected

Good evening Martin,

I've extracted the information I believe is useful. If I'm wrong let me
know.

I didn't report the correction in my current Karmic, but I can also do
it if you need it.

Thank you for your help
François

output of udevadm info --export-db :

P: /devices/pci0000:00/0000:00:1d.7/usb2/2-4
N: bus/usb/002/004
S: libmtp-2-4
S: char/189:131
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb2/2-4
E: MAJOR=189
E: MINOR=131
E: DEVNAME=/dev/bus/usb/002/004
E: DEVTYPE=usb_device
E: DRIVER=usb
E: PRODUCT=41e/4131/100
E: TYPE=255/0/0
E: BUSNUM=002
E: DEVNUM=004
E: SUBSYSTEM=usb
E: ID_VENDOR=Creative_Technology_Ltd
E: ID_VENDOR_ENC=Creative\x20Technology\x20Ltd
E: ID_VENDOR_ID=041e
E: ID_MODEL=Creative_Zen_Touch
E: ID_MODEL_ENC=Creative\x20Zen\x20Touch
E: ID_MODEL_ID=4131
E: ID_REVISION=0100
E: ID_SERIAL=Creative_Technology_Ltd_Creative_Zen_Touch_0101255115038FE4
E: ID_SERIAL_SHORT=0101255115038FE4
E: ID_BUS=usb
E: ID_USB_INTERFACES=:000000:
E: ID_GPHOTO2=1
E: GPHOTO2_DRIVER=proprietary
E: ID_MEDIA_PLAYER=1
E: ACL_MANAGE=1
E: DEVLINKS=/dev/libmtp-2-4 /dev/char/189:131

P: /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4:1.0
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4:1.0
E: DEVTYPE=usb_interface
E: DRIVER=usbfs
E: PRODUCT=41e/4131/100
E: TYPE=255/0/0
E: INTERFACE=0/0/0
E: MODALIAS=usb:v041Ep4131d0100dcFFdsc00dp00ic00isc00ip00
E: SUBSYSTEM=usb

Le 17/03/2010 18:21, Martin Pitt a écrit :
> 1) fixed in http://cgit.freedesktop.org/media-player-
> info/commit/?id=e0980bfa454e0d4bfeeb0495d85079c54f58419d
>
> For (2) I'd appreciate if you could do
>
> udevadm info --export-db> /tmp/udev.txt
>
> and attach /tmp/udev.txt here, so that I can fix the rules for mtp
> devices?
>
> ** Changed in: media-player-info (Ubuntu)
> Status: New => Incomplete
>
>

Revision history for this message
Francois Jaouen (francois-jaouen) wrote : Fwd: Re: [Bug 478789] Re: Creative Zen Touch not properly detected

Good evening Martin,

I've extracted the information I believe is useful. If I'm wrong let me
know.

I didn't report the correction in my current Karmic, but I can also do
it if you need it.

Thank you for your help
François

output of udevadm info --export-db :

P: /devices/pci0000:00/0000:00:1d.7/usb2/2-4
N: bus/usb/002/004
S: libmtp-2-4
S: char/189:131
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb2/2-4
E: MAJOR=189
E: MINOR=131
E: DEVNAME=/dev/bus/usb/002/004
E: DEVTYPE=usb_device
E: DRIVER=usb
E: PRODUCT=41e/4131/100
E: TYPE=255/0/0
E: BUSNUM=002
E: DEVNUM=004
E: SUBSYSTEM=usb
E: ID_VENDOR=Creative_Technology_Ltd
E: ID_VENDOR_ENC=Creative\x20Technology\x20Ltd
E: ID_VENDOR_ID=041e
E: ID_MODEL=Creative_Zen_Touch
E: ID_MODEL_ENC=Creative\x20Zen\x20Touch
E: ID_MODEL_ID=4131
E: ID_REVISION=0100
E: ID_SERIAL=Creative_Technology_Ltd_Creative_Zen_Touch_0101255115038FE4
E: ID_SERIAL_SHORT=0101255115038FE4
E: ID_BUS=usb
E: ID_USB_INTERFACES=:000000:
E: ID_GPHOTO2=1
E: GPHOTO2_DRIVER=proprietary
E: ID_MEDIA_PLAYER=1
E: ACL_MANAGE=1
E: DEVLINKS=/dev/libmtp-2-4 /dev/char/189:131

P: /devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4:1.0
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4:1.0
E: DEVTYPE=usb_interface
E: DRIVER=usbfs
E: PRODUCT=41e/4131/100
E: TYPE=255/0/0
E: INTERFACE=0/0/0
E: MODALIAS=usb:v041Ep4131d0100dcFFdsc00dp00ic00isc00ip00
E: SUBSYSTEM=usb

Le 17/03/2010 18:21, Martin Pitt a écrit :
> 1) fixed in http://cgit.freedesktop.org/media-player-
> info/commit/?id=e0980bfa454e0d4bfeeb0495d85079c54f58419d
>
> For (2) I'd appreciate if you could do
>
> udevadm info --export-db> /tmp/udev.txt
>
> and attach /tmp/udev.txt here, so that I can fix the rules for mtp
> devices?
>
> ** Changed in: media-player-info (Ubuntu)
> Status: New => Incomplete
>
>

Revision history for this message
Martin Pitt (pitti) wrote :

BTW, right now m-p-i is not really meant to have MTP players, since they are already covered by 40-libgphoto2-2.rules and 45-libmtp8.rules. "Everything run smoother since this line is commented out." -> what is that in particular? You see the device in RB now, and not before? Different icon on the desktop? Different dialog after you plug it in?

Thanks!

Revision history for this message
Martin Pitt (pitti) wrote :

Also, rhythmbox reads the supported storage formats from the device itself (through MTP), so we do not actually need to put MTP devices into m-p-i.

Revision history for this message
Martin Pitt (pitti) wrote :

Considering this "fix committed", the new ID is upstream now.

Changed in media-player-info (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Francois Jaouen (francois-jaouen) wrote : Re: [Bug 478789] Re: Creative Zen Touch not properly detected

"Everything run smoother since this line is commented out."

I was hacking Rhythmbox in order to use gvfs layer instead of direct access to mtp devices when I encountered the problem.
Rb relies on mpi files for UMS devices and I plugged MTP devices on the same code (so I needed that ID_MEDIA_PLAYER points to the mpi file what 90-usb-media-players.rules is supposed to do AFAIU)
(more details : https://bugzilla.gnome.org/show_bug.cgi?id=520121#c5 )

I filled the current bug during this hack but the patch was refused so there is no big to fix it.

Nevertheless I still don't understand the logic of 90-usb-media-players.rules.
At first it defines data (ex: ID_MEDIA_PLAYER the one I was looking for) for pure MTP devices (read no UMS support) but because of
SUBSYSTEM!="block", GOTO="media_player_end" these data are never read.
So, it doesn't make any sense to me to correct the first point (adding id 4131 for Creative Zen Touch) and not the above test.
Can you shed some light on this disturbing point ?

Thank you

François

PS : If its not the right place to discuss of udev/m-p-i let me know where I can find information.

Le 18/03/2010 14:29, Martin Pitt a écrit :
> Considering this "fix committed", the new ID is upstream now.
>
> ** Changed in: media-player-info (Ubuntu)
> Status: In Progress => Fix Committed
>
>

Revision history for this message
Martin Pitt (pitti) wrote :

Francois Jaouen [2010-03-18 21:47 -0000]:
> "Everything run smoother since this line is commented out."
>
> I was hacking Rhythmbox in order to use gvfs layer instead of direct
> access to mtp devices when I encountered the problem. Rb relies on
> mpi files for UMS devices and I plugged MTP devices on the same code
> (so I needed that ID_MEDIA_PLAYER points to the mpi file what
> 90-usb-media-players.rules is supposed to do AFAIU)

Ah, I see. Well, it would certainly be nice if gvfs would also get
along with the player through the libgphoto backend, so that you can
also browse files in nautilus, etc.

Unfortunately I only have a Samsung U5 here, which speaks both UMS and
MTP. So in gvfs/nautilus I see the mount, and if I open RB it unmounts
and uses libmtp.

So if m-t-p knows about an MTP device, I don't see why it would hurt
to set the actual mpi file instead of just "1" (what the libgphoto
rules do).

> Nevertheless I still don't understand the logic of
> 90-usb-media-players.rules. At first it defines data (ex:
> ID_MEDIA_PLAYER the one I was looking for) for pure MTP devices
> (read no UMS support) but because of SUBSYSTEM!="block",
> GOTO="media_player_end" these data are never read.

Well, 95% of mtp is a direct import of hal-info's music-player
database by now; it's not unlikely that this also contained MTP
players.

> So, it doesn't make any sense to me to correct the first point
> (adding id 4131 for Creative Zen Touch) and not the above test.

Agreed. I'd like to fix the test, too. I'll get to that soon.

> PS : If its not the right place to discuss of udev/m-p-i let me know
> where I can find information.

It's fine. mpi bugs are tracked on bugs.freedesktop.org these days,
but since I'm upstream I don't care much whether it's on fd or LP :)

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
Martin Pitt (pitti) wrote :

Can you apply this to /lib/udev/rules.d/90-usb-media-players.rules?

   http://cgit.freedesktop.org/media-player-info/commit/?id=a98f03dc1e6dd3b67e376931c5c88ad8d46c4fb8

This works fine for my U5, I now get

UDEV [1268985835.424954] add /devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8.2 (usb)
SUBSYSTEM=usb
DEVNAME=/dev/bus/usb/001/013
ID_VENDOR=Samsung
ID_VENDOR_ENC=Samsung
ID_VENDOR_ID=04e8
ID_MODEL=U5
ID_MODEL_ENC=U5
ID_MODEL_ID=5121
ID_REVISION=0001
ID_SERIAL=Samsung_U5_0B3300006755D2100002DA783745D210
ID_SERIAL_SHORT=0B3300006755D2100002DA783745D210
ID_BUS=usb
ID_USB_INTERFACES=:080650:
ID_GPHOTO2=1
GPHOTO2_DRIVER=proprietary
ID_MEDIA_PLAYER=samsung-u5

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package media-player-info - 5-1

---------------
media-player-info (5-1) unstable; urgency=low

  * New upstream release:
    - add iRiver H320, H340 (LP: #487963)
    - add Amazon Kindle 2
    - Add Motorola Droid (LP: #495764)
    - Add Philips GoGear RaGa (SA1942/02) (LP: #528948)
    - Add Creative Zen Touch. (LP: #478789)
    - Add Samsung U5
    - Move udev rules to a much earlier place
    - Add support for per-device icons
    - apple-ipod.mpi: Set "multimedia-player-ipod" icon
  * Add debian/watch.
  * debian/control: Bump Standards-Version to 5 (no changes necessary).
  * Switch to dpkg-source 3.0 (quilt) format.
 -- Martin Pitt <email address hidden> Thu, 18 Mar 2010 15:21:01 +0100

Changed in media-player-info (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Francois Jaouen (francois-jaouen) wrote :

Thank you Martin

Your fix works like a charm

Thank you also for your explaination about legacy hal database.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.