usb: remove "Ask" USB Mode (FS#13317)
USB ask mode is basically a footgun: it can't work on native targets
and doesn't work reliably on hosted ones, and it continually produces
a slow trickle of problems. FS#13317 gives a rundown of the issues.
Removing the setting seems like the best solution for now, since a fix
would be pretty involved.
This partially reverts 60f581e8f5
. The USB Mode setting is left in
place so the option can be added back later in a non-buggy way.
Change-Id: Ie01b28dd2ed95a31b509a7834d85bac8eb866098
This commit is contained in:
parent
6cdd142d5c
commit
7e0492444c
5 changed files with 17 additions and 41 deletions
|
@ -2148,19 +2148,18 @@ const struct settings_list settings[] = {
|
||||||
LANG_USB_MODE,
|
LANG_USB_MODE,
|
||||||
USBMODE_DEFAULT,
|
USBMODE_DEFAULT,
|
||||||
"usb mode",
|
"usb mode",
|
||||||
"ask,mass storage,charge"
|
"mass storage,charge"
|
||||||
#if defined(DX50) || defined(DX90)
|
#if defined(DX50) || defined(DX90)
|
||||||
",adb"
|
",adb"
|
||||||
#endif
|
#endif
|
||||||
,
|
,
|
||||||
#if defined(DX50) || defined(DX90)
|
#if defined(DX50) || defined(DX90)
|
||||||
ibasso_set_usb_mode,
|
ibasso_set_usb_mode,
|
||||||
4,
|
3,
|
||||||
#else
|
#else
|
||||||
usb_set_mode,
|
usb_set_mode,
|
||||||
3,
|
2,
|
||||||
#endif
|
#endif
|
||||||
ID2P(LANG_ASK),
|
|
||||||
ID2P(LANG_USB_MODE_MASS_STORAGE),
|
ID2P(LANG_USB_MODE_MASS_STORAGE),
|
||||||
ID2P(LANG_USB_MODE_CHARGE)
|
ID2P(LANG_USB_MODE_CHARGE)
|
||||||
#if defined(DX50) || defined(DX90)
|
#if defined(DX50) || defined(DX90)
|
||||||
|
|
|
@ -134,7 +134,6 @@ enum
|
||||||
/* Supported usb modes. */
|
/* Supported usb modes. */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
USB_MODE_ASK = 0,
|
|
||||||
USB_MODE_MASS_STORAGE,
|
USB_MODE_MASS_STORAGE,
|
||||||
USB_MODE_CHARGE,
|
USB_MODE_CHARGE,
|
||||||
USB_MODE_ADB
|
USB_MODE_ADB
|
||||||
|
|
|
@ -491,37 +491,12 @@ static void NORETURN_ATTR usb_thread(void)
|
||||||
if (button_status() & ~USBPOWER_BTN_IGNORE)
|
if (button_status() & ~USBPOWER_BTN_IGNORE)
|
||||||
new_usbmode = USB_MODE_MASS_STORAGE;
|
new_usbmode = USB_MODE_MASS_STORAGE;
|
||||||
break;
|
break;
|
||||||
#ifndef BOOTLOADER
|
|
||||||
case USB_MODE_ASK:
|
|
||||||
new_usbmode = USB_MODE_ASK;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
case USB_MODE_MASS_STORAGE:
|
case USB_MODE_MASS_STORAGE:
|
||||||
if (button_status() & ~USBPOWER_BTN_IGNORE)
|
if (button_status() & ~USBPOWER_BTN_IGNORE)
|
||||||
new_usbmode = USB_MODE_CHARGE;
|
new_usbmode = USB_MODE_CHARGE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef BOOTLOADER
|
|
||||||
if (new_usbmode == USB_MODE_ASK)
|
|
||||||
{
|
|
||||||
push_current_activity(ACTIVITY_USBSCREEN);
|
|
||||||
if (yesno_pop(ID2P(LANG_ENTER_USB_STORAGE_MODE_QUERY)))
|
|
||||||
new_usbmode = USB_MODE_MASS_STORAGE;
|
|
||||||
else
|
|
||||||
new_usbmode = USB_MODE_CHARGE;
|
|
||||||
pop_current_activity();
|
|
||||||
/* Force full redraw */
|
|
||||||
// queue_post(&button_queue, BUTTON_REDRAW, 0);
|
|
||||||
// Alternative approach, as above is supposedly inadequate by design.
|
|
||||||
FOR_NB_SCREENS(i)
|
|
||||||
{
|
|
||||||
struct screen *screen = &screens[i];
|
|
||||||
screen->set_viewport(NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef USB_DETECT_BY_REQUEST
|
#ifndef USB_DETECT_BY_REQUEST
|
||||||
|
|
|
@ -870,8 +870,14 @@ therefore result in better runtime.
|
||||||
\opt{usb_power}{
|
\opt{usb_power}{
|
||||||
\subsection{USB Mode}
|
\subsection{USB Mode}
|
||||||
This controls what happens with the \dap{}'s USB port is connected.
|
This controls what happens with the \dap{}'s USB port is connected.
|
||||||
\setting{Charge Only} and \setting{Mass Storage} will automatically enter
|
\setting{Mass Storage} allows you to transfer files, while
|
||||||
that mode, and \setting{Ask} will prompt the user each time.
|
\setting{Charge Only} will only charge the battery (and allow you to keep
|
||||||
|
using the player). You can choose the opposite behavior by holding down any
|
||||||
|
button while plugging in the USB cable.
|
||||||
|
\nopt{fuzeplus}{
|
||||||
|
\note{Be aware that holding a button may still perform its normal function,
|
||||||
|
so it is recommended to use a button without harmful side effects, such as
|
||||||
|
\ActionStdUsbCharge{}.}
|
||||||
}
|
}
|
||||||
\opt{multidrive_usb}{
|
\opt{multidrive_usb}{
|
||||||
\subsection{USB Hide Internal Drive}
|
\subsection{USB Hide Internal Drive}
|
||||||
|
|
|
@ -848,16 +848,13 @@ properly.}
|
||||||
|
|
||||||
\opt{usb_power}{
|
\opt{usb_power}{
|
||||||
\section{USB Charging}
|
\section{USB Charging}
|
||||||
Whenever your \dap{} is connected to USB, it will automatically charge.
|
Your \dap{} will automatically charge when connected to USB. By default
|
||||||
However, depending on the \config{usb\_mode} setting, the \dap{} may also
|
Rockbox will connect in mass storage mode to transfer files, but you can
|
||||||
enter mass storage mode or prompt the user for what action to take.
|
prevent this by holding down any button while plugging in the USB cable,
|
||||||
When the \dap{} is configured to enter mass storage mode or automatically
|
or by changing the \setting{USB Mode} setting to \setting{Charge Only}.
|
||||||
charge, you may trigger the opposite behavior by holding down any button
|
|
||||||
while plugging it in. Your \dap{} must already be in Rockbox for this to
|
|
||||||
function.
|
|
||||||
\nopt{fuzeplus}{
|
\nopt{fuzeplus}{
|
||||||
\note{Be aware that this button may still perform its normal function, so
|
\note{Be aware that holding a button may still perform its normal function,
|
||||||
it is recommended to use a button without harmful side effects, such as
|
so it is recommended to use a button without harmful side effects, such as
|
||||||
\ActionStdUsbCharge{}.}
|
\ActionStdUsbCharge{}.}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue