blob: d4918d727fe229ad8d830df46bc3f70b458a7a76 [file] [log] [blame]
Linus Walleije8c54642006-03-28 09:45:00 +00001TODO file:
2----------
3
Linus Walleij7f2c3e32007-08-04 18:11:38 +00004COMPATIBILITY fixes:
5
61. COMPATIBILITY: dual-mode devices, i.e. devices exposing both an MTP
7 and a USB Mass Storage Device Class (flashdrive) interface are and
8 have always been problematic. We must find a way to get this to work,
9 eventually. The problem is that the in-kernel mass storage driver hogs
10 the device before the MTP mode gets a chance of being used, whereas
Linus Walleij1aec6fd2011-06-08 09:08:33 +020011 the Windows kernel driver apparently does it the other way around,
Linus Walleij7f2c3e32007-08-04 18:11:38 +000012 trying the MTP mode first and then not fall back on mass storage if
13 MTP is available. (For some more explanations se src/libusb-glue.h.)
Linus Walleije80d6bd2008-06-23 23:11:42 +000014 This may involve kernel modifications. Perhaps it is only necessary
15 to tweak the udev config not to load USB mass storage support for
16 these devices. Dunno.
Linus Walleij7f2c3e32007-08-04 18:11:38 +000017
Linus Walleij1aec6fd2011-06-08 09:08:33 +0200182. COMPATIBILITY: several devices tend to "hang" after disconnect,
19 needing to be unplugged and replugged before they can be used again.
Linus Walleij7f2c3e32007-08-04 18:11:38 +000020 We don't know why, it may be related to low-level USB behaviour that
Linus Walleij849dccc2007-10-22 08:53:35 +000021 is not exposed in the logs we read. On some devices it appear that
Linus Walleij1aec6fd2011-06-08 09:08:33 +020022 avoiding to release the USB interface after closing the PTP/MTP
Linus Walleij849dccc2007-10-22 08:53:35 +000023 session solves this, and might be a hint at how the Windows MTP stack
24 works: perhaps the Windows MTP daemon grabs the interface once the
Linus Walleije80d6bd2008-06-23 23:11:42 +000025 device is plugged in, created a session and NEVER release it.
26 Thus only unplug or shutdown ends the session. This behaviour can be
27 emulated (sort of) by DEVICE_FLAG_NO_RELEASE_INTERFACE which will
28 make the device not release the USB low-level interface, though it'll
29 still close the session. But is it really desireable to have
Linus Walleij849dccc2007-10-22 08:53:35 +000030 as default? Not unless we run an MTP daemon as well, probably, and
31 the behaviour is questionable from an USB interoperability point
32 of view.
Linus Walleij0558ac52006-09-07 06:55:03 +000033
Linus Walleij8a0a0db2007-08-16 07:34:16 +000034
Linus Walleijd5ad8852006-11-30 23:17:31 +000035SPEEDUP fixes:
Linus Walleijc3743492006-09-04 17:37:19 +000036
Linus Walleij7e3b3072009-01-19 22:51:17 +000037 None known. libmtp is fast :-)
Linus Walleij849dccc2007-10-22 08:53:35 +000038
Linus Walleijc3743492006-09-04 17:37:19 +000039
Linus Walleijd5ad8852006-11-30 23:17:31 +000040FEATURE fixes:
41
Linus Walleij849dccc2007-10-22 08:53:35 +0000421. FEATURE: Support playback and volume setting on devices that have it.
Linus Walleijee73ef22006-08-27 19:56:00 +000043 (I don't have one that does - Linus.)
Linus Walleijcf223e62006-06-19 09:31:53 +000044
Linus Walleij849dccc2007-10-22 08:53:35 +0000452. FEATURE: Support relevant events. MTP devices seen in existance provide
Linus Walleijd5ad8852006-11-30 23:17:31 +000046 events for "object added" and "object deleted". These should result in
Linus Walleije80d6bd2008-06-23 23:11:42 +000047 atleast a call to the cache update function.
Linus Walleija29ed2a2007-02-25 22:01:37 +000048
Linus Walleije80d6bd2008-06-23 23:11:42 +0000493. FEATURE: Mechanism to retrieve the device icon device property, else if not
Linus Walleije1d774b2010-11-30 23:49:36 +000050 present, look for DevIcon.fil (Windows ICO format) and
Linus Walleij7f2c3e32007-08-04 18:11:38 +000051 DevLogo.fil (PNG Format) images from the device (if available).
52
Linus Walleije80d6bd2008-06-23 23:11:42 +0000534. FEATURE: Shared device access so that multiple client applications can have
Linus Walleij7f2c3e32007-08-04 18:11:38 +000054 an open connection to the device at the same time via a handle. For example,
Linus Walleije1d774b2010-11-30 23:49:36 +000055 it should be somehow possible to run mtp-detect at the same time as amarok or
Linus Walleij7f2c3e32007-08-04 18:11:38 +000056 mtpfs is connected to a device. This would require some form of resource
Linus Walleij9e6e79c2013-04-22 22:14:11 +020057 sharing, discussions have centered on a D-Bus based connection arbiter
58 daemon.
Linus Walleija29ed2a2007-02-25 22:01:37 +000059
Linus Walleije80d6bd2008-06-23 23:11:42 +0000605. FEATURE: Implement an OpenSync backend for devices which have
Linus Walleijd78694d2007-11-05 11:51:03 +000061 calendaring, contact etc support. http://opensync.org/
62
Linus Walleij971914e2007-04-20 08:15:22 +000063
Linus Walleija29ed2a2007-02-25 22:01:37 +000064THOSE ARE ALREADY DONE:
65
Linus Walleij1aec6fd2011-06-08 09:08:33 +0200661. FEATURE: Make an API that can return several devices and let the user
Linus Walleija29ed2a2007-02-25 22:01:37 +000067 choose which one to operate, not just connect to the first one...
Linus Walleijf0bf4372007-07-01 21:47:38 +000068
692. SPEED: Cache the object info for all items on the device.
70 Right now, ptp_getobjectinfo() is called repeatedly on the same
71 objects during startup, track listing, file listing, playlist listing,
72 album listing and whatever we implement tomorrow. A lot of useless
73 communication can be saved by cacheing this info. Notice that this
74 needs to be updated whenever flush_handles() is called too.
75 (This came from libgphoto2 implementing it!)
Linus Walleij338ade42007-07-03 20:44:08 +000076
773. SPEED: Cache track metadata, file metadata etc in params->proplist.
78
tsaarnia3eb60a2007-07-06 17:41:30 +0000794. SPEED: Whenever we add an object (file, track, playlist...) we
80 should only need to update the cache with relevant data. Atleast for
81 speedup caches.
Linus Walleij849dccc2007-10-22 08:53:35 +000082
835. COMPATIBILITY: account for different step sizes and intervals on some
84 numeric properties we set, make the functions round off when possible.
85
866. SPEED: Cache the supported object properties at first read/startup.
87 then use the cache to check for supported props instead of calling
88 out to PTP with ptp_mtp_getobjectpropssupported() every time.
89 The cache would be an array of size params->deviceinfo.ImageFormats_len
Linus Walleij1aec6fd2011-06-08 09:08:33 +020090 with a list for each format of the properties it will support. Notice
Linus Walleij849dccc2007-10-22 08:53:35 +000091 that this needs to be updated whenever flush_handles() is called too.
Linus Walleij1aec6fd2011-06-08 09:08:33 +020092 THIS HAS BEEN DISCARDED, TERO IMPLEMENTED IT BUT IT DOESN'T SEEM TO
Linus Walleij849dccc2007-10-22 08:53:35 +000093 YIELD MUCH.
94
Linus Walleij1aec6fd2011-06-08 09:08:33 +0200957. FEATURE: Make abstract playlists really become size -1 when created as
Linus Walleij849dccc2007-10-22 08:53:35 +000096 the ones created on the device instead of the current 1 byte size.
97 (Is this possible using enhanced commands? See TODO remarks in
98 the create_abstract_entity() function)
99
1008. FEATURE: Integrate libmtp with HAL / D-Bus so applications can dynamically
Linus Walleij1aec6fd2011-06-08 09:08:33 +0200101 know when a device has been plugged in or removed. Need a mechanism to
Linus Walleij849dccc2007-10-22 08:53:35 +0000102 connect a specific hal UDI.
Linus Walleij7e3b3072009-01-19 22:51:17 +0000103
1049. SPEEDUP: The recursive function that builds the folder tree is
105 O(n^2)! Atleast remove all non-folders (PTP associations) from the
106 list before we start sorting and building that tree. We walk the
107 entire list for each group of siblings right now!
Linus Walleij1aec6fd2011-06-08 09:08:33 +0200108
10910. FEATURE: program to autoprobe device interfaces on connection.
110
11111. FEATURE: accomodate Googles uncached device needs.
112
11312. FEATURE: rudimentary event interface.