diff options
author | Nils Wallménius <nils@rockbox.org> | 2009-01-03 12:48:06 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2009-01-03 12:48:06 +0000 |
commit | 3681ff197d3cf5393df3d56d7b6f7b39af0fc47f (patch) | |
tree | 057abedb9b45425c53e27739b3c228a6148ab456 /apps | |
parent | d14f79dc7b4888b345ec2b71c36ca432d23c5711 (diff) | |
download | rockbox-3681ff197d3cf5393df3d56d7b6f7b39af0fc47f.tar.gz rockbox-3681ff197d3cf5393df3d56d7b6f7b39af0fc47f.zip |
Reorder of user_settings, cleaned out some unused settings grouped settings depending on the same preprocessor defines together a bit more to make it more readable, updated some comments. Plugin api bump and the wps token for 12/24 hour clock setting is now excluded for non rtc targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19655 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/gwps-common.c | 3 | ||||
-rw-r--r-- | apps/plugin.h | 4 | ||||
-rw-r--r-- | apps/settings.c | 4 | ||||
-rw-r--r-- | apps/settings.h | 520 |
4 files changed, 252 insertions, 279 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index 5e134b5fa3..2b1d6417e2 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c | |||
@@ -1147,12 +1147,13 @@ static const char *get_token_value(struct gui_wps *gwps, | |||
1147 | *intval = global_settings.repeat_mode + 1; | 1147 | *intval = global_settings.repeat_mode + 1; |
1148 | snprintf(buf, buf_size, "%d", global_settings.repeat_mode); | 1148 | snprintf(buf, buf_size, "%d", global_settings.repeat_mode); |
1149 | return buf; | 1149 | return buf; |
1150 | #if CONFIG_RTC | ||
1150 | case WPS_TOKEN_RTC_12HOUR_CFG: | 1151 | case WPS_TOKEN_RTC_12HOUR_CFG: |
1151 | if (intval) | 1152 | if (intval) |
1152 | *intval = global_settings.timeformat + 1; | 1153 | *intval = global_settings.timeformat + 1; |
1153 | snprintf(buf, buf_size, "%d", global_settings.timeformat); | 1154 | snprintf(buf, buf_size, "%d", global_settings.timeformat); |
1154 | return buf; | 1155 | return buf; |
1155 | #if CONFIG_RTC | 1156 | |
1156 | case WPS_TOKEN_RTC_DAY_OF_MONTH: | 1157 | case WPS_TOKEN_RTC_DAY_OF_MONTH: |
1157 | /* d: day of month (01..31) */ | 1158 | /* d: day of month (01..31) */ |
1158 | snprintf(buf, buf_size, "%02d", tm->tm_mday); | 1159 | snprintf(buf, buf_size, "%02d", tm->tm_mday); |
diff --git a/apps/plugin.h b/apps/plugin.h index fbf20e84e4..a06f009520 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -132,12 +132,12 @@ void* plugin_get_buffer(size_t *buffer_size); | |||
132 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ | 132 | #define PLUGIN_MAGIC 0x526F634B /* RocK */ |
133 | 133 | ||
134 | /* increase this every time the api struct changes */ | 134 | /* increase this every time the api struct changes */ |
135 | #define PLUGIN_API_VERSION 133 | 135 | #define PLUGIN_API_VERSION 134 |
136 | 136 | ||
137 | /* update this to latest version if a change to the api struct breaks | 137 | /* update this to latest version if a change to the api struct breaks |
138 | backwards compatibility (and please take the opportunity to sort in any | 138 | backwards compatibility (and please take the opportunity to sort in any |
139 | new function which are "waiting" at the end of the function table) */ | 139 | new function which are "waiting" at the end of the function table) */ |
140 | #define PLUGIN_MIN_API_VERSION 133 | 140 | #define PLUGIN_MIN_API_VERSION 134 |
141 | 141 | ||
142 | /* plugin return codes */ | 142 | /* plugin return codes */ |
143 | enum plugin_status { | 143 | enum plugin_status { |
diff --git a/apps/settings.c b/apps/settings.c index dcd68b6a9c..42fb4dad5d 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -800,9 +800,13 @@ void settings_apply(bool read_disk) | |||
800 | #endif | 800 | #endif |
801 | 801 | ||
802 | #ifdef HAVE_LCD_BITMAP | 802 | #ifdef HAVE_LCD_BITMAP |
803 | #ifdef HAVE_LCD_INVERT | ||
803 | lcd_set_invert_display(global_settings.invert); | 804 | lcd_set_invert_display(global_settings.invert); |
805 | #endif | ||
806 | #ifdef HAVE_LCD_FLIP | ||
804 | lcd_set_flip(global_settings.flip_display); | 807 | lcd_set_flip(global_settings.flip_display); |
805 | button_set_flip(global_settings.flip_display); | 808 | button_set_flip(global_settings.flip_display); |
809 | #endif | ||
806 | lcd_update(); /* refresh after flipping the screen */ | 810 | lcd_update(); /* refresh after flipping the screen */ |
807 | settings_apply_pm_range(); | 811 | settings_apply_pm_range(); |
808 | peak_meter_init_times( | 812 | peak_meter_init_times( |
diff --git a/apps/settings.h b/apps/settings.h index f9b3239e05..e48e5b5dd0 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -316,14 +316,14 @@ struct user_settings | |||
316 | int stereo_width; /* 0-255% */ | 316 | int stereo_width; /* 0-255% */ |
317 | 317 | ||
318 | #if CONFIG_CODEC != SWCODEC | 318 | #if CONFIG_CODEC != SWCODEC |
319 | int loudness; /* loudness eq: 0-100 0=off 100=max */ | 319 | int loudness; /* loudness eq: 0-100 0=off 100=max */ |
320 | int avc; /* auto volume correct: 0=off, 1=20ms, 2=2s 3=4s 4=8s */ | 320 | int avc; /* auto volume correct: 0=off, 1=20ms, 2=2s 3=4s 4=8s */ |
321 | int mdb_strength; /* 0-127dB */ | 321 | int mdb_strength; /* 0-127dB */ |
322 | int mdb_harmonics; /* 0-100% */ | 322 | int mdb_harmonics; /* 0-100% */ |
323 | int mdb_center; /* 20-300Hz */ | 323 | int mdb_center; /* 20-300Hz */ |
324 | int mdb_shape; /* 50-300Hz */ | 324 | int mdb_shape; /* 50-300Hz */ |
325 | bool mdb_enable; /* true/false */ | 325 | bool mdb_enable; /* true/false */ |
326 | bool superbass; /* true/false */ | 326 | bool superbass; /* true/false */ |
327 | #endif | 327 | #endif |
328 | 328 | ||
329 | #ifdef HAVE_WM8758 | 329 | #ifdef HAVE_WM8758 |
@@ -332,16 +332,83 @@ struct user_settings | |||
332 | #endif | 332 | #endif |
333 | 333 | ||
334 | #if CONFIG_CODEC == SWCODEC | 334 | #if CONFIG_CODEC == SWCODEC |
335 | int crossfade; /* Enable crossfade (0=off,1=shuffle,2=trackskip,3=shuff&trackskip,4=always) */ | 335 | /* Crossfade */ |
336 | int crossfade; /* Enable crossfade (0=off, 1=shuffle, 2=trackskip, | ||
337 | 3=shuff&trackskip, 4=always) */ | ||
336 | int crossfade_fade_in_delay; /* Fade in delay (0-15s) */ | 338 | int crossfade_fade_in_delay; /* Fade in delay (0-15s) */ |
337 | int crossfade_fade_out_delay; /* Fade out delay (0-15s) */ | 339 | int crossfade_fade_out_delay; /* Fade out delay (0-15s) */ |
338 | int crossfade_fade_in_duration; /* Fade in duration (0-15s) */ | 340 | int crossfade_fade_in_duration; /* Fade in duration (0-15s) */ |
339 | int crossfade_fade_out_duration; /* Fade out duration (0-15s) */ | 341 | int crossfade_fade_out_duration; /* Fade out duration (0-15s) */ |
340 | int crossfade_fade_out_mixmode; /* Fade out mode (0=crossfade,1=mix) */ | 342 | int crossfade_fade_out_mixmode; /* Fade out mode (0=crossfade,1=mix) */ |
341 | #endif | 343 | |
344 | /* Replaygain */ | ||
345 | bool replaygain; /* enable replaygain */ | ||
346 | bool replaygain_noclip; /* scale to prevent clips */ | ||
347 | int replaygain_type; /* 0=track gain, 1=album gain, 2=track gain if | ||
348 | shuffle is on, album gain otherwise */ | ||
349 | int replaygain_preamp; /* scale replaygained tracks by this */ | ||
350 | |||
351 | /* Crossfeed */ | ||
352 | bool crossfeed; /* enable crossfeed */ | ||
353 | unsigned int crossfeed_direct_gain; /* dB x 10 */ | ||
354 | unsigned int crossfeed_cross_gain; /* dB x 10 */ | ||
355 | unsigned int crossfeed_hf_attenuation; /* dB x 10 */ | ||
356 | unsigned int crossfeed_hf_cutoff; /* Frequency in Hz */ | ||
357 | |||
358 | /* EQ */ | ||
359 | bool eq_enabled; /* Enable equalizer */ | ||
360 | unsigned int eq_precut; /* dB */ | ||
361 | |||
362 | /* Order is important here, must be cutoff, q, then gain for each band. | ||
363 | See dsp_set_eq_coefs in dsp.c for why. */ | ||
364 | |||
365 | /* Band 0 settings */ | ||
366 | int eq_band0_cutoff; /* Hz */ | ||
367 | int eq_band0_q; | ||
368 | int eq_band0_gain; /* +/- dB */ | ||
369 | |||
370 | /* Band 1 settings */ | ||
371 | int eq_band1_cutoff; /* Hz */ | ||
372 | int eq_band1_q; | ||
373 | int eq_band1_gain; /* +/- dB */ | ||
374 | |||
375 | /* Band 2 settings */ | ||
376 | int eq_band2_cutoff; /* Hz */ | ||
377 | int eq_band2_q; | ||
378 | int eq_band2_gain; /* +/- dB */ | ||
379 | |||
380 | /* Band 3 settings */ | ||
381 | int eq_band3_cutoff; /* Hz */ | ||
382 | int eq_band3_q; | ||
383 | int eq_band3_gain; /* +/- dB */ | ||
384 | |||
385 | /* Band 4 settings */ | ||
386 | int eq_band4_cutoff; /* Hz */ | ||
387 | int eq_band4_q; | ||
388 | int eq_band4_gain; /* +/- dB */ | ||
389 | |||
390 | /* Misc. swcodec */ | ||
391 | int beep; /* system beep volume when changing tracks etc. */ | ||
392 | int keyclick; /* keyclick volume */ | ||
393 | int keyclick_repeats; /* keyclick on repeats */ | ||
394 | bool dithering_enabled; | ||
395 | #endif /* CONFIG_CODEC == SWCODEC */ | ||
396 | |||
342 | #ifdef HAVE_RECORDING | 397 | #ifdef HAVE_RECORDING |
343 | #if CONFIG_CODEC == SWCODEC | 398 | #if CONFIG_CODEC == SWCODEC |
344 | int rec_format; /* record format index */ | 399 | int rec_format; /* record format index */ |
400 | int rec_mono_mode; /* how to create mono: L, R, L+R */ | ||
401 | |||
402 | /* Encoder Settings Start - keep these together */ | ||
403 | struct mp3_enc_config mp3_enc_config; | ||
404 | #if 0 /* These currently contain no members but their places in line | ||
405 | should be held */ | ||
406 | struct aiff_enc_config aiff_enc_config; | ||
407 | struct wav_enc_config wav_enc_config; | ||
408 | struct wavpack_enc_config wavpack_enc_config; | ||
409 | #endif | ||
410 | /* Encoder Settings End */ | ||
411 | |||
345 | #else | 412 | #else |
346 | int rec_quality; /* 0-7 */ | 413 | int rec_quality; /* 0-7 */ |
347 | #endif /* CONFIG_CODEC == SWCODEC */ | 414 | #endif /* CONFIG_CODEC == SWCODEC */ |
@@ -353,12 +420,11 @@ struct user_settings | |||
353 | 4 = 24kHz | 420 | 4 = 24kHz |
354 | 5 = 16kHz */ | 421 | 5 = 16kHz */ |
355 | int rec_channels; /* 0=Stereo, 1=Mono */ | 422 | int rec_channels; /* 0=Stereo, 1=Mono */ |
356 | #if CONFIG_CODEC == SWCODEC | 423 | |
357 | int rec_mono_mode; /* how to create mono: L, R, L+R */ | ||
358 | #endif | ||
359 | int rec_mic_gain; /* depends on target */ | 424 | int rec_mic_gain; /* depends on target */ |
360 | int rec_left_gain; /* depends on target */ | 425 | int rec_left_gain; /* depends on target */ |
361 | int rec_right_gain; /* depands on target */ | 426 | int rec_right_gain; /* depends on target */ |
427 | bool peak_meter_clipcounter; /* clipping count indicator */ | ||
362 | bool rec_editable; /* true means that the bit reservoir is off */ | 428 | bool rec_editable; /* true means that the bit reservoir is off */ |
363 | 429 | ||
364 | /* note: timesplit setting is not saved */ | 430 | /* note: timesplit setting is not saved */ |
@@ -412,148 +478,133 @@ struct user_settings | |||
412 | int rec_agc_cliptime; /* 0.2, 0.4, 0.6, 0.8, 1s */ | 478 | int rec_agc_cliptime; /* 0.2, 0.4, 0.6, 0.8, 1s */ |
413 | #endif | 479 | #endif |
414 | #endif /* HAVE_RECORDING */ | 480 | #endif /* HAVE_RECORDING */ |
415 | /* device settings */ | ||
416 | 481 | ||
417 | #ifdef HAVE_LCD_CONTRAST | 482 | #if CONFIG_TUNER |
418 | int contrast; /* lcd contrast */ | 483 | int fm_region; |
419 | #endif | 484 | bool fm_force_mono; /* Forces Mono mode if true */ |
420 | bool invert; /* invert display */ | 485 | unsigned char fmr_file[MAX_FILENAME+1]; /* last fmr preset */ |
421 | int cursor_style; /* style of the selection cursor */ | ||
422 | bool flip_display; /* turn display (and button layout) by 180 degrees */ | ||
423 | int poweroff; /* power off timer */ | ||
424 | int backlight_timeout; /* backlight off timeout: 0-18 0=never, | ||
425 | 1=always, | ||
426 | then according to timeout_values[] */ | ||
427 | #if CONFIG_CHARGING | ||
428 | int backlight_timeout_plugged; | ||
429 | #endif | 486 | #endif |
430 | 487 | ||
431 | #if defined(HAVE_BACKLIGHT_PWM_FADING) | 488 | /* misc options */ |
432 | int backlight_fade_in; /* backlight fade in timing: 0..3 */ | 489 | #ifndef HAVE_SCROLLWHEEL |
433 | int backlight_fade_out; /* backlight fade in timing: 0..7 */ | 490 | int list_accel_start_delay; /* ms before we start increaseing step size */ |
434 | #elif defined(USE_BACKLIGHT_SW_FADING) \ | 491 | int list_accel_wait; /* ms between increases */ |
435 | || defined(USE_BACKLIGHT_CUSTOM_FADING_BOOL) | ||
436 | bool backlight_fade_in; | ||
437 | bool backlight_fade_out; | ||
438 | #endif | 492 | #endif |
439 | 493 | ||
440 | #ifdef HAVE_BACKLIGHT_BRIGHTNESS | 494 | #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING |
441 | int brightness; | 495 | int touchpad_sensitivity; |
442 | #endif | ||
443 | int battery_capacity; /* in mAh */ | ||
444 | #if BATTERY_TYPES_COUNT > 1 | ||
445 | int battery_type; /* for units which can take multiple types (Ondio). */ | ||
446 | #endif | 496 | #endif |
447 | #ifdef HAVE_SPDIF_POWER | 497 | |
448 | bool spdif_enable; /* S/PDIF power on/off */ | 498 | #ifdef HAVE_HEADPHONE_DETECTION |
499 | int unplug_mode; /* pause on headphone unplug */ | ||
500 | int unplug_rw; /* time in s to rewind when pausing */ | ||
501 | bool unplug_autoresume; /* disable auto-resume if no phones */ | ||
449 | #endif | 502 | #endif |
450 | 503 | ||
451 | #if CONFIG_TUNER | 504 | #ifdef HAVE_QUICKSCREEN |
452 | unsigned char fmr_file[MAX_FILENAME+1]; /* last fmr preset */ | 505 | /* these are split because settings_list cant handle arrays */ |
506 | int qs_item_left; | ||
507 | int qs_item_right; | ||
508 | int qs_item_bottom; | ||
453 | #endif | 509 | #endif |
454 | #ifdef HAVE_LCD_BITMAP | 510 | |
455 | unsigned char font_file[MAX_FILENAME+1]; /* last font */ | 511 | #if CONFIG_RTC |
512 | int timeformat; /* time format: 0=24 hour clock, 1=12 hour clock */ | ||
456 | #endif | 513 | #endif |
457 | unsigned char wps_file[MAX_FILENAME+1]; /* last wps */ | ||
458 | unsigned char lang_file[MAX_FILENAME+1]; /* last language */ | ||
459 | 514 | ||
460 | /* misc options */ | 515 | #ifdef HAVE_DISK_STORAGE |
516 | int disk_spindown; /* time until disk spindown, in seconds (0=off) */ | ||
517 | int buffer_margin; /* audio buffer watermark margin, in seconds */ | ||
518 | #endif | ||
461 | 519 | ||
462 | int repeat_mode; /* 0=off 1=repeat all 2=repeat one 3=shuffle 4=ab */ | ||
463 | int dirfilter; /* 0=display all, 1=only supported, 2=only music, | 520 | int dirfilter; /* 0=display all, 1=only supported, 2=only music, |
464 | 3=dirs+playlists, 4=ID3 database */ | 521 | 3=dirs+playlists, 4=ID3 database */ |
465 | bool sort_case; /* dir sort order: 0=case insensitive, 1=sensitive */ | ||
466 | int show_filename_ext; /* show filename extensions in file browser? | 522 | int show_filename_ext; /* show filename extensions in file browser? |
467 | 0 = no, 1 = yes, 2 = only unknown 0 */ | 523 | 0 = no, 1 = yes, 2 = only unknown 0 */ |
468 | int volume_type; /* how volume is displayed: 0=graphic, 1=percent */ | 524 | int default_codepage; /* set default codepage for tag conversion */ |
469 | int battery_display; /* how battery is displayed: 0=graphic, 1=percent */ | 525 | bool hold_lr_for_scroll_in_list; /* hold L/R scrolls the list left/right */ |
470 | int timeformat; /* time format: 0=24 hour clock, 1=12 hour clock */ | ||
471 | bool playlist_shuffle; | ||
472 | bool play_selected; /* Plays selected file even in shuffle mode */ | 526 | bool play_selected; /* Plays selected file even in shuffle mode */ |
527 | bool party_mode; /* party mode - unstoppable music */ | ||
528 | bool audioscrobbler; /* Audioscrobbler logging */ | ||
529 | bool cuesheet; | ||
530 | bool car_adapter_mode; /* 0=off 1=on */ | ||
531 | int start_in_screen; | ||
532 | #if defined(HAVE_RTC_ALARM) && \ | ||
533 | (defined(HAVE_RECORDING) || CONFIG_TUNER) | ||
534 | int alarm_wake_up_screen; | ||
535 | #endif | ||
473 | int ff_rewind_min_step; /* FF/Rewind minimum step size */ | 536 | int ff_rewind_min_step; /* FF/Rewind minimum step size */ |
474 | int ff_rewind_accel; /* FF/Rewind acceleration (in seconds per doubling) */ | 537 | int ff_rewind_accel; /* FF/Rewind acceleration (in seconds per doubling) */ |
475 | 538 | ||
476 | #ifdef HAVE_DISK_STORAGE | ||
477 | int disk_spindown; /* time until disk spindown, in seconds (0=off) */ | ||
478 | int buffer_margin; /* MP3 buffer watermark margin, in seconds */ | ||
479 | #endif | ||
480 | |||
481 | int peak_meter_release; /* units per read out */ | 539 | int peak_meter_release; /* units per read out */ |
482 | int peak_meter_hold; /* hold time for peak meter in 1/100 s */ | 540 | int peak_meter_hold; /* hold time for peak meter in 1/100 s */ |
483 | int peak_meter_clip_hold; /* hold time for clips */ | 541 | int peak_meter_clip_hold; /* hold time for clips */ |
484 | bool peak_meter_dbfs; /* show linear or dbfs values */ | 542 | bool peak_meter_dbfs; /* show linear or dbfs values */ |
485 | int peak_meter_min; /* range minimum */ | 543 | int peak_meter_min; /* range minimum */ |
486 | int peak_meter_max; /* range maximum */ | 544 | int peak_meter_max; /* range maximum */ |
487 | #ifdef HAVE_RECORDING | ||
488 | bool peak_meter_clipcounter; /* clipping count indicator */ | ||
489 | #endif | ||
490 | bool car_adapter_mode; /* 0=off 1=on */ | ||
491 | #ifdef IPOD_ACCESSORY_PROTOCOL | ||
492 | int serial_bitrate; /* 0=auto 1=9600 2=19200 3=38400 4=57600 */ | ||
493 | #endif | ||
494 | #ifdef HAVE_ACCESSORY_SUPPLY | ||
495 | bool accessory_supply; /* 0=off 1=on, accessory power supply for iPod */ | ||
496 | #endif | ||
497 | 545 | ||
498 | /* show status bar */ | 546 | unsigned char wps_file[MAX_FILENAME+1]; /* last wps */ |
547 | unsigned char lang_file[MAX_FILENAME+1]; /* last language */ | ||
548 | unsigned char playlist_catalog_dir[MAX_FILENAME+1]; | ||
549 | int skip_length; /* skip length */ | ||
550 | int max_files_in_dir; /* Max entries in directory (file browser) */ | ||
551 | int max_files_in_playlist; /* Max entries in playlist */ | ||
552 | int volume_type; /* how volume is displayed: 0=graphic, 1=percent */ | ||
553 | int battery_display; /* how battery is displayed: 0=graphic, 1=percent */ | ||
554 | bool show_icons; /* 0=hide 1=show */ | ||
499 | bool statusbar; /* 0=hide, 1=show */ | 555 | bool statusbar; /* 0=hide, 1=show */ |
500 | 556 | ||
501 | #if CONFIG_KEYPAD == RECORDER_PAD | 557 | #if CONFIG_KEYPAD == RECORDER_PAD |
502 | /* show button bar */ | ||
503 | bool buttonbar; /* 0=hide, 1=show */ | 558 | bool buttonbar; /* 0=hide, 1=show */ |
504 | #endif | 559 | #endif |
505 | 560 | ||
506 | /* show scroll bar */ | ||
507 | bool scrollbar; /* 0=hide, 1=show */ | 561 | bool scrollbar; /* 0=hide, 1=show */ |
508 | |||
509 | /* goto current song when exiting WPS */ | 562 | /* goto current song when exiting WPS */ |
510 | bool browse_current; /* 1=goto current song, | 563 | bool browse_current; /* 1=goto current song, |
511 | 0=goto previous location */ | 564 | 0=goto previous location */ |
512 | 565 | bool scroll_paginated; /* 0=dont 1=do */ | |
513 | 566 | int scroll_speed; /* long texts scrolling speed: 1-30 */ | |
514 | int scroll_speed; /* long texts scrolling speed: 1-30 */ | 567 | int bidir_limit; /* bidir scroll length limit */ |
515 | int bidir_limit; /* bidir scroll length limit */ | 568 | int scroll_delay; /* delay (in 1/10s) before starting scroll */ |
516 | int scroll_delay; /* delay (in 1/10s) before starting scroll */ | 569 | int scroll_step; /* pixels to advance per update */ |
517 | int scroll_step; /* pixels to advance per update */ | ||
518 | #ifdef HAVE_REMOTE_LCD | ||
519 | int remote_scroll_speed; /* long texts scrolling speed: 1-30 */ | ||
520 | int remote_scroll_delay; /* delay (in 1/10s) before starting scroll */ | ||
521 | int remote_scroll_step; /* pixels to advance per update */ | ||
522 | int remote_bidir_limit; /* bidir scroll length limit */ | ||
523 | #endif | ||
524 | |||
525 | #ifdef HAVE_LCD_BITMAP | ||
526 | bool offset_out_of_view; | ||
527 | int screen_scroll_step; | ||
528 | #endif | ||
529 | 570 | ||
530 | /* auto bookmark settings */ | 571 | /* auto bookmark settings */ |
531 | int autoloadbookmark; /* auto load option: 0=off, 1=ask, 2=on */ | 572 | int autoloadbookmark; /* auto load option: 0=off, 1=ask, 2=on */ |
532 | int autocreatebookmark; /* auto create option: 0=off, 1=ask, 2=on */ | 573 | int autocreatebookmark; /* auto create option: 0=off, 1=ask, 2=on */ |
533 | int usemrb; /* use MRB list: 0=No, 1=Yes*/ | 574 | int usemrb; /* use MRB list: 0=No, 1=Yes*/ |
534 | #ifdef HAVE_LCD_CHARCELLS | ||
535 | int jump_scroll; /* Fast jump when scrolling */ | ||
536 | int jump_scroll_delay; /* Delay between jump scroll screens */ | ||
537 | #endif | ||
538 | bool fade_on_stop; /* fade on pause/unpause/stop */ | ||
539 | bool caption_backlight; /* turn on backlight at end and start of track */ | ||
540 | 575 | ||
541 | #if CONFIG_TUNER | 576 | #ifdef HAVE_DIRCACHE |
542 | int fm_freq_step; /* Frequency step for manual tuning, in kHz */ | 577 | bool dircache; /* enable directory cache */ |
543 | bool fm_force_mono; /* Forces Mono mode if true */ | 578 | #endif |
544 | bool fm_full_range; /* Enables full 10MHz-160MHz range if true, else | 579 | #ifdef HAVE_TAGCACHE |
545 | only 88MHz-108MHz */ | 580 | #ifdef HAVE_TC_RAMCACHE |
581 | bool tagcache_ram; /* load tagcache to ram? */ | ||
546 | #endif | 582 | #endif |
583 | bool tagcache_autoupdate; /* automatically keep tagcache in sync? */ | ||
584 | bool runtimedb; /* runtime database active? */ | ||
585 | #endif /* HAVE_TAGCACHE */ | ||
547 | 586 | ||
548 | int max_files_in_dir; /* Max entries in directory (file browser) */ | 587 | #if LCD_DEPTH > 1 |
549 | int max_files_in_playlist; /* Max entries in playlist */ | 588 | unsigned char backdrop_file[MAX_FILENAME+1]; /* backdrop bitmap file */ |
550 | bool show_icons; /* 0=hide 1=show */ | 589 | #endif |
551 | int recursive_dir_insert; /* should directories be inserted recursively */ | ||
552 | 590 | ||
553 | #if CONFIG_CODEC == MAS3507D | 591 | #ifdef HAVE_LCD_COLOR |
554 | bool line_in; /* false=off, true=active */ | 592 | int bg_color; /* background color native format */ |
593 | int fg_color; /* foreground color native format */ | ||
594 | int lss_color; /* background color for the selector or start color for the gradient */ | ||
595 | int lse_color; /* end color for the selector gradient */ | ||
596 | int lst_color; /* color of the text for the selector */ | ||
597 | unsigned char colors_file[MAX_FILENAME+1]; | ||
555 | #endif | 598 | #endif |
556 | 599 | ||
600 | /* playlist/playback settings */ | ||
601 | int repeat_mode; /* 0=off 1=repeat all 2=repeat one 3=shuffle 4=ab */ | ||
602 | int next_folder; /* move to next folder */ | ||
603 | int recursive_dir_insert; /* should directories be inserted recursively */ | ||
604 | bool fade_on_stop; /* fade on pause/unpause/stop */ | ||
605 | bool playlist_shuffle; | ||
606 | bool warnon_erase_dynplaylist; /* warn when erasing dynamic playlist */ | ||
607 | |||
557 | /* playlist viewer settings */ | 608 | /* playlist viewer settings */ |
558 | bool playlist_viewer_icons; /* display icons on viewer */ | 609 | bool playlist_viewer_icons; /* display icons on viewer */ |
559 | bool playlist_viewer_indices; /* display playlist indices on viewer */ | 610 | bool playlist_viewer_indices; /* display playlist indices on viewer */ |
@@ -569,116 +620,59 @@ struct user_settings | |||
569 | bool talk_battery_level; | 620 | bool talk_battery_level; |
570 | 621 | ||
571 | /* file browser sorting */ | 622 | /* file browser sorting */ |
572 | int sort_file; /* 0=alpha, 1=date, 2=date (new first), 3=type */ | 623 | bool sort_case; /* dir sort order: 0=case insensitive, 1=sensitive */ |
573 | int sort_dir; /* 0=alpha, 1=date (old first), 2=date (new first) */ | 624 | int sort_file; /* 0=alpha, 1=date, 2=date (new first), 3=type */ |
574 | 625 | int sort_dir; /* 0=alpha, 1=date (old first), 2=date (new first) */ | |
575 | #ifdef HAVE_REMOTE_LCD | ||
576 | /* remote lcd */ | ||
577 | int remote_contrast; /* lcd contrast: 0-63 0=low 63=high */ | ||
578 | bool remote_invert; /* invert display */ | ||
579 | bool remote_flip_display; /* turn display (and button layout) by 180 degrees */ | ||
580 | int remote_backlight_timeout; /* backlight off timeout: 0-18 0=never, | ||
581 | 1=always, | ||
582 | then according to timeout_values[] */ | ||
583 | int remote_backlight_timeout_plugged; | ||
584 | bool remote_caption_backlight; /* turn on backlight at end and start of track */ | ||
585 | #ifdef HAS_REMOTE_BUTTON_HOLD | ||
586 | int remote_backlight_on_button_hold; /* what to do with remote backlight when hold | ||
587 | switch is on */ | ||
588 | #endif | ||
589 | #ifdef HAVE_REMOTE_LCD_TICKING | ||
590 | bool remote_reduce_ticking; /* 0=normal operation, | ||
591 | 1=EMI reduce on with cost more CPU. */ | ||
592 | #endif | ||
593 | #endif /* HAVE_REMOTE_LCD */ | ||
594 | |||
595 | int next_folder; /* move to next folder */ | ||
596 | bool runtimedb; /* runtime database active? */ | ||
597 | 626 | ||
598 | #if CONFIG_CODEC == SWCODEC | 627 | /* power settings */ |
599 | bool replaygain; /* enable replaygain */ | 628 | int poweroff; /* idle power off timer */ |
600 | bool replaygain_noclip; /* scale to prevent clips */ | 629 | int battery_capacity; /* in mAh */ |
601 | int replaygain_type; /* 0=track gain, 1=album gain, 2=track gain if | ||
602 | shuffle is on, album gain otherwise */ | ||
603 | int replaygain_preamp; /* scale replaygained tracks by this */ | ||
604 | int beep; /* system beep volume when changing tracks etc. */ | ||
605 | 630 | ||
606 | /* Crossfeed settings */ | 631 | #if BATTERY_TYPES_COUNT > 1 |
607 | bool crossfeed; /* enable crossfeed */ | 632 | int battery_type; /* for units which can take multiple types (Ondio). */ |
608 | unsigned int crossfeed_direct_gain; /* dB x 10 */ | ||
609 | unsigned int crossfeed_cross_gain; /* dB x 10 */ | ||
610 | unsigned int crossfeed_hf_attenuation; /* dB x 10 */ | ||
611 | unsigned int crossfeed_hf_cutoff; /* Frequency in Hz */ | ||
612 | #endif | ||
613 | #ifdef HAVE_DIRCACHE | ||
614 | bool dircache; /* enable directory cache */ | ||
615 | #endif | ||
616 | #ifdef HAVE_TAGCACHE | ||
617 | #ifdef HAVE_TC_RAMCACHE | ||
618 | bool tagcache_ram; /* load tagcache to ram? */ | ||
619 | #endif | 633 | #endif |
620 | bool tagcache_autoupdate; /* automatically keep tagcache in sync? */ | 634 | #ifdef HAVE_SPDIF_POWER |
635 | bool spdif_enable; /* S/PDIF power on/off */ | ||
621 | #endif | 636 | #endif |
622 | int default_codepage; /* set default codepage for tag conversion */ | 637 | #ifdef HAVE_USB_CHARGING_ENABLE |
623 | #ifdef HAVE_REMOTE_LCD | 638 | bool usb_charging; |
624 | unsigned char rwps_file[MAX_FILENAME+1]; /* last remote-wps */ | ||
625 | #endif | 639 | #endif |
626 | 640 | ||
627 | #if CONFIG_CODEC == SWCODEC | 641 | /* device settings */ |
628 | bool eq_enabled; /* Enable equalizer */ | 642 | #ifdef HAVE_LCD_CONTRAST |
629 | unsigned int eq_precut; /* dB */ | 643 | int contrast; /* lcd contrast */ |
630 | |||
631 | /* Order is important here, must be cutoff, q, then gain for each band. | ||
632 | See dsp_eq_update_data in dsp.c for why. */ | ||
633 | |||
634 | /* Band 0 settings */ | ||
635 | int eq_band0_cutoff; /* Hz */ | ||
636 | int eq_band0_q; | ||
637 | int eq_band0_gain; /* +/- dB */ | ||
638 | |||
639 | /* Band 1 settings */ | ||
640 | int eq_band1_cutoff; /* Hz */ | ||
641 | int eq_band1_q; | ||
642 | int eq_band1_gain; /* +/- dB */ | ||
643 | |||
644 | /* Band 2 settings */ | ||
645 | int eq_band2_cutoff; /* Hz */ | ||
646 | int eq_band2_q; | ||
647 | int eq_band2_gain; /* +/- dB */ | ||
648 | |||
649 | /* Band 3 settings */ | ||
650 | int eq_band3_cutoff; /* Hz */ | ||
651 | int eq_band3_q; | ||
652 | int eq_band3_gain; /* +/- dB */ | ||
653 | |||
654 | /* Band 4 settings */ | ||
655 | int eq_band4_cutoff; /* Hz */ | ||
656 | int eq_band4_q; | ||
657 | int eq_band4_gain; /* +/- dB */ | ||
658 | |||
659 | bool dithering_enabled; | ||
660 | #endif | 644 | #endif |
661 | 645 | ||
662 | 646 | #ifdef HAVE_LCD_BITMAP | |
663 | #if LCD_DEPTH > 1 | 647 | #ifdef HAVE_LCD_INVERT |
664 | unsigned char backdrop_file[MAX_FILENAME+1]; /* backdrop bitmap file */ | 648 | bool invert; /* invert display */ |
665 | #endif | 649 | #endif |
650 | #ifdef HAVE_LCD_FLIP | ||
651 | bool flip_display; /* turn display (and button layout) by 180 degrees */ | ||
652 | #endif | ||
653 | int cursor_style; /* style of the selection cursor */ | ||
654 | int screen_scroll_step; | ||
655 | int show_path_in_browser; /* 0=off, 1=current directory, 2=full path */ | ||
656 | bool offset_out_of_view; | ||
657 | unsigned char icon_file[MAX_FILENAME+1]; | ||
658 | unsigned char viewers_icon_file[MAX_FILENAME+1]; | ||
659 | unsigned char font_file[MAX_FILENAME+1]; /* last font */ | ||
660 | unsigned char kbd_file[MAX_FILENAME+1]; /* last keyboard */ | ||
661 | #endif /* HAVE_LCD_BITMAP */ | ||
666 | 662 | ||
667 | bool warnon_erase_dynplaylist; /* warn when erasing dynamic playlist */ | 663 | #ifdef HAVE_LCD_CHARCELLS |
668 | bool scroll_paginated; /* 0=dont 1=do */ | 664 | int jump_scroll; /* Fast jump when scrolling */ |
669 | #ifdef HAVE_LCD_COLOR | 665 | int jump_scroll_delay; /* Delay between jump scroll screens */ |
670 | int bg_color; /* background color native format */ | ||
671 | int fg_color; /* foreground color native format */ | ||
672 | int lss_color; /* background color for the selector or start color for the gradient */ | ||
673 | int lse_color; /* end color for the selector gradient */ | ||
674 | int lst_color; /* color of the text for the selector */ | ||
675 | #endif | 666 | #endif |
676 | bool party_mode; /* party mode - unstoppable music */ | ||
677 | 667 | ||
678 | #ifdef HAVE_BACKLIGHT | 668 | #ifdef HAVE_BACKLIGHT |
669 | int backlight_timeout; /* backlight off timeout: 0-18 0=never, | ||
670 | 1=always, | ||
671 | then according to timeout_values[] */ | ||
672 | bool caption_backlight; /* turn on backlight at end and start of track */ | ||
679 | bool bl_filter_first_keypress; /* filter first keypress when dark? */ | 673 | bool bl_filter_first_keypress; /* filter first keypress when dark? */ |
680 | #ifdef HAVE_REMOTE_LCD | 674 | #if CONFIG_CHARGING |
681 | bool remote_bl_filter_first_keypress; /* filter first remote keypress when remote dark? */ | 675 | int backlight_timeout_plugged; |
682 | #endif | 676 | #endif |
683 | #ifdef HAS_BUTTON_HOLD | 677 | #ifdef HAS_BUTTON_HOLD |
684 | int backlight_on_button_hold; /* what to do with backlight when hold | 678 | int backlight_on_button_hold; /* what to do with backlight when hold |
@@ -688,93 +682,67 @@ struct user_settings | |||
688 | int lcd_sleep_after_backlight_off; /* when to put lcd to sleep after backlight | 682 | int lcd_sleep_after_backlight_off; /* when to put lcd to sleep after backlight |
689 | has turned off */ | 683 | has turned off */ |
690 | #endif | 684 | #endif |
691 | #endif /* HAVE_BACKLIGHT */ | 685 | #if defined(HAVE_BACKLIGHT_PWM_FADING) |
692 | 686 | int backlight_fade_in; /* backlight fade in timing: 0..3 */ | |
693 | #ifdef HAVE_LCD_BITMAP | 687 | int backlight_fade_out; /* backlight fade in timing: 0..7 */ |
694 | unsigned char kbd_file[MAX_FILENAME+1]; /* last keyboard */ | 688 | #elif defined(USE_BACKLIGHT_SW_FADING) \ |
695 | #endif | 689 | || defined(USE_BACKLIGHT_CUSTOM_FADING_BOOL) |
696 | 690 | bool backlight_fade_in; | |
697 | #ifdef HAVE_USB_CHARGING_ENABLE | 691 | bool backlight_fade_out; |
698 | bool usb_charging; | ||
699 | #endif | ||
700 | |||
701 | bool hold_lr_for_scroll_in_list; /* hold L/R scrolls the list left/right */ | ||
702 | #ifdef HAVE_LCD_BITMAP | ||
703 | int show_path_in_browser; /* 0=off, 1=current directory, 2=full path */ | ||
704 | #endif | ||
705 | |||
706 | #ifdef HAVE_HEADPHONE_DETECTION | ||
707 | int unplug_mode; /* pause on headphone unplug */ | ||
708 | int unplug_rw; /* time in s to rewind when pausing */ | ||
709 | bool unplug_autoresume; /* disable auto-resume if no phones */ | ||
710 | #endif | 692 | #endif |
711 | #if CONFIG_TUNER | 693 | #ifdef HAVE_BACKLIGHT_BRIGHTNESS |
712 | int fm_region; | 694 | int brightness; |
713 | #endif | 695 | #endif |
714 | bool audioscrobbler; /* Audioscrobbler logging */ | 696 | #endif /* HAVE_BACKLIGHT */ |
715 | |||
716 | /* If values are just added to the end, no need to bump plugin API | ||
717 | version. */ | ||
718 | /* new stuff to be added at the end */ | ||
719 | 697 | ||
720 | #if defined(HAVE_RECORDING) && CONFIG_CODEC == SWCODEC | ||
721 | /* Encoder Settings Start - keep these together */ | ||
722 | struct mp3_enc_config mp3_enc_config; | ||
723 | #if 0 /* These currently contain no members but their places in line | ||
724 | should be held */ | ||
725 | struct aiff_enc_config aiff_enc_config; | ||
726 | struct wav_enc_config wav_enc_config; | ||
727 | struct wavpack_enc_config wavpack_enc_config; | ||
728 | #endif | ||
729 | /* Encoder Settings End */ | ||
730 | #endif /* CONFIG_CODEC == SWCODEC */ | ||
731 | bool cuesheet; | ||
732 | int start_in_screen; | ||
733 | #if defined(HAVE_RTC_ALARM) && \ | ||
734 | (defined(HAVE_RECORDING) || CONFIG_TUNER) | ||
735 | int alarm_wake_up_screen; | ||
736 | #endif | ||
737 | /* customizable icons */ | ||
738 | #ifdef HAVE_LCD_BITMAP | ||
739 | unsigned char icon_file[MAX_FILENAME+1]; | ||
740 | unsigned char viewers_icon_file[MAX_FILENAME+1]; | ||
741 | #endif | ||
742 | #ifdef HAVE_REMOTE_LCD | 698 | #ifdef HAVE_REMOTE_LCD |
699 | /* remote lcd */ | ||
700 | int remote_contrast; /* lcd contrast: 0-63 0=low 63=high */ | ||
701 | int remote_backlight_timeout; /* backlight off timeout: 0-18 0=never, | ||
702 | 1=always, then according to timeout_values[] */ | ||
703 | int remote_backlight_timeout_plugged; | ||
704 | int remote_scroll_speed; /* long texts scrolling speed: 1-30 */ | ||
705 | int remote_scroll_delay; /* delay (in 1/10s) before starting scroll */ | ||
706 | int remote_scroll_step; /* pixels to advance per update */ | ||
707 | int remote_bidir_limit; /* bidir scroll length limit */ | ||
708 | bool remote_invert; /* invert display */ | ||
709 | bool remote_flip_display; /* turn display (and button layout) by 180 degrees */ | ||
710 | bool remote_caption_backlight; /* turn on backlight at end and start of track */ | ||
711 | bool remote_bl_filter_first_keypress; /* filter first remote keypress when remote dark? */ | ||
743 | unsigned char remote_icon_file[MAX_FILENAME+1]; | 712 | unsigned char remote_icon_file[MAX_FILENAME+1]; |
744 | unsigned char remote_viewers_icon_file[MAX_FILENAME+1]; | 713 | unsigned char remote_viewers_icon_file[MAX_FILENAME+1]; |
714 | unsigned char rwps_file[MAX_FILENAME+1]; /* last remote-wps */ | ||
715 | #ifdef HAS_REMOTE_BUTTON_HOLD | ||
716 | int remote_backlight_on_button_hold; /* what to do with remote backlight when hold | ||
717 | switch is on */ | ||
745 | #endif | 718 | #endif |
746 | #ifdef HAVE_LCD_COLOR | 719 | #ifdef HAVE_REMOTE_LCD_TICKING |
747 | unsigned char colors_file[MAX_FILENAME+1]; | 720 | bool remote_reduce_ticking; /* 0=normal operation, |
721 | 1=EMI reduce on with cost more CPU. */ | ||
748 | #endif | 722 | #endif |
723 | #endif /* HAVE_REMOTE_LCD */ | ||
724 | |||
725 | #if CONFIG_CODEC == MAS3507D | ||
726 | bool line_in; /* false=off, true=active */ | ||
727 | #endif | ||
728 | |||
749 | #ifdef HAVE_BUTTON_LIGHT | 729 | #ifdef HAVE_BUTTON_LIGHT |
750 | int buttonlight_timeout; | 730 | int buttonlight_timeout; |
751 | #endif | 731 | #endif |
752 | #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS | 732 | #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS |
753 | int buttonlight_brightness; | 733 | int buttonlight_brightness; |
754 | #endif | 734 | #endif |
755 | #ifndef HAVE_SCROLLWHEEL | 735 | |
756 | int list_accel_start_delay; /* ms before we start increaseing step size */ | 736 | #ifdef IPOD_ACCESSORY_PROTOCOL |
757 | int list_accel_wait; /* ms between increases */ | 737 | int serial_bitrate; /* 0=auto 1=9600 2=19200 3=38400 4=57600 */ |
758 | #endif | ||
759 | #ifdef HAVE_USBSTACK | ||
760 | int usb_stack_mode; /* device or host */ | ||
761 | unsigned char usb_stack_device_driver[32]; /* usb device driver to load */ | ||
762 | #endif | ||
763 | #if CONFIG_CODEC == SWCODEC | ||
764 | int keyclick; /* keyclick volume */ | ||
765 | int keyclick_repeats; /* keyclick on repeats */ | ||
766 | #endif | ||
767 | unsigned char playlist_catalog_dir[MAX_FILENAME+1]; | ||
768 | int skip_length; /* skip length */ | ||
769 | #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING | ||
770 | int touchpad_sensitivity; | ||
771 | #endif | 738 | #endif |
772 | #ifdef HAVE_QUICKSCREEN | 739 | #ifdef HAVE_ACCESSORY_SUPPLY |
773 | /* these are split because settings_list cant handle arrays */ | 740 | bool accessory_supply; /* 0=off 1=on, accessory power supply for iPod */ |
774 | int qs_item_left; | ||
775 | int qs_item_right; | ||
776 | int qs_item_bottom; | ||
777 | #endif | 741 | #endif |
742 | |||
743 | /* If values are just added to the end, no need to bump plugin API | ||
744 | version. */ | ||
745 | /* new stuff to be added at the end */ | ||
778 | }; | 746 | }; |
779 | 747 | ||
780 | /** global variables **/ | 748 | /** global variables **/ |