diff options
52 files changed, 250 insertions, 229 deletions
diff --git a/apps/alarm_menu.c b/apps/alarm_menu.c index 6e2519bd38..20b2f51821 100644 --- a/apps/alarm_menu.c +++ b/apps/alarm_menu.c | |||
@@ -130,7 +130,7 @@ bool alarm_screen(void) | |||
130 | h = 23; | 130 | h = 23; |
131 | break; | 131 | break; |
132 | 132 | ||
133 | #ifdef HAVE_RECORDER_KEYPAD | 133 | #if CONFIG_KEYPAD == RECORDER_PAD |
134 | /* inc(h) */ | 134 | /* inc(h) */ |
135 | case BUTTON_UP: | 135 | case BUTTON_UP: |
136 | case BUTTON_UP | BUTTON_REPEAT: | 136 | case BUTTON_UP | BUTTON_REPEAT: |
@@ -144,7 +144,7 @@ bool alarm_screen(void) | |||
144 | break; | 144 | break; |
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | #ifdef HAVE_RECORDER_KEYPAD | 147 | #if CONFIG_KEYPAD == RECORDER_PAD |
148 | case BUTTON_OFF: | 148 | case BUTTON_OFF: |
149 | #else | 149 | #else |
150 | case BUTTON_STOP: | 150 | case BUTTON_STOP: |
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 26052d0b32..7a1c2a3df8 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -51,7 +51,7 @@ | |||
51 | #include "widgets.h" | 51 | #include "widgets.h" |
52 | #include "peakmeter.h" | 52 | #include "peakmeter.h" |
53 | #endif | 53 | #endif |
54 | #ifdef HAVE_FMRADIO | 54 | #ifdef CONFIG_TUNER |
55 | #include "radio.h" | 55 | #include "radio.h" |
56 | #endif | 56 | #endif |
57 | 57 | ||
@@ -790,7 +790,7 @@ bool dbg_mas(void) | |||
790 | return false; | 790 | return false; |
791 | } | 791 | } |
792 | 792 | ||
793 | #ifdef HAVE_MAS3587F | 793 | #if CONFIG_HWCODEC == MAS3587F |
794 | bool dbg_mas_codec(void) | 794 | bool dbg_mas_codec(void) |
795 | { | 795 | { |
796 | char buf[32]; | 796 | char buf[32]; |
@@ -999,7 +999,7 @@ bool view_battery(void) | |||
999 | 999 | ||
1000 | #endif | 1000 | #endif |
1001 | 1001 | ||
1002 | #ifdef HAVE_MAS3507D | 1002 | #if CONFIG_HWCODEC == MAS3507D |
1003 | bool dbg_mas_info(void) | 1003 | bool dbg_mas_info(void) |
1004 | { | 1004 | { |
1005 | int button; | 1005 | int button; |
@@ -1457,7 +1457,7 @@ bool dbg_save_roms(void) | |||
1457 | return false; | 1457 | return false; |
1458 | } | 1458 | } |
1459 | 1459 | ||
1460 | #ifdef HAVE_FMRADIO | 1460 | #ifdef CONFIG_TUNER |
1461 | extern int debug_fm_detection; | 1461 | extern int debug_fm_detection; |
1462 | 1462 | ||
1463 | bool dbg_fm_radio(void) | 1463 | bool dbg_fm_radio(void) |
@@ -1535,11 +1535,11 @@ bool debug_menu(void) | |||
1535 | #endif /* HAVE_LCD_BITMAP */ | 1535 | #endif /* HAVE_LCD_BITMAP */ |
1536 | { "View OS stacks", dbg_os }, | 1536 | { "View OS stacks", dbg_os }, |
1537 | { "Catch mem accesses", dbg_set_memory_guard }, | 1537 | { "Catch mem accesses", dbg_set_memory_guard }, |
1538 | #ifdef HAVE_MAS3507D | 1538 | #if CONFIG_HWCODEC == MAS3507D |
1539 | { "View MAS info", dbg_mas_info }, | 1539 | { "View MAS info", dbg_mas_info }, |
1540 | #endif | 1540 | #endif |
1541 | { "View MAS regs", dbg_mas }, | 1541 | { "View MAS regs", dbg_mas }, |
1542 | #ifdef HAVE_MAS3587F | 1542 | #if CONFIG_HWCODEC == MAS3587F |
1543 | { "View MAS codec", dbg_mas_codec }, | 1543 | { "View MAS codec", dbg_mas_codec }, |
1544 | #endif | 1544 | #endif |
1545 | #ifdef HAVE_LCD_BITMAP | 1545 | #ifdef HAVE_LCD_BITMAP |
@@ -1560,7 +1560,7 @@ bool debug_menu(void) | |||
1560 | #endif /* PM_DEBUG */ | 1560 | #endif /* PM_DEBUG */ |
1561 | #endif /* HAVE_LCD_BITMAP */ | 1561 | #endif /* HAVE_LCD_BITMAP */ |
1562 | { "View runtime", view_runtime }, | 1562 | { "View runtime", view_runtime }, |
1563 | #ifdef HAVE_FMRADIO | 1563 | #ifdef CONFIG_TUNER |
1564 | { "FM Radio", dbg_fm_radio }, | 1564 | { "FM Radio", dbg_fm_radio }, |
1565 | #endif | 1565 | #endif |
1566 | }; | 1566 | }; |
diff --git a/apps/main_menu.c b/apps/main_menu.c index d642fc56fe..d47fc5148e 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c | |||
@@ -46,13 +46,13 @@ | |||
46 | #include "screens.h" | 46 | #include "screens.h" |
47 | #include "playlist_menu.h" | 47 | #include "playlist_menu.h" |
48 | #include "talk.h" | 48 | #include "talk.h" |
49 | #ifdef HAVE_FMRADIO | 49 | #ifdef CONFIG_TUNER |
50 | #include "radio.h" | 50 | #include "radio.h" |
51 | #endif | 51 | #endif |
52 | #include "misc.h" | 52 | #include "misc.h" |
53 | #include "lang.h" | 53 | #include "lang.h" |
54 | 54 | ||
55 | #ifdef HAVE_MAS3587F | 55 | #if CONFIG_HWCODEC == MAS3587F |
56 | #include "recording.h" | 56 | #include "recording.h" |
57 | #endif | 57 | #endif |
58 | 58 | ||
@@ -263,14 +263,14 @@ static bool plugin_browse(void) | |||
263 | return rockbox_browse(PLUGIN_DIR, SHOW_PLUGINS); | 263 | return rockbox_browse(PLUGIN_DIR, SHOW_PLUGINS); |
264 | } | 264 | } |
265 | 265 | ||
266 | #ifdef HAVE_MAS3587F | 266 | #if CONFIG_HWCODEC == MAS3587F |
267 | static bool recording_settings(void) | 267 | static bool recording_settings(void) |
268 | { | 268 | { |
269 | return recording_menu(false); | 269 | return recording_menu(false); |
270 | } | 270 | } |
271 | #endif | 271 | #endif |
272 | 272 | ||
273 | #ifdef HAVE_MAS3587F | 273 | #if CONFIG_HWCODEC == MAS3587F |
274 | 274 | ||
275 | bool rec_menu(void) | 275 | bool rec_menu(void) |
276 | { | 276 | { |
@@ -335,14 +335,14 @@ bool main_menu(void) | |||
335 | items[i].desc = ID2P(LANG_GENERAL_SETTINGS); | 335 | items[i].desc = ID2P(LANG_GENERAL_SETTINGS); |
336 | items[i++].function = settings_menu; | 336 | items[i++].function = settings_menu; |
337 | 337 | ||
338 | #ifdef HAVE_FMRADIO | 338 | #ifdef CONFIG_TUNER |
339 | if(radio_hardware_present()) { | 339 | if(radio_hardware_present()) { |
340 | items[i].desc = ID2P(LANG_FM_RADIO); | 340 | items[i].desc = ID2P(LANG_FM_RADIO); |
341 | items[i++].function = radio_screen; | 341 | items[i++].function = radio_screen; |
342 | } | 342 | } |
343 | #endif | 343 | #endif |
344 | 344 | ||
345 | #ifdef HAVE_MAS3587F | 345 | #if CONFIG_HWCODEC == MAS3587F |
346 | items[i].desc = ID2P(LANG_RECORDING); | 346 | items[i].desc = ID2P(LANG_RECORDING); |
347 | items[i++].function = rec_menu; | 347 | items[i++].function = rec_menu; |
348 | #endif | 348 | #endif |
diff --git a/apps/menu.h b/apps/menu.h index 99ef3443ba..7ebfbf316c 100644 --- a/apps/menu.h +++ b/apps/menu.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <stdbool.h> | 23 | #include <stdbool.h> |
24 | 24 | ||
25 | /* button definitions */ | 25 | /* button definitions */ |
26 | #ifdef HAVE_RECORDER_KEYPAD | 26 | #if CONFIG_KEYPAD == RECORDER_PAD |
27 | #define MENU_NEXT BUTTON_DOWN | 27 | #define MENU_NEXT BUTTON_DOWN |
28 | #define MENU_PREV BUTTON_UP | 28 | #define MENU_PREV BUTTON_UP |
29 | #define MENU_EXIT (BUTTON_LEFT | BUTTON_REL) | 29 | #define MENU_EXIT (BUTTON_LEFT | BUTTON_REL) |
@@ -32,14 +32,14 @@ | |||
32 | #define MENU_ENTER (BUTTON_RIGHT | BUTTON_REL) | 32 | #define MENU_ENTER (BUTTON_RIGHT | BUTTON_REL) |
33 | #define MENU_ENTER2 (BUTTON_PLAY | BUTTON_REL) | 33 | #define MENU_ENTER2 (BUTTON_PLAY | BUTTON_REL) |
34 | 34 | ||
35 | #elif defined HAVE_PLAYER_KEYPAD | 35 | #elif CONFIG_KEYPAD == PLAYER_PAD |
36 | #define MENU_NEXT BUTTON_RIGHT | 36 | #define MENU_NEXT BUTTON_RIGHT |
37 | #define MENU_PREV BUTTON_LEFT | 37 | #define MENU_PREV BUTTON_LEFT |
38 | #define MENU_EXIT (BUTTON_STOP | BUTTON_REL) | 38 | #define MENU_EXIT (BUTTON_STOP | BUTTON_REL) |
39 | #define MENU_EXIT2 (BUTTON_MENU | BUTTON_REL) | 39 | #define MENU_EXIT2 (BUTTON_MENU | BUTTON_REL) |
40 | #define MENU_ENTER (BUTTON_PLAY | BUTTON_REL) | 40 | #define MENU_ENTER (BUTTON_PLAY | BUTTON_REL) |
41 | 41 | ||
42 | #elif defined HAVE_ONDIO_KEYPAD | 42 | #elif CONFIG_KEYPAD == ONDIO_PAD |
43 | #define MENU_NEXT BUTTON_DOWN | 43 | #define MENU_NEXT BUTTON_DOWN |
44 | #define MENU_PREV BUTTON_UP | 44 | #define MENU_PREV BUTTON_UP |
45 | #define MENU_EXIT (BUTTON_LEFT | BUTTON_REL) | 45 | #define MENU_EXIT (BUTTON_LEFT | BUTTON_REL) |
diff --git a/apps/playlist.c b/apps/playlist.c index ecdb45c104..e514530aea 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -1050,7 +1050,7 @@ static void display_playlist_count(int count, const char *fmt) | |||
1050 | #endif | 1050 | #endif |
1051 | 1051 | ||
1052 | splash(0, true, fmt, count, | 1052 | splash(0, true, fmt, count, |
1053 | #ifdef HAVE_PLAYER_KEYPAD | 1053 | #if CONFIG_KEYPAD == PLAYER_PAD |
1054 | str(LANG_STOP_ABORT) | 1054 | str(LANG_STOP_ABORT) |
1055 | #else | 1055 | #else |
1056 | str(LANG_OFF_ABORT) | 1056 | str(LANG_OFF_ABORT) |
diff --git a/apps/plugin.c b/apps/plugin.c index 9a7a397bea..51f7a610dd 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -211,7 +211,7 @@ static const struct plugin_api rockbox_api = { | |||
211 | mas_writemem, | 211 | mas_writemem, |
212 | mas_readreg, | 212 | mas_readreg, |
213 | mas_writereg, | 213 | mas_writereg, |
214 | #ifdef HAVE_MAS3587F | 214 | #if CONFIG_HWCODEC == MAS3587F |
215 | mas_codec_writereg, | 215 | mas_codec_writereg, |
216 | mas_codec_readreg, | 216 | mas_codec_readreg, |
217 | #endif | 217 | #endif |
@@ -244,7 +244,7 @@ static const struct plugin_api rockbox_api = { | |||
244 | /* new stuff at the end, sort into place next time | 244 | /* new stuff at the end, sort into place next time |
245 | the API gets incompatible */ | 245 | the API gets incompatible */ |
246 | 246 | ||
247 | #ifdef HAVE_MAS3587F | 247 | #if CONFIG_HWCODEC == MAS3587F |
248 | mpeg_set_pitch, | 248 | mpeg_set_pitch, |
249 | 249 | ||
250 | peak_meter_scale_value, | 250 | peak_meter_scale_value, |
diff --git a/apps/plugin.h b/apps/plugin.h index 078dc12217..445427ffd5 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -239,7 +239,7 @@ struct plugin_api { | |||
239 | int (*mas_writemem)(int bank, int addr, const unsigned long* src, int len); | 239 | int (*mas_writemem)(int bank, int addr, const unsigned long* src, int len); |
240 | int (*mas_readreg)(int reg); | 240 | int (*mas_readreg)(int reg); |
241 | int (*mas_writereg)(int reg, unsigned int val); | 241 | int (*mas_writereg)(int reg, unsigned int val); |
242 | #ifdef HAVE_MAS3587F | 242 | #if CONFIG_HWCODEC == MAS3587F |
243 | int (*mas_codec_writereg)(int reg, unsigned int val); | 243 | int (*mas_codec_writereg)(int reg, unsigned int val); |
244 | int (*mas_codec_readreg)(int reg); | 244 | int (*mas_codec_readreg)(int reg); |
245 | #endif | 245 | #endif |
@@ -277,7 +277,7 @@ struct plugin_api { | |||
277 | /* new stuff at the end, sort into place next time | 277 | /* new stuff at the end, sort into place next time |
278 | the API gets incompatible */ | 278 | the API gets incompatible */ |
279 | 279 | ||
280 | #ifdef HAVE_MAS3587F | 280 | #if CONFIG_HWCODEC == MAS3587F |
281 | void (*mpeg_set_pitch)(int pitch); | 281 | void (*mpeg_set_pitch)(int pitch); |
282 | 282 | ||
283 | unsigned short (*peak_meter_scale_value)(unsigned short val, | 283 | unsigned short (*peak_meter_scale_value)(unsigned short val, |
diff --git a/apps/plugins/battery_test.c b/apps/plugins/battery_test.c index c7dac01a47..04be9b0070 100644 --- a/apps/plugins/battery_test.c +++ b/apps/plugins/battery_test.c | |||
@@ -97,7 +97,7 @@ enum plugin_status loop(void) | |||
97 | 97 | ||
98 | /* Check if we shall exit the plugin */ | 98 | /* Check if we shall exit the plugin */ |
99 | if (button==BUTTON_ON || | 99 | if (button==BUTTON_ON || |
100 | #ifdef HAVE_RECORDER_KEYPAD | 100 | #if CONFIG_KEYPAD == RECORDER_PAD |
101 | button==BUTTON_OFF | 101 | button==BUTTON_OFF |
102 | #else | 102 | #else |
103 | button==BUTTON_STOP | 103 | button==BUTTON_STOP |
diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c index b647a0fa76..4df169669a 100644 --- a/apps/plugins/chessclock.c +++ b/apps/plugins/chessclock.c | |||
@@ -227,7 +227,7 @@ static int run_timer(int nr) | |||
227 | button = rb->button_get_w_tmo(10); | 227 | button = rb->button_get_w_tmo(10); |
228 | switch (button) { | 228 | switch (button) { |
229 | /* OFF/MENU key to exit */ | 229 | /* OFF/MENU key to exit */ |
230 | #ifdef HAVE_RECORDER_KEYPAD | 230 | #if CONFIG_KEYPAD == RECORDER_PAD |
231 | case BUTTON_OFF: | 231 | case BUTTON_OFF: |
232 | #else | 232 | #else |
233 | case BUTTON_ON: | 233 | case BUTTON_ON: |
@@ -299,7 +299,7 @@ static int run_timer(int nr) | |||
299 | break; | 299 | break; |
300 | 300 | ||
301 | /* UP (RIGHT/+) = Scroll Lap timer up */ | 301 | /* UP (RIGHT/+) = Scroll Lap timer up */ |
302 | #ifdef HAVE_RECORDER_KEYPAD | 302 | #if CONFIG_KEYPAD == RECORDER_PAD |
303 | case BUTTON_UP: | 303 | case BUTTON_UP: |
304 | #else | 304 | #else |
305 | case BUTTON_RIGHT: | 305 | case BUTTON_RIGHT: |
@@ -309,7 +309,7 @@ static int run_timer(int nr) | |||
309 | break; | 309 | break; |
310 | 310 | ||
311 | /* DOWN (LEFT/-) = Scroll Lap timer down */ | 311 | /* DOWN (LEFT/-) = Scroll Lap timer down */ |
312 | #ifdef HAVE_RECORDER_KEYPAD | 312 | #if CONFIG_KEYPAD == RECORDER_PAD |
313 | case BUTTON_DOWN: | 313 | case BUTTON_DOWN: |
314 | #else | 314 | #else |
315 | case BUTTON_LEFT: | 315 | case BUTTON_LEFT: |
@@ -364,7 +364,7 @@ static int chessclock_set_int(char* string, | |||
364 | #endif | 364 | #endif |
365 | button = rb->button_get_w_tmo(HZ/2); | 365 | button = rb->button_get_w_tmo(HZ/2); |
366 | switch(button) { | 366 | switch(button) { |
367 | #ifdef HAVE_RECORDER_KEYPAD | 367 | #if CONFIG_KEYPAD == RECORDER_PAD |
368 | case BUTTON_UP: | 368 | case BUTTON_UP: |
369 | case BUTTON_UP | BUTTON_REPEAT: | 369 | case BUTTON_UP | BUTTON_REPEAT: |
370 | #else | 370 | #else |
@@ -374,7 +374,7 @@ static int chessclock_set_int(char* string, | |||
374 | *variable += step; | 374 | *variable += step; |
375 | break; | 375 | break; |
376 | 376 | ||
377 | #ifdef HAVE_RECORDER_KEYPAD | 377 | #if CONFIG_KEYPAD == RECORDER_PAD |
378 | case BUTTON_DOWN: | 378 | case BUTTON_DOWN: |
379 | case BUTTON_DOWN | BUTTON_REPEAT: | 379 | case BUTTON_DOWN | BUTTON_REPEAT: |
380 | #else | 380 | #else |
@@ -384,7 +384,7 @@ static int chessclock_set_int(char* string, | |||
384 | *variable -= step; | 384 | *variable -= step; |
385 | break; | 385 | break; |
386 | 386 | ||
387 | #ifdef HAVE_RECORDER_KEYPAD | 387 | #if CONFIG_KEYPAD == RECORDER_PAD |
388 | case BUTTON_LEFT: | 388 | case BUTTON_LEFT: |
389 | case BUTTON_PLAY: | 389 | case BUTTON_PLAY: |
390 | #else | 390 | #else |
@@ -393,7 +393,7 @@ static int chessclock_set_int(char* string, | |||
393 | done = true; | 393 | done = true; |
394 | break; | 394 | break; |
395 | 395 | ||
396 | #ifdef HAVE_RECORDER_KEYPAD | 396 | #if CONFIG_KEYPAD == RECORDER_PAD |
397 | case BUTTON_OFF: | 397 | case BUTTON_OFF: |
398 | #else | 398 | #else |
399 | case BUTTON_STOP: | 399 | case BUTTON_STOP: |
@@ -442,7 +442,7 @@ static int simple_menu(int nr, char **strarr) | |||
442 | rb->lcd_puts_scroll(0, 0, strarr[show]); | 442 | rb->lcd_puts_scroll(0, 0, strarr[show]); |
443 | button = rb->button_get(false); | 443 | button = rb->button_get(false); |
444 | switch(button) { | 444 | switch(button) { |
445 | #ifdef HAVE_RECORDER_KEYPAD | 445 | #if CONFIG_KEYPAD == RECORDER_PAD |
446 | case BUTTON_UP: | 446 | case BUTTON_UP: |
447 | case BUTTON_UP | BUTTON_REPEAT: | 447 | case BUTTON_UP | BUTTON_REPEAT: |
448 | #else | 448 | #else |
@@ -452,7 +452,7 @@ static int simple_menu(int nr, char **strarr) | |||
452 | show++; | 452 | show++; |
453 | break; | 453 | break; |
454 | 454 | ||
455 | #ifdef HAVE_RECORDER_KEYPAD | 455 | #if CONFIG_KEYPAD == RECORDER_PAD |
456 | case BUTTON_DOWN: | 456 | case BUTTON_DOWN: |
457 | case BUTTON_DOWN | BUTTON_REPEAT: | 457 | case BUTTON_DOWN | BUTTON_REPEAT: |
458 | #else | 458 | #else |
@@ -462,7 +462,7 @@ static int simple_menu(int nr, char **strarr) | |||
462 | show--; | 462 | show--; |
463 | break; | 463 | break; |
464 | 464 | ||
465 | #ifdef HAVE_RECORDER_KEYPAD | 465 | #if CONFIG_KEYPAD == RECORDER_PAD |
466 | case BUTTON_LEFT: | 466 | case BUTTON_LEFT: |
467 | case BUTTON_PLAY: | 467 | case BUTTON_PLAY: |
468 | #else | 468 | #else |
@@ -471,7 +471,7 @@ static int simple_menu(int nr, char **strarr) | |||
471 | return show; | 471 | return show; |
472 | break; | 472 | break; |
473 | 473 | ||
474 | #ifdef HAVE_RECORDER_KEYPAD | 474 | #if CONFIG_KEYPAD == RECORDER_PAD |
475 | case BUTTON_OFF: | 475 | case BUTTON_OFF: |
476 | #else | 476 | #else |
477 | case BUTTON_STOP: | 477 | case BUTTON_STOP: |
diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c index dbccd03697..74b7663f3f 100644 --- a/apps/plugins/metronome.c +++ b/apps/plugins/metronome.c | |||
@@ -200,7 +200,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter){ | |||
200 | while (true){ | 200 | while (true){ |
201 | 201 | ||
202 | switch (rb->button_get(true)) { | 202 | switch (rb->button_get(true)) { |
203 | #ifdef HAVE_RECORDER_KEYPAD | 203 | #if CONFIG_KEYPAD == RECORDER_PAD |
204 | case BUTTON_OFF: | 204 | case BUTTON_OFF: |
205 | #else | 205 | #else |
206 | case BUTTON_STOP: | 206 | case BUTTON_STOP: |
@@ -220,7 +220,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter){ | |||
220 | draw_display(); | 220 | draw_display(); |
221 | break; | 221 | break; |
222 | 222 | ||
223 | #ifdef HAVE_RECORDER_KEYPAD | 223 | #if CONFIG_KEYPAD == RECORDER_PAD |
224 | case BUTTON_UP: | 224 | case BUTTON_UP: |
225 | case BUTTON_UP | BUTTON_REPEAT: | 225 | case BUTTON_UP | BUTTON_REPEAT: |
226 | #else | 226 | #else |
@@ -231,7 +231,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter){ | |||
231 | calc_period(); | 231 | calc_period(); |
232 | break; | 232 | break; |
233 | 233 | ||
234 | #ifdef HAVE_RECORDER_KEYPAD | 234 | #if CONFIG_KEYPAD == RECORDER_PAD |
235 | case BUTTON_DOWN: | 235 | case BUTTON_DOWN: |
236 | case BUTTON_DOWN | BUTTON_REPEAT: | 236 | case BUTTON_DOWN | BUTTON_REPEAT: |
237 | #else | 237 | #else |
diff --git a/apps/plugins/splitedit.c b/apps/plugins/splitedit.c index db99c5bb77..b76a08cb80 100644 --- a/apps/plugins/splitedit.c +++ b/apps/plugins/splitedit.c | |||
@@ -230,7 +230,7 @@ static void update_icons(void) | |||
230 | LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, | 230 | LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, |
231 | BMPWIDTH, BMPHEIGHT, true); | 231 | BMPWIDTH, BMPHEIGHT, true); |
232 | 232 | ||
233 | #ifdef HAVE_MAS3587F | 233 | #if CONFIG_HWCODEC == MAS3587F |
234 | /* The scale icon */ | 234 | /* The scale icon */ |
235 | rb->lcd_bitmap(SCALE_BMP[rb->peak_meter_get_use_dbfs()], | 235 | rb->lcd_bitmap(SCALE_BMP[rb->peak_meter_get_use_dbfs()], |
236 | 2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, | 236 | 2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT, |
@@ -849,7 +849,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split, | |||
849 | { | 849 | { |
850 | /* read volume info */ | 850 | /* read volume info */ |
851 | unsigned short volume; | 851 | unsigned short volume; |
852 | #ifdef HAVE_MAS3587F | 852 | #if CONFIG_HWCODEC == MAS3587F |
853 | volume = rb->mas_codec_readreg(0x0c); | 853 | volume = rb->mas_codec_readreg(0x0c); |
854 | volume += rb->mas_codec_readreg(0x0d); | 854 | volume += rb->mas_codec_readreg(0x0d); |
855 | volume = volume / 2; | 855 | volume = volume / 2; |
@@ -1003,7 +1003,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split, | |||
1003 | lastx = time_to_xpos(mp3->elapsed); | 1003 | lastx = time_to_xpos(mp3->elapsed); |
1004 | break; | 1004 | break; |
1005 | 1005 | ||
1006 | #ifdef HAVE_MAS3587F | 1006 | #if CONFIG_HWCODEC == MAS3587F |
1007 | case BUTTON_ON | BUTTON_RIGHT: | 1007 | case BUTTON_ON | BUTTON_RIGHT: |
1008 | rb->mpeg_set_pitch(1500); | 1008 | rb->mpeg_set_pitch(1500); |
1009 | splitedit_invalidate_osci(); | 1009 | splitedit_invalidate_osci(); |
@@ -1060,7 +1060,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split, | |||
1060 | break; | 1060 | break; |
1061 | 1061 | ||
1062 | case BUTTON_F3: | 1062 | case BUTTON_F3: |
1063 | #ifdef HAVE_MAS3587F | 1063 | #if CONFIG_HWCODEC == MAS3587F |
1064 | rb->peak_meter_set_use_dbfs(rb->peak_meter_get_use_dbfs() +1); | 1064 | rb->peak_meter_set_use_dbfs(rb->peak_meter_get_use_dbfs() +1); |
1065 | #endif | 1065 | #endif |
1066 | splitedit_invalidate_osci(); | 1066 | splitedit_invalidate_osci(); |
diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c index f71c4fe454..370a1b51a6 100644 --- a/apps/plugins/stopwatch.c +++ b/apps/plugins/stopwatch.c | |||
@@ -103,7 +103,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
103 | { | 103 | { |
104 | 104 | ||
105 | /* OFF/MENU key to exit */ | 105 | /* OFF/MENU key to exit */ |
106 | #ifdef HAVE_RECORDER_KEYPAD | 106 | #if CONFIG_KEYPAD == RECORDER_PAD |
107 | case BUTTON_OFF: | 107 | case BUTTON_OFF: |
108 | #else | 108 | #else |
109 | case BUTTON_MENU: | 109 | case BUTTON_MENU: |
@@ -127,7 +127,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
127 | break; | 127 | break; |
128 | 128 | ||
129 | /* LEFT = Reset timer */ | 129 | /* LEFT = Reset timer */ |
130 | #ifdef HAVE_RECORDER_KEYPAD | 130 | #if CONFIG_KEYPAD == RECORDER_PAD |
131 | case BUTTON_LEFT: | 131 | case BUTTON_LEFT: |
132 | #else | 132 | #else |
133 | case BUTTON_STOP: | 133 | case BUTTON_STOP: |
@@ -148,7 +148,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
148 | break; | 148 | break; |
149 | 149 | ||
150 | /* UP (RIGHT/+) = Scroll Lap timer up */ | 150 | /* UP (RIGHT/+) = Scroll Lap timer up */ |
151 | #ifdef HAVE_RECORDER_KEYPAD | 151 | #if CONFIG_KEYPAD == RECORDER_PAD |
152 | case BUTTON_UP: | 152 | case BUTTON_UP: |
153 | #else | 153 | #else |
154 | case BUTTON_RIGHT: | 154 | case BUTTON_RIGHT: |
@@ -161,7 +161,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
161 | break; | 161 | break; |
162 | 162 | ||
163 | /* DOWN (LEFT/-) = Scroll Lap timer down */ | 163 | /* DOWN (LEFT/-) = Scroll Lap timer down */ |
164 | #ifdef HAVE_RECORDER_KEYPAD | 164 | #if CONFIG_KEYPAD == RECORDER_PAD |
165 | case BUTTON_DOWN: | 165 | case BUTTON_DOWN: |
166 | #else | 166 | #else |
167 | case BUTTON_LEFT: | 167 | case BUTTON_LEFT: |
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index a593da28e7..eb15127704 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c | |||
@@ -746,7 +746,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
746 | 746 | ||
747 | while (!exit) { | 747 | while (!exit) { |
748 | switch (rb->button_get(true)) { | 748 | switch (rb->button_get(true)) { |
749 | #ifdef HAVE_RECORDER_KEYPAD | 749 | #if CONFIG_KEYPAD == RECORDER_PAD |
750 | case BUTTON_OFF: | 750 | case BUTTON_OFF: |
751 | #else | 751 | #else |
752 | case BUTTON_STOP: | 752 | case BUTTON_STOP: |
@@ -755,7 +755,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
755 | exit = true; | 755 | exit = true; |
756 | break; | 756 | break; |
757 | 757 | ||
758 | #ifdef HAVE_RECORDER_KEYPAD | 758 | #if CONFIG_KEYPAD == RECORDER_PAD |
759 | case BUTTON_F1: | 759 | case BUTTON_F1: |
760 | #else | 760 | #else |
761 | case BUTTON_ON | BUTTON_LEFT: | 761 | case BUTTON_ON | BUTTON_LEFT: |
@@ -776,7 +776,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
776 | viewer_draw(col); | 776 | viewer_draw(col); |
777 | break; | 777 | break; |
778 | 778 | ||
779 | #ifdef HAVE_RECORDER_KEYPAD | 779 | #if CONFIG_KEYPAD == RECORDER_PAD |
780 | case BUTTON_F2: | 780 | case BUTTON_F2: |
781 | #else | 781 | #else |
782 | case BUTTON_ON | BUTTON_MENU | BUTTON_RIGHT: | 782 | case BUTTON_ON | BUTTON_MENU | BUTTON_RIGHT: |
@@ -802,7 +802,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
802 | viewer_draw(col); | 802 | viewer_draw(col); |
803 | break; | 803 | break; |
804 | 804 | ||
805 | #ifdef HAVE_RECORDER_KEYPAD | 805 | #if CONFIG_KEYPAD == RECORDER_PAD |
806 | case BUTTON_F3: | 806 | case BUTTON_F3: |
807 | #else | 807 | #else |
808 | case BUTTON_ON | BUTTON_RIGHT: | 808 | case BUTTON_ON | BUTTON_RIGHT: |
@@ -843,7 +843,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
843 | viewer_draw(col); | 843 | viewer_draw(col); |
844 | break; | 844 | break; |
845 | 845 | ||
846 | #ifdef HAVE_RECORDER_KEYPAD | 846 | #if CONFIG_KEYPAD == RECORDER_PAD |
847 | case BUTTON_UP: | 847 | case BUTTON_UP: |
848 | case BUTTON_UP | BUTTON_REPEAT: | 848 | case BUTTON_UP | BUTTON_REPEAT: |
849 | #else | 849 | #else |
@@ -861,7 +861,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
861 | viewer_draw(col); | 861 | viewer_draw(col); |
862 | break; | 862 | break; |
863 | 863 | ||
864 | #ifdef HAVE_RECORDER_KEYPAD | 864 | #if CONFIG_KEYPAD == RECORDER_PAD |
865 | case BUTTON_DOWN: | 865 | case BUTTON_DOWN: |
866 | case BUTTON_DOWN | BUTTON_REPEAT: | 866 | case BUTTON_DOWN | BUTTON_REPEAT: |
867 | #else | 867 | #else |
@@ -875,7 +875,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
875 | viewer_draw(col); | 875 | viewer_draw(col); |
876 | break; | 876 | break; |
877 | 877 | ||
878 | #ifdef HAVE_RECORDER_KEYPAD | 878 | #if CONFIG_KEYPAD == RECORDER_PAD |
879 | case BUTTON_LEFT: | 879 | case BUTTON_LEFT: |
880 | case BUTTON_LEFT | BUTTON_REPEAT: | 880 | case BUTTON_LEFT | BUTTON_REPEAT: |
881 | #else | 881 | #else |
@@ -895,7 +895,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
895 | viewer_draw(col); | 895 | viewer_draw(col); |
896 | break; | 896 | break; |
897 | 897 | ||
898 | #ifdef HAVE_RECORDER_KEYPAD | 898 | #if CONFIG_KEYPAD == RECORDER_PAD |
899 | case BUTTON_RIGHT: | 899 | case BUTTON_RIGHT: |
900 | case BUTTON_RIGHT | BUTTON_REPEAT: | 900 | case BUTTON_RIGHT | BUTTON_REPEAT: |
901 | #else | 901 | #else |
@@ -915,7 +915,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) | |||
915 | viewer_draw(col); | 915 | viewer_draw(col); |
916 | break; | 916 | break; |
917 | 917 | ||
918 | #ifdef HAVE_RECORDER_KEYPAD | 918 | #if CONFIG_KEYPAD == RECORDER_PAD |
919 | case BUTTON_ON: | 919 | case BUTTON_ON: |
920 | /*Go to On-btn combinations */ | 920 | /*Go to On-btn combinations */ |
921 | col = viewer_recorder_on_button(col); | 921 | col = viewer_recorder_on_button(col); |
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c index c1bd25e0aa..b1a28c29b4 100644 --- a/apps/recorder/keyboard.c +++ b/apps/recorder/keyboard.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #define KEYBOARD_LINES 4 | 33 | #define KEYBOARD_LINES 4 |
34 | #define KEYBOARD_PAGES 3 | 34 | #define KEYBOARD_PAGES 3 |
35 | 35 | ||
36 | #ifdef HAVE_RECORDER_KEYPAD | 36 | #if CONFIG_KEYPAD == RECORDER_PAD |
37 | static void kbd_setupkeys(const char* line[KEYBOARD_LINES], int page) | 37 | static void kbd_setupkeys(const char* line[KEYBOARD_LINES], int page) |
38 | { | 38 | { |
39 | switch (page) { | 39 | switch (page) { |
@@ -77,7 +77,7 @@ void kbd_spellchar(char c) | |||
77 | 77 | ||
78 | int kbd_input(char* text, int buflen) | 78 | int kbd_input(char* text, int buflen) |
79 | { | 79 | { |
80 | #ifndef HAVE_RECORDER_KEYPAD | 80 | #if CONFIG_KEYPAD != RECORDER_PAD |
81 | (void)text; | 81 | (void)text; |
82 | (void)buflen; | 82 | (void)buflen; |
83 | splash(HZ*2, true, "Keyboard not implemented yet"); | 83 | splash(HZ*2, true, "Keyboard not implemented yet"); |
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index c163cc4552..3d03dc30c9 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c | |||
@@ -48,7 +48,7 @@ | |||
48 | #include "recording.h" | 48 | #include "recording.h" |
49 | #include "talk.h" | 49 | #include "talk.h" |
50 | 50 | ||
51 | #ifdef HAVE_FMRADIO | 51 | #ifdef CONFIG_TUNER |
52 | 52 | ||
53 | #define MAX_FREQ (108000000) | 53 | #define MAX_FREQ (108000000) |
54 | #define MIN_FREQ (87500000) | 54 | #define MIN_FREQ (87500000) |
@@ -167,7 +167,7 @@ static void remember_frequency(void) | |||
167 | 167 | ||
168 | bool radio_screen(void) | 168 | bool radio_screen(void) |
169 | { | 169 | { |
170 | #ifndef HAVE_RECORDER_KEYPAD | 170 | #if CONFIG_KEYPAD != RECORDER_PAD |
171 | splash(HZ*2, true, "Radio not supported yet"); | 171 | splash(HZ*2, true, "Radio not supported yet"); |
172 | return false; | 172 | return false; |
173 | #else | 173 | #else |
@@ -668,7 +668,7 @@ static bool radio_add_preset(void) | |||
668 | static int handle_radio_presets_menu_cb(int key, int m) | 668 | static int handle_radio_presets_menu_cb(int key, int m) |
669 | { | 669 | { |
670 | (void)m; | 670 | (void)m; |
671 | #ifdef HAVE_RECORDER_KEYPAD | 671 | #if CONFIG_KEYPAD == RECORDER_PAD |
672 | switch(key) | 672 | switch(key) |
673 | { | 673 | { |
674 | case BUTTON_F3: | 674 | case BUTTON_F3: |
@@ -732,7 +732,7 @@ bool handle_radio_presets_menu(void) | |||
732 | 732 | ||
733 | int handle_radio_presets_cb(int key, int m) | 733 | int handle_radio_presets_cb(int key, int m) |
734 | { | 734 | { |
735 | #ifdef HAVE_ONDIO_KEYPAD | 735 | #if CONFIG_KEYPAD == ONDIO_PAD |
736 | (void)key; | 736 | (void)key; |
737 | (void)m; | 737 | (void)m; |
738 | return BUTTON_NONE; | 738 | return BUTTON_NONE; |
diff --git a/apps/recorder/radio.h b/apps/recorder/radio.h index 5ddbf13d6b..76a4af3b9f 100644 --- a/apps/recorder/radio.h +++ b/apps/recorder/radio.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #ifndef RADIO_H | 19 | #ifndef RADIO_H |
20 | #define RADIO_H | 20 | #define RADIO_H |
21 | 21 | ||
22 | #ifdef HAVE_FMRADIO | 22 | #ifdef CONFIG_TUNER |
23 | bool radio_screen(void); | 23 | bool radio_screen(void); |
24 | void radio_stop(void); | 24 | void radio_stop(void); |
25 | bool radio_hardware_present(void); | 25 | bool radio_hardware_present(void); |
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 3a2505b6ae..98c2b27008 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -166,7 +166,7 @@ int rec_create_directory(void) | |||
166 | 166 | ||
167 | bool recording_screen(void) | 167 | bool recording_screen(void) |
168 | { | 168 | { |
169 | #ifndef HAVE_RECORDER_KEYPAD | 169 | #if CONFIG_KEYPAD != RECORDER_PAD |
170 | splash(HZ*2, true, "Recording not supported yet"); | 170 | splash(HZ*2, true, "Recording not supported yet"); |
171 | return false; | 171 | return false; |
172 | #else | 172 | #else |
@@ -625,7 +625,7 @@ bool recording_screen(void) | |||
625 | #endif | 625 | #endif |
626 | } | 626 | } |
627 | 627 | ||
628 | #ifdef HAVE_RECORDER_KEYPAD | 628 | #if CONFIG_KEYPAD == RECORDER_PAD |
629 | bool f2_rec_screen(void) | 629 | bool f2_rec_screen(void) |
630 | { | 630 | { |
631 | bool exit = false; | 631 | bool exit = false; |
diff --git a/apps/screens.c b/apps/screens.c index b0d95e0a7a..64382cc0ed 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -286,7 +286,7 @@ int charging_screen(void) | |||
286 | #endif /* HAVE_BATTERIES */ | 286 | #endif /* HAVE_BATTERIES */ |
287 | 287 | ||
288 | 288 | ||
289 | #ifdef HAVE_RECORDER_KEYPAD | 289 | #if CONFIG_KEYPAD == RECORDER_PAD |
290 | /* returns: | 290 | /* returns: |
291 | 0 if no key was pressed | 291 | 0 if no key was pressed |
292 | 1 if a key was pressed (or if ON was held down long enough to repeat) | 292 | 1 if a key was pressed (or if ON was held down long enough to repeat) |
@@ -1112,7 +1112,7 @@ bool set_time_screen(const char* string, struct tm *tm) | |||
1112 | } | 1112 | } |
1113 | #endif | 1113 | #endif |
1114 | 1114 | ||
1115 | #ifdef HAVE_RECORDER_KEYPAD | 1115 | #if CONFIG_KEYPAD == RECORDER_PAD |
1116 | bool shutdown_screen(void) | 1116 | bool shutdown_screen(void) |
1117 | { | 1117 | { |
1118 | int button; | 1118 | int button; |
diff --git a/apps/screens.h b/apps/screens.h index 9f15ff3228..47b85af821 100644 --- a/apps/screens.h +++ b/apps/screens.h | |||
@@ -26,7 +26,7 @@ void usb_screen(void); | |||
26 | int charging_screen(void); | 26 | int charging_screen(void); |
27 | void charging_splash(void); | 27 | void charging_splash(void); |
28 | 28 | ||
29 | #ifdef HAVE_RECORDER_KEYPAD | 29 | #if CONFIG_KEYPAD == RECORDER_PAD |
30 | int pitch_screen(void); | 30 | int pitch_screen(void); |
31 | bool quick_screen(const int, const int); | 31 | bool quick_screen(const int, const int); |
32 | #endif | 32 | #endif |
diff --git a/apps/settings.c b/apps/settings.c index bd1abc240d..a13abecfc7 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -63,7 +63,7 @@ | |||
63 | #include "keyboard.h" | 63 | #include "keyboard.h" |
64 | #include "version.h" | 64 | #include "version.h" |
65 | #include "rtc.h" | 65 | #include "rtc.h" |
66 | #ifdef HAVE_MAS3507D | 66 | #if CONFIG_HWCODEC == MAS3507D |
67 | void dac_line_in(bool enable); | 67 | void dac_line_in(bool enable); |
68 | #endif | 68 | #endif |
69 | struct user_settings global_settings; | 69 | struct user_settings global_settings; |
@@ -164,7 +164,7 @@ static const struct bit_entry rtc_bits[] = | |||
164 | {8 | SIGNED, S_O(balance), 0, "balance", NULL }, /* -100...100 */ | 164 | {8 | SIGNED, S_O(balance), 0, "balance", NULL }, /* -100...100 */ |
165 | {5 | SIGNED, S_O(bass), 0, "bass", NULL }, /* -15..+15 / -12..+12 */ | 165 | {5 | SIGNED, S_O(bass), 0, "bass", NULL }, /* -15..+15 / -12..+12 */ |
166 | {5 | SIGNED, S_O(treble), 0, "treble", NULL }, /* -15..+15 / -12..+12 */ | 166 | {5 | SIGNED, S_O(treble), 0, "treble", NULL }, /* -15..+15 / -12..+12 */ |
167 | #ifdef HAVE_MAS3587F | 167 | #if CONFIG_HWCODEC == MAS3587F |
168 | {5, S_O(loudness), 0, "loudness", NULL }, /* 0...17 */ | 168 | {5, S_O(loudness), 0, "loudness", NULL }, /* 0...17 */ |
169 | {3, S_O(avc), 0, "auto volume", "off,20ms,2,4,8" }, | 169 | {3, S_O(avc), 0, "auto volume", "off,20ms,2,4,8" }, |
170 | {1, S_O(superbass), false, "superbass", off_on }, | 170 | {1, S_O(superbass), false, "superbass", off_on }, |
@@ -221,7 +221,7 @@ static const struct bit_entry rtc_bits[] = | |||
221 | 221 | ||
222 | /* new stuff to be added here */ | 222 | /* new stuff to be added here */ |
223 | /* If values are just added to the end, no need to bump the version. */ | 223 | /* If values are just added to the end, no need to bump the version. */ |
224 | #ifdef HAVE_FMRADIO | 224 | #ifdef CONFIG_TUNER |
225 | {1, S_O(fm_force_mono), false, "force fm mono", off_on }, | 225 | {1, S_O(fm_force_mono), false, "force fm mono", off_on }, |
226 | {8, S_O(last_frequency), 0, NULL, NULL }, /* Default: MIN_FREQ */ | 226 | {8, S_O(last_frequency), 0, NULL, NULL }, /* Default: MIN_FREQ */ |
227 | #endif | 227 | #endif |
@@ -295,7 +295,7 @@ static const struct bit_entry hd_bits[] = | |||
295 | {7, S_O(peak_meter_min), 60, "peak meter min", NULL }, /* 0...100 */ | 295 | {7, S_O(peak_meter_min), 60, "peak meter min", NULL }, /* 0...100 */ |
296 | {7, S_O(peak_meter_max), 0, "peak meter max", NULL }, /* 0...100 */ | 296 | {7, S_O(peak_meter_max), 0, "peak meter max", NULL }, /* 0...100 */ |
297 | #endif | 297 | #endif |
298 | #ifdef HAVE_MAS3587F | 298 | #if CONFIG_HWCODEC == MAS3587F |
299 | /* recording */ | 299 | /* recording */ |
300 | {1, S_O(rec_editable), false, "editable recordings", off_on }, | 300 | {1, S_O(rec_editable), false, "editable recordings", off_on }, |
301 | {4, S_O(rec_timesplit), 0, "rec timesplit", /* 0...13 */ | 301 | {4, S_O(rec_timesplit), 0, "rec timesplit", /* 0...13 */ |
@@ -315,7 +315,7 @@ static const struct bit_entry hd_bits[] = | |||
315 | {1, S_O(rec_directory), 0, /* rec_base_directory */ | 315 | {1, S_O(rec_directory), 0, /* rec_base_directory */ |
316 | "rec directory", REC_BASE_DIR ",current" }, | 316 | "rec directory", REC_BASE_DIR ",current" }, |
317 | #endif | 317 | #endif |
318 | #ifdef HAVE_MAS3507D | 318 | #if CONFIG_HWCODEC == MAS3507D |
319 | {1, S_O(line_in), false, "line in", off_on }, | 319 | {1, S_O(line_in), false, "line in", off_on }, |
320 | #endif | 320 | #endif |
321 | /* voice */ | 321 | /* voice */ |
@@ -710,7 +710,7 @@ void sound_settings_apply(void) | |||
710 | mpeg_sound_set(SOUND_BALANCE, global_settings.balance); | 710 | mpeg_sound_set(SOUND_BALANCE, global_settings.balance); |
711 | mpeg_sound_set(SOUND_VOLUME, global_settings.volume); | 711 | mpeg_sound_set(SOUND_VOLUME, global_settings.volume); |
712 | mpeg_sound_set(SOUND_CHANNELS, global_settings.channel_config); | 712 | mpeg_sound_set(SOUND_CHANNELS, global_settings.channel_config); |
713 | #ifdef HAVE_MAS3587F | 713 | #if CONFIG_HWCODEC == MAS3587F |
714 | mpeg_sound_set(SOUND_LOUDNESS, global_settings.loudness); | 714 | mpeg_sound_set(SOUND_LOUDNESS, global_settings.loudness); |
715 | mpeg_sound_set(SOUND_AVC, global_settings.avc); | 715 | mpeg_sound_set(SOUND_AVC, global_settings.avc); |
716 | mpeg_sound_set(SOUND_MDB_STRENGTH, global_settings.mdb_strength); | 716 | mpeg_sound_set(SOUND_MDB_STRENGTH, global_settings.mdb_strength); |
@@ -735,7 +735,7 @@ void settings_apply(void) | |||
735 | backlight_set_timeout(global_settings.backlight_timeout); | 735 | backlight_set_timeout(global_settings.backlight_timeout); |
736 | backlight_set_on_when_charging(global_settings.backlight_on_when_charging); | 736 | backlight_set_on_when_charging(global_settings.backlight_on_when_charging); |
737 | ata_spindown(global_settings.disk_spindown); | 737 | ata_spindown(global_settings.disk_spindown); |
738 | #ifdef HAVE_MAS3507D | 738 | #if CONFIG_HWCODEC == MAS3507D |
739 | dac_line_in(global_settings.line_in); | 739 | dac_line_in(global_settings.line_in); |
740 | #endif | 740 | #endif |
741 | #ifdef HAVE_ATA_POWER_OFF | 741 | #ifdef HAVE_ATA_POWER_OFF |
@@ -1513,7 +1513,7 @@ bool set_option(const char* string, void* variable, enum optiontype type, | |||
1513 | return false; | 1513 | return false; |
1514 | } | 1514 | } |
1515 | 1515 | ||
1516 | #ifdef HAVE_MAS3587F | 1516 | #if CONFIG_HWCODEC == MAS3587F |
1517 | /* This array holds the record timer interval lengths, in seconds */ | 1517 | /* This array holds the record timer interval lengths, in seconds */ |
1518 | static const unsigned long rec_timer_seconds[] = | 1518 | static const unsigned long rec_timer_seconds[] = |
1519 | { | 1519 | { |
diff --git a/apps/settings.h b/apps/settings.h index aa408ea2cc..b6d37a0aab 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -34,7 +34,7 @@ | |||
34 | #define MAX_FILENAME 20 | 34 | #define MAX_FILENAME 20 |
35 | 35 | ||
36 | /* button definitions */ | 36 | /* button definitions */ |
37 | #ifdef HAVE_RECORDER_KEYPAD | 37 | #if CONFIG_KEYPAD == RECORDER_PAD |
38 | #define SETTINGS_INC BUTTON_UP | 38 | #define SETTINGS_INC BUTTON_UP |
39 | #define SETTINGS_DEC BUTTON_DOWN | 39 | #define SETTINGS_DEC BUTTON_DOWN |
40 | #define SETTINGS_OK (BUTTON_PLAY|BUTTON_REL) | 40 | #define SETTINGS_OK (BUTTON_PLAY|BUTTON_REL) |
@@ -42,14 +42,14 @@ | |||
42 | #define SETTINGS_CANCEL (BUTTON_OFF|BUTTON_REL) | 42 | #define SETTINGS_CANCEL (BUTTON_OFF|BUTTON_REL) |
43 | #define SETTINGS_CANCEL2 (BUTTON_F1|BUTTON_REL) | 43 | #define SETTINGS_CANCEL2 (BUTTON_F1|BUTTON_REL) |
44 | 44 | ||
45 | #elif defined HAVE_PLAYER_KEYPAD | 45 | #elif CONFIG_KEYPAD == PLAYER_PAD |
46 | #define SETTINGS_INC BUTTON_RIGHT | 46 | #define SETTINGS_INC BUTTON_RIGHT |
47 | #define SETTINGS_DEC BUTTON_LEFT | 47 | #define SETTINGS_DEC BUTTON_LEFT |
48 | #define SETTINGS_OK (BUTTON_PLAY|BUTTON_REL) | 48 | #define SETTINGS_OK (BUTTON_PLAY|BUTTON_REL) |
49 | #define SETTINGS_CANCEL (BUTTON_STOP|BUTTON_REL) | 49 | #define SETTINGS_CANCEL (BUTTON_STOP|BUTTON_REL) |
50 | #define SETTINGS_CANCEL2 (BUTTON_MENU|BUTTON_REL) | 50 | #define SETTINGS_CANCEL2 (BUTTON_MENU|BUTTON_REL) |
51 | 51 | ||
52 | #elif defined HAVE_ONDIO_KEYPAD | 52 | #elif CONFIG_KEYPAD == ONDIO_PAD |
53 | #define SETTINGS_INC BUTTON_UP | 53 | #define SETTINGS_INC BUTTON_UP |
54 | #define SETTINGS_DEC BUTTON_DOWN | 54 | #define SETTINGS_DEC BUTTON_DOWN |
55 | #define SETTINGS_OK (BUTTON_RIGHT|BUTTON_REL) | 55 | #define SETTINGS_OK (BUTTON_RIGHT|BUTTON_REL) |
@@ -239,7 +239,7 @@ struct user_settings | |||
239 | bool fade_on_stop; /* fade on pause/unpause/stop */ | 239 | bool fade_on_stop; /* fade on pause/unpause/stop */ |
240 | bool caption_backlight; /* turn on backlight at end and start of track */ | 240 | bool caption_backlight; /* turn on backlight at end and start of track */ |
241 | 241 | ||
242 | #ifdef HAVE_FMRADIO | 242 | #ifdef CONFIG_TUNER |
243 | int fm_freq_step; /* Frequency step for manual tuning, in kHz */ | 243 | int fm_freq_step; /* Frequency step for manual tuning, in kHz */ |
244 | bool fm_force_mono; /* Forces Mono mode if true */ | 244 | bool fm_force_mono; /* Forces Mono mode if true */ |
245 | bool fm_full_range; /* Enables full 10MHz-160MHz range if true, else | 245 | bool fm_full_range; /* Enables full 10MHz-160MHz range if true, else |
@@ -306,7 +306,7 @@ bool set_time_screen(const char* string, struct tm *tm); | |||
306 | int read_line(int fd, char* buffer, int buffer_size); | 306 | int read_line(int fd, char* buffer, int buffer_size); |
307 | void set_file(char* filename, char* setting, int maxlen); | 307 | void set_file(char* filename, char* setting, int maxlen); |
308 | 308 | ||
309 | #ifdef HAVE_MAS3587F | 309 | #if CONFIG_HWCODEC == MAS3587F |
310 | unsigned int rec_timesplit_seconds(void); | 310 | unsigned int rec_timesplit_seconds(void); |
311 | #endif | 311 | #endif |
312 | 312 | ||
diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 9e95fe9d9a..624274520f 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c | |||
@@ -48,7 +48,7 @@ | |||
48 | #include "peakmeter.h" | 48 | #include "peakmeter.h" |
49 | #endif | 49 | #endif |
50 | #include "lang.h" | 50 | #include "lang.h" |
51 | #ifdef HAVE_MAS3507D | 51 | #if CONFIG_HWCODEC == MAS3507D |
52 | void dac_line_in(bool enable); | 52 | void dac_line_in(bool enable); |
53 | #endif | 53 | #endif |
54 | #ifdef HAVE_ALARM_MOD | 54 | #ifdef HAVE_ALARM_MOD |
@@ -775,7 +775,7 @@ static bool spindown(void) | |||
775 | ata_spindown, 1, 3, 254 ); | 775 | ata_spindown, 1, 3, 254 ); |
776 | } | 776 | } |
777 | 777 | ||
778 | #ifdef HAVE_MAS3507D | 778 | #if CONFIG_HWCODEC == MAS3507D |
779 | static bool line_in(void) | 779 | static bool line_in(void) |
780 | { | 780 | { |
781 | bool rc = set_bool(str(LANG_LINE_IN), &global_settings.line_in); | 781 | bool rc = set_bool(str(LANG_LINE_IN), &global_settings.line_in); |
@@ -1335,7 +1335,7 @@ static bool system_settings_menu(void) | |||
1335 | { ID2P(LANG_ALARM_MOD_ALARM_MENU), alarm_screen }, | 1335 | { ID2P(LANG_ALARM_MOD_ALARM_MENU), alarm_screen }, |
1336 | #endif | 1336 | #endif |
1337 | { ID2P(LANG_LIMITS_MENU), limits_settings_menu }, | 1337 | { ID2P(LANG_LIMITS_MENU), limits_settings_menu }, |
1338 | #ifdef HAVE_MAS3507D | 1338 | #if CONFIG_HWCODEC == MAS3507D |
1339 | { ID2P(LANG_LINE_IN), line_in }, | 1339 | { ID2P(LANG_LINE_IN), line_in }, |
1340 | #endif | 1340 | #endif |
1341 | { ID2P(LANG_CAR_ADAPTER_MODE), car_adapter_mode }, | 1341 | { ID2P(LANG_CAR_ADAPTER_MODE), car_adapter_mode }, |
diff --git a/apps/sound_menu.c b/apps/sound_menu.c index fdb2043171..1cb10c6a81 100644 --- a/apps/sound_menu.c +++ b/apps/sound_menu.c | |||
@@ -137,7 +137,7 @@ bool set_sound(const char* string, | |||
137 | } | 137 | } |
138 | if (changed) { | 138 | if (changed) { |
139 | mpeg_sound_set(setting, *variable); | 139 | mpeg_sound_set(setting, *variable); |
140 | #ifdef HAVE_MAS3507D | 140 | #if CONFIG_HWCODEC == MAS3507D |
141 | if(setting == SOUND_BALANCE) | 141 | if(setting == SOUND_BALANCE) |
142 | mpeg_sound_set(SOUND_VOLUME, global_settings.volume); | 142 | mpeg_sound_set(SOUND_VOLUME, global_settings.volume); |
143 | #endif | 143 | #endif |
@@ -168,7 +168,7 @@ static bool treble(void) | |||
168 | return set_sound(str(LANG_TREBLE), &global_settings.treble, SOUND_TREBLE); | 168 | return set_sound(str(LANG_TREBLE), &global_settings.treble, SOUND_TREBLE); |
169 | } | 169 | } |
170 | 170 | ||
171 | #ifdef HAVE_MAS3587F | 171 | #if CONFIG_HWCODEC == MAS3587F |
172 | static bool loudness(void) | 172 | static bool loudness(void) |
173 | { | 173 | { |
174 | return set_sound(str(LANG_LOUDNESS), &global_settings.loudness, | 174 | return set_sound(str(LANG_LOUDNESS), &global_settings.loudness, |
@@ -370,7 +370,7 @@ static bool recdirectory(void) | |||
370 | names, 2, NULL ); | 370 | names, 2, NULL ); |
371 | } | 371 | } |
372 | 372 | ||
373 | #endif /* HAVE_MAS3587F */ | 373 | #endif /* MAS3587F */ |
374 | 374 | ||
375 | static void set_chanconf(int val) | 375 | static void set_chanconf(int val) |
376 | { | 376 | { |
@@ -406,7 +406,7 @@ bool sound_menu(void) | |||
406 | { ID2P(LANG_TREBLE), treble }, | 406 | { ID2P(LANG_TREBLE), treble }, |
407 | { ID2P(LANG_BALANCE), balance }, | 407 | { ID2P(LANG_BALANCE), balance }, |
408 | { ID2P(LANG_CHANNEL_MENU), chanconf }, | 408 | { ID2P(LANG_CHANNEL_MENU), chanconf }, |
409 | #ifdef HAVE_MAS3587F | 409 | #if CONFIG_HWCODEC == MAS3587F |
410 | { ID2P(LANG_LOUDNESS), loudness }, | 410 | { ID2P(LANG_LOUDNESS), loudness }, |
411 | { ID2P(LANG_AUTOVOL), avc }, | 411 | { ID2P(LANG_AUTOVOL), avc }, |
412 | { ID2P(LANG_SUPERBASS), superbass }, | 412 | { ID2P(LANG_SUPERBASS), superbass }, |
@@ -426,7 +426,7 @@ bool sound_menu(void) | |||
426 | return result; | 426 | return result; |
427 | } | 427 | } |
428 | 428 | ||
429 | #ifdef HAVE_MAS3587F | 429 | #if CONFIG_HWCODEC == MAS3587F |
430 | bool recording_menu(bool no_source) | 430 | bool recording_menu(bool no_source) |
431 | { | 431 | { |
432 | int m; | 432 | int m; |
diff --git a/apps/status.c b/apps/status.c index f144adebef..84a3f8d6c2 100644 --- a/apps/status.c +++ b/apps/status.c | |||
@@ -84,7 +84,7 @@ int current_playmode(void) | |||
84 | else | 84 | else |
85 | return STATUS_PLAY; | 85 | return STATUS_PLAY; |
86 | } | 86 | } |
87 | #ifdef HAVE_MAS3587F | 87 | #if CONFIG_HWCODEC == MAS3587F |
88 | else | 88 | else |
89 | { | 89 | { |
90 | if(mpeg_stat & MPEG_STATUS_RECORD) | 90 | if(mpeg_stat & MPEG_STATUS_RECORD) |
diff --git a/apps/tree.c b/apps/tree.c index 44ade04d29..1ffbaa47fe 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -1351,7 +1351,7 @@ static bool dirbrowse(const char *root, const int *dirfilter) | |||
1351 | break; | 1351 | break; |
1352 | #endif | 1352 | #endif |
1353 | 1353 | ||
1354 | #ifdef HAVE_RECORDER_KEYPAD | 1354 | #if CONFIG_KEYPAD == RECORDER_PAD |
1355 | case BUTTON_F2: | 1355 | case BUTTON_F2: |
1356 | if (*dirfilter < NUM_FILTER_MODES) | 1356 | if (*dirfilter < NUM_FILTER_MODES) |
1357 | { | 1357 | { |
diff --git a/apps/tree.h b/apps/tree.h index eb4f0cd00c..398c676f05 100644 --- a/apps/tree.h +++ b/apps/tree.h | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #include <stdbool.h> | 22 | #include <stdbool.h> |
23 | 23 | ||
24 | #ifdef HAVE_RECORDER_KEYPAD | 24 | #if CONFIG_KEYPAD == RECORDER_PAD |
25 | #define TREE_NEXT BUTTON_DOWN | 25 | #define TREE_NEXT BUTTON_DOWN |
26 | #define TREE_PREV BUTTON_UP | 26 | #define TREE_PREV BUTTON_UP |
27 | #define TREE_EXIT BUTTON_LEFT | 27 | #define TREE_EXIT BUTTON_LEFT |
@@ -37,7 +37,7 @@ | |||
37 | #define TREE_RC_ENTER BUTTON_RC_PLAY | 37 | #define TREE_RC_ENTER BUTTON_RC_PLAY |
38 | #define TREE_RC_RUN BUTTON_RC_PLAY | 38 | #define TREE_RC_RUN BUTTON_RC_PLAY |
39 | 39 | ||
40 | #elif defined HAVE_PLAYER_KEYPAD | 40 | #elif CONFIG_KEYPAD == PLAYER_PAD |
41 | #define TREE_NEXT BUTTON_RIGHT | 41 | #define TREE_NEXT BUTTON_RIGHT |
42 | #define TREE_PREV BUTTON_LEFT | 42 | #define TREE_PREV BUTTON_LEFT |
43 | #define TREE_EXIT BUTTON_STOP | 43 | #define TREE_EXIT BUTTON_STOP |
@@ -52,7 +52,7 @@ | |||
52 | #define TREE_RC_ENTER BUTTON_RC_PLAY | 52 | #define TREE_RC_ENTER BUTTON_RC_PLAY |
53 | #define TREE_RC_RUN BUTTON_RC_PLAY | 53 | #define TREE_RC_RUN BUTTON_RC_PLAY |
54 | 54 | ||
55 | #elif defined HAVE_ONDIO_KEYPAD | 55 | #elif CONFIG_KEYPAD == ONDIO_PAD |
56 | #define TREE_NEXT BUTTON_DOWN | 56 | #define TREE_NEXT BUTTON_DOWN |
57 | #define TREE_PREV BUTTON_UP | 57 | #define TREE_PREV BUTTON_UP |
58 | #define TREE_EXIT BUTTON_LEFT | 58 | #define TREE_EXIT BUTTON_LEFT |
diff --git a/apps/wps.c b/apps/wps.c index 8d49b5a478..d5c3d82eca 100644 --- a/apps/wps.c +++ b/apps/wps.c | |||
@@ -62,7 +62,7 @@ static struct mp3entry* nid3 = NULL; | |||
62 | static char current_track_path[MAX_PATH+1]; | 62 | static char current_track_path[MAX_PATH+1]; |
63 | 63 | ||
64 | /* button definitions */ | 64 | /* button definitions */ |
65 | #ifdef HAVE_RECORDER_KEYPAD | 65 | #if CONFIG_KEYPAD == RECORDER_PAD |
66 | #define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL) | 66 | #define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL) |
67 | #define WPS_PREV (BUTTON_LEFT | BUTTON_REL) | 67 | #define WPS_PREV (BUTTON_LEFT | BUTTON_REL) |
68 | #define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT) | 68 | #define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT) |
@@ -84,7 +84,7 @@ static char current_track_path[MAX_PATH+1]; | |||
84 | #define WPS_RC_DECVOL BUTTON_RC_VOL_DOWN | 84 | #define WPS_RC_DECVOL BUTTON_RC_VOL_DOWN |
85 | #define WPS_RC_EXIT BUTTON_RC_STOP | 85 | #define WPS_RC_EXIT BUTTON_RC_STOP |
86 | 86 | ||
87 | #elif defined HAVE_PLAYER_KEYPAD | 87 | #elif CONFIG_KEYPAD == PLAYER_PAD |
88 | #define WPS_NEXT BUTTON_RIGHT | 88 | #define WPS_NEXT BUTTON_RIGHT |
89 | #define WPS_PREV BUTTON_LEFT | 89 | #define WPS_PREV BUTTON_LEFT |
90 | #define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT) | 90 | #define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT) |
@@ -106,7 +106,7 @@ static char current_track_path[MAX_PATH+1]; | |||
106 | #define WPS_RC_DECVOL BUTTON_RC_VOL_DOWN | 106 | #define WPS_RC_DECVOL BUTTON_RC_VOL_DOWN |
107 | #define WPS_RC_EXIT BUTTON_RC_STOP | 107 | #define WPS_RC_EXIT BUTTON_RC_STOP |
108 | 108 | ||
109 | #elif defined HAVE_ONDIO_KEYPAD | 109 | #elif CONFIG_KEYPAD == ONDIO_PAD |
110 | #define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL) | 110 | #define WPS_NEXT (BUTTON_RIGHT | BUTTON_REL) |
111 | #define WPS_PREV (BUTTON_LEFT | BUTTON_REL) | 111 | #define WPS_PREV (BUTTON_LEFT | BUTTON_REL) |
112 | #define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT) | 112 | #define WPS_FFWD (BUTTON_RIGHT | BUTTON_REPEAT) |
@@ -218,7 +218,7 @@ static bool ffwd_rew(int button) | |||
218 | { | 218 | { |
219 | if (!paused) | 219 | if (!paused) |
220 | mpeg_pause(); | 220 | mpeg_pause(); |
221 | #ifdef HAVE_PLAYER_KEYPAD | 221 | #if CONFIG_KEYPAD == PLAYER_PAD |
222 | lcd_stop_scroll(); | 222 | lcd_stop_scroll(); |
223 | #endif | 223 | #endif |
224 | if (direction > 0) | 224 | if (direction > 0) |
@@ -629,7 +629,7 @@ int wps_show(void) | |||
629 | case WPS_RC_NEXT: | 629 | case WPS_RC_NEXT: |
630 | #endif | 630 | #endif |
631 | case WPS_NEXT: | 631 | case WPS_NEXT: |
632 | #ifdef HAVE_RECORDER_KEYPAD | 632 | #if CONFIG_KEYPAD == RECORDER_PAD |
633 | if (lastbutton & BUTTON_REPEAT) | 633 | if (lastbutton & BUTTON_REPEAT) |
634 | break; | 634 | break; |
635 | #endif | 635 | #endif |
@@ -664,7 +664,7 @@ int wps_show(void) | |||
664 | waitfor_nokey(); | 664 | waitfor_nokey(); |
665 | break; | 665 | break; |
666 | 666 | ||
667 | #ifdef HAVE_RECORDER_KEYPAD | 667 | #if CONFIG_KEYPAD == RECORDER_PAD |
668 | /* play settings */ | 668 | /* play settings */ |
669 | case BUTTON_F2: | 669 | case BUTTON_F2: |
670 | if (quick_screen(CONTEXT_WPS, BUTTON_F2)) | 670 | if (quick_screen(CONTEXT_WPS, BUTTON_F2)) |
diff --git a/apps/wps.h b/apps/wps.h index c6cec3fdce..bc2e30e7c0 100644 --- a/apps/wps.h +++ b/apps/wps.h | |||
@@ -28,7 +28,7 @@ int wps_show(void); | |||
28 | bool refresh_wps(bool refresh_scroll); | 28 | bool refresh_wps(bool refresh_scroll); |
29 | void handle_usb(void); | 29 | void handle_usb(void); |
30 | 30 | ||
31 | #ifdef HAVE_RECORDER_KEYPAD | 31 | #if CONFIG_KEYPAD == RECORDER_PAD |
32 | bool f2_screen(void); | 32 | bool f2_screen(void); |
33 | bool f3_screen(void); | 33 | bool f3_screen(void); |
34 | #endif | 34 | #endif |
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 1e889a3339..4ba5829f56 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -33,7 +33,7 @@ | |||
33 | /* skip whole file for an MMC-based system, FIXME in makefile */ | 33 | /* skip whole file for an MMC-based system, FIXME in makefile */ |
34 | #ifndef HAVE_MMC | 34 | #ifndef HAVE_MMC |
35 | 35 | ||
36 | #ifdef HAVE_SCF5249 | 36 | #if CONFIG_CPU == SCF5249 |
37 | 37 | ||
38 | /* don't use sh7034 assembler routines */ | 38 | /* don't use sh7034 assembler routines */ |
39 | #define PREFER_C_READING | 39 | #define PREFER_C_READING |
@@ -43,7 +43,7 @@ | |||
43 | #define ATA_DATA (*((volatile unsigned short*)ATA_IOBASE)) | 43 | #define ATA_DATA (*((volatile unsigned short*)ATA_IOBASE)) |
44 | #define ATA_CONTROL (*((volatile unsigned short*)ATA_IOBASE + 0xe)) | 44 | #define ATA_CONTROL (*((volatile unsigned short*)ATA_IOBASE + 0xe)) |
45 | 45 | ||
46 | #elif defined HAVE_SH7034 | 46 | #elif CONFIG_CPU == SH7034 |
47 | 47 | ||
48 | #define ATA_IOBASE 0x06100100 | 48 | #define ATA_IOBASE 0x06100100 |
49 | #define ATA_DATA (*((volatile unsigned short*)0x06104100)) | 49 | #define ATA_DATA (*((volatile unsigned short*)0x06104100)) |
@@ -879,7 +879,7 @@ int ata_hard_reset(void) | |||
879 | { | 879 | { |
880 | int ret; | 880 | int ret; |
881 | 881 | ||
882 | #ifdef HAVE_SH7034 | 882 | #if CONFIG_CPU == SH7034 |
883 | /* state HRR0 */ | 883 | /* state HRR0 */ |
884 | and_b(~0x02, &PADRH); /* assert _RESET */ | 884 | and_b(~0x02, &PADRH); /* assert _RESET */ |
885 | sleep(1); /* > 25us */ | 885 | sleep(1); /* > 25us */ |
@@ -979,7 +979,7 @@ static int master_slave_detect(void) | |||
979 | return 0; | 979 | return 0; |
980 | } | 980 | } |
981 | 981 | ||
982 | #ifdef HAVE_SH7034 /* special archos quirk */ | 982 | #if CONFIG_CPU == SH7034 /* special archos quirk */ |
983 | static int io_address_detect(void) | 983 | static int io_address_detect(void) |
984 | { /* now, use the HW mask instead of probing */ | 984 | { /* now, use the HW mask instead of probing */ |
985 | if (read_hw_mask() & ATA_ADDRESS_200) | 985 | if (read_hw_mask() & ATA_ADDRESS_200) |
@@ -1001,7 +1001,7 @@ static int io_address_detect(void) | |||
1001 | 1001 | ||
1002 | void ata_enable(bool on) | 1002 | void ata_enable(bool on) |
1003 | { | 1003 | { |
1004 | #ifdef HAVE_SH7034 | 1004 | #if CONFIG_CPU == SH7034 |
1005 | if(on) | 1005 | if(on) |
1006 | and_b(~0x80, &PADRL); /* enable ATA */ | 1006 | and_b(~0x80, &PADRL); /* enable ATA */ |
1007 | else | 1007 | else |
@@ -1129,7 +1129,7 @@ int ata_init(void) | |||
1129 | 1129 | ||
1130 | led(false); | 1130 | led(false); |
1131 | 1131 | ||
1132 | #ifdef HAVE_SH7034 | 1132 | #if CONFIG_CPU == SH7034 |
1133 | /* Port A setup */ | 1133 | /* Port A setup */ |
1134 | or_b(0x02, &PAIORH); /* output for ATA reset */ | 1134 | or_b(0x02, &PAIORH); /* output for ATA reset */ |
1135 | or_b(0x02, &PADRH); /* release ATA reset */ | 1135 | or_b(0x02, &PADRH); /* release ATA reset */ |
@@ -1159,7 +1159,7 @@ int ata_init(void) | |||
1159 | if (rc) | 1159 | if (rc) |
1160 | return -10 + rc; | 1160 | return -10 + rc; |
1161 | 1161 | ||
1162 | #ifdef HAVE_SH7034 | 1162 | #if CONFIG_CPU == SH7034 |
1163 | rc = io_address_detect(); | 1163 | rc = io_address_detect(); |
1164 | if (rc) | 1164 | if (rc) |
1165 | return -20 + rc; | 1165 | return -20 + rc; |
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index ebe3389454..d05f81bb45 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c | |||
@@ -36,7 +36,7 @@ | |||
36 | struct event_queue button_queue; | 36 | struct event_queue button_queue; |
37 | 37 | ||
38 | static int lastbtn; /* Last valid button status */ | 38 | static int lastbtn; /* Last valid button status */ |
39 | #if defined(HAVE_RECORDER_KEYPAD) || defined(HAVE_ONDIO_KEYPAD) | 39 | #if (CONFIG_KEYPAD == RECORDER_PAD) || (CONFIG_KEYPAD == ONDIO_PAD) |
40 | static int last_read; /* Last button status, for debouncing/filtering */ | 40 | static int last_read; /* Last button status, for debouncing/filtering */ |
41 | static bool flipped; /* bottons can be flipped to match the LCD flip */ | 41 | static bool flipped; /* bottons can be flipped to match the LCD flip */ |
42 | #endif | 42 | #endif |
@@ -179,7 +179,7 @@ int button_get_w_tmo(int ticks) | |||
179 | return (ev.id != SYS_TIMEOUT)? ev.id: BUTTON_NONE; | 179 | return (ev.id != SYS_TIMEOUT)? ev.id: BUTTON_NONE; |
180 | } | 180 | } |
181 | 181 | ||
182 | #ifdef HAVE_RECORDER_KEYPAD | 182 | #if CONFIG_KEYPAD == RECORDER_PAD |
183 | 183 | ||
184 | /* AJBR buttons are connected to the CPU as follows: | 184 | /* AJBR buttons are connected to the CPU as follows: |
185 | * | 185 | * |
@@ -348,7 +348,7 @@ static int button_read(void) | |||
348 | return retval; | 348 | return retval; |
349 | } | 349 | } |
350 | 350 | ||
351 | #elif defined(HAVE_PLAYER_KEYPAD) | 351 | #elif CONFIG_KEYPAD == PLAYER_PAD |
352 | 352 | ||
353 | /* The player has two buttons on port pins: | 353 | /* The player has two buttons on port pins: |
354 | 354 | ||
@@ -397,7 +397,7 @@ static int button_read(void) | |||
397 | return btn; | 397 | return btn; |
398 | } | 398 | } |
399 | 399 | ||
400 | #elif defined HAVE_ONDIO_KEYPAD | 400 | #elif CONFIG_KEYPAD == ONDIO_PAD |
401 | 401 | ||
402 | /* | 402 | /* |
403 | * helper function to swap UP/DOWN, LEFT/RIGHT | 403 | * helper function to swap UP/DOWN, LEFT/RIGHT |
diff --git a/firmware/drivers/fmradio.c b/firmware/drivers/fmradio.c index 604005b884..a0394b2a57 100644 --- a/firmware/drivers/fmradio.c +++ b/firmware/drivers/fmradio.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include "debug.h" | 23 | #include "debug.h" |
24 | #include "system.h" | 24 | #include "system.h" |
25 | 25 | ||
26 | #ifdef HAVE_FMRADIO | 26 | #ifdef CONFIG_TUNER |
27 | 27 | ||
28 | /* Signals: | 28 | /* Signals: |
29 | DI (Data In) - PB0 (doubles as data pin for the LCD) | 29 | DI (Data In) - PB0 (doubles as data pin for the LCD) |
diff --git a/firmware/drivers/mas.c b/firmware/drivers/mas.c index a6fd1d1a21..9f6e0943c7 100644 --- a/firmware/drivers/mas.c +++ b/firmware/drivers/mas.c | |||
@@ -132,7 +132,7 @@ int mas_writemem(int bank, int addr, const unsigned long* src, int len) | |||
132 | 132 | ||
133 | j = 0; | 133 | j = 0; |
134 | while(len--) { | 134 | while(len--) { |
135 | #ifdef HAVE_MAS3587F | 135 | #if CONFIG_HWCODEC == MAS3587F |
136 | buf[i++] = 0; | 136 | buf[i++] = 0; |
137 | buf[i++] = ptr[j+1]; | 137 | buf[i++] = ptr[j+1]; |
138 | buf[i++] = ptr[j+2]; | 138 | buf[i++] = ptr[j+2]; |
@@ -232,7 +232,7 @@ static int mas_devread(unsigned long *dest, int len) | |||
232 | if (i2c_getack()) { | 232 | if (i2c_getack()) { |
233 | for (i=0;len;i++) { | 233 | for (i=0;len;i++) { |
234 | len--; | 234 | len--; |
235 | #ifdef HAVE_MAS3587F | 235 | #if CONFIG_HWCODEC == MAS3587F |
236 | i2c_inb(0); /* Dummy read */ | 236 | i2c_inb(0); /* Dummy read */ |
237 | ptr[i*4+0] = 0; | 237 | ptr[i*4+0] = 0; |
238 | ptr[i*4+1] = i2c_inb(0) & 0x0f; | 238 | ptr[i*4+1] = i2c_inb(0) & 0x0f; |
@@ -266,7 +266,7 @@ static int mas_devread(unsigned long *dest, int len) | |||
266 | return ret; | 266 | return ret; |
267 | } | 267 | } |
268 | 268 | ||
269 | #ifdef HAVE_MAS3587F | 269 | #if CONFIG_HWCODEC == MAS3587F |
270 | void mas_reset(void) | 270 | void mas_reset(void) |
271 | { | 271 | { |
272 | or_b(0x01, &PAIORH); | 272 | or_b(0x01, &PAIORH); |
diff --git a/firmware/drivers/serial.c b/firmware/drivers/serial.c index bf2b26b866..8a16cfb3b5 100644 --- a/firmware/drivers/serial.c +++ b/firmware/drivers/serial.c | |||
@@ -87,7 +87,7 @@ int remote_control_rx(void) | |||
87 | } | 87 | } |
88 | else | 88 | else |
89 | { | 89 | { |
90 | #ifndef HAVE_ONDIO_KEYPAD | 90 | #if CONFIG_KEYPAD != ONDIO_PAD |
91 | switch (btn) | 91 | switch (btn) |
92 | { | 92 | { |
93 | case STOP: | 93 | case STOP: |
diff --git a/firmware/export/button.h b/firmware/export/button.h index 50a9b1d8fd..562344ea44 100644 --- a/firmware/export/button.h +++ b/firmware/export/button.h | |||
@@ -30,7 +30,7 @@ int button_get (bool block); | |||
30 | int button_get_w_tmo(int ticks); | 30 | int button_get_w_tmo(int ticks); |
31 | int button_status(void); | 31 | int button_status(void); |
32 | void button_clear_queue(void); | 32 | void button_clear_queue(void); |
33 | #if defined(HAVE_RECORDER_KEYPAD) || defined(HAVE_ONDIO_KEYPAD) | 33 | #if CONFIG_KEYPAD == RECORDER_PAD || CONFIG_KEYPAD == ONDIO_PAD |
34 | void button_set_flip(bool flip); /* turn 180 degrees */ | 34 | void button_set_flip(bool flip); /* turn 180 degrees */ |
35 | #endif | 35 | #endif |
36 | 36 | ||
@@ -51,7 +51,7 @@ void button_set_flip(bool flip); /* turn 180 degrees */ | |||
51 | #define BUTTON_RC_LEFT (BUTTON_LEFT | BUTTON_REMOTE) | 51 | #define BUTTON_RC_LEFT (BUTTON_LEFT | BUTTON_REMOTE) |
52 | #define BUTTON_RC_RIGHT (BUTTON_RIGHT| BUTTON_REMOTE) | 52 | #define BUTTON_RC_RIGHT (BUTTON_RIGHT| BUTTON_REMOTE) |
53 | 53 | ||
54 | #ifdef HAVE_RECORDER_KEYPAD | 54 | #if CONFIG_KEYPAD == RECORDER_PAD |
55 | 55 | ||
56 | /* Recorder specific button codes */ | 56 | /* Recorder specific button codes */ |
57 | #define BUTTON_ON 0x0001 | 57 | #define BUTTON_ON 0x0001 |
@@ -66,7 +66,7 @@ void button_set_flip(bool flip); /* turn 180 degrees */ | |||
66 | #define BUTTON_RC_PLAY (BUTTON_PLAY | BUTTON_REMOTE) | 66 | #define BUTTON_RC_PLAY (BUTTON_PLAY | BUTTON_REMOTE) |
67 | #define BUTTON_RC_STOP (BUTTON_OFF | BUTTON_REMOTE) | 67 | #define BUTTON_RC_STOP (BUTTON_OFF | BUTTON_REMOTE) |
68 | 68 | ||
69 | #elif defined(HAVE_PLAYER_KEYPAD) | 69 | #elif CONFIG_KEYPAD == PLAYER_PAD |
70 | 70 | ||
71 | /* Jukebox 6000 and Studio specific button codes */ | 71 | /* Jukebox 6000 and Studio specific button codes */ |
72 | #define BUTTON_ON 0x0001 | 72 | #define BUTTON_ON 0x0001 |
@@ -77,7 +77,7 @@ void button_set_flip(bool flip); /* turn 180 degrees */ | |||
77 | #define BUTTON_RC_PLAY (BUTTON_PLAY | BUTTON_REMOTE) | 77 | #define BUTTON_RC_PLAY (BUTTON_PLAY | BUTTON_REMOTE) |
78 | #define BUTTON_RC_STOP (BUTTON_STOP | BUTTON_REMOTE) | 78 | #define BUTTON_RC_STOP (BUTTON_STOP | BUTTON_REMOTE) |
79 | 79 | ||
80 | #elif defined HAVE_ONDIO_KEYPAD | 80 | #elif CONFIG_KEYPAD == ONDIO_PAD |
81 | 81 | ||
82 | /* Ondio specific button codes */ | 82 | /* Ondio specific button codes */ |
83 | #define BUTTON_OFF 0x0002 | 83 | #define BUTTON_OFF 0x0002 |
@@ -85,7 +85,7 @@ void button_set_flip(bool flip); /* turn 180 degrees */ | |||
85 | #define BUTTON_DOWN 0x0020 | 85 | #define BUTTON_DOWN 0x0020 |
86 | #define BUTTON_MENU 0x0100 | 86 | #define BUTTON_MENU 0x0100 |
87 | 87 | ||
88 | #endif /* HAVE_RECORDER/PLAYER/ONDIO_KEYPAD */ | 88 | #endif /* RECORDER/PLAYER/ONDIO KEYPAD */ |
89 | 89 | ||
90 | #endif /* _BUTTON_H_ */ | 90 | #endif /* _BUTTON_H_ */ |
91 | 91 | ||
diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index 4f9decf74b..af7ca91315 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #define LCD_HEIGHT 64 | 9 | #define LCD_HEIGHT 64 |
10 | 10 | ||
11 | /* define this if you have a Recorder style 10-key keyboard */ | 11 | /* define this if you have a Recorder style 10-key keyboard */ |
12 | #define HAVE_RECORDER_KEYPAD 1 | 12 | #define CONFIG_KEYPAD RECORDER_PAD |
13 | 13 | ||
14 | /* define this if you have a real-time clock */ | 14 | /* define this if you have a real-time clock */ |
15 | #define HAVE_RTC 1 | 15 | #define HAVE_RTC 1 |
@@ -17,10 +17,10 @@ | |||
17 | #ifndef SIMULATOR | 17 | #ifndef SIMULATOR |
18 | 18 | ||
19 | /* Define this if you have a MAS3587F */ | 19 | /* Define this if you have a MAS3587F */ |
20 | #define HAVE_MAS3587F | 20 | #define CONFIG_HWCODEC MAS3587F |
21 | 21 | ||
22 | /* Define this if you have a SH7034 */ | 22 | /* Define this if you have a SH7034 */ |
23 | #define HAVE_SH7034 | 23 | #define CONFIG_CPU SH7034 |
24 | 24 | ||
25 | /* Define this if you have a FM Recorder key system */ | 25 | /* Define this if you have a FM Recorder key system */ |
26 | #define HAVE_FMADC 1 | 26 | #define HAVE_FMADC 1 |
@@ -56,7 +56,7 @@ | |||
56 | #define HAVE_ALARM_MOD 1 | 56 | #define HAVE_ALARM_MOD 1 |
57 | 57 | ||
58 | /* Define this if you have an FM Radio */ | 58 | /* Define this if you have an FM Radio */ |
59 | #define HAVE_FMRADIO 1 | 59 | #define CONFIG_TUNER S1A0903X01 |
60 | 60 | ||
61 | /* How to detect USB */ | 61 | /* How to detect USB */ |
62 | #define USB_FMRECORDERSTYLE 1 | 62 | #define USB_FMRECORDERSTYLE 1 |
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h index 9917b63e68..6343ebd9e2 100644 --- a/firmware/export/config-h100.h +++ b/firmware/export/config-h100.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #define LCD_HEIGHT 128 | 9 | #define LCD_HEIGHT 128 |
10 | 10 | ||
11 | /* define this if you have the Recorder's 10-key keyboard */ | 11 | /* define this if you have the Recorder's 10-key keyboard */ |
12 | #define HAVE_RECORDER_KEYPAD 1 | 12 | #define CONFIG_KEYPAD RECORDER_PAD |
13 | 13 | ||
14 | #ifndef SIMULATOR | 14 | #ifndef SIMULATOR |
15 | 15 | ||
diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h index 36fd095507..d27444840b 100644 --- a/firmware/export/config-ondiofm.h +++ b/firmware/export/config-ondiofm.h | |||
@@ -9,15 +9,15 @@ | |||
9 | #define LCD_HEIGHT 64 | 9 | #define LCD_HEIGHT 64 |
10 | 10 | ||
11 | /* define this if you have an Ondio style 6-key keyboard */ | 11 | /* define this if you have an Ondio style 6-key keyboard */ |
12 | #define HAVE_ONDIO_KEYPAD | 12 | #define CONFIG_KEYPAD ONDIO_PAD |
13 | 13 | ||
14 | #ifndef SIMULATOR | 14 | #ifndef SIMULATOR |
15 | 15 | ||
16 | /* Define this if you have a SH7034 */ | 16 | /* Define this if you have a SH7034 */ |
17 | #define HAVE_SH7034 | 17 | #define CONFIG_CPU SH7034 |
18 | 18 | ||
19 | /* Define this if you have a MAS3587F */ | 19 | /* Define this if you have a MAS3587F */ |
20 | #define HAVE_MAS3587F | 20 | #define CONFIG_HWCODEC MAS3587F |
21 | 21 | ||
22 | /* Define this if you have a LiIon battery */ | 22 | /* Define this if you have a LiIon battery */ |
23 | /* #define HAVE_LIION */ | 23 | /* #define HAVE_LIION */ |
@@ -50,7 +50,7 @@ | |||
50 | /* #define HAVE_ALARM_MOD 1 */ | 50 | /* #define HAVE_ALARM_MOD 1 */ |
51 | 51 | ||
52 | /* Define this if you have an FM Radio */ | 52 | /* Define this if you have an FM Radio */ |
53 | #define HAVE_FMRADIO 1 | 53 | #define CONFIG_TUNER TEA5767 |
54 | 54 | ||
55 | /* How to detect USB */ | 55 | /* How to detect USB */ |
56 | #define USB_FMRECORDERSTYLE 1 /* like FM, on AN1 */ | 56 | #define USB_FMRECORDERSTYLE 1 /* like FM, on AN1 */ |
diff --git a/firmware/export/config-ondiosp.h b/firmware/export/config-ondiosp.h index 4b276db54f..0a270e8ae5 100644 --- a/firmware/export/config-ondiosp.h +++ b/firmware/export/config-ondiosp.h | |||
@@ -9,15 +9,15 @@ | |||
9 | #define LCD_HEIGHT 64 | 9 | #define LCD_HEIGHT 64 |
10 | 10 | ||
11 | /* define this if you have an Ondio style 6-key keyboard */ | 11 | /* define this if you have an Ondio style 6-key keyboard */ |
12 | #define HAVE_ONDIO_KEYPAD | 12 | #define CONFIG_KEYPAD ONDIO_PAD |
13 | 13 | ||
14 | #ifndef SIMULATOR | 14 | #ifndef SIMULATOR |
15 | 15 | ||
16 | /* Define this if you have a SH7034 */ | 16 | /* Define this if you have a SH7034 */ |
17 | #define HAVE_SH7034 | 17 | #define CONFIG_CPU SH7034 |
18 | 18 | ||
19 | /* Define this if you have a MAS3587F */ | 19 | /* Define this if you have a MAS3539F */ |
20 | #define HAVE_MAS3587F | 20 | #define CONFIG_HWCODEC MAS3587F /* will be MAS3539F once prepared */ |
21 | 21 | ||
22 | /* Define this if you have a LiIon battery */ | 22 | /* Define this if you have a LiIon battery */ |
23 | /* #define HAVE_LIION */ | 23 | /* #define HAVE_LIION */ |
diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h index 99d5a61240..8bd63c42e6 100644 --- a/firmware/export/config-player.h +++ b/firmware/export/config-player.h | |||
@@ -6,15 +6,15 @@ | |||
6 | #define LCD_HEIGHT (4*16+2*24) /* 4*char + 2*icons */ | 6 | #define LCD_HEIGHT (4*16+2*24) /* 4*char + 2*icons */ |
7 | 7 | ||
8 | /* define this if you have the Player's keyboard */ | 8 | /* define this if you have the Player's keyboard */ |
9 | #define HAVE_PLAYER_KEYPAD 1 | 9 | #define CONFIG_KEYPAD PLAYER_PAD |
10 | 10 | ||
11 | #ifndef SIMULATOR | 11 | #ifndef SIMULATOR |
12 | 12 | ||
13 | /* Define this if you have a SH7034 */ | 13 | /* Define this if you have a SH7034 */ |
14 | #define HAVE_SH7034 | 14 | #define CONFIG_CPU SH7034 |
15 | 15 | ||
16 | /* Define this if you have a MAS3507D */ | 16 | /* Define this if you have a MAS3507D */ |
17 | #define HAVE_MAS3507D | 17 | #define CONFIG_HWCODEC MAS3507D |
18 | 18 | ||
19 | /* Define this if you have a DAC3550A */ | 19 | /* Define this if you have a DAC3550A */ |
20 | #define HAVE_DAC3550A | 20 | #define HAVE_DAC3550A |
diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h index 704e9e6d8d..89e19f32f6 100644 --- a/firmware/export/config-recorder.h +++ b/firmware/export/config-recorder.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #define LCD_HEIGHT 64 | 9 | #define LCD_HEIGHT 64 |
10 | 10 | ||
11 | /* define this if you have the Recorder's 10-key keyboard */ | 11 | /* define this if you have the Recorder's 10-key keyboard */ |
12 | #define HAVE_RECORDER_KEYPAD 1 | 12 | #define CONFIG_KEYPAD RECORDER_PAD |
13 | 13 | ||
14 | /* define this if you have a real-time clock */ | 14 | /* define this if you have a real-time clock */ |
15 | #define HAVE_RTC 1 | 15 | #define HAVE_RTC 1 |
@@ -17,10 +17,10 @@ | |||
17 | #ifndef SIMULATOR | 17 | #ifndef SIMULATOR |
18 | 18 | ||
19 | /* Define this if you have a MAS3587F */ | 19 | /* Define this if you have a MAS3587F */ |
20 | #define HAVE_MAS3587F | 20 | #define CONFIG_HWCODEC MAS3587F |
21 | 21 | ||
22 | /* Define this if you have a SH7034 */ | 22 | /* Define this if you have a SH7034 */ |
23 | #define HAVE_SH7034 | 23 | #define CONFIG_CPU SH7034 |
24 | 24 | ||
25 | /* Define this if you have charging control */ | 25 | /* Define this if you have charging control */ |
26 | #define HAVE_CHARGE_CTRL | 26 | #define HAVE_CHARGE_CTRL |
diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h index efec9c20d1..56967cfa10 100644 --- a/firmware/export/config-recorderv2.h +++ b/firmware/export/config-recorderv2.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #define LCD_HEIGHT 64 | 9 | #define LCD_HEIGHT 64 |
10 | 10 | ||
11 | /* define this if you have a Recorder style 10-key keyboard */ | 11 | /* define this if you have a Recorder style 10-key keyboard */ |
12 | #define HAVE_RECORDER_KEYPAD 1 | 12 | #define CONFIG_KEYPAD RECORDER_PAD |
13 | 13 | ||
14 | /* define this if you have a real-time clock */ | 14 | /* define this if you have a real-time clock */ |
15 | #define HAVE_RTC 1 | 15 | #define HAVE_RTC 1 |
@@ -17,10 +17,10 @@ | |||
17 | #ifndef SIMULATOR | 17 | #ifndef SIMULATOR |
18 | 18 | ||
19 | /* Define this if you have a SH7034 */ | 19 | /* Define this if you have a SH7034 */ |
20 | #define HAVE_SH7034 | 20 | #define CONFIG_CPU SH7034 |
21 | 21 | ||
22 | /* Define this if you have a MAS3587F */ | 22 | /* Define this if you have a MAS3587F */ |
23 | #define HAVE_MAS3587F | 23 | #define CONFIG_HWCODEC MAS3587F |
24 | 24 | ||
25 | /* Define this if you have a FM Recorder key system */ | 25 | /* Define this if you have a FM Recorder key system */ |
26 | #define HAVE_FMADC 1 | 26 | #define HAVE_FMADC 1 |
@@ -56,7 +56,7 @@ | |||
56 | #define HAVE_ALARM_MOD 1 | 56 | #define HAVE_ALARM_MOD 1 |
57 | 57 | ||
58 | /* Define this if you have an FM Radio */ | 58 | /* Define this if you have an FM Radio */ |
59 | #define HAVE_FMRADIO 1 | 59 | #define CONFIG_TUNER S1A0903X01 |
60 | 60 | ||
61 | /* How to detect USB */ | 61 | /* How to detect USB */ |
62 | #define USB_FMRECORDERSTYLE 1 | 62 | #define USB_FMRECORDERSTYLE 1 |
diff --git a/firmware/export/config.h b/firmware/export/config.h index 49306d4e81..524a2249d3 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -20,6 +20,27 @@ | |||
20 | #ifndef __CONFIG_H__ | 20 | #ifndef __CONFIG_H__ |
21 | #define __CONFIG_H__ | 21 | #define __CONFIG_H__ |
22 | 22 | ||
23 | /* symbolic names for multiple choice configurations: */ | ||
24 | |||
25 | /* CONFIG_TUNER */ | ||
26 | #define S1A0903X01 0 /* Samsung */ | ||
27 | #define TEA5767 1 /* Philips */ | ||
28 | |||
29 | /* CONFIG_HWCODEC */ | ||
30 | #define MAS3587F 3587 | ||
31 | #define MAS3507D 3507 | ||
32 | #define MAS3539F 3539 | ||
33 | |||
34 | /* CONFIG_CPU */ | ||
35 | #define SH7034 7034 | ||
36 | #define SCF5249 5249 | ||
37 | |||
38 | /* CONFIG_KEYPAD */ | ||
39 | #define PLAYER_PAD 0 | ||
40 | #define RECORDER_PAD 1 | ||
41 | #define ONDIO_PAD 2 | ||
42 | |||
43 | /* now go and pick yours */ | ||
23 | #if defined(ARCHOS_PLAYER) | 44 | #if defined(ARCHOS_PLAYER) |
24 | #include "config-player.h" | 45 | #include "config-player.h" |
25 | #elif defined(ARCHOS_RECORDER) | 46 | #elif defined(ARCHOS_RECORDER) |
diff --git a/firmware/export/mas.h b/firmware/export/mas.h index 8a60389ade..dac946ea63 100644 --- a/firmware/export/mas.h +++ b/firmware/export/mas.h | |||
@@ -27,7 +27,7 @@ | |||
27 | /* | 27 | /* |
28 | MAS I2C defs | 28 | MAS I2C defs |
29 | */ | 29 | */ |
30 | #ifdef HAVE_MAS3587F | 30 | #if CONFIG_HWCODEC == MAS3587F |
31 | #define MAS_ADR 0x3c | 31 | #define MAS_ADR 0x3c |
32 | #define MAS_DEV_WRITE (MAS_ADR | 0x00) | 32 | #define MAS_DEV_WRITE (MAS_ADR | 0x00) |
33 | #define MAS_DEV_READ (MAS_ADR | 0x01) | 33 | #define MAS_DEV_READ (MAS_ADR | 0x01) |
@@ -38,7 +38,7 @@ | |||
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | /* registers..*/ | 40 | /* registers..*/ |
41 | #ifdef HAVE_MAS3587F | 41 | #if CONFIG_HWCODEC == MAS3587F |
42 | #define MAS_DATA_WRITE 0x68 | 42 | #define MAS_DATA_WRITE 0x68 |
43 | #define MAS_DATA_READ 0x69 | 43 | #define MAS_DATA_READ 0x69 |
44 | #define MAS_CODEC_WRITE 0x6c | 44 | #define MAS_CODEC_WRITE 0x6c |
@@ -62,7 +62,7 @@ | |||
62 | #define MAS_REG_KPRESCALE 0xe7 | 62 | #define MAS_REG_KPRESCALE 0xe7 |
63 | #define MAS_REG_KBASS 0x6b | 63 | #define MAS_REG_KBASS 0x6b |
64 | #define MAS_REG_KTREBLE 0x6f | 64 | #define MAS_REG_KTREBLE 0x6f |
65 | #ifdef HAVE_MAS3587F | 65 | #if CONFIG_HWCODEC == MAS3587F |
66 | #define MAS_REG_KMDB_SWITCH 0x21 | 66 | #define MAS_REG_KMDB_SWITCH 0x21 |
67 | #define MAS_REG_KMDB_STR 0x22 | 67 | #define MAS_REG_KMDB_STR 0x22 |
68 | #define MAS_REG_KMDB_HAR 0x23 | 68 | #define MAS_REG_KMDB_HAR 0x23 |
@@ -78,7 +78,7 @@ | |||
78 | /* | 78 | /* |
79 | * MAS commands | 79 | * MAS commands |
80 | */ | 80 | */ |
81 | #ifdef HAVE_MAS3587F | 81 | #if CONFIG_HWCODEC == MAS3587F |
82 | #define MAS_CMD_READ_ANCILLARY 0x50 | 82 | #define MAS_CMD_READ_ANCILLARY 0x50 |
83 | #define MAS_CMD_FAST_PRG_DL 0x60 | 83 | #define MAS_CMD_FAST_PRG_DL 0x60 |
84 | #define MAS_CMD_READ_IC_VER 0x70 | 84 | #define MAS_CMD_READ_IC_VER 0x70 |
diff --git a/firmware/export/mp3_playback.h b/firmware/export/mp3_playback.h index 12ef734bfe..dd56940c37 100644 --- a/firmware/export/mp3_playback.h +++ b/firmware/export/mp3_playback.h | |||
@@ -39,13 +39,13 @@ int mpeg_val2phys(int setting, int value); | |||
39 | const char *mpeg_sound_unit(int setting); | 39 | const char *mpeg_sound_unit(int setting); |
40 | int mpeg_sound_numdecimals(int setting); | 40 | int mpeg_sound_numdecimals(int setting); |
41 | int mpeg_sound_steps(int setting); | 41 | int mpeg_sound_steps(int setting); |
42 | #if defined(HAVE_MAS3587F) || defined(SIMULATOR) | 42 | #if CONFIG_HWCODEC == MAS3587F || defined(SIMULATOR) |
43 | void mpeg_set_pitch(int percent); | 43 | void mpeg_set_pitch(int percent); |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | 46 | ||
47 | /* exported just for mpeg.c, to keep the recording there */ | 47 | /* exported just for mpeg.c, to keep the recording there */ |
48 | #ifdef HAVE_MAS3587F | 48 | #if CONFIG_HWCODEC == MAS3587F |
49 | void demand_irq_enable(bool on); | 49 | void demand_irq_enable(bool on); |
50 | #endif | 50 | #endif |
51 | 51 | ||
diff --git a/firmware/export/mpeg.h b/firmware/export/mpeg.h index 3088dc5ffd..66e6ad950c 100644 --- a/firmware/export/mpeg.h +++ b/firmware/export/mpeg.h | |||
@@ -74,7 +74,7 @@ struct mp3entry* mpeg_current_track(void); | |||
74 | struct mp3entry* mpeg_next_track(void); | 74 | struct mp3entry* mpeg_next_track(void); |
75 | bool mpeg_has_changed_track(void); | 75 | bool mpeg_has_changed_track(void); |
76 | int mpeg_status(void); | 76 | int mpeg_status(void); |
77 | #if defined(HAVE_MAS3587F) || defined(SIMULATOR) | 77 | #if (CONFIG_HWCODEC == MAS3587F) || defined(SIMULATOR) |
78 | void mpeg_init_recording(void); | 78 | void mpeg_init_recording(void); |
79 | void mpeg_init_playback(void); | 79 | void mpeg_init_playback(void); |
80 | void mpeg_record(const char *filename); | 80 | void mpeg_record(const char *filename); |
diff --git a/firmware/mp3_playback.c b/firmware/mp3_playback.c index 7f96ee075a..fae8377c4b 100644 --- a/firmware/mp3_playback.c +++ b/firmware/mp3_playback.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | /* hacking into mpeg.c, recording is still there */ | 37 | /* hacking into mpeg.c, recording is still there */ |
38 | #ifdef HAVE_MAS3587F | 38 | #if CONFIG_HWCODEC == MAS3587F |
39 | enum | 39 | enum |
40 | { | 40 | { |
41 | MPEG_DECODER, | 41 | MPEG_DECODER, |
@@ -44,7 +44,7 @@ enum | |||
44 | 44 | ||
45 | extern unsigned long shadow_7f1; | 45 | extern unsigned long shadow_7f1; |
46 | 46 | ||
47 | #endif /* #ifdef HAVE_MAS3587F */ | 47 | #endif /* #ifdef MAS3587F */ |
48 | 48 | ||
49 | /**** globals ****/ | 49 | /**** globals ****/ |
50 | 50 | ||
@@ -124,7 +124,7 @@ static const int steps[] = | |||
124 | static const int minval[] = | 124 | static const int minval[] = |
125 | { | 125 | { |
126 | 0, /* Volume */ | 126 | 0, /* Volume */ |
127 | #ifdef HAVE_MAS3587F | 127 | #if CONFIG_HWCODEC == MAS3587F |
128 | -12, /* Bass */ | 128 | -12, /* Bass */ |
129 | -12, /* Treble */ | 129 | -12, /* Treble */ |
130 | #else | 130 | #else |
@@ -149,7 +149,7 @@ static const int minval[] = | |||
149 | static const int maxval[] = | 149 | static const int maxval[] = |
150 | { | 150 | { |
151 | 100, /* Volume */ | 151 | 100, /* Volume */ |
152 | #ifdef HAVE_MAS3587F | 152 | #if CONFIG_HWCODEC == MAS3587F |
153 | 12, /* Bass */ | 153 | 12, /* Bass */ |
154 | 12, /* Treble */ | 154 | 12, /* Treble */ |
155 | #else | 155 | #else |
@@ -174,7 +174,7 @@ static const int maxval[] = | |||
174 | static const int defaultval[] = | 174 | static const int defaultval[] = |
175 | { | 175 | { |
176 | 70, /* Volume */ | 176 | 70, /* Volume */ |
177 | #ifdef HAVE_MAS3587F | 177 | #if CONFIG_HWCODEC == MAS3587F |
178 | 6, /* Bass */ | 178 | 6, /* Bass */ |
179 | 6, /* Treble */ | 179 | 6, /* Treble */ |
180 | #else | 180 | #else |
@@ -238,7 +238,7 @@ static bool mpeg_is_initialized = false; | |||
238 | 238 | ||
239 | unsigned long mas_version_code; | 239 | unsigned long mas_version_code; |
240 | 240 | ||
241 | #ifdef HAVE_MAS3507D | 241 | #if CONFIG_HWCODEC == MAS3507D |
242 | 242 | ||
243 | static const unsigned int bass_table[] = | 243 | static const unsigned int bass_table[] = |
244 | { | 244 | { |
@@ -333,7 +333,7 @@ static const unsigned int prescale_table[] = | |||
333 | 333 | ||
334 | bool dma_on; /* The DMA is active */ | 334 | bool dma_on; /* The DMA is active */ |
335 | 335 | ||
336 | #ifdef HAVE_MAS3507D | 336 | #if CONFIG_HWCODEC == MAS3507D |
337 | static void mas_poll_start(int interval_in_ms) | 337 | static void mas_poll_start(int interval_in_ms) |
338 | { | 338 | { |
339 | unsigned int count; | 339 | unsigned int count; |
@@ -393,7 +393,7 @@ static void postpone_dma_tick(void) | |||
393 | #endif | 393 | #endif |
394 | 394 | ||
395 | 395 | ||
396 | #ifdef HAVE_MAS3587F | 396 | #if CONFIG_HWCODEC == MAS3587F |
397 | void demand_irq_enable(bool on) | 397 | void demand_irq_enable(bool on) |
398 | { | 398 | { |
399 | int oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL); | 399 | int oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL); |
@@ -408,7 +408,7 @@ void demand_irq_enable(bool on) | |||
408 | 408 | ||
409 | set_irq_level(oldlevel); | 409 | set_irq_level(oldlevel); |
410 | } | 410 | } |
411 | #endif /* #ifdef HAVE_MAS3587F */ | 411 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
412 | 412 | ||
413 | 413 | ||
414 | void play_tick(void) | 414 | void play_tick(void) |
@@ -455,10 +455,10 @@ void IMIA1(void) /* Timer 1 interrupt */ | |||
455 | if(playing) | 455 | if(playing) |
456 | play_tick(); | 456 | play_tick(); |
457 | TSR1 &= ~0x01; | 457 | TSR1 &= ~0x01; |
458 | #ifdef HAVE_MAS3587F | 458 | #if CONFIG_HWCODEC == MAS3587F |
459 | /* Disable interrupt */ | 459 | /* Disable interrupt */ |
460 | IPRC &= ~0x000f; | 460 | IPRC &= ~0x000f; |
461 | #endif /* #ifdef HAVE_MAS3587F */ | 461 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
462 | } | 462 | } |
463 | 463 | ||
464 | #pragma interrupt | 464 | #pragma interrupt |
@@ -467,7 +467,7 @@ void IRQ6(void) /* PB14: MAS stop demand IRQ */ | |||
467 | SCR0 &= ~0x80; | 467 | SCR0 &= ~0x80; |
468 | } | 468 | } |
469 | 469 | ||
470 | #ifdef HAVE_MAS3587F | 470 | #if CONFIG_HWCODEC == MAS3587F |
471 | #pragma interrupt | 471 | #pragma interrupt |
472 | void IRQ3(void) /* PA15: MAS demand IRQ */ | 472 | void IRQ3(void) /* PA15: MAS demand IRQ */ |
473 | { | 473 | { |
@@ -479,7 +479,7 @@ void IRQ3(void) /* PA15: MAS demand IRQ */ | |||
479 | else | 479 | else |
480 | postpone_dma_tick(); | 480 | postpone_dma_tick(); |
481 | } | 481 | } |
482 | #endif /* #ifdef HAVE_MAS3587F */ | 482 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
483 | 483 | ||
484 | static void setup_sci0(void) | 484 | static void setup_sci0(void) |
485 | { | 485 | { |
@@ -519,7 +519,7 @@ static void setup_sci0(void) | |||
519 | } | 519 | } |
520 | #endif /* SIMULATOR */ | 520 | #endif /* SIMULATOR */ |
521 | 521 | ||
522 | #ifdef HAVE_MAS3587F | 522 | #if CONFIG_HWCODEC == MAS3587F |
523 | static void init_playback(void) | 523 | static void init_playback(void) |
524 | { | 524 | { |
525 | unsigned long val; | 525 | unsigned long val; |
@@ -577,10 +577,10 @@ static void init_playback(void) | |||
577 | 577 | ||
578 | DEBUGF("MAS Decoding application started\n"); | 578 | DEBUGF("MAS Decoding application started\n"); |
579 | } | 579 | } |
580 | #endif /* #ifdef HAVE_MAS3587F */ | 580 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
581 | 581 | ||
582 | #ifndef SIMULATOR | 582 | #ifndef SIMULATOR |
583 | #ifdef HAVE_MAS3507D | 583 | #if CONFIG_HWCODEC == MAS3507D |
584 | int current_left_volume = 0; /* all values in tenth of dB */ | 584 | int current_left_volume = 0; /* all values in tenth of dB */ |
585 | int current_right_volume = 0; /* all values in tenth of dB */ | 585 | int current_right_volume = 0; /* all values in tenth of dB */ |
586 | int current_treble = 0; | 586 | int current_treble = 0; |
@@ -613,10 +613,10 @@ void set_prescaled_volume(void) | |||
613 | 613 | ||
614 | dac_volume(tenthdb2reg(l), tenthdb2reg(r), false); | 614 | dac_volume(tenthdb2reg(l), tenthdb2reg(r), false); |
615 | } | 615 | } |
616 | #endif /* HAVE_MAS3507D */ | 616 | #endif /* MAS3507D */ |
617 | #endif /* !SIMULATOR */ | 617 | #endif /* !SIMULATOR */ |
618 | 618 | ||
619 | #ifdef HAVE_MAS3587F | 619 | #if CONFIG_HWCODEC == MAS3587F |
620 | unsigned long mdb_shape_shadow = 0; | 620 | unsigned long mdb_shape_shadow = 0; |
621 | unsigned long loudness_shadow = 0; | 621 | unsigned long loudness_shadow = 0; |
622 | #endif | 622 | #endif |
@@ -626,7 +626,7 @@ void mpeg_sound_set(int setting, int value) | |||
626 | #ifdef SIMULATOR | 626 | #ifdef SIMULATOR |
627 | setting = value; | 627 | setting = value; |
628 | #else | 628 | #else |
629 | #ifdef HAVE_MAS3507D | 629 | #if CONFIG_HWCODEC == MAS3507D |
630 | int l, r; | 630 | int l, r; |
631 | #else | 631 | #else |
632 | int tmp; | 632 | int tmp; |
@@ -638,7 +638,7 @@ void mpeg_sound_set(int setting, int value) | |||
638 | switch(setting) | 638 | switch(setting) |
639 | { | 639 | { |
640 | case SOUND_VOLUME: | 640 | case SOUND_VOLUME: |
641 | #ifdef HAVE_MAS3587F | 641 | #if CONFIG_HWCODEC == MAS3587F |
642 | tmp = 0x7f00 * value / 100; | 642 | tmp = 0x7f00 * value / 100; |
643 | mas_codec_writereg(0x10, tmp & 0xff00); | 643 | mas_codec_writereg(0x10, tmp & 0xff00); |
644 | #else | 644 | #else |
@@ -671,7 +671,7 @@ void mpeg_sound_set(int setting, int value) | |||
671 | break; | 671 | break; |
672 | 672 | ||
673 | case SOUND_BALANCE: | 673 | case SOUND_BALANCE: |
674 | #ifdef HAVE_MAS3587F | 674 | #if CONFIG_HWCODEC == MAS3587F |
675 | tmp = ((value * 127 / 100) & 0xff) << 8; | 675 | tmp = ((value * 127 / 100) & 0xff) << 8; |
676 | mas_codec_writereg(0x11, tmp & 0xff00); | 676 | mas_codec_writereg(0x11, tmp & 0xff00); |
677 | #else | 677 | #else |
@@ -680,7 +680,7 @@ void mpeg_sound_set(int setting, int value) | |||
680 | break; | 680 | break; |
681 | 681 | ||
682 | case SOUND_BASS: | 682 | case SOUND_BASS: |
683 | #ifdef HAVE_MAS3587F | 683 | #if CONFIG_HWCODEC == MAS3587F |
684 | tmp = ((value * 8) & 0xff) << 8; | 684 | tmp = ((value * 8) & 0xff) << 8; |
685 | mas_codec_writereg(0x14, tmp & 0xff00); | 685 | mas_codec_writereg(0x14, tmp & 0xff00); |
686 | #else | 686 | #else |
@@ -691,7 +691,7 @@ void mpeg_sound_set(int setting, int value) | |||
691 | break; | 691 | break; |
692 | 692 | ||
693 | case SOUND_TREBLE: | 693 | case SOUND_TREBLE: |
694 | #ifdef HAVE_MAS3587F | 694 | #if CONFIG_HWCODEC == MAS3587F |
695 | tmp = ((value * 8) & 0xff) << 8; | 695 | tmp = ((value * 8) & 0xff) << 8; |
696 | mas_codec_writereg(0x15, tmp & 0xff00); | 696 | mas_codec_writereg(0x15, tmp & 0xff00); |
697 | #else | 697 | #else |
@@ -701,7 +701,7 @@ void mpeg_sound_set(int setting, int value) | |||
701 | #endif | 701 | #endif |
702 | break; | 702 | break; |
703 | 703 | ||
704 | #ifdef HAVE_MAS3587F | 704 | #if CONFIG_HWCODEC == MAS3587F |
705 | case SOUND_LOUDNESS: | 705 | case SOUND_LOUDNESS: |
706 | loudness_shadow = (loudness_shadow & 0x04) | | 706 | loudness_shadow = (loudness_shadow & 0x04) | |
707 | (MAX(MIN(value * 4, 0x44), 0) << 8); | 707 | (MAX(MIN(value * 4, 0x44), 0) << 8); |
@@ -771,7 +771,7 @@ void mpeg_sound_set(int setting, int value) | |||
771 | 771 | ||
772 | int mpeg_val2phys(int setting, int value) | 772 | int mpeg_val2phys(int setting, int value) |
773 | { | 773 | { |
774 | #ifdef HAVE_MAS3587F | 774 | #if CONFIG_HWCODEC == MAS3587F |
775 | int result = 0; | 775 | int result = 0; |
776 | 776 | ||
777 | switch(setting) | 777 | switch(setting) |
@@ -858,7 +858,7 @@ void mpeg_sound_channel_config(int configuration) | |||
858 | break; | 858 | break; |
859 | } | 859 | } |
860 | 860 | ||
861 | #ifdef HAVE_MAS3587F | 861 | #if CONFIG_HWCODEC == MAS3587F |
862 | mas_writemem(MAS_BANK_D0, 0x7fc, &val_ll, 1); /* LL */ | 862 | mas_writemem(MAS_BANK_D0, 0x7fc, &val_ll, 1); /* LL */ |
863 | mas_writemem(MAS_BANK_D0, 0x7fd, &val_lr, 1); /* LR */ | 863 | mas_writemem(MAS_BANK_D0, 0x7fd, &val_lr, 1); /* LR */ |
864 | mas_writemem(MAS_BANK_D0, 0x7fe, &val_rl, 1); /* RL */ | 864 | mas_writemem(MAS_BANK_D0, 0x7fe, &val_rl, 1); /* RL */ |
@@ -872,7 +872,7 @@ void mpeg_sound_channel_config(int configuration) | |||
872 | #endif | 872 | #endif |
873 | } | 873 | } |
874 | 874 | ||
875 | #ifdef HAVE_MAS3587F | 875 | #if CONFIG_HWCODEC == MAS3587F |
876 | /* This function works by telling the decoder that we have another | 876 | /* This function works by telling the decoder that we have another |
877 | crystal frequency than we actually have. It will adjust its internal | 877 | crystal frequency than we actually have. It will adjust its internal |
878 | parameters and the result is that the audio is played at another pitch. | 878 | parameters and the result is that the audio is played at another pitch. |
@@ -918,7 +918,7 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness, | |||
918 | (void)mdb_enable; | 918 | (void)mdb_enable; |
919 | (void)superbass; | 919 | (void)superbass; |
920 | #else | 920 | #else |
921 | #ifdef HAVE_MAS3507D | 921 | #if CONFIG_HWCODEC == MAS3507D |
922 | unsigned long val; | 922 | unsigned long val; |
923 | (void)loudness; | 923 | (void)loudness; |
924 | (void)avc; | 924 | (void)avc; |
@@ -932,7 +932,7 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness, | |||
932 | 932 | ||
933 | setup_sci0(); | 933 | setup_sci0(); |
934 | 934 | ||
935 | #ifdef HAVE_MAS3587F | 935 | #if CONFIG_HWCODEC == MAS3587F |
936 | or_b(0x08, &PAIORH); /* output for /PR */ | 936 | or_b(0x08, &PAIORH); /* output for /PR */ |
937 | init_playback(); | 937 | init_playback(); |
938 | 938 | ||
@@ -946,7 +946,7 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness, | |||
946 | dac_init(); | 946 | dac_init(); |
947 | #endif | 947 | #endif |
948 | 948 | ||
949 | #ifdef HAVE_MAS3507D | 949 | #if CONFIG_HWCODEC == MAS3507D |
950 | and_b(~0x20, &PBDRL); | 950 | and_b(~0x20, &PBDRL); |
951 | sleep(HZ/5); | 951 | sleep(HZ/5); |
952 | or_b(0x20, &PBDRL); | 952 | or_b(0x20, &PBDRL); |
@@ -992,7 +992,7 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness, | |||
992 | 992 | ||
993 | #endif | 993 | #endif |
994 | 994 | ||
995 | #ifdef HAVE_MAS3507D | 995 | #if CONFIG_HWCODEC == MAS3507D |
996 | mas_poll_start(1); | 996 | mas_poll_start(1); |
997 | 997 | ||
998 | mas_writereg(MAS_REG_KPRESCALE, 0xe9400); | 998 | mas_writereg(MAS_REG_KPRESCALE, 0xe9400); |
@@ -1001,7 +1001,7 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness, | |||
1001 | mpeg_sound_channel_config(channel_config); | 1001 | mpeg_sound_channel_config(channel_config); |
1002 | #endif | 1002 | #endif |
1003 | 1003 | ||
1004 | #ifdef HAVE_MAS3587F | 1004 | #if CONFIG_HWCODEC == MAS3587F |
1005 | ICR &= ~0x0010; /* IRQ3 level sensitive */ | 1005 | ICR &= ~0x0010; /* IRQ3 level sensitive */ |
1006 | PACR1 = (PACR1 & 0x3fff) | 0x4000; /* PA15 is IRQ3 */ | 1006 | PACR1 = (PACR1 & 0x3fff) | 0x4000; /* PA15 is IRQ3 */ |
1007 | #endif | 1007 | #endif |
@@ -1014,7 +1014,7 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness, | |||
1014 | mpeg_sound_set(SOUND_BALANCE, balance); | 1014 | mpeg_sound_set(SOUND_BALANCE, balance); |
1015 | mpeg_sound_set(SOUND_VOLUME, volume); | 1015 | mpeg_sound_set(SOUND_VOLUME, volume); |
1016 | 1016 | ||
1017 | #ifdef HAVE_MAS3587F | 1017 | #if CONFIG_HWCODEC == MAS3587F |
1018 | mpeg_sound_channel_config(channel_config); | 1018 | mpeg_sound_channel_config(channel_config); |
1019 | mpeg_sound_set(SOUND_LOUDNESS, loudness); | 1019 | mpeg_sound_set(SOUND_LOUDNESS, loudness); |
1020 | mpeg_sound_set(SOUND_AVC, avc); | 1020 | mpeg_sound_set(SOUND_AVC, avc); |
@@ -1034,12 +1034,12 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness, | |||
1034 | void mp3_shutdown(void) | 1034 | void mp3_shutdown(void) |
1035 | { | 1035 | { |
1036 | #ifndef SIMULATOR | 1036 | #ifndef SIMULATOR |
1037 | #ifdef HAVE_MAS3587F | 1037 | #if CONFIG_HWCODEC == MAS3587F |
1038 | unsigned long val = 1; | 1038 | unsigned long val = 1; |
1039 | mas_writemem(MAS_BANK_D0, 0x7f9, &val, 1); /* Mute */ | 1039 | mas_writemem(MAS_BANK_D0, 0x7f9, &val, 1); /* Mute */ |
1040 | #endif | 1040 | #endif |
1041 | 1041 | ||
1042 | #ifdef HAVE_MAS3507D | 1042 | #if CONFIG_HWCODEC == MAS3507D |
1043 | dac_volume(0, 0, false); | 1043 | dac_volume(0, 0, false); |
1044 | #endif | 1044 | #endif |
1045 | 1045 | ||
@@ -1052,7 +1052,7 @@ void mp3_shutdown(void) | |||
1052 | 1052 | ||
1053 | void mp3_play_init(void) | 1053 | void mp3_play_init(void) |
1054 | { | 1054 | { |
1055 | #ifdef HAVE_MAS3587F | 1055 | #if CONFIG_HWCODEC == MAS3587F |
1056 | init_playback(); | 1056 | init_playback(); |
1057 | #endif | 1057 | #endif |
1058 | playing = false; | 1058 | playing = false; |
@@ -1081,7 +1081,7 @@ void mp3_play_data(const unsigned char* start, int size, | |||
1081 | 1081 | ||
1082 | CHCR3 |= 0x0001; /* Enable DMA IRQ */ | 1082 | CHCR3 |= 0x0001; /* Enable DMA IRQ */ |
1083 | 1083 | ||
1084 | #ifdef HAVE_MAS3587F | 1084 | #if CONFIG_HWCODEC == MAS3587F |
1085 | demand_irq_enable(true); | 1085 | demand_irq_enable(true); |
1086 | #endif | 1086 | #endif |
1087 | } | 1087 | } |
@@ -1107,7 +1107,7 @@ void mp3_play_stop(void) | |||
1107 | playing = false; | 1107 | playing = false; |
1108 | mp3_play_pause(false); | 1108 | mp3_play_pause(false); |
1109 | CHCR3 &= ~0x0001; /* Disable the DMA interrupt */ | 1109 | CHCR3 &= ~0x0001; /* Disable the DMA interrupt */ |
1110 | #ifdef HAVE_MAS3587F | 1110 | #if CONFIG_HWCODEC == MAS3587F |
1111 | demand_irq_enable(false); | 1111 | demand_irq_enable(false); |
1112 | #endif | 1112 | #endif |
1113 | } | 1113 | } |
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index e6d59176f7..df9e77a305 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c | |||
@@ -44,7 +44,7 @@ | |||
44 | 44 | ||
45 | #include "bitswap.h" | 45 | #include "bitswap.h" |
46 | 46 | ||
47 | #ifdef HAVE_MAS3587F | 47 | #if CONFIG_HWCODEC == MAS3587F |
48 | static void init_recording(void); | 48 | static void init_recording(void); |
49 | static void start_prerecording(void); | 49 | static void start_prerecording(void); |
50 | static void start_recording(void); | 50 | static void start_recording(void); |
@@ -52,7 +52,7 @@ static void stop_recording(void); | |||
52 | static int get_unsaved_space(void); | 52 | static int get_unsaved_space(void); |
53 | static void pause_recording(void); | 53 | static void pause_recording(void); |
54 | static void resume_recording(void); | 54 | static void resume_recording(void); |
55 | #endif /* #ifdef HAVE_MAS3587F */ | 55 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
56 | 56 | ||
57 | #ifndef SIMULATOR | 57 | #ifndef SIMULATOR |
58 | static int get_unplayed_space(void); | 58 | static int get_unplayed_space(void); |
@@ -79,13 +79,13 @@ static int get_unswapped_space(void); | |||
79 | #define MPEG_SAVE_DATA 102 | 79 | #define MPEG_SAVE_DATA 102 |
80 | #define MPEG_STOP_DONE 103 | 80 | #define MPEG_STOP_DONE 103 |
81 | 81 | ||
82 | #ifdef HAVE_MAS3587F | 82 | #if CONFIG_HWCODEC == MAS3587F |
83 | extern enum /* from mp3_playback.c */ | 83 | extern enum /* from mp3_playback.c */ |
84 | { | 84 | { |
85 | MPEG_DECODER, | 85 | MPEG_DECODER, |
86 | MPEG_ENCODER | 86 | MPEG_ENCODER |
87 | } mpeg_mode; | 87 | } mpeg_mode; |
88 | #endif /* #ifdef HAVE_MAS3587F */ | 88 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
89 | 89 | ||
90 | extern char* playlist_peek(int steps); | 90 | extern char* playlist_peek(int steps); |
91 | extern bool playlist_check(int steps); | 91 | extern bool playlist_check(int steps); |
@@ -326,7 +326,7 @@ unsigned long mpeg_get_last_header(void) | |||
326 | 326 | ||
327 | /* Read the frame data from the MAS and reconstruct it with the | 327 | /* Read the frame data from the MAS and reconstruct it with the |
328 | frame sync and all */ | 328 | frame sync and all */ |
329 | #ifdef HAVE_MAS3587F | 329 | #if CONFIG_HWCODEC == MAS3587F |
330 | mas_readmem(MAS_BANK_D0, 0xfd1, tmp, 2); | 330 | mas_readmem(MAS_BANK_D0, 0xfd1, tmp, 2); |
331 | #else | 331 | #else |
332 | mas_readmem(MAS_BANK_D0, 0x301, tmp, 2); | 332 | mas_readmem(MAS_BANK_D0, 0x301, tmp, 2); |
@@ -368,7 +368,7 @@ static int low_watermark; /* Dynamic low watermark level */ | |||
368 | static int low_watermark_margin; /* Extra time in seconds for watermark */ | 368 | static int low_watermark_margin; /* Extra time in seconds for watermark */ |
369 | static int lowest_watermark_level; /* Debug value to observe the buffer | 369 | static int lowest_watermark_level; /* Debug value to observe the buffer |
370 | usage */ | 370 | usage */ |
371 | #ifdef HAVE_MAS3587F | 371 | #if CONFIG_HWCODEC == MAS3587F |
372 | static bool is_recording; /* We are recording */ | 372 | static bool is_recording; /* We are recording */ |
373 | static bool stop_pending; | 373 | static bool stop_pending; |
374 | unsigned long record_start_time; /* Value of current_tick when recording | 374 | unsigned long record_start_time; /* Value of current_tick when recording |
@@ -399,15 +399,15 @@ unsigned long shadow_7f1 = 0; | |||
399 | unsigned long shadow_7f6 = 0; | 399 | unsigned long shadow_7f6 = 0; |
400 | unsigned long shadow_7f9 = 0; | 400 | unsigned long shadow_7f9 = 0; |
401 | 401 | ||
402 | #endif /* #ifdef HAVE_MAS3587F */ | 402 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
403 | 403 | ||
404 | static int mpeg_file; | 404 | static int mpeg_file; |
405 | 405 | ||
406 | /* Synchronization variables */ | 406 | /* Synchronization variables */ |
407 | #ifdef HAVE_MAS3587F | 407 | #if CONFIG_HWCODEC == MAS3587F |
408 | static bool init_recording_done; | 408 | static bool init_recording_done; |
409 | static bool init_playback_done; | 409 | static bool init_playback_done; |
410 | #endif /* #ifdef HAVE_MAS3587F */ | 410 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
411 | static bool mpeg_stop_done; | 411 | static bool mpeg_stop_done; |
412 | 412 | ||
413 | static void recalculate_watermark(int bitrate) | 413 | static void recalculate_watermark(int bitrate) |
@@ -533,7 +533,7 @@ static int get_unswapped_space(void) | |||
533 | return space; | 533 | return space; |
534 | } | 534 | } |
535 | 535 | ||
536 | #ifdef HAVE_MAS3587F | 536 | #if CONFIG_HWCODEC == MAS3587F |
537 | static int get_unsaved_space(void) | 537 | static int get_unsaved_space(void) |
538 | { | 538 | { |
539 | int space = mp3buf_write - mp3buf_read; | 539 | int space = mp3buf_write - mp3buf_read; |
@@ -541,9 +541,9 @@ static int get_unsaved_space(void) | |||
541 | space += mp3buflen; | 541 | space += mp3buflen; |
542 | return space; | 542 | return space; |
543 | } | 543 | } |
544 | #endif /* #ifdef HAVE_MAS3587F */ | 544 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
545 | 545 | ||
546 | #ifdef HAVE_MAS3587F | 546 | #if CONFIG_HWCODEC == MAS3587F |
547 | #ifdef DEBUG | 547 | #ifdef DEBUG |
548 | static long timing_info_index = 0; | 548 | static long timing_info_index = 0; |
549 | static long timing_info[1024]; | 549 | static long timing_info[1024]; |
@@ -584,12 +584,12 @@ static void drain_dma_buffer(void) | |||
584 | ); | 584 | ); |
585 | } | 585 | } |
586 | 586 | ||
587 | #endif /* #ifdef HAVE_MAS3587F */ | 587 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
588 | 588 | ||
589 | void rec_tick (void) __attribute__ ((section (".icode"))); | 589 | void rec_tick (void) __attribute__ ((section (".icode"))); |
590 | void rec_tick(void) | 590 | void rec_tick(void) |
591 | { | 591 | { |
592 | #ifdef HAVE_MAS3587F | 592 | #if CONFIG_HWCODEC == MAS3587F |
593 | int i; | 593 | int i; |
594 | int num_bytes; | 594 | int num_bytes; |
595 | if(is_recording && (PBDR & 0x4000)) | 595 | if(is_recording && (PBDR & 0x4000)) |
@@ -694,7 +694,7 @@ void rec_tick(void) | |||
694 | } | 694 | } |
695 | } | 695 | } |
696 | } | 696 | } |
697 | #endif /* #ifdef HAVE_MAS3587F */ | 697 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
698 | } | 698 | } |
699 | 699 | ||
700 | void playback_tick(void) | 700 | void playback_tick(void) |
@@ -927,10 +927,10 @@ static void track_change(void) | |||
927 | { | 927 | { |
928 | DEBUGF("Track change\n"); | 928 | DEBUGF("Track change\n"); |
929 | 929 | ||
930 | #ifdef HAVE_MAS3587F | 930 | #if CONFIG_HWCODEC == MAS3587F |
931 | /* Reset the AVC */ | 931 | /* Reset the AVC */ |
932 | mpeg_sound_set(SOUND_AVC, -1); | 932 | mpeg_sound_set(SOUND_AVC, -1); |
933 | #endif /* #ifdef HAVE_MAS3587F */ | 933 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
934 | remove_current_tag(); | 934 | remove_current_tag(); |
935 | 935 | ||
936 | update_playlist(); | 936 | update_playlist(); |
@@ -1049,7 +1049,7 @@ static void mpeg_thread(void) | |||
1049 | int amount_to_read; | 1049 | int amount_to_read; |
1050 | int t1, t2; | 1050 | int t1, t2; |
1051 | int start_offset; | 1051 | int start_offset; |
1052 | #ifdef HAVE_MAS3587F | 1052 | #if CONFIG_HWCODEC == MAS3587F |
1053 | int amount_to_save; | 1053 | int amount_to_save; |
1054 | int writelen; | 1054 | int writelen; |
1055 | int framelen; | 1055 | int framelen; |
@@ -1058,7 +1058,7 @@ static void mpeg_thread(void) | |||
1058 | int rc; | 1058 | int rc; |
1059 | int offset; | 1059 | int offset; |
1060 | int countdown; | 1060 | int countdown; |
1061 | #endif /* #ifdef HAVE_MAS3587F */ | 1061 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
1062 | 1062 | ||
1063 | is_playing = false; | 1063 | is_playing = false; |
1064 | play_pending = false; | 1064 | play_pending = false; |
@@ -1067,10 +1067,10 @@ static void mpeg_thread(void) | |||
1067 | 1067 | ||
1068 | while(1) | 1068 | while(1) |
1069 | { | 1069 | { |
1070 | #ifdef HAVE_MAS3587F | 1070 | #if CONFIG_HWCODEC == MAS3587F |
1071 | if(mpeg_mode == MPEG_DECODER) | 1071 | if(mpeg_mode == MPEG_DECODER) |
1072 | { | 1072 | { |
1073 | #endif /* #ifdef HAVE_MAS3587F */ | 1073 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
1074 | yield(); | 1074 | yield(); |
1075 | 1075 | ||
1076 | /* Swap if necessary, and don't block on the queue_wait() */ | 1076 | /* Swap if necessary, and don't block on the queue_wait() */ |
@@ -1092,11 +1092,11 @@ static void mpeg_thread(void) | |||
1092 | case MPEG_PLAY: | 1092 | case MPEG_PLAY: |
1093 | DEBUGF("MPEG_PLAY\n"); | 1093 | DEBUGF("MPEG_PLAY\n"); |
1094 | 1094 | ||
1095 | #ifdef HAVE_FMRADIO | 1095 | #ifdef CONFIG_TUNER |
1096 | /* Silence the A/D input, it may be on because the radio | 1096 | /* Silence the A/D input, it may be on because the radio |
1097 | may be playing */ | 1097 | may be playing */ |
1098 | mas_codec_writereg(6, 0x0000); | 1098 | mas_codec_writereg(6, 0x0000); |
1099 | #endif /* #ifdef HAVE_FMRADIO */ | 1099 | #endif /* #ifdef CONFIG_TUNER */ |
1100 | 1100 | ||
1101 | /* Stop the current stream */ | 1101 | /* Stop the current stream */ |
1102 | play_pending = false; | 1102 | play_pending = false; |
@@ -1589,14 +1589,14 @@ static void mpeg_thread(void) | |||
1589 | break; | 1589 | break; |
1590 | #endif /* #ifndef USB_NONE */ | 1590 | #endif /* #ifndef USB_NONE */ |
1591 | 1591 | ||
1592 | #ifdef HAVE_MAS3587F | 1592 | #if CONFIG_HWCODEC == MAS3587F |
1593 | case MPEG_INIT_RECORDING: | 1593 | case MPEG_INIT_RECORDING: |
1594 | init_recording(); | 1594 | init_recording(); |
1595 | init_recording_done = true; | 1595 | init_recording_done = true; |
1596 | break; | 1596 | break; |
1597 | #endif /* #ifdef HAVE_MAS3587F */ | 1597 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
1598 | } | 1598 | } |
1599 | #ifdef HAVE_MAS3587F | 1599 | #if CONFIG_HWCODEC == MAS3587F |
1600 | } | 1600 | } |
1601 | else | 1601 | else |
1602 | { | 1602 | { |
@@ -1996,7 +1996,7 @@ static void mpeg_thread(void) | |||
1996 | break; | 1996 | break; |
1997 | } | 1997 | } |
1998 | } | 1998 | } |
1999 | #endif /* #ifdef HAVE_MAS3587F */ | 1999 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
2000 | } | 2000 | } |
2001 | } | 2001 | } |
2002 | #endif /* SIMULATOR */ | 2002 | #endif /* SIMULATOR */ |
@@ -2044,7 +2044,7 @@ bool mpeg_has_changed_track(void) | |||
2044 | return false; | 2044 | return false; |
2045 | } | 2045 | } |
2046 | 2046 | ||
2047 | #ifdef HAVE_MAS3587F | 2047 | #if CONFIG_HWCODEC == MAS3587F |
2048 | void mpeg_init_playback(void) | 2048 | void mpeg_init_playback(void) |
2049 | { | 2049 | { |
2050 | init_playback_done = false; | 2050 | init_playback_done = false; |
@@ -2617,13 +2617,13 @@ int mpeg_status(void) | |||
2617 | if(paused) | 2617 | if(paused) |
2618 | ret |= MPEG_STATUS_PAUSE; | 2618 | ret |= MPEG_STATUS_PAUSE; |
2619 | 2619 | ||
2620 | #ifdef HAVE_MAS3587F | 2620 | #if CONFIG_HWCODEC == MAS3587F |
2621 | if(is_recording && !is_prerecording) | 2621 | if(is_recording && !is_prerecording) |
2622 | ret |= MPEG_STATUS_RECORD; | 2622 | ret |= MPEG_STATUS_RECORD; |
2623 | 2623 | ||
2624 | if(is_prerecording) | 2624 | if(is_prerecording) |
2625 | ret |= MPEG_STATUS_PRERECORD; | 2625 | ret |= MPEG_STATUS_PRERECORD; |
2626 | #endif /* #ifdef HAVE_MAS3587F */ | 2626 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
2627 | 2627 | ||
2628 | if(mpeg_errno) | 2628 | if(mpeg_errno) |
2629 | ret |= MPEG_STATUS_ERROR; | 2629 | ret |= MPEG_STATUS_ERROR; |
@@ -2677,12 +2677,12 @@ void mpeg_init(void) | |||
2677 | memset(id3tags, sizeof(id3tags), 0); | 2677 | memset(id3tags, sizeof(id3tags), 0); |
2678 | memset(_id3tags, sizeof(id3tags), 0); | 2678 | memset(_id3tags, sizeof(id3tags), 0); |
2679 | 2679 | ||
2680 | #ifdef HAVE_MAS3587F | 2680 | #if CONFIG_HWCODEC == MAS3587F |
2681 | if(read_hw_mask() & PR_ACTIVE_HIGH) | 2681 | if(read_hw_mask() & PR_ACTIVE_HIGH) |
2682 | and_b(~0x08, &PADRH); | 2682 | and_b(~0x08, &PADRH); |
2683 | else | 2683 | else |
2684 | or_b(0x08, &PADRH); | 2684 | or_b(0x08, &PADRH); |
2685 | #endif /* #ifdef HAVE_MAS3587F */ | 2685 | #endif /* #if CONFIG_HWCODEC == MAS3587F */ |
2686 | 2686 | ||
2687 | #ifdef DEBUG | 2687 | #ifdef DEBUG |
2688 | dbg_timer_start(); | 2688 | dbg_timer_start(); |
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 6a72a2c613..155d11e609 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include "usb.h" | 34 | #include "usb.h" |
35 | #include "powermgmt.h" | 35 | #include "powermgmt.h" |
36 | #include "backlight.h" | 36 | #include "backlight.h" |
37 | #ifdef HAVE_FMRADIO | 37 | #ifdef CONFIG_TUNER |
38 | #include "fmradio.h" | 38 | #include "fmradio.h" |
39 | #endif | 39 | #endif |
40 | 40 | ||
@@ -315,7 +315,7 @@ static void handle_auto_poweroff(void) | |||
315 | charger_was_inserted = charger_is_inserted; | 315 | charger_was_inserted = charger_is_inserted; |
316 | 316 | ||
317 | if(timeout && | 317 | if(timeout && |
318 | #ifdef HAVE_FMRADIO | 318 | #ifdef CONFIG_TUNER |
319 | !fmradio_get_status() && | 319 | !fmradio_get_status() && |
320 | #endif | 320 | #endif |
321 | !usb_inserted() && | 321 | !usb_inserted() && |
diff --git a/uisimulator/battery.c b/uisimulator/battery.c index 1af8e71787..d8580b42d1 100644 --- a/uisimulator/battery.c +++ b/uisimulator/battery.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include "types.h" | 22 | #include "types.h" |
23 | #include "lcd.h" | 23 | #include "lcd.h" |
24 | #include "debug.h" | 24 | #include "debug.h" |
25 | #define HAVE_RECORDER_KEYPAD | 25 | #define CONFIG_KEYPAD RECORDER_PAD |
26 | #include "button.h" | 26 | #include "button.h" |
27 | 27 | ||
28 | #ifdef SIMULATOR | 28 | #ifdef SIMULATOR |
diff --git a/uisimulator/common/fmradio.c b/uisimulator/common/fmradio.c index 280a963f5a..a4cbd7977c 100644 --- a/uisimulator/common/fmradio.c +++ b/uisimulator/common/fmradio.c | |||
@@ -18,7 +18,7 @@ | |||
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #include "debug.h" | 19 | #include "debug.h" |
20 | 20 | ||
21 | #ifdef HAVE_FMRADIO | 21 | #ifdef CONFIG_TUNER |
22 | 22 | ||
23 | static int fmstatus = 0; | 23 | static int fmstatus = 0; |
24 | 24 | ||
diff --git a/uisimulator/win32/button.c b/uisimulator/win32/button.c index 5d56456f6e..a304c366c4 100644 --- a/uisimulator/win32/button.c +++ b/uisimulator/win32/button.c | |||
@@ -124,9 +124,9 @@ void button_event(int key, bool pressed) | |||
124 | #endif | 124 | #endif |
125 | 125 | ||
126 | #ifdef BUTTON_MENU | 126 | #ifdef BUTTON_MENU |
127 | #ifdef HAVE_PLAYER_KEYPAD | 127 | #if CONFIG_KEYPAD == PLAYER_PAD |
128 | case VK_RETURN: | 128 | case VK_RETURN: |
129 | #elif defined HAVE_ONDIO_KEYPAD | 129 | #elif CONFIG_KEYPAD == ONDIO_PAD |
130 | case VK_INSERT: | 130 | case VK_INSERT: |
131 | #endif | 131 | #endif |
132 | new_btn = BUTTON_MENU; | 132 | new_btn = BUTTON_MENU; |
diff --git a/uisimulator/x11/button-x11.c b/uisimulator/x11/button-x11.c index 534568b658..d6837f640a 100644 --- a/uisimulator/x11/button-x11.c +++ b/uisimulator/x11/button-x11.c | |||
@@ -145,10 +145,10 @@ static int get_raw_button (void) | |||
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | #ifdef BUTTON_MENU | 147 | #ifdef BUTTON_MENU |
148 | #ifdef HAVE_PLAYER_KEYPAD | 148 | #if CONFIG_KEYPAD == PLAYER_PAD |
149 | case XK_KP_Enter: | 149 | case XK_KP_Enter: |
150 | case XK_Return: | 150 | case XK_Return: |
151 | #elif defined HAVE_ONDIO_KEYPAD | 151 | #elif CONFIG_KEYPAD == ONDIO_PAD |
152 | case XK_KP_Insert: | 152 | case XK_KP_Insert: |
153 | case XK_Control_R: | 153 | case XK_Control_R: |
154 | #endif | 154 | #endif |