Notice: A non well formed numeric value encountered in /sites/ on line 96 Notice: A non well formed numeric value encountered in /sites/ on line 96 Notice: A non well formed numeric value encountered in /sites/ on line 96 Deprecated: Function create_function() is deprecated in /sites/ on line 104 Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /sites/ on line 845 Deprecated: Function create_function() is deprecated in /sites/ on line 111 FS#11101 : user selectable USB cable bevaviour



FS#11101 - user selectable USB cable bevaviour

Attached to Project: Rockbox
Opened by Oron Lavi (llhell) - Sunday, 14 March 2010, 01:45 GMT
Task Type Patches
Category Configuration
Status Unconfirmed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.4
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


Added new menu item under Settings.General.System, to select whether USB cable connection enters charging mode by default, or data transfer mode.

By default, the option is set to "No". Meaning, in order to have RB enter charging mode, a specific button should be pressed by the user.

If the option is set to "Yes", USB connection causes RB to enter charging mode, unless the specified button is pressed, causing RB to switch into data xfer mode.
This task depends upon

Comment by Oron Lavi (llhell) - Sunday, 14 March 2010, 01:49 GMT
Forgot to mention - this patch takes effect only when USB is connected while RB is on. If connecting while device is off, OF still boots as usual.
Comment by Jonathan Gordon (jdgordon) - Sunday, 14 March 2010, 12:15 GMT
the usb.c and usb.h changes need to be fixed. we have a rule that the firmware level doesnt call any apps level stuff (including global_settings). look at how the backlight settings work for a good way to do it.
Comment by Oron Lavi (llhell) - Sunday, 14 March 2010, 20:35 GMT
done. hopefully this is how you meant it should be fixed :)
Comment by Frank Gevaerts (fg) - Saturday, 20 March 2010, 15:45 GMT
I don't mind the functionality, but I strongly object to some of the terminology and naming used.

"usb charging mode" does not at all imply what the setting does, and "usb_charging_by_default" seems to imply that if it's set to false, the device will not charge.

These settings and variable names seem to imply that rockbox will not charge while connected in MSC mode, which is plainly not the case. Also, some players (such as the Ondio) can run on USB power but can not charge from USB, so for these the entire "charge" wording is even more wrong.

The patch also misses the necessary changes to the manual.
Comment by Oron Lavi (llhell) - Saturday, 20 March 2010, 17:10 GMT
sure, what terminology would you prefer?

How do I change the manual..? there was no reference to doing so in RB's development guide :(
Comment by Frank Gevaerts (fg) - Sunday, 21 March 2010, 13:18 GMT
I'd use e.g. usb_default_to_power_only (or similar) instead of usb_charging_by_default (power instead of charging, and "power only" doesn't imply that the alternative doesn't do power).

For the setting string, it's a bit more difficult to fit in a yes/no thing. I'd really prefer something like "USB default connection mode: Power only/Full connection" (or "MSC", or something like that). I don't know if that's easy to do in the settings code.

For the manual, I guess might be useful. If you can't manage it, feel free to join us on irc to ask for help, or at least provide the text the manual should have here
Comment by Oron Lavi (llhell) - Sunday, 21 March 2010, 18:28 GMT
alright, to avoid any misunderstandings with different platforms I think I'll use something along the lines of 'use alternative USB power mode' or 'reverse USB power operation' - since this is the only way to truly describe what that option does - switches the way rockbox behaves when connecting exteral power and pressing the 'select' button.

I'll get that fixed, update the manual and repost the patch.
Comment by Oron Lavi (llhell) - Friday, 26 March 2010, 19:12 GMT
Ok, made the requested code/interface changes, tested, and updated the manual accordingly.
Comment by Paul Louden (Llorean) - Sunday, 28 March 2010, 23:35 GMT
Storage on USB attach: (When button is bressed / When no button is pressed)

Make it about the presentation of storage, rather than about power/charging.
Comment by Oron Lavi (llhell) - Monday, 29 March 2010, 04:16 GMT
Well I think this is becoming somewhat redundant... I honestly don't mind how this option is called, I just think it has to be user controlled.

If you guys wish, we could have a vote among all rockbox devs to decide the best phrasing, but I think that right now the interface describes exactly what the option does (regardless of actual functionality).
This menu option causes rockbox to switch the two possible modes of handling USB connections, that's it. and that's why it's called the way it is.

Moreover, since the complete description is found in the manual, I don't see the point in contemplating other possible ways to phrase this in the GUI... the current phrasing is close enough, and anyone interested should read the manual to fully understand it.