summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-03-20 15:02:29 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-03-20 15:02:29 +0000
commitb6c12a129e22dadff4be67e5b0fe8993c888d6d8 (patch)
treeee6e855a5d998e3c5bae6d74a86641f3d01ebd50 /apps
parent181e0e0878aac10dd9a6651842fbb59c4fed7a9b (diff)
downloadrockbox-b6c12a129e22dadff4be67e5b0fe8993c888d6d8.tar.gz
rockbox-b6c12a129e22dadff4be67e5b0fe8993c888d6d8.tar.bz2
rockbox-b6c12a129e22dadff4be67e5b0fe8993c888d6d8.zip
Submit FS#11065. Introduce a new system setting for en-/disabling the Line-out. For now only implemented on iPod Video. This allows to save power if the user does not use the player's Line-out. On iPod 5G the saving is ~0.5 mA.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25257 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/features.txt4
-rw-r--r--apps/lang/english.lang18
-rw-r--r--apps/main.c3
-rw-r--r--apps/menus/settings_menu.c6
-rw-r--r--apps/settings.h3
-rw-r--r--apps/settings_list.c4
6 files changed, 37 insertions, 1 deletions
diff --git a/apps/features.txt b/apps/features.txt
index 242d2d4386..af0da5b355 100644
--- a/apps/features.txt
+++ b/apps/features.txt
@@ -225,6 +225,10 @@ usb_hid_mouse
wheel_acceleration
#endif
+#if defined(HAVE_LINEOUT_POWEROFF)
+lineout_poweroff
+#endif
+
#if defined(HAVE_TOUCHSCREEN)
touchscreen
#endif
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index ab5b6b59cf..3c847cff81 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -13377,4 +13377,20 @@
recording_histogram: "Histogram interval"
</voice>
</phrase>
-
+<phrase>
+ id: LANG_LINEOUT_ONOFF
+ desc: in system settings menu
+ user: core
+ <source>
+ *: none
+ lineout_poweroff: "Line-out"
+ </source>
+ <dest>
+ *: none
+ lineout_poweroff: "Line-out"
+ </dest>
+ <voice>
+ *: none
+ lineout_poweroff: "Line-out"
+ </voice>
+</phrase>
diff --git a/apps/main.c b/apps/main.c
index fa1500edd5..7c43c0c277 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -632,6 +632,9 @@ static void init(void)
#ifdef HAVE_ACCESSORY_SUPPLY
accessory_supply_set(global_settings.accessory_supply);
#endif
+#ifdef HAVE_LINEOUT_POWEROFF
+ lineout_set(global_settings.lineout_active);
+#endif
#ifdef HAVE_HOTSWAP_STORAGE_AS_MAIN
check_bootfile(false); /* remember write time and filesize */
#endif
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index 5c30e5982f..b695d9265b 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -251,6 +251,9 @@ MENUITEM_SETTING(serial_bitrate, &global_settings.serial_bitrate, NULL);
#ifdef HAVE_ACCESSORY_SUPPLY
MENUITEM_SETTING(accessory_supply, &global_settings.accessory_supply, NULL);
#endif
+#ifdef HAVE_LINEOUT_POWEROFF
+MENUITEM_SETTING(lineout_onoff, &global_settings.lineout_active, NULL);
+#endif
MENUITEM_SETTING(start_screen, &global_settings.start_in_screen, NULL);
#ifdef USB_ENABLE_HID
MENUITEM_SETTING(usb_hid, &global_settings.usb_hid, NULL);
@@ -299,6 +302,9 @@ MAKE_MENU(system_menu, ID2P(LANG_SYSTEM),
#ifdef HAVE_ACCESSORY_SUPPLY
&accessory_supply,
#endif
+#ifdef HAVE_LINEOUT_POWEROFF
+ &lineout_onoff,
+#endif
#ifdef HAVE_BUTTON_LIGHT
&buttonlight_timeout,
#endif
diff --git a/apps/settings.h b/apps/settings.h
index 4cc2bd521e..62f85254aa 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -767,6 +767,9 @@ struct user_settings
#ifdef HAVE_ACCESSORY_SUPPLY
bool accessory_supply; /* 0=off 1=on, accessory power supply for iPod */
#endif
+#ifdef HAVE_LINEOUT_POWEROFF
+ bool lineout_active;
+#endif
#ifdef HAVE_SPEAKER
bool speaker_enabled;
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 5759e24286..2638eac5a0 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -700,6 +700,10 @@ const struct settings_list settings[] = {
OFFON_SETTING(0, accessory_supply, LANG_ACCESSORY_SUPPLY,
true, "accessory power supply", accessory_supply_set),
#endif
+#ifdef HAVE_LINEOUT_POWEROFF
+ OFFON_SETTING(0, lineout_active, LANG_LINEOUT_ONOFF,
+ true, "lineout", lineout_set),
+#endif
/* tuner */
#if CONFIG_TUNER
OFFON_SETTING(0,fm_force_mono, LANG_FM_MONO_MODE,