summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c180
1 files changed, 74 insertions, 106 deletions
diff --git a/apps/settings.c b/apps/settings.c
index ccf0acd8f9..0031130f9a 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -94,7 +94,7 @@ const char rec_base_directory[] = REC_BASE_DIR;
94#include "dsp.h" 94#include "dsp.h"
95#endif 95#endif
96 96
97#define CONFIG_BLOCK_VERSION 42 97#define CONFIG_BLOCK_VERSION 43
98#define CONFIG_BLOCK_SIZE 512 98#define CONFIG_BLOCK_SIZE 512
99#define RTC_BLOCK_SIZE 44 99#define RTC_BLOCK_SIZE 44
100 100
@@ -342,20 +342,47 @@ static const struct bit_entry hd_bits[] =
342#ifdef CONFIG_BACKLIGHT 342#ifdef CONFIG_BACKLIGHT
343 {1, S_O(caption_backlight), false, "caption backlight", off_on }, 343 {1, S_O(caption_backlight), false, "caption backlight", off_on },
344#endif 344#endif
345#ifdef HAVE_REMOTE_LCD
346 {1, S_O(remote_caption_backlight), false,
347 "remote caption backlight", off_on },
348#endif
349#ifdef HAVE_BACKLIGHT_BRIGHTNESS
350 {4, S_O(brightness), 9, "brightness", NULL },
351#endif
352#ifdef HAVE_BACKLIGHT_PWM_FADING
353 /* backlight fading */
354 {2, S_O(backlight_fade_in), 1, "backlight fade in", "off,500ms,1s,2s"},
355 {3, S_O(backlight_fade_out), 3, "backlight fade out",
356 "off,500ms,1s,2s,3s,4s,5s,10s"},
357#endif
358
345 {4, S_O(scroll_speed), 9, "scroll speed", NULL }, /* 0...15 */ 359 {4, S_O(scroll_speed), 9, "scroll speed", NULL }, /* 0...15 */
360 {8, S_O(scroll_delay), 100, "scroll delay", NULL }, /* 0...250 */
361 {8, S_O(bidir_limit), 50, "bidir limit", NULL }, /* 0...200 */
346#ifdef HAVE_LCD_BITMAP 362#ifdef HAVE_LCD_BITMAP
347#if LCD_WIDTH > 127 363 {1, S_O(offset_out_of_view), false, "Screen Scrolls Out Of View", off_on },
348 {8, S_O(scroll_step), 6, "scroll step", NULL }, /* 1...160 */ 364#if LCD_WIDTH > 255
365 {9, S_O(scroll_step), 6, "scroll step", NULL },
366 {9, S_O(screen_scroll_step), 16, "screen scroll step", NULL },
367#elif LCD_WIDTH > 127
368 {8, S_O(scroll_step), 6, "scroll step", NULL },
369 {8, S_O(screen_scroll_step), 16, "screen scroll step", NULL },
349#else 370#else
350 {7, S_O(scroll_step), 6, "scroll step", NULL }, /* 1...112 */ 371 {7, S_O(scroll_step), 6, "scroll step", NULL },
372 {7, S_O(screen_scroll_step), 16, "screen scroll step", NULL },
351#endif 373#endif
352#endif /* HAVE_LCD_BITMAP */ 374#endif /* HAVE_LCD_BITMAP */
353 {8, S_O(scroll_delay), 100, "scroll delay", NULL }, /* 0...250 */
354 {8, S_O(bidir_limit), 50, "bidir limit", NULL }, /* 0...200 */
355#ifdef HAVE_LCD_CHARCELLS 375#ifdef HAVE_LCD_CHARCELLS
356 {3, S_O(jump_scroll), 0, "jump scroll", NULL }, /* 0...5 */ 376 {3, S_O(jump_scroll), 0, "jump scroll", NULL }, /* 0...5 */
357 {8, S_O(jump_scroll_delay), 50, "jump scroll delay", NULL }, /* 0...250 */ 377 {8, S_O(jump_scroll_delay), 50, "jump scroll delay", NULL }, /* 0...250 */
358#endif 378#endif
379 {1, S_O(scroll_paginated), false, "scroll paginated", off_on },
380
381#ifdef HAVE_LCD_COLOR
382 {LCD_DEPTH,S_O(fg_color),LCD_DEFAULT_FG,"foreground color","rgb"},
383 {LCD_DEPTH,S_O(bg_color),LCD_DEFAULT_BG,"background color","rgb"},
384#endif
385
359 /* more playback */ 386 /* more playback */
360 {1, S_O(play_selected), true, "play selected", off_on }, 387 {1, S_O(play_selected), true, "play selected", off_on },
361 {1, S_O(fade_on_stop), true, "volume fade", off_on }, 388 {1, S_O(fade_on_stop), true, "volume fade", off_on },
@@ -375,6 +402,7 @@ static const struct bit_entry hd_bits[] =
375#endif 402#endif
376 {8, S_O(disk_spindown), 5, "disk spindown", NULL }, 403 {8, S_O(disk_spindown), 5, "disk spindown", NULL },
377#endif /* HAVE_MMC */ 404#endif /* HAVE_MMC */
405
378 /* browser */ 406 /* browser */
379 {3, S_O(dirfilter), SHOW_SUPPORTED, 407 {3, S_O(dirfilter), SHOW_SUPPORTED,
380 "show files", "all,supported,music,playlists,id3 database" }, 408 "show files", "all,supported,music,playlists,id3 database" },
@@ -406,29 +434,6 @@ static const struct bit_entry hd_bits[] =
406 {7, S_O(peak_meter_min), 60, "peak meter min", NULL }, /* 0...100 */ 434 {7, S_O(peak_meter_min), 60, "peak meter min", NULL }, /* 0...100 */
407 {7, S_O(peak_meter_max), 0, "peak meter max", NULL }, /* 0...100 */ 435 {7, S_O(peak_meter_max), 0, "peak meter max", NULL }, /* 0...100 */
408#endif 436#endif
409#if CONFIG_CODEC == MAS3587F
410 /* recording */
411 {1, S_O(rec_editable), false, "editable recordings", off_on },
412 {4, S_O(rec_timesplit), 0, "rec timesplit", /* 0...15 */
413 "off,00:05,00:10,00:15,00:30,01:00,01:14,01:20,02:00,04:00,06:00,08:00,10:00,12:00,18:00,24:00" },
414 {1, S_O(rec_channels), 0, "rec channels", "stereo,mono" },
415 {4, S_O(rec_mic_gain), 8, "rec mic gain", NULL },
416 {3, S_O(rec_quality), 5, "rec quality", NULL },
417#ifdef HAVE_SPDIF_IN
418 {2, S_O(rec_source), 0 /* 0=mic */, "rec source", "mic,line,spdif" },
419#else
420 {1, S_O(rec_source), 0 /* 0=mic */, "rec source", "mic,line" },
421#endif
422 {3, S_O(rec_frequency), 0, /* 0=44.1kHz */
423 "rec frequency", "44,48,32,22,24,16" },
424 {4, S_O(rec_left_gain), 2, /* 0dB */
425 "rec left gain", NULL }, /* 0...15 */
426 {4, S_O(rec_right_gain), 2, /* 0dB */
427 "rec right gain", NULL }, /* 0...15 */
428 {5, S_O(rec_prerecord_time), 0, "prerecording time", NULL }, /* 0...30 */
429 {1, S_O(rec_directory), 0, /* rec_base_directory */
430 "rec directory", REC_BASE_DIR ",current" },
431#endif
432#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) 437#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
433 {7, S_O(mdb_strength), 0, "mdb strength", NULL}, 438 {7, S_O(mdb_strength), 0, "mdb strength", NULL},
434 {7, S_O(mdb_harmonics), 0, "mdb harmonics", NULL}, 439 {7, S_O(mdb_harmonics), 0, "mdb harmonics", NULL},
@@ -449,7 +454,37 @@ static const struct bit_entry hd_bits[] =
449 {1, S_O(id3_v1_first), 0, "id3 tag priority", "v2-v1,v1-v2"}, 454 {1, S_O(id3_v1_first), 0, "id3 tag priority", "v2-v1,v1-v2"},
450 455
451#ifdef HAVE_RECORDING 456#ifdef HAVE_RECORDING
457 /* recording */
452 {1, S_O(rec_startup), false, "rec screen on startup", off_on }, 458 {1, S_O(rec_startup), false, "rec screen on startup", off_on },
459 {4, S_O(rec_timesplit), 0, "rec timesplit", /* 0...15 */
460 "off,00:05,00:10,00:15,00:30,01:00,01:14,01:20,02:00,04:00,06:00,08:00,10:00,12:00,18:00,24:00" },
461 {1, S_O(rec_channels), 0, "rec channels", "stereo,mono" },
462#ifdef HAVE_SPDIF_IN
463 {2, S_O(rec_source), 0 /* 0=mic */, "rec source", "mic,line,spdif" },
464#else
465 {1, S_O(rec_source), 0 /* 0=mic */, "rec source", "mic,line" },
466#endif
467 {5, S_O(rec_prerecord_time), 0, "prerecording time", NULL }, /* 0...30 */
468 {1, S_O(rec_directory), 0, /* rec_base_directory */
469 "rec directory", REC_BASE_DIR ",current" },
470#ifdef CONFIG_BACKLIGHT
471 {2, S_O(cliplight), 0, "cliplight", "off,main,both,remote" },
472#endif
473#if CONFIG_CODEC == MAS3587F
474 {4, S_O(rec_mic_gain), 8, "rec mic gain", NULL },
475 {4, S_O(rec_left_gain), 2 /* 0dB */, "rec left gain", NULL }, /* 0...15 */
476 {4, S_O(rec_right_gain), 2 /* 0dB */, "rec right gain", NULL }, /* 0...15 */
477 {3, S_O(rec_frequency), 0, /* 0=44.1kHz */
478 "rec frequency", "44,48,32,22,24,16" },
479 {1, S_O(rec_editable), false, "editable recordings", off_on },
480 {3, S_O(rec_quality), 5, "rec quality", NULL },
481#elif defined(HAVE_UDA1380)
482 {8|SIGNED, S_O(rec_mic_gain), 16 /* 8 dB */, "rec mic gain", NULL }, /* -128...+108 */
483 {8|SIGNED, S_O(rec_left_gain), 0, "rec left gain", NULL }, /* -128...+96 */
484 {8|SIGNED, S_O(rec_right_gain), 0, "rec right gain", NULL }, /* -128...+96 */
485 {3, S_O(rec_frequency), 0, /* 0=44.1kHz */
486 "rec frequency", "44,48,32,22,24,16" },
487#endif
453 488
454 /* values for the trigger */ 489 /* values for the trigger */
455 {8 | SIGNED, S_O(rec_start_thres), -35, "trigger start threshold", NULL}, 490 {8 | SIGNED, S_O(rec_start_thres), -35, "trigger start threshold", NULL},
@@ -458,14 +493,7 @@ static const struct bit_entry hd_bits[] =
458 {4, S_O(rec_stop_postrec), 2, "trigger stop postrec", trig_durations_conf}, 493 {4, S_O(rec_stop_postrec), 2, "trigger stop postrec", trig_durations_conf},
459 {4, S_O(rec_stop_gap), 1, "trigger min gap", trig_durations_conf}, 494 {4, S_O(rec_stop_gap), 1, "trigger min gap", trig_durations_conf},
460 {4, S_O(rec_trigger_mode ), 0, "trigger mode", "off,once,repeat"}, 495 {4, S_O(rec_trigger_mode ), 0, "trigger mode", "off,once,repeat"},
461#endif 496#endif /* HAVE_RECORDING */
462
463#ifdef HAVE_BACKLIGHT_PWM_FADING
464 /* backlight fading */
465 {2, S_O(backlight_fade_in), 1, "backlight fade in", "off,500ms,1s,2s"},
466 {3, S_O(backlight_fade_out), 3, "backlight fade out",
467 "off,500ms,1s,2s,3s,4s,5s,10s"},
468#endif
469 497
470#ifdef HAVE_SPDIF_POWER 498#ifdef HAVE_SPDIF_POWER
471 {1, S_O(spdif_enable), false, "spdif enable", off_on}, 499 {1, S_O(spdif_enable), false, "spdif enable", off_on},
@@ -492,59 +520,8 @@ static const struct bit_entry hd_bits[] =
492 {7, S_O(crossfeed_cross_gain), 60, "crossfeed cross gain", NULL }, 520 {7, S_O(crossfeed_cross_gain), 60, "crossfeed cross gain", NULL },
493 {8, S_O(crossfeed_hf_attenuation), 160, "crossfeed hf attenuation", NULL }, 521 {8, S_O(crossfeed_hf_attenuation), 160, "crossfeed hf attenuation", NULL },
494 {11, S_O(crossfeed_hf_cutoff), 700, "crossfeed hf cutoff", NULL }, 522 {11, S_O(crossfeed_hf_cutoff), 700, "crossfeed hf cutoff", NULL },
495#endif
496#ifdef HAVE_DIRCACHE
497 {1, S_O(dircache), false, "dircache", off_on },
498 {22, S_O(dircache_size), 0, NULL, NULL },
499#endif
500 523
501#if defined(HAVE_UDA1380) 524 /* equalizer */
502 /* recording settings for iriver */
503 {4, S_O(rec_timesplit), 0, "rec timesplit", /* 0...15 */
504 "off,00:05,00:10,00:15,00:30,01:00,01:14,01:20,02:00,04:00,06:00,08:00,10:00,12:00,18:00,24:00" },
505 {1, S_O(rec_channels), 0, "rec channels", "stereo,mono" },
506 {4, S_O(rec_mic_gain), 4, "rec mic gain", NULL },
507#ifdef HAVE_SPDIF_IN
508 {2, S_O(rec_source), 0 /* 0=mic */, "rec source", "mic,line,spdif" },
509#else
510 {1, S_O(rec_source), 0 /* 0=mic */, "rec source", "mic,line" },
511#endif
512 {3, S_O(rec_frequency), 0, /* 0=44.1kHz */
513 "rec frequency", "44,48,32,22,24,16" },
514 {4, S_O(rec_left_gain), 2, /* 0dB */
515 "rec left gain", NULL }, /* 0...15 */
516 {4, S_O(rec_right_gain), 2, /* 0dB */
517 "rec right gain", NULL }, /* 0...15 */
518 {5, S_O(rec_prerecord_time), 0, "prerecording time", NULL }, /* 0...30 */
519 {1, S_O(rec_directory), 0, /* rec_base_directory */
520 "rec directory", REC_BASE_DIR ",current" },
521 {8|SIGNED, S_O(rec_linein_decimator_left_gain), 0, /* 0dB */
522 "line in decimator left gain", NULL }, /* -128...48 */
523 {8|SIGNED, S_O(rec_linein_decimator_right_gain), 0, /* 0dB */
524 "line in decimator right gain", NULL }, /* -128...48 */
525#endif
526
527#ifdef HAVE_REMOTE_LCD
528 {1, S_O(remote_caption_backlight), false,
529 "remote caption backlight", off_on },
530#endif
531 {4, S_O(default_codepage), 0, "default codepage", "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256,iso8859-9,iso8859-2,sjis,gb2312,ksx1001,big5,utf-8,cp1256" },
532
533#ifdef HAVE_BACKLIGHT_BRIGHTNESS
534 {4, S_O(brightness), 9, "brightness", NULL },
535#endif
536
537#ifdef HAVE_LCD_BITMAP
538 {1, S_O(offset_out_of_view), false, "Screen Scrolls Out Of View", off_on },
539#if LCD_WIDTH > 127
540 {8, S_O(screen_scroll_step), 16, "screen scroll step", NULL }, /* 1...160 */
541#else
542 {7, S_O(screen_scroll_step), 16, "screen scroll step", NULL }, /* 1...112 */
543#endif
544#endif /* HAVE_LCD_BITMAP */
545 {1, S_O(warnon_erase_dynplaylist), false,
546 "warn when erasing dynamic playlist", off_on },
547#if CONFIG_CODEC == SWCODEC
548 {1, S_O(eq_enabled), false, "eq enabled", off_on }, 525 {1, S_O(eq_enabled), false, "eq enabled", off_on },
549 {8, S_O(eq_precut), 0, "eq precut", NULL }, 526 {8, S_O(eq_precut), 0, "eq precut", NULL },
550 /* 0..32768 Hz */ 527 /* 0..32768 Hz */
@@ -566,28 +543,19 @@ static const struct bit_entry hd_bits[] =
566 {9|SIGNED, S_O(eq_band3_gain), 0, "eq band 3 gain", NULL }, 543 {9|SIGNED, S_O(eq_band3_gain), 0, "eq band 3 gain", NULL },
567 {9|SIGNED, S_O(eq_band4_gain), 0, "eq band 4 gain", NULL }, 544 {9|SIGNED, S_O(eq_band4_gain), 0, "eq band 4 gain", NULL },
568#endif 545#endif
569#if defined(HAVE_UDA1380) /* PLEASE merge this with the other UDA1380 define
570 when bumping the settings version number PLEASE */
571 {8|SIGNED, S_O(rec_mic_decimator_left_gain), 0, /* 0dB */
572 "mic decimator left gain", NULL }, /* -128...48 */
573 {8|SIGNED, S_O(rec_mic_decimator_right_gain), 0, /* 0dB */
574 "mic decimator right gain", NULL }, /* -128...48 */
575#endif
576 {1, S_O(scroll_paginated), false, "scroll paginated", off_on },
577#ifdef HAVE_RECORDING
578#ifdef CONFIG_BACKLIGHT
579 {2, S_O(cliplight), 0, "cliplight", "off,main,both,remote" },
580#endif /* CONFIG_BACKLIGHT */
581#endif /*HAVE_RECORDING*/
582#ifdef HAVE_LCD_COLOR
583 {LCD_DEPTH,S_O(fg_color),LCD_DEFAULT_FG,"foreground color","rgb"},
584 {LCD_DEPTH,S_O(bg_color),LCD_DEFAULT_BG,"background color","rgb"},
585#endif
586 546
587#ifdef HAVE_DIRCACHE 547#ifdef HAVE_DIRCACHE
548 {1, S_O(dircache), false, "dircache", off_on },
549 {22, S_O(dircache_size), 0, NULL, NULL },
588 {1, S_O(tagcache_ram), 0, "tagcache_ram", off_on }, 550 {1, S_O(tagcache_ram), 0, "tagcache_ram", off_on },
589#endif 551#endif
590 552
553 {4, S_O(default_codepage), 0, "default codepage",
554 "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256,iso8859-9,iso8859-2,sjis,gb2312,ksx1001,big5,utf-8,cp1256" },
555
556 {1, S_O(warnon_erase_dynplaylist), false,
557 "warn when erasing dynamic playlist", off_on },
558
591 /* If values are just added to the end, no need to bump the version. */ 559 /* If values are just added to the end, no need to bump the version. */
592 /* new stuff to be added at the end */ 560 /* new stuff to be added at the end */
593 561