diff options
author | Udo Schläpfer <rockbox-2014.10@desktopwarrior.net> | 2015-02-02 21:44:29 +0100 |
---|---|---|
committer | Udo Schläpfer <rockbox-2014.10@desktopwarrior.net> | 2015-02-02 21:57:55 +0100 |
commit | dbabd0d9c34a33bc0c51243ec37f230d117db955 (patch) | |
tree | 46de348929ce739702a230a2587fdb5539585753 /apps | |
parent | cef17e3d59ad93f766e8ee23b1610540a33dfe5e (diff) | |
download | rockbox-dbabd0d9c34a33bc0c51243ec37f230d117db955.tar.gz rockbox-dbabd0d9c34a33bc0c51243ec37f230d117db955.zip |
iBasso DX50/DX90: Major code cleanup and reorganization.
Reorganization
- Separated iBasso devices from PLATFORM_ANDROID. These are now standlone
hosted targets. Most device specific code is in the
firmware/target/hosted/ibasso directory.
- No dependency on Android SDK, only the Android NDK is needed.
32 bit Android NDK and Android API Level 16.
- Separate implementation for each device where feasible.
Code cleanup
- Rewrite of existing code, from simple reformat to complete reimplementation.
- New backlight interface, seperating backlight from touchscreen.
- Rewrite of device button handler, removing unneeded code and fixing memory
leaks.
- New Debug messages interface logging to Android adb logcat (DEBUGF, panicf,
logf).
- Rewrite of lcd device handler, removing unneeded code and fixing memory leaks.
- Rewrite of audiohw device handler/pcm interface, removing unneeded code and
fixing memory leaks, enabling 44.1/48kHz pthreaded playback.
- Rewrite of power and powermng, proper shutdown, using batterylog results
(see http://gerrit.rockbox.org/r/#/c/1047/).
- Rewrite of configure (Android NDK) and device specific config.
- Rewrite of the Android NDK specific Makefile.
Misc
- All plugins/games/demos activated.
- Update tinyalsa to latest from https://github.com/tinyalsa/tinyalsa.
Includes
- http://gerrit.rockbox.org/r/#/c/993/
- http://gerrit.rockbox.org/r/#/c/1010/
- http://gerrit.rockbox.org/r/#/c/1035/
Does not include http://gerrit.rockbox.org/r/#/c/1007/ due to new backlight
interface and new option for hold switch, touchscreen, physical button
interaction.
Rockbox needs the iBasso DX50/DX90 loader for startup, see
http://gerrit.rockbox.org/r/#/c/1099/
The loader expects Rockbox to be installed in /mnt/sdcard/.rockbox/. If
/mnt/sdcard/ is accessed as USB mass storage device, Rockbox will exit
gracefully and the loader will restart Rockbox on USB disconnect.
Tested on iBasso DX50.
Compiled (not tested) for iBasso DX90.
Compiled (not tested) for PLATFORM_ANDROID.
Change-Id: I5f5e22e68f5b4cf29c28e2b40b2c265f2beb7ab7
Diffstat (limited to 'apps')
-rw-r--r-- | apps/SOURCES | 4 | ||||
-rw-r--r-- | apps/action.c | 4 | ||||
-rw-r--r-- | apps/keymaps/keymap-dx50.c | 301 | ||||
-rw-r--r-- | apps/keymaps/keymap-touchscreen.c | 12 | ||||
-rw-r--r-- | apps/main.c | 4 | ||||
-rw-r--r-- | apps/playback.c | 2 | ||||
-rw-r--r-- | apps/plugins/SOURCES.app_build | 2 | ||||
-rw-r--r-- | apps/plugins/SUBDIRS.app_build | 2 | ||||
-rw-r--r-- | apps/plugins/battery_bench.c | 8 | ||||
-rw-r--r-- | apps/plugins/plugins.make | 2 | ||||
-rw-r--r-- | apps/root_menu.c | 4 | ||||
-rw-r--r-- | apps/scrobbler.c | 2 | ||||
-rw-r--r-- | apps/settings.h | 2 |
13 files changed, 195 insertions, 154 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index 6118438b40..0965c498b6 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -100,7 +100,7 @@ gui/statusbar.c | |||
100 | #ifdef HAVE_LCD_BITMAP | 100 | #ifdef HAVE_LCD_BITMAP |
101 | gui/statusbar-skinned.c | 101 | gui/statusbar-skinned.c |
102 | #endif | 102 | #endif |
103 | #if (CONFIG_PLATFORM&PLATFORM_ANDROID) && !defined (DX50) && !defined(DX90) | 103 | #if (CONFIG_PLATFORM&PLATFORM_ANDROID) |
104 | hosted/android/yesno.c | 104 | hosted/android/yesno.c |
105 | hosted/android/notification.c | 105 | hosted/android/notification.c |
106 | #else | 106 | #else |
@@ -129,7 +129,7 @@ player/keyboard.c | |||
129 | #ifdef HAVE_LCD_BITMAP | 129 | #ifdef HAVE_LCD_BITMAP |
130 | recorder/bmp.c | 130 | recorder/bmp.c |
131 | recorder/icons.c | 131 | recorder/icons.c |
132 | #if (CONFIG_PLATFORM&PLATFORM_ANDROID) && !defined (DX50) && !defined(DX90) | 132 | #if (CONFIG_PLATFORM&PLATFORM_ANDROID) |
133 | hosted/android/keyboard.c | 133 | hosted/android/keyboard.c |
134 | #else | 134 | #else |
135 | recorder/keyboard.c | 135 | recorder/keyboard.c |
diff --git a/apps/action.c b/apps/action.c index 25f559f7bd..856bc0810c 100644 --- a/apps/action.c +++ b/apps/action.c | |||
@@ -77,6 +77,10 @@ static inline int do_button_check(const struct button_mapping *items, | |||
77 | { | 77 | { |
78 | if (items[i].button_code == button) | 78 | if (items[i].button_code == button) |
79 | { | 79 | { |
80 | /* | ||
81 | CAVEAT: This will allways return the action without pre_button_code if it has a | ||
82 | lower index in the list. | ||
83 | */ | ||
80 | if ((items[i].pre_button_code == BUTTON_NONE) | 84 | if ((items[i].pre_button_code == BUTTON_NONE) |
81 | || (items[i].pre_button_code == last_button)) | 85 | || (items[i].pre_button_code == last_button)) |
82 | { | 86 | { |
diff --git a/apps/keymaps/keymap-dx50.c b/apps/keymaps/keymap-dx50.c index ee3b32005a..c6bb814469 100644 --- a/apps/keymaps/keymap-dx50.c +++ b/apps/keymaps/keymap-dx50.c | |||
@@ -1,13 +1,15 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * __________ __ ___. | 2 | * __________ __ ___ |
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
7 | * \/ \/ \/ \/ \/ | 7 | * \/ \/ \/ \/ \/ |
8 | * $Id$ | ||
9 | * | 8 | * |
10 | * Copyright (C) 2010 Maurus Cuelenaere | 9 | * Copyright (C) 2014 by Ilia Sergachev: Initial Rockbox port to iBasso DX50 |
10 | * Copyright (C) 2014 by Mario Basister: iBasso DX90 port | ||
11 | * Copyright (C) 2014 by Simon Rothen: Initial Rockbox repository submission, additional features | ||
12 | * Copyright (C) 2014 by Udo Schläpfer: Code clean up, additional features | ||
11 | * | 13 | * |
12 | * This program is free software; you can redistribute it and/or | 14 | * This program is free software; you can redistribute it and/or |
13 | * modify it under the terms of the GNU General Public License | 15 | * modify it under the terms of the GNU General Public License |
@@ -19,7 +21,6 @@ | |||
19 | * | 21 | * |
20 | ****************************************************************************/ | 22 | ****************************************************************************/ |
21 | 23 | ||
22 | /* Button Code Definitions for iBasso DX50 & DX90 */ | ||
23 | 24 | ||
24 | #include <stdio.h> | 25 | #include <stdio.h> |
25 | #include <string.h> | 26 | #include <string.h> |
@@ -30,190 +31,214 @@ | |||
30 | #include "button.h" | 31 | #include "button.h" |
31 | #include "settings.h" | 32 | #include "settings.h" |
32 | 33 | ||
34 | |||
33 | /* | 35 | /* |
34 | * The format of the list is as follows | 36 | Button Code Definitions for iBasso DX50 & DX90. |
35 | * { Action Code, Button code, Prereq button code } | 37 | |
36 | * if there's no need to check the previous button's value, use BUTTON_NONE | 38 | The format of the list is as follows |
37 | * Insert LAST_ITEM_IN_LIST at the end of each mapping | 39 | |
38 | */ | 40 | { Action Code, Button code, Prereq button code } |
39 | 41 | ||
40 | static const struct button_mapping button_context_standard[] = { | 42 | If there's no need to check the previous button's value, use BUTTON_NONE. |
41 | { ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE }, | 43 | CAVEAT: The action without prereq button code will allways be choosen if it has a |
42 | { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE }, | 44 | lower index in the list. |
43 | { ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | 45 | Insert LAST_ITEM_IN_LIST at the end of each mapping |
44 | { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | 46 | */ |
45 | { ACTION_STD_OK, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, | 47 | |
46 | { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE }, | 48 | |
47 | { ACTION_STD_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE }, | 49 | static const struct button_mapping button_context_standard[] = |
50 | { | ||
51 | { ACTION_STD_CONTEXT, BUTTON_PLAY | BUTTON_REPEAT, BUTTON_PLAY }, | ||
52 | { ACTION_STD_OK, BUTTON_PLAY | BUTTON_REL, BUTTON_PLAY }, | ||
53 | { ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE }, | ||
54 | { ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE }, | ||
55 | { ACTION_STD_PREVREPEAT, BUTTON_LEFT | BUTTON_REPEAT, BUTTON_NONE }, | ||
56 | { ACTION_STD_NEXTREPEAT, BUTTON_RIGHT | BUTTON_REPEAT, BUTTON_NONE }, | ||
57 | { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE }, | ||
48 | 58 | ||
49 | LAST_ITEM_IN_LIST | 59 | LAST_ITEM_IN_LIST |
50 | }; /* button_context_standard */ | 60 | }; |
51 | 61 | ||
52 | static const struct button_mapping button_context_wps[] = { | 62 | |
53 | { ACTION_WPS_MENU, BUTTON_POWER, BUTTON_NONE }, | 63 | static const struct button_mapping button_context_wps[] = |
54 | { ACTION_WPS_CONTEXT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE }, | 64 | { |
55 | { ACTION_WPS_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_NONE }, | 65 | { ACTION_WPS_MENU, BUTTON_POWER, BUTTON_NONE }, |
56 | { ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE }, | 66 | { ACTION_WPS_CONTEXT, BUTTON_PLAY | BUTTON_REPEAT, BUTTON_NONE }, |
57 | { ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE }, | 67 | { ACTION_WPS_PLAY, BUTTON_PLAY | BUTTON_REL, BUTTON_NONE }, |
58 | { ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | 68 | { ACTION_WPS_SEEKBACK, BUTTON_LEFT | BUTTON_REPEAT, BUTTON_NONE }, |
59 | { ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | 69 | { ACTION_WPS_SEEKFWD, BUTTON_RIGHT | BUTTON_REPEAT, BUTTON_NONE }, |
60 | { ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT }, | 70 | { ACTION_WPS_STOPSEEK, BUTTON_LEFT | BUTTON_REL, BUTTON_LEFT | BUTTON_REPEAT }, |
61 | { ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT }, | 71 | { ACTION_WPS_STOPSEEK, BUTTON_RIGHT | BUTTON_REL, BUTTON_RIGHT | BUTTON_REPEAT }, |
62 | { ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, | 72 | { ACTION_WPS_SKIPNEXT, BUTTON_RIGHT | BUTTON_REL, BUTTON_NONE }, |
63 | { ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | 73 | { ACTION_WPS_SKIPPREV, BUTTON_LEFT | BUTTON_REL, BUTTON_NONE }, |
64 | { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | 74 | { ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, |
65 | { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | 75 | { ACTION_WPS_VOLUP, BUTTON_VOL_UP | BUTTON_REPEAT, BUTTON_NONE }, |
76 | { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
77 | { ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN | BUTTON_REPEAT, BUTTON_NONE }, | ||
78 | |||
66 | LAST_ITEM_IN_LIST | 79 | LAST_ITEM_IN_LIST |
67 | }; /* button_context_wps */ | 80 | }; |
68 | 81 | ||
69 | static const struct button_mapping button_context_list[] = { | 82 | |
70 | #ifdef HAVE_VOLUME_IN_LIST | 83 | static const struct button_mapping button_context_list[] = |
71 | { ACTION_LIST_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | 84 | { |
72 | { ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, | 85 | { ACTION_LIST_VOLUP, BUTTON_VOL_UP | BUTTON_REPEAT, BUTTON_NONE }, |
73 | { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | 86 | { ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE }, |
74 | { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | 87 | { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, |
75 | #endif | 88 | { ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN | BUTTON_REPEAT, BUTTON_NONE }, |
89 | |||
76 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), | 90 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), |
77 | }; /* button_context_list */ | 91 | }; |
78 | 92 | ||
79 | static const struct button_mapping button_context_tree[] = { | ||
80 | 93 | ||
94 | static const struct button_mapping button_context_tree[] = | ||
95 | { | ||
81 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), | 96 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), |
82 | }; /* button_context_tree */ | 97 | }; |
83 | 98 | ||
84 | static const struct button_mapping button_context_listtree_scroll_with_combo[] = { | 99 | |
85 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), | 100 | static const struct button_mapping button_context_listtree_scroll_with_combo[] = |
101 | { | ||
102 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM | CONTEXT_TREE), | ||
86 | }; | 103 | }; |
87 | 104 | ||
88 | static const struct button_mapping button_context_listtree_scroll_without_combo[] = { | 105 | |
89 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE), | 106 | static const struct button_mapping button_context_listtree_scroll_without_combo[] = |
107 | { | ||
108 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM | CONTEXT_TREE), | ||
90 | }; | 109 | }; |
91 | 110 | ||
92 | static const struct button_mapping button_context_settings[] = { | 111 | |
93 | { ACTION_SETTINGS_INC, BUTTON_VOL_UP|BUTTON_REL, BUTTON_NONE }, | 112 | static const struct button_mapping button_context_settings[] = |
94 | { ACTION_SETTINGS_INCREPEAT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | 113 | { |
95 | { ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN|BUTTON_REL, BUTTON_NONE }, | 114 | { ACTION_SETTINGS_INC, BUTTON_VOL_UP | BUTTON_REL, BUTTON_NONE }, |
96 | { ACTION_SETTINGS_DECREPEAT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | 115 | { ACTION_SETTINGS_INCREPEAT, BUTTON_VOL_UP | BUTTON_REPEAT, BUTTON_NONE }, |
116 | { ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN | BUTTON_REL, BUTTON_NONE }, | ||
117 | { ACTION_SETTINGS_DECREPEAT, BUTTON_VOL_DOWN | BUTTON_REPEAT, BUTTON_NONE }, | ||
118 | |||
97 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), | 119 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), |
98 | }; /* button_context_settings */ | 120 | }; |
99 | 121 | ||
100 | static const struct button_mapping button_context_settings_right_is_inc[] = { | ||
101 | 122 | ||
123 | static const struct button_mapping button_context_settings_right_is_inc[] = | ||
124 | { | ||
102 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), | 125 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), |
103 | }; /* button_context_settingsgraphical */ | 126 | }; |
104 | 127 | ||
105 | static const struct button_mapping button_context_mainmenu[] = { | 128 | |
129 | static const struct button_mapping button_context_mainmenu[] = | ||
130 | { | ||
131 | { ACTION_TREE_WPS, BUTTON_POWER, BUTTON_NONE }, | ||
106 | 132 | ||
107 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_TREE), | 133 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_TREE), |
108 | }; /* button_context_mainmenu */ | 134 | }; |
109 | 135 | ||
110 | static const struct button_mapping button_context_yesno[] = { | 136 | |
111 | { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, | 137 | static const struct button_mapping button_context_yesno[] = |
138 | { | ||
139 | { ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE }, | ||
140 | { ACTION_YESNO_ACCEPT, BUTTON_LEFT, BUTTON_NONE }, | ||
112 | 141 | ||
113 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), | 142 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD), |
114 | }; /* button_context_settings_yesno */ | 143 | }; |
115 | 144 | ||
116 | static const struct button_mapping button_context_colorchooser[] = { | ||
117 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS), | ||
118 | }; /* button_context_colorchooser */ | ||
119 | 145 | ||
120 | static const struct button_mapping button_context_eq[] = { | 146 | static const struct button_mapping button_context_colorchooser[] = |
147 | { | ||
121 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS), | 148 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS), |
122 | }; /* button_context_eq */ | 149 | }; |
123 | 150 | ||
124 | static const struct button_mapping button_context_keyboard[] = { | ||
125 | { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE }, | ||
126 | { ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | ||
127 | { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | ||
128 | { ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | ||
129 | 151 | ||
130 | { ACTION_KBD_CURSOR_LEFT, BUTTON_PLAY|BUTTON_LEFT, BUTTON_NONE }, | 152 | static const struct button_mapping button_context_eq[] = |
131 | { ACTION_KBD_CURSOR_LEFT, BUTTON_PLAY|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, | 153 | { |
132 | { ACTION_KBD_CURSOR_RIGHT, BUTTON_PLAY|BUTTON_RIGHT, BUTTON_NONE }, | 154 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS), |
133 | { ACTION_KBD_CURSOR_RIGHT, BUTTON_PLAY|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | 155 | }; |
134 | { ACTION_KBD_SELECT, BUTTON_PLAY, BUTTON_NONE }, | ||
135 | 156 | ||
136 | { ACTION_KBD_UP, BUTTON_VOL_UP, BUTTON_NONE }, | 157 | |
137 | { ACTION_KBD_UP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | 158 | static const struct button_mapping button_context_keyboard[] = |
138 | { ACTION_KBD_DOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | 159 | { |
139 | { ACTION_KBD_DOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | 160 | { ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE }, |
161 | { ACTION_KBD_LEFT, BUTTON_LEFT | BUTTON_REPEAT, BUTTON_NONE }, | ||
162 | { ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | ||
163 | { ACTION_KBD_RIGHT, BUTTON_RIGHT | BUTTON_REPEAT, BUTTON_NONE }, | ||
164 | { ACTION_KBD_CURSOR_LEFT, BUTTON_PLAY | BUTTON_LEFT, BUTTON_NONE }, | ||
165 | { ACTION_KBD_CURSOR_LEFT, BUTTON_PLAY | BUTTON_LEFT | BUTTON_REPEAT, BUTTON_NONE }, | ||
166 | { ACTION_KBD_CURSOR_RIGHT, BUTTON_PLAY | BUTTON_RIGHT, BUTTON_NONE }, | ||
167 | { ACTION_KBD_CURSOR_RIGHT, BUTTON_PLAY | BUTTON_RIGHT | BUTTON_REPEAT, BUTTON_NONE }, | ||
168 | { ACTION_KBD_SELECT, BUTTON_PLAY, BUTTON_NONE }, | ||
169 | { ACTION_KBD_UP, BUTTON_VOL_UP, BUTTON_NONE }, | ||
170 | { ACTION_KBD_UP, BUTTON_VOL_UP | BUTTON_REPEAT, BUTTON_NONE }, | ||
171 | { ACTION_KBD_DOWN, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
172 | { ACTION_KBD_DOWN, BUTTON_VOL_DOWN | BUTTON_REPEAT, BUTTON_NONE }, | ||
140 | 173 | ||
141 | LAST_ITEM_IN_LIST | 174 | LAST_ITEM_IN_LIST |
142 | }; /* button_context_keyboard */ | 175 | }; |
176 | |||
143 | 177 | ||
144 | /** Bookmark Screen **/ | 178 | |
145 | static const struct button_mapping button_context_bmark[] = { | 179 | static const struct button_mapping button_context_bmark[] = |
180 | { | ||
146 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), | 181 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST), |
147 | }; /* button_context_bmark */ | 182 | }; |
183 | |||
148 | 184 | ||
149 | static const struct button_mapping button_context_time[] = { | 185 | static const struct button_mapping button_context_time[] = |
186 | { | ||
150 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS), | 187 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS), |
151 | }; /* button_context_time */ | 188 | }; |
152 | 189 | ||
153 | static const struct button_mapping button_context_quickscreen[] = { | 190 | |
191 | static const struct button_mapping button_context_quickscreen[] = | ||
192 | { | ||
154 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 193 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
155 | }; /* button_context_quickscreen */ | 194 | }; |
156 | 195 | ||
157 | static const struct button_mapping button_context_pitchscreen[] = { | ||
158 | 196 | ||
159 | { ACTION_PS_INC_SMALL, BUTTON_VOL_UP|BUTTON_REL, BUTTON_NONE }, | 197 | static const struct button_mapping button_context_pitchscreen[] = |
160 | { ACTION_PS_DEC_SMALL, BUTTON_VOL_DOWN|BUTTON_REL, BUTTON_NONE }, | 198 | { |
161 | { ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE }, | 199 | { ACTION_PS_INC_SMALL, BUTTON_VOL_UP | BUTTON_REL, BUTTON_NONE }, |
200 | { ACTION_PS_DEC_SMALL, BUTTON_VOL_DOWN |BUTTON_REL, BUTTON_NONE }, | ||
201 | { ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE }, | ||
162 | 202 | ||
163 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 203 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
164 | }; /* button_context_pitchcreen */ | 204 | }; |
165 | 205 | ||
166 | 206 | ||
167 | static const struct button_mapping button_context_radio[] = { | 207 | static const struct button_mapping button_context_radio[] = |
208 | { | ||
168 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) | 209 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) |
169 | }; /* button_context_radio */ | 210 | }; |
211 | |||
170 | 212 | ||
171 | const struct button_mapping* target_get_context_mapping(int context) | 213 | const struct button_mapping* target_get_context_mapping(int context) |
172 | { | 214 | { |
173 | switch (context) | 215 | switch(context) |
174 | { | 216 | { |
175 | case CONTEXT_STD: | 217 | case CONTEXT_STD: { return button_context_standard; } |
176 | return button_context_standard; | 218 | case CONTEXT_WPS: { return button_context_wps; } |
177 | case CONTEXT_WPS: | 219 | case CONTEXT_LIST: { return button_context_list; } |
178 | return button_context_wps; | 220 | case CONTEXT_MAINMENU: { return button_context_mainmenu; } |
179 | 221 | case CONTEXT_CUSTOM | CONTEXT_TREE: { return button_context_tree; } | |
180 | case CONTEXT_LIST: | 222 | case CONTEXT_SETTINGS: { return button_context_settings; } |
181 | return button_context_list; | 223 | case CONTEXT_SETTINGS_COLOURCHOOSER: { return button_context_colorchooser; } |
182 | case CONTEXT_MAINMENU: | 224 | case CONTEXT_SETTINGS_EQ: { return button_context_eq; } |
183 | return button_context_mainmenu; | 225 | case CONTEXT_SETTINGS_TIME: { return button_context_time; } |
226 | case CONTEXT_KEYBOARD: { return button_context_keyboard; } | ||
227 | case CONTEXT_FM: { return button_context_radio; } | ||
228 | case CONTEXT_BOOKMARKSCREEN: { return button_context_bmark; } | ||
229 | case CONTEXT_QUICKSCREEN: { return button_context_quickscreen; } | ||
230 | case CONTEXT_PITCHSCREEN: { return button_context_pitchscreen; } | ||
231 | case CONTEXT_CUSTOM | CONTEXT_SETTINGS: | ||
232 | case CONTEXT_SETTINGS_RECTRIGGER: { return button_context_settings_right_is_inc; } | ||
184 | case CONTEXT_TREE: | 233 | case CONTEXT_TREE: |
185 | if (global_settings.hold_lr_for_scroll_in_list) | 234 | { |
235 | if(global_settings.hold_lr_for_scroll_in_list) | ||
236 | { | ||
186 | return button_context_listtree_scroll_without_combo; | 237 | return button_context_listtree_scroll_without_combo; |
187 | else | 238 | } |
188 | return button_context_listtree_scroll_with_combo; | 239 | return button_context_listtree_scroll_with_combo; |
189 | case CONTEXT_CUSTOM|CONTEXT_TREE: | 240 | } |
190 | return button_context_tree; | ||
191 | |||
192 | case CONTEXT_SETTINGS: | ||
193 | return button_context_settings; | ||
194 | case CONTEXT_CUSTOM|CONTEXT_SETTINGS: | ||
195 | case CONTEXT_SETTINGS_RECTRIGGER: | ||
196 | return button_context_settings_right_is_inc; | ||
197 | |||
198 | case CONTEXT_SETTINGS_COLOURCHOOSER: | ||
199 | return button_context_colorchooser; | ||
200 | case CONTEXT_SETTINGS_EQ: | ||
201 | return button_context_eq; | ||
202 | |||
203 | case CONTEXT_SETTINGS_TIME: | ||
204 | return button_context_time; | ||
205 | |||
206 | case CONTEXT_KEYBOARD: | ||
207 | return button_context_keyboard; | ||
208 | |||
209 | case CONTEXT_FM: | ||
210 | return button_context_radio; | ||
211 | case CONTEXT_BOOKMARKSCREEN: | ||
212 | return button_context_bmark; | ||
213 | case CONTEXT_QUICKSCREEN: | ||
214 | return button_context_quickscreen; | ||
215 | case CONTEXT_PITCHSCREEN: | ||
216 | return button_context_pitchscreen; | ||
217 | } | 241 | } |
242 | |||
218 | return button_context_standard; | 243 | return button_context_standard; |
219 | } | 244 | } |
diff --git a/apps/keymaps/keymap-touchscreen.c b/apps/keymaps/keymap-touchscreen.c index 9825c92e7d..6163cb054c 100644 --- a/apps/keymaps/keymap-touchscreen.c +++ b/apps/keymaps/keymap-touchscreen.c | |||
@@ -171,6 +171,13 @@ static const struct button_mapping button_context_settings_right_is_inc[] = { | |||
171 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM|CONTEXT_SETTINGS) | 171 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_CUSTOM|CONTEXT_SETTINGS) |
172 | }; /* button_context_settingsgraphical */ | 172 | }; /* button_context_settingsgraphical */ |
173 | 173 | ||
174 | |||
175 | static const struct button_mapping button_context_mainmenu[] = | ||
176 | { | ||
177 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2 | CONTEXT_MAINMENU) | ||
178 | }; | ||
179 | |||
180 | |||
174 | static const struct button_mapping button_context_yesno[] = { | 181 | static const struct button_mapping button_context_yesno[] = { |
175 | { ACTION_YESNO_ACCEPT, BUTTON_TOPRIGHT, BUTTON_NONE }, | 182 | { ACTION_YESNO_ACCEPT, BUTTON_TOPRIGHT, BUTTON_NONE }, |
176 | { ACTION_YESNO_ACCEPT, BUTTON_BOTTOMLEFT, BUTTON_NONE }, | 183 | { ACTION_YESNO_ACCEPT, BUTTON_BOTTOMLEFT, BUTTON_NONE }, |
@@ -389,7 +396,12 @@ const struct button_mapping* get_context_mapping(int context) | |||
389 | 396 | ||
390 | case CONTEXT_LIST: | 397 | case CONTEXT_LIST: |
391 | return button_context_list; | 398 | return button_context_list; |
399 | |||
392 | case CONTEXT_MAINMENU: | 400 | case CONTEXT_MAINMENU: |
401 | { | ||
402 | return button_context_mainmenu; | ||
403 | } | ||
404 | |||
393 | case CONTEXT_TREE: | 405 | case CONTEXT_TREE: |
394 | if (global_settings.hold_lr_for_scroll_in_list) | 406 | if (global_settings.hold_lr_for_scroll_in_list) |
395 | return button_context_listtree_scroll_without_combo; | 407 | return button_context_listtree_scroll_without_combo; |
diff --git a/apps/main.c b/apps/main.c index 211f7f1b3c..88a6630f94 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -37,7 +37,9 @@ | |||
37 | #include "menu.h" | 37 | #include "menu.h" |
38 | #include "usb.h" | 38 | #include "usb.h" |
39 | #include "powermgmt.h" | 39 | #include "powermgmt.h" |
40 | #if !defined(DX50) && !defined(DX90) | ||
40 | #include "adc.h" | 41 | #include "adc.h" |
42 | #endif | ||
41 | #include "i2c.h" | 43 | #include "i2c.h" |
42 | #ifndef DEBUG | 44 | #ifndef DEBUG |
43 | #include "serial.h" | 45 | #include "serial.h" |
@@ -340,7 +342,7 @@ static void init(void) | |||
340 | #ifdef SIMULATOR | 342 | #ifdef SIMULATOR |
341 | sim_tasks_init(); | 343 | sim_tasks_init(); |
342 | #endif | 344 | #endif |
343 | #if (CONFIG_PLATFORM & PLATFORM_ANDROID) && !defined(DX50) && !defined(DX90) | 345 | #if (CONFIG_PLATFORM & PLATFORM_ANDROID) |
344 | notification_init(); | 346 | notification_init(); |
345 | #endif | 347 | #endif |
346 | lang_init(core_language_builtin, language_strings, | 348 | lang_init(core_language_builtin, language_strings, |
diff --git a/apps/playback.c b/apps/playback.c index c57855eeac..d1fe8ca0ea 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -1961,7 +1961,7 @@ static int audio_finish_load_track(struct track_info *info) | |||
1961 | resume_rewind_adjust_progress(track_id3, &elapsed, &offset); | 1961 | resume_rewind_adjust_progress(track_id3, &elapsed, &offset); |
1962 | 1962 | ||
1963 | logf("%s: Set resume for %s to %lu %lX", __func__, | 1963 | logf("%s: Set resume for %s to %lu %lX", __func__, |
1964 | id3->title, elapsed, offset); | 1964 | track_id3->title, elapsed, offset); |
1965 | 1965 | ||
1966 | enum data_type audiotype = rbcodec_format_is_atomic(track_id3->codectype) ? | 1966 | enum data_type audiotype = rbcodec_format_is_atomic(track_id3->codectype) ? |
1967 | TYPE_ATOMIC_AUDIO : TYPE_PACKET_AUDIO; | 1967 | TYPE_ATOMIC_AUDIO : TYPE_PACKET_AUDIO; |
diff --git a/apps/plugins/SOURCES.app_build b/apps/plugins/SOURCES.app_build index 990a7c1c86..89a8b0ede6 100644 --- a/apps/plugins/SOURCES.app_build +++ b/apps/plugins/SOURCES.app_build | |||
@@ -1,4 +1,4 @@ | |||
1 | #ifndef HAVE_TOUCHSCREEN | 1 | #if !defined(HAVE_TOUCHSCREEN) || defined(DX50) || defined(DX90) |
2 | /* In devices running RockBox as an application, but having a keypad */ | 2 | /* In devices running RockBox as an application, but having a keypad */ |
3 | #include "SOURCES" | 3 | #include "SOURCES" |
4 | #else | 4 | #else |
diff --git a/apps/plugins/SUBDIRS.app_build b/apps/plugins/SUBDIRS.app_build index 934474a996..954044146a 100644 --- a/apps/plugins/SUBDIRS.app_build +++ b/apps/plugins/SUBDIRS.app_build | |||
@@ -1,4 +1,4 @@ | |||
1 | #ifndef HAVE_TOUCHSCREEN | 1 | #if !defined(HAVE_TOUCHSCREEN) || defined(DX50) || defined(DX90) |
2 | /* This is for devices having a keypad, running RockBox as an application */ | 2 | /* This is for devices having a keypad, running RockBox as an application */ |
3 | #include "SUBDIRS" | 3 | #include "SUBDIRS" |
4 | 4 | ||
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index 289b399e27..9ffdb0798f 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c | |||
@@ -262,10 +262,10 @@ | |||
262 | #define BATTERY_OFF_TXT "Power" | 262 | #define BATTERY_OFF_TXT "Power" |
263 | 263 | ||
264 | #elif CONFIG_KEYPAD == DX50_PAD | 264 | #elif CONFIG_KEYPAD == DX50_PAD |
265 | #define BATTERY_ON BUTTON_PLAY | 265 | #define BATTERY_ON BUTTON_PLAY |
266 | #define BATTERY_OFF BUTTON_POWER | 266 | #define BATTERY_OFF BUTTON_POWER_LONG |
267 | #define BATTERY_OFF_TXT "POWER" | 267 | #define BATTERY_OFF_TXT "Power Long" |
268 | #define BATTERY_ON_TXT "PLAY - start" | 268 | #define BATTERY_ON_TXT "Play - start" |
269 | 269 | ||
270 | #else | 270 | #else |
271 | #error No keymap defined! | 271 | #error No keymap defined! |
diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make index 1edbd37306..be3d35717e 100644 --- a/apps/plugins/plugins.make +++ b/apps/plugins/plugins.make | |||
@@ -11,11 +11,9 @@ | |||
11 | is_app_build = | 11 | is_app_build = |
12 | ifdef APP_TYPE | 12 | ifdef APP_TYPE |
13 | ifneq ($(APP_TYPE),sdl-sim) | 13 | ifneq ($(APP_TYPE),sdl-sim) |
14 | ifeq (,$(findstring standalone, $(APP_TYPE))) | ||
15 | is_app_build = yes | 14 | is_app_build = yes |
16 | endif | 15 | endif |
17 | endif | 16 | endif |
18 | endif | ||
19 | 17 | ||
20 | ifdef is_app_build | 18 | ifdef is_app_build |
21 | PLUGINS_SRC = $(call preprocess, $(APPSDIR)/plugins/SOURCES.app_build) | 19 | PLUGINS_SRC = $(call preprocess, $(APPSDIR)/plugins/SOURCES.app_build) |
diff --git a/apps/root_menu.c b/apps/root_menu.c index f1b5017751..7ec803f585 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c | |||
@@ -792,13 +792,13 @@ void root_menu(void) | |||
792 | case GO_TO_ROOT: | 792 | case GO_TO_ROOT: |
793 | if (last_screen != GO_TO_ROOT) | 793 | if (last_screen != GO_TO_ROOT) |
794 | selected = get_selection(last_screen); | 794 | selected = get_selection(last_screen); |
795 | #if (CONFIG_PLATFORM&PLATFORM_ANDROID) && !defined(DX50) && !defined(DX90) | 795 | #if (CONFIG_PLATFORM&PLATFORM_ANDROID) |
796 | /* When we are in the main menu we want the hardware BACK | 796 | /* When we are in the main menu we want the hardware BACK |
797 | * button to be handled by Android instead of rockbox */ | 797 | * button to be handled by Android instead of rockbox */ |
798 | android_ignore_back_button(true); | 798 | android_ignore_back_button(true); |
799 | #endif | 799 | #endif |
800 | next_screen = do_menu(&root_menu_, &selected, NULL, false); | 800 | next_screen = do_menu(&root_menu_, &selected, NULL, false); |
801 | #if (CONFIG_PLATFORM&PLATFORM_ANDROID) && !defined(DX50) && !defined(DX90) | 801 | #if (CONFIG_PLATFORM&PLATFORM_ANDROID) |
802 | android_ignore_back_button(false); | 802 | android_ignore_back_button(false); |
803 | #endif | 803 | #endif |
804 | if (next_screen != GO_TO_PREVIOUS) | 804 | if (next_screen != GO_TO_PREVIOUS) |
diff --git a/apps/scrobbler.c b/apps/scrobbler.c index 4f3693e716..2793e70725 100644 --- a/apps/scrobbler.c +++ b/apps/scrobbler.c | |||
@@ -78,7 +78,7 @@ static void get_scrobbler_filename(char *path, size_t size) | |||
78 | used = snprintf(path, size, "/home/user/MyDocs/%s", BASE_FILENAME); | 78 | used = snprintf(path, size, "/home/user/MyDocs/%s", BASE_FILENAME); |
79 | #elif (CONFIG_PLATFORM & PLATFORM_ANDROID) | 79 | #elif (CONFIG_PLATFORM & PLATFORM_ANDROID) |
80 | used = snprintf(path, size, "/sdcard/%s", BASE_FILENAME); | 80 | used = snprintf(path, size, "/sdcard/%s", BASE_FILENAME); |
81 | #elif defined (SAMSUNG_YPR0) | 81 | #elif defined (SAMSUNG_YPR0) || defined(DX50) || defined(DX90) |
82 | used = snprintf(path, size, "%s/%s", HOME_DIR, BASE_FILENAME); | 82 | used = snprintf(path, size, "%s/%s", HOME_DIR, BASE_FILENAME); |
83 | #else /* SDL/unknown RaaA build */ | 83 | #else /* SDL/unknown RaaA build */ |
84 | used = snprintf(path, size, "%s/%s", ROCKBOX_DIR, BASE_FILENAME); | 84 | used = snprintf(path, size, "%s/%s", ROCKBOX_DIR, BASE_FILENAME); |
diff --git a/apps/settings.h b/apps/settings.h index 3029026ab6..4ea56d273e 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -291,7 +291,7 @@ struct user_settings | |||
291 | /* audio settings */ | 291 | /* audio settings */ |
292 | 292 | ||
293 | int volume; /* audio output volume in decibels range depends on the dac */ | 293 | int volume; /* audio output volume in decibels range depends on the dac */ |
294 | int balance; /* stereo balance: 0-100 0=left 50=bal 100=right */ | 294 | int balance; /* stereo balance: -100 - +100 -100=left 0=bal +100=right */ |
295 | int bass; /* bass boost/cut in decibels */ | 295 | int bass; /* bass boost/cut in decibels */ |
296 | int treble; /* treble boost/cut in decibels */ | 296 | int treble; /* treble boost/cut in decibels */ |
297 | int channel_config; /* Stereo, Mono, Custom, Mono left, Mono right, Karaoke */ | 297 | int channel_config; /* Stereo, Mono, Custom, Mono left, Mono right, Karaoke */ |