Patch to add HAL FDI info for MPMan MP-Ki 128

Bug #66239 reported by mibus
4
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Fix Released
Undecided
Martin Pitt
Nominated for Lucid by Julian Alarcon

Bug Description

Binary package hint: hal

This patch (from instructions at http://blog.pcode.nl/?p=176 ) adds detection for a 'Actions Semiconductor Co., Ltd MPMan MP-Ki 128 MP3 Player/Recorder').

mibus@kappa:~$ lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 002: ID 10d6:1100 Actions Semiconductor Co., Ltd MPMan MP-Ki 128 MP3 Player/Recorder
Bus 001 Device 001: ID 0000:0000

Relevant output from lshal (after patch):

udi = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK'
  info.udi = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK' (string)
  linux.subsystem = 'usb' (string)
  linux.hotplug_type = 1 (0x1) (int)
  usb_device.bus_number = 1 (0x1) (int)
  usb_device.can_wake_up = false (bool)
  usb_device.is_self_powered = false (bool)
  usb_device.version_bcd = 272 (0x110) (int)
  usb_device.speed_bcd = 4608 (0x1200) (int)
  usb_device.serial = 'USB 2.0(FS) FLASH DISK' (string)
  usb_device.linux.device_number = 2 (0x2) (int)
  usb_device.num_ports = 0 (0x0) (int)
  usb_device.max_power = 100 (0x64) (int)
  usb_device.device_revision_bcd = 256 (0x100) (int)
  info.product = 'MPMan MP-Ki 128 MP3 Player/Recorder' (string)
  usb_device.product = 'MPMan MP-Ki 128 MP3 Player/Recorder' (string)
  info.vendor = 'Actions Semiconductor Co., Ltd' (string)
  usb_device.vendor = 'Actions Semiconductor Co., Ltd' (string)
  usb_device.product_id = 4352 (0x1100) (int)
  usb_device.vendor_id = 4310 (0x10d6) (int)
  usb_device.device_protocol = 0 (0x0) (int)
  usb_device.device_subclass = 0 (0x0) (int)
  usb_device.device_class = 0 (0x0) (int)
  usb_device.num_interfaces = 1 (0x1) (int)
  usb_device.num_configurations = 1 (0x1) (int)
  usb_device.configuration_value = 1 (0x1) (int)
  usb_device.linux.sysfs_path = '/sys/devices/pci0001:10/0001:10:18.0/usb1/1-1' (string)
  info.linux.driver = 'usb' (string)
  info.bus = 'usb_device' (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_0_0_0001_10_18_0' (string)
  linux.sysfs_path_device = '/sys/devices/pci0001:10/0001:10:18.0/usb1/1-1' (string)
  linux.sysfs_path = '/sys/devices/pci0001:10/0001:10:18.0/usb1/1-1' (string)

udi = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK_usbraw'
  info.udi = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK_usbraw' (string)
  linux.device_file = '/dev/usbdev1.2' (string)
  linux.subsystem = 'usb_device' (string)
  linux.hotplug_type = 2 (0x2) (int)
  usbraw.device = '/dev/usbdev1.2' (string)
  info.product = 'USB Raw Device Access' (string)
  info.capabilities = {'usbraw'} (string list)
  info.category = 'usbraw' (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK' (string)
  linux.sysfs_path = '/sys/class/usb_device/usbdev1.2' (string)

udi = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK_if0'
  info.udi = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK_if0' (string)
  linux.subsystem = 'usb' (string)
  linux.hotplug_type = 1 (0x1) (int)
  info.product = 'USB Mass Storage Interface' (string)
  usb.interface.protocol = 80 (0x50) (int)
  usb.interface.subclass = 5 (0x5) (int)
  usb.interface.class = 8 (0x8) (int)
  usb.interface.number = 0 (0x0) (int)
  info.linux.driver = 'usb-storage' (string)
  usb.linux.sysfs_path = '/sys/devices/pci0001:10/0001:10:18.0/usb1/1-1/1-1:1.0' (string)
  usb.configuration_value = 1 (0x1) (int)
  usb.num_configurations = 1 (0x1) (int)
  usb.num_interfaces = 1 (0x1) (int)
  usb.device_class = 0 (0x0) (int)
  usb.device_subclass = 0 (0x0) (int)
  usb.device_protocol = 0 (0x0) (int)
  usb.vendor_id = 4310 (0x10d6) (int)
  usb.product_id = 4352 (0x1100) (int)
  usb.vendor = 'Actions Semiconductor Co., Ltd' (string)
  usb.product = 'USB Mass Storage Interface' (string)
  usb.device_revision_bcd = 256 (0x100) (int)
  usb.max_power = 100 (0x64) (int)
  usb.num_ports = 0 (0x0) (int)
  usb.linux.device_number = 2 (0x2) (int)
  usb.serial = 'USB 2.0(FS) FLASH DISK' (string)
  usb.speed_bcd = 4608 (0x1200) (int)
  usb.version_bcd = 272 (0x110) (int)
  usb.is_self_powered = false (bool)
  usb.can_wake_up = false (bool)
  usb.bus_number = 1 (0x1) (int)
  info.bus = 'usb' (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK' (string)
  linux.sysfs_path_device = '/sys/devices/pci0001:10/0001:10:18.0/usb1/1-1/1-1:1.0' (string)
  linux.sysfs_path = '/sys/devices/pci0001:10/0001:10:18.0/usb1/1-1/1-1:1.0' (string)

udi = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK_if0_scsi_host'
  info.udi = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK_if0_scsi_host' (string)
  linux.subsystem = 'scsi_host' (string)
  linux.hotplug_type = 2 (0x2) (int)
  scsi_host.host = 0 (0x0) (int)
  info.product = 'SCSI Host Adapter' (string)
  info.capabilities = {'scsi_host'} (string list)
  info.category = 'scsi_host' (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK_if0' (string)
  linux.sysfs_path_device = '/sys/devices/pci0001:10/0001:10:18.0/usb1/1-1/1-1:1.0/host0' (string)
  linux.sysfs_path = '/sys/class/scsi_host/host0' (string)

udi = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK_if0_scsi_host_scsi_device_lun0'
  info.linux.driver = 'sd' (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK_if0_scsi_host_scsi_device_lun0' (string)
  linux.subsystem = 'scsi' (string)
  linux.hotplug_type = 1 (0x1) (int)
  scsi.type = 'disk' (string)
  scsi.vendor = '' (string)
  scsi.model = '?w@??k?l?m?n?o?p' (string)
  info.product = 'SCSI Device' (string)
  scsi.lun = 0 (0x0) (int)
  scsi.target = 0 (0x0) (int)
  scsi.bus = 0 (0x0) (int)
  scsi.host = 0 (0x0) (int)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK_if0_scsi_host' (string)
  info.bus = 'scsi' (string)
  linux.sysfs_path_device = '/sys/devices/pci0001:10/0001:10:18.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0' (string)
  linux.sysfs_path = '/sys/devices/pci0001:10/0001:10:18.0/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0' (string)

udi = '/org/freedesktop/Hal/devices/storage_serial_10d6_USB_2_0_FS__FLASH_DISK_USB_2_0_FS__FLASH_DISK'
  info.addons = {'hald-addon-storage'} (string list)
  portable_audio_player.output_formats = {'audio/mpeg', 'audio/x-ms-wma', 'audio/x-wav'} (string list)
  portable_audio_player.storage_device = '/org/freedesktop/Hal/devices/storage_serial_10d6_USB_2_0_FS__FLASH_DISK_USB_2_0_FS__FLASH_DISK' (string)
  portable_audio_player.access_method = 'storage' (string)
  portable_audio_player.type = 'generic' (string)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_10d6_USB_2_0_FS__FLASH_DISK_USB_2_0_FS__FLASH_DISK' (string)
  info.udi = '/org/freedesktop/Hal/devices/storage_serial_10d6_USB_2_0_FS__FLASH_DISK_USB_2_0_FS__FLASH_DISK' (string)
  storage.requires_eject = false (bool)
  storage.hotpluggable = true (bool)
  info.capabilities = {'storage', 'block', 'portable_audio_player'} (string list)
  info.category = 'portable_audio_player' (string)
  info.product = '?w@??k?l?m?n?o?p' (string)
  info.vendor = '' (string)
  storage.removable = true (bool)
  storage.physical_device = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK_if0' (string)
  storage.lun = 0 (0x0) (int)
  storage.firmware_version = '0100' (string)
  storage.serial = '10d6_USB_2.0(FS)_FLASH_DISK_USB_2.0(FS)_FLASH_DISK' (string)
  storage.vendor = '' (string)
  storage.model = '?w@??k?l?m?n?o?p' (string)
  storage.drive_type = 'disk' (string)
  storage.automount_enabled_hint = true (bool)
  storage.media_check_enabled = true (bool)
  storage.no_partitions_hint = false (bool)
  storage.bus = 'usb' (string)
  block.is_volume = false (bool)
  block.minor = 0 (0x0) (int)
  block.major = 8 (0x8) (int)
  block.device = '/dev/sda' (string)
  linux.hotplug_type = 3 (0x3) (int)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_10d6_1100_USB_2_0_FS__FLASH_DISK_if0_scsi_host_scsi_device_lun0' (string)
  linux.sysfs_path_device = '/sys/block/sda' (string)
  linux.sysfs_path = '/sys/block/sda' (string)

udi = '/org/freedesktop/Hal/devices/volume_uuid_44ED_FD6D'
  volume.unmount.valid_options = {'lazy'} (string list)
  volume.mount.valid_options = {'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'noexec', 'quiet', 'utf8', 'shortname=', 'codepage=', 'iocharset=', 'umask=', 'dmask=', 'fmask=', 'uid='} (string list)
  org.freedesktop.Hal.Device.Volume.method_execpaths = {'hal-system-storage-mount', 'hal-system-storage-unmount', 'hal-system-storage-eject'} (string list)
  org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'} (string list)
  org.freedesktop.Hal.Device.Volume.method_names = {'Mount', 'Unmount', 'Eject'} (string list)
  info.interfaces = {'org.freedesktop.Hal.Device.Volume'} (string list)
  volume.ignore = false (bool)
  info.udi = '/org/freedesktop/Hal/devices/volume_uuid_44ED_FD6D' (string)
  info.product = 'Volume (vfat)' (string)
  volume.size = 526238208 (0x1f5dc200) (uint64)
  volume.num_blocks = 1027809 (0xfaee1) (int)
  volume.block_size = 512 (0x200) (int)
  info.capabilities = {'volume', 'block'} (string list)
  info.category = 'volume' (string)
  volume.is_partition = true (bool)
  volume.is_disc = false (bool)
  volume.is_mounted = true (bool)
  volume.mount_point = '/media/usbdisk' (string)
  volume.label = '' (string)
  volume.uuid = '44ED-FD6D' (string)
  volume.fsversion = 'FAT16' (string)
  volume.fsusage = 'filesystem' (string)
  volume.fstype = 'vfat' (string)
  storage.model = '' (string)
  block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_10d6_USB_2_0_FS__FLASH_DISK_USB_2_0_FS__FLASH_DISK' (string)
  block.is_volume = true (bool)
  block.minor = 0 (0x0) (int)
  block.major = 8 (0x8) (int)
  block.device = '/dev/sda' (string)
  linux.hotplug_type = 3 (0x3) (int)
  info.parent = '/org/freedesktop/Hal/devices/storage_serial_10d6_USB_2_0_FS__FLASH_DISK_USB_2_0_FS__FLASH_DISK' (string)
  linux.sysfs_path_device = '/sys/block/sda/fakevolume' (string)
  linux.sysfs_path = '/sys/block/sda/fakevolume' (string)

Patch:
--- 10-usb-music-players.fdi.orig 2006-08-16 01:01:07.000000000 +0930
+++ 10-usb-music-players.fdi 2006-10-15 21:23:21.000000000 +0930
@@ -34,6 +34,21 @@
       <!-- USB Mass Storage devices that are music players -->

       <match key="@storage.physical_device:info.bus" string="usb">
+
+ <!-- MPMan MP-Ki 128 Player -->
+ <match key="@storage.physical_device:usb.vendor_id" int="0x10d6">
+ <match key="@storage.physical_device:usb.product_id" int="0x1100">
+ <append key="info.capabilities" type="strlist">portable_audio_player</append>
+ <merge key="info.category" type="string">portable_audio_player</merge>
+ <merge key="portable_audio_player.type" type="string">generic</merge>
+ <merge key="portable_audio_player.access_method" type="string">storage</merge>
+ <merge key="portable_audio_player.storage_device" type="copy_property">info.udi</merge>
+ <append key="portable_audio_player.output_formats" type="strlist">audio/mpeg</append>
+ <append key="portable_audio_player.output_formats" type="strlist">audio/x-ms-wma</append>
+ <append key="portable_audio_player.output_formats" type="strlist">audio/x-wav</append>
+ </match>
+ </match>
+
        <!-- Jetflash MP3 Player -->
        <match key="@storage.physical_device:usb.vendor_id" int="0x066f">
           <match key="@storage.physical_device:usb.product_id" int="0x8000">

Revision history for this message
Alex Sutcliffe (alex.sutcliffe) wrote :

Hi,

I've got one of these too and I've got a couple of questions about it.

1. On my Ubuntu system, there's already an entry in 10-usb-music-players.fdi commented <!-- Foston 256MB --> for this vendor_id/product_id combo while my device is 512MB. Are the vendor_id/product_id combinations meant to be unique?

1. Mine can only play songs if they are in the root directory or one dir down. Should any entry in the fdi specify this through the portable_audio_player.folder_depth key?

Cheers,

Revision history for this message
mibus (launchpad-dot-net) wrote :

1. I think so. I didn't have one, I probably had an old fdi file? My device was also 512MB, the '128' is just from the USB ident string.

2. Mine is the same. I didn't see that option - if there is one, it would be good to add it in.

(FWIW, mine won't actually work as an MP3 player any more - either dd'ing images on and off of it upset it, or it's been through the wash... I'd really like a YP-U1 or something similar, which can play my existing Vorbis files)

Revision history for this message
Alex Sutcliffe (alex.sutcliffe) wrote :

I think that nominating a folder depth of 0 or 1 is probably right for this device ie:

<append key="portable_audio_player.folder_depth" type="int">0</append>

but I haven't been able to properly test this due to the problems I'm facing here: https://launchpad.net/distros/ubuntu/+source/banshee/+bug/71784

Revision history for this message
Alex Sutcliffe (alex.sutcliffe) wrote :

OK, as far as the folder depth goes, the line added should be:

<merge key="portable_audio_player.folder_depth" type="int">0</merge>

ie merge rather than append.

Martin Pitt (pitti)
Changed in hal:
assignee: nobody → pitti
status: Unconfirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

 hal (0.5.8.1-4ubuntu2) feisty; urgency=low
 .
   * Add back debian/patches/00upstream-06-stat-dev-not-mountpoint.patch and
     port it to 0.5.8.1. This fixes handling of NTFS-FUSE mounts again in
     Feisty. Closes: LP#35354
   * debian/patches/24_ignored_volumes.patch: Fix ignoring of Apple bootstrap
     partitions. Closes: LP#61767
   * debian/patches/24_ignored_volumes.patch: Ignore partitions without an
     fsusage, e. g. unformatted ones, Mac patch partitions, etc.
     Closes: LP#18901
   * Add debian/patches/00upstream-01-acpi-low-powerlevels.patch:
     - Fix ACPI problems with incorrect low current voltage values.
     - Patch taken from upstream git 9c99fc03fbac6380032a6678c641a76ef02ad834.
     - Closes: LP#66025
   * Add debian/patches/16_ntfs_allow_local_mount_option.patch: Allow 'locale='
     mount option for NTFS. Closes: LP#78370
   * Add debian/patches/00upstream-02-music-players.patch: Pull USB music
     player FDI file from git head. At the moment, this adds the Zen Nano.
     Closes: LP#77047
   * debian/patches/30-mp3-player-fdi.patch:
     - Add "Nexia NX58XX (including Super*Talent MegaScreen)". Closes: LP#77842
     - Add "Feiya Technology Corp Memory Bar". Closes: LP#77854
     - Add "MPMan MP-Ki 128". Closes: LP#66239

Changed in hal:
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
Julian Alarcon (julian-alarcon) wrote :

Mmm, one regression to Lucid Lynx.

My MP3 player is not recognized by Ubuntu 10.04 Lucid Lynx (updated)

Probably is the transition from HAL.

Changed in hal (Ubuntu):
status: Fix Released → Confirmed
tags: added: regression-potential
Revision history for this message
Martin Pitt (pitti) wrote :

This media player is in media-player-info already. Are you trying this with rhythmbox? Can you please give the output of "gvfs-mount -li" after plugging it in?

Changed in hal (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Julian Alarcon (julian-alarcon) wrote :

Martin, sorry for the late. I wasn't subscribed to this bug. here is some more info, a dmesg output, lsusb (using watch) and the suggested command output.

Nautilus, GVFS or Rhytmbox can't see it. The system don't show anything. Just the logs on this files.

Revision history for this message
Julian Alarcon (julian-alarcon) wrote :
Revision history for this message
Julian Alarcon (julian-alarcon) wrote :

Maybe my problem is a new bug, if you consider useful, I can open a new bug against GVFS.

Thanks!

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

Julian, it rather looks like not even the kernel sees a partition on this device. Is it perhaps using the entire device without partitions? It would be helpful if you could plug it in, and do

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

and attach /tmp/udev.txt here. Thanks!

Revision history for this message
Julian Alarcon (julian-alarcon) wrote :

Here is... my udevadm output.

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

Hm, udev sees it just fine. So let's walk up the ladder and check what udisks is doing. Please remove the device, do

  udisks --monitor-detail

then plug it in, let it settle, and copy&paste the output here. Thanks!

Revision history for this message
Julian Alarcon (julian-alarcon) wrote :

Sorry for the delay.

Here is the output of udisks --monitor-detail

I see this error:
(udisks:14925): udisks-WARNING **: Couldn't call GetAll() to get properties for /org/freedesktop/UDisks/devices/sdc: Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist

Revision history for this message
Julian Alarcon (julian-alarcon) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

@Julian: Right, it seems that the device keeps disappearing and reconnecting due to this kernel bug. So let's track this in bug 518186.

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.