USB support for PortalPlayer PP502x based DAPs
Mass storage
Summary
It's not ready yet. The main problems are:
- bad signal quality (should be fixed now)
- a bug in the sansa flash driver that only seems to show up when using USB that causes data corruption
Signal Quality
USB connections should now (as of r17195) mostly work properly, but more testing is needed. There still are problems with hubs.
If you have problems, try a different port on your PC. Back-side ports generally work better than front-side ports.
Sansa SD-driver bug
See FS#8663. This seems to affect c200 much more than e200, although since applying the quick fix in FS#8663 I haven't seen it yet. No guarantees though, and FS#8663 doesn't fix it on e200. It also seems more frequent on high speed than on full speed. There might also be a difference between internal flash and microSD card.
This bug doesn't affect non-sansa players at all. I haven't heard about data corruption on non-sansa since the very early USB stack days.
Minor issues
- Charging from USB is not fully implemented on most players
Enabling mass storage support
If you're still undeterred, edit your Makefile, and change the EXTRA_DEFINES line to say: "export EXTRA_DEFINES=-DUSE_HIGH_SPEED -DUSE_ROCKBOX_USB" for high-speed or "export EXTRA_DEFINES=-DUSE_ROCKBOX_USB" for full speed
logf() over USB Serial
logf() over usb serial seems to work well at full speed, not so well at high speed (but full speed should be sufficient for this)
To enable this, edit firmware/export/usb_core.h and change the following:
- remove the comment marker from #define USB_SERIAL
- (if you are only interested in logf) comment out the #define USB_STORAGE. This step is optional, but if you leave storage enabled, remember to hold the appropriate key to put the device in "charging only" mode while plugging in, or you won't be able to debug anything but storage
- edit your Makefile, and change the EXTRA_DEFINES line to say: "export EXTRA_DEFINES=-DUSE_ROCKBOX_USB"
You should then get a "logf over usb" in the debug menu. Use this to enable or disable the logf sending, while not connected. Results of changing this while connected are undefined.
To use this from linux, run "modprobe usbserial vendor=0x0781 product=0x7450" (for a sansa c200, change vendor and product id as appropriate, see lsusb output for yours). You should then get a /dev/ttyUSB* device when plugging in. You can then use this e.g. with "cu -l /dev/ttyUSB0", or any other serial communications program of your choice (i.e. minicom)
The usb serial implementation doesn't seem complete enough to be usable from Windows. Support under Mac OSX is unknown.
|