Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Operating System/Drivers
  • Assigned To No-one
  • Operating System PortalPlayer-based
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Dave Chapman - 2007-09-01
Last edited by Dave Chapman - 2007-09-04

FS#7691 - Improved PP (ipod) USB detection

This patch (hopefully) improves the USB detection on PortalPlayer targets, fixing the following bugs:

1) MENU needed to be held for a long time (10 seconds or more) in order to prevent Rockbox rebooting into disk mode.

2) Windows would display an “unknown usb device” message

It also changes the target-tree function usb_detect() on all targets from bool to int, returning USB_INSERTED or USB_EXTRACTED instead of true or false.

This change was made to enable the PP usb_detect() function to check for USB_POWER and return that as a third value.

The PP usb_detect() function also checks for USB_POWER_BUTTON being held, and will not call dr_controller_run if MENU is held.

I’ve tested this patch on an iPod Color and a Gigabeat F, but would like it to be tested more widely (especially on different PP targets connecting to different host operating systems) before committing.

The task blocks this from closing
ID Project Summary Priority Severity Assigned To Progress
4762 Rockbox  FS#4762 - Random resets when playing while plugged in (USB)  Very Low Medium
100%
Closed by  Dave Chapman
2007-09-04 08:03
Reason for closing:  Accepted
Additional comments about closing:  

Committed to SVN. Thanks to all for testing.

Peter D'Hoye commented on 2007-09-01 18:29

patch is 0 bytes…

Nick Waterton commented on 2007-09-01 18:30

looks like it would be a useful patch, but your patch (diff) file is empty!

Dave Chapman commented on 2007-09-01 18:32

Patch attached to first comment should now be fine.

Nick Waterton commented on 2007-09-01 19:10

Thanks, patch is fine now.
I downloaded, patched with no problems, and compiled fine.
Menu hold and "unknown USB" fix works great.

Tested in iPod nano, Win XP.

Peter D'Hoye commented on 2007-09-01 19:27

no different behavior seen on H10-5gb

Xinlu Huang commented on 2007-09-01 20:59

Works great on my 60GB ipod. No error message & short menu hold prevents disk mode. Also seems to fix my problem with my external charger (it used to trigger disk mode without menu hold; now rockbox seems to be able to detect that this is a charger, not usb connection).

Xinlu Huang commented on 2007-09-01 23:38

Works great on my 60GB ipod. No error message & short menu hold prevents disk mode. Also seems to fix my problem with my external charger (it used to trigger disk mode without menu hold; now rockbox seems to be able to detect that this is a charger, not usb connection).

David Hall commented on 2007-09-02 15:04

"Menu" to prevent entering of disk mode works now with only a momentary push.
iPod still reboots into Apple disk mode when "Menu" not depressed while inserting USB cable.
Tested with an iPod 5th gen and Nano on Ubuntu and Windows 2000.

Only issue which remains (on my 5th gen, not my Nano)(separate bug?) is that booting with a USB cable inserted will successfully boot Rockbox, but Rockbox will freeze at the main menu - disk spinning - forever. Rockbox, in this state, does not respond to any button press except in activating the backlight.

Peter D'Hoye commented on 2007-09-02 15:21

Freezing on boot when USB was inserted is something that happens on all targets I think. At least my H380 does it too.

David Hall commented on 2007-09-02 15:27

I am unable to make my Nano freeze on boot while USB is inserted. It boots normally, 2 seconds later the USB plug image shows and it successfully reboots into Apple disk mode.

Dave Chapman commented on 2007-09-02 22:00

I forgot to adjust the bootloaders with my first patch - here's an update.

Would someone be able to test the USB detection in the Sansa bootloader (the only PP bootloader that does USB detection) with this patch?

Jonathan Gordon commented on 2007-09-02 23:58

sansabooloader stll works correctly. with this patch

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing