summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/lang/deutsch.lang80
-rw-r--r--apps/lang/english.lang80
-rw-r--r--apps/menus/settings_menu.c3
-rw-r--r--apps/settings.c2
-rw-r--r--apps/settings.h1
-rw-r--r--apps/settings_list.c12
-rw-r--r--firmware/target/hosted/ibasso/system-ibasso.c2
7 files changed, 178 insertions, 2 deletions
diff --git a/apps/lang/deutsch.lang b/apps/lang/deutsch.lang
index 6d9c025bd2..d0e0c92c2c 100644
--- a/apps/lang/deutsch.lang
+++ b/apps/lang/deutsch.lang
@@ -13075,3 +13075,83 @@
ibassodx90: "Freq Scaling Governor"
</voice>
</phrase>
+<phrase>
+ id: LANG_IBASSO_USB_MODE
+ desc: in Settings -> General -> System -> USB Mode
+ user: core
+ <source>
+ *: none
+ ibassodx50: "USB Mode"
+ ibassodx90: "USB Mode"
+ </source>
+ <dest>
+ *: none
+ ibassodx50: "USB Modus"
+ ibassodx90: "USB Modus"
+ </dest>
+ <voice>
+ *: none
+ ibassodx50: "USB Modus"
+ ibassodx90: "USB Modus"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_IBASSO_USB_MODE_MASS_STORAGE
+ desc: in Settings -> General -> System -> USB Mode: Mass Storage
+ user: core
+ <source>
+ *: none
+ ibassodx50: "Mass Storage"
+ ibassodx90: "Mass Storage"
+ </source>
+ <dest>
+ *: none
+ ibassodx50: "Massenspeicher"
+ ibassodx90: "Massenspeicher"
+ </dest>
+ <voice>
+ *: none
+ ibassodx50: "Massenspeicher"
+ ibassodx90: "Massenspeicher"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_IBASSO_USB_MODE_CHARGE
+ desc: in Settings -> General -> System -> USB Mode: Charge Only
+ user: core
+ <source>
+ *: none
+ ibassodx50: "Charge Only"
+ ibassodx90: "Charge Only"
+ </source>
+ <dest>
+ *: none
+ ibassodx50: "Nur laden"
+ ibassodx90: "Nur laden"
+ </dest>
+ <voice>
+ *: none
+ ibassodx50: "Nur laden"
+ ibassodx90: "Nur laden"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_IBASSO_USB_MODE_ADB
+ desc: in Settings -> General -> System -> USB Mode: Android Debug Bridge
+ user: core
+ <source>
+ *: none
+ ibassodx50: "Android Debug Bridge"
+ ibassodx90: "Android Debug Bridge"
+ </source>
+ <dest>
+ *: none
+ ibassodx50: "Android Debug Bridge"
+ ibassodx90: "Android Debug Bridge"
+ </dest>
+ <voice>
+ *: none
+ ibassodx50: "Android Debug Bridge"
+ ibassodx90: "Android Debug Bridge"
+ </voice>
+</phrase>
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index 081e33d32c..67b8d01efc 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -13393,3 +13393,83 @@
ibassodx90: "Freq Scaling Governor"
</voice>
</phrase>
+<phrase>
+ id: LANG_IBASSO_USB_MODE
+ desc: in Settings -> General -> System -> USB Mode
+ user: core
+ <source>
+ *: none
+ ibassodx50: "USB Mode"
+ ibassodx90: "USB Mode"
+ </source>
+ <dest>
+ *: none
+ ibassodx50: "USB Mode"
+ ibassodx90: "USB Mode"
+ </dest>
+ <voice>
+ *: none
+ ibassodx50: "USB Mode"
+ ibassodx90: "USB Mode"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_IBASSO_USB_MODE_MASS_STORAGE
+ desc: in Settings -> General -> System -> USB Mode: Mass Storage
+ user: core
+ <source>
+ *: none
+ ibassodx50: "Mass Storage"
+ ibassodx90: "Mass Storage"
+ </source>
+ <dest>
+ *: none
+ ibassodx50: "Mass Storage"
+ ibassodx90: "Mass Storage"
+ </dest>
+ <voice>
+ *: none
+ ibassodx50: "Mass Storage"
+ ibassodx90: "Mass Storage"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_IBASSO_USB_MODE_CHARGE
+ desc: in Settings -> General -> System -> USB Mode: Charge Only
+ user: core
+ <source>
+ *: none
+ ibassodx50: "Charge Only"
+ ibassodx90: "Charge Only"
+ </source>
+ <dest>
+ *: none
+ ibassodx50: "Charge Only"
+ ibassodx90: "Charge Only"
+ </dest>
+ <voice>
+ *: none
+ ibassodx50: "Charge Only"
+ ibassodx90: "Charge Only"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_IBASSO_USB_MODE_ADB
+ desc: in Settings -> General -> System -> USB Mode: Android Debug Bridge
+ user: core
+ <source>
+ *: none
+ ibassodx50: "Android Debug Bridge"
+ ibassodx90: "Android Debug Bridge"
+ </source>
+ <dest>
+ *: none
+ ibassodx50: "Android Debug Bridge"
+ ibassodx90: "Android Debug Bridge"
+ </dest>
+ <voice>
+ *: none
+ ibassodx50: "Android Debug Bridge"
+ ibassodx90: "Android Debug Bridge"
+ </voice>
+</phrase>
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index 6fcc3e91a9..f42550cc6a 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -52,6 +52,7 @@
#if defined(DX50) || defined(DX90)
#include "governor-ibasso.h"
+#include "usb-ibasso.h"
#endif
/***********************************/
@@ -331,6 +332,7 @@ MENUITEM_SETTING(shortcuts_replaces_quickscreen, &global_settings.shortcuts_repl
#if defined(DX50) || defined(DX90)
MENUITEM_SETTING(governor, &global_settings.governor, NULL);
+MENUITEM_SETTING(usb_mode, &global_settings.usb_mode, NULL);
#endif
MAKE_MENU(system_menu, ID2P(LANG_SYSTEM),
@@ -388,6 +390,7 @@ MAKE_MENU(system_menu, ID2P(LANG_SYSTEM),
#if defined(DX50) || defined(DX90)
&governor,
+ &usb_mode,
#endif
);
diff --git a/apps/settings.c b/apps/settings.c
index be7b7c30e6..a0e20839ed 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -107,6 +107,7 @@ struct system_status global_status;
#if defined(DX50) || defined(DX90)
#include "governor-ibasso.h"
+#include "usb-ibasso.h"
#endif
@@ -1088,6 +1089,7 @@ void settings_apply(bool read_disk)
#if defined(DX50) || defined(DX90)
ibasso_set_governor(global_settings.governor);
+ ibasso_set_usb_mode(global_settings.usb_mode);
#endif
/* This should stay last */
diff --git a/apps/settings.h b/apps/settings.h
index 5d25dc7ab0..ec2d1007eb 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -853,6 +853,7 @@ struct user_settings
#if defined(DX50) || defined(DX90)
int governor;
+ int usb_mode;
#endif
};
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 2c3f360cea..62f232610c 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -64,6 +64,7 @@
#if defined(DX50) || defined(DX90)
#include "governor-ibasso.h"
+#include "usb-ibasso.h"
#endif
#define NVRAM(bytes) (bytes<<F_NVRAM_MASK_SHIFT)
@@ -2212,6 +2213,17 @@ const struct settings_list settings[] = {
"Interactive",
"Powersave",
"Performance"),
+ CHOICE_SETTING(0,
+ usb_mode,
+ LANG_IBASSO_USB_MODE,
+ USB_MODE_MASS_STORAGE,
+ "usb mode",
+ "mass storage,charge,adb",
+ ibasso_set_usb_mode,
+ 3,
+ ID2P(LANG_IBASSO_USB_MODE_MASS_STORAGE),
+ ID2P(LANG_IBASSO_USB_MODE_CHARGE),
+ ID2P(LANG_IBASSO_USB_MODE_ADB)),
#endif
};
diff --git a/firmware/target/hosted/ibasso/system-ibasso.c b/firmware/target/hosted/ibasso/system-ibasso.c
index a107af7a7f..cf087761d3 100644
--- a/firmware/target/hosted/ibasso/system-ibasso.c
+++ b/firmware/target/hosted/ibasso/system-ibasso.c
@@ -32,7 +32,6 @@
#include "button-ibasso.h"
#include "debug-ibasso.h"
#include "sysfs-ibasso.h"
-#include "usb-ibasso.h"
#include "vold-ibasso.h"
@@ -50,7 +49,6 @@ void system_init(void)
stackbegin = stackend = (uintptr_t*) &stack;
vold_monitor_start();
- ibasso_set_usb_mode(USB_MODE_MASS_STORAGE);
/*
Prevent device from deep sleeping, which will interrupt playback.