Re: [RFC/PATCH 0/2] u_char.c and mtp.c patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ext Linus Walleij wrote:
2010/4/20 Roger Quadros <roger.quadros@xxxxxxxxx>:

http://libmtp.cvs.sourceforge.net/viewvc/*checkout*/libmtp/libmtp/src/libusb-glue.c?revision=1.284
Do you know if these older Windows OSes request the OS descriptor when the
device uses a standard USB class code?

I haven't tested, but I think Windows will attempt to always use the OS
descriptor first and foremost.

AFAIK the MTP device device should use PTP Class, Subclass and protocol
codes (i.e. 6:1:1). In this case Windows XP treats it as a PTP device (even
if the device implements OS descriptors).

I'm sure all MTP devices in the market that implement OS descriptors use
Vendor Specific class (i.e. 0xff:0:0) which is not the right thing to do
after MTP has been standardized by usb.if.

Yes they should, but still very few devices, if any, use the PTP class code.

The reason behind, and the reason to why they use the OS descriptor at all,
if I understood correctly, was that Microsoft actually *wanted* to use the PTP
class for MTP devices, but to do that the MTP extensions had to pass
through the USB IF standardization process which took some three years or
so. In the meantime USB IF forbade them to use the PTP class code for
something that was not officially a PTP extension.

So these devices all are class 0xff  "vendor specific" or 0x00 "defined at
interface level". (One device mistakedly use class code 111 decimal!)
I haven't however looked at what they're using as bInterfaceClass really,
perhaps there are MTP devices out there that define themselves as PTP,
I've never heard of one, other than the experimental device that was used
to implement the proper detection algorithm in libmtp.

I think Windows only knows they are MTP devices by either
probing the OS descriptor or having a built-in table of MTP-compliant
vendor/device ID pairs. Probably both, because some of the very earliest
"PMC" (Portable Media Center) models didn't even have OS descriptors.

I guess Felipe may have first-hand experience with using the PTP class
code only? Maybe this works in the latest Windowses, post-USB IF
standardization? No idea.

Maybe tagging a device with the PTP class  and subclass 0x01 will make
it always fall back to PTP mode only under Windows, MTP features disabled,
this would not surprise me one bit.

I can confirm this. Using PTP class code for an MTP device and no OS descriptors, falls back to PTP mode on Windows XP. On Windows 7 it works as MTP device. Need to confirm on Vista though.

On Linux (Ubuntu 9.04) it works as PTP device.

-roger
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Gstreamer Embedded]     [Linux MMC Devel]     [U-Boot V2]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux ARM Kernel]     [Linux OMAP]     [Linux SCSI]

  Powered by Linux