This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Rockbox - 10 Band EQ w/ Presets

By: a guest on Jan 22nd, 2013  |  syntax: None  |  size: 131.56 KB  |  views: 100  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff --git a/apps/menus/eq_menu.c b/apps/menus/eq_menu.c
  2. index 7ece92e..dddeb14 100644
  3. --- a/apps/menus/eq_menu.c
  4. +++ b/apps/menus/eq_menu.c
  5. @@ -106,6 +106,16 @@ MENUITEM_SETTING(cutoff_3, &global_settings.eq_band_settings[3].cutoff,
  6.                   eq_setting_callback);
  7.  MENUITEM_SETTING(cutoff_4, &global_settings.eq_band_settings[4].cutoff,
  8.                   eq_setting_callback);
  9. +MENUITEM_SETTING(cutoff_5, &global_settings.eq_band_settings[5].cutoff,
  10. +                 eq_setting_callback);
  11. +MENUITEM_SETTING(cutoff_6, &global_settings.eq_band_settings[6].cutoff,
  12. +                 eq_setting_callback);
  13. +MENUITEM_SETTING(cutoff_7, &global_settings.eq_band_settings[7].cutoff,
  14. +                 eq_setting_callback);
  15. +MENUITEM_SETTING(cutoff_8, &global_settings.eq_band_settings[8].cutoff,
  16. +                 eq_setting_callback);
  17. +MENUITEM_SETTING(cutoff_9, &global_settings.eq_band_settings[9].cutoff,
  18. +                 eq_setting_callback);
  19.  
  20.  MENUITEM_SETTING(q_0, &global_settings.eq_band_settings[0].q,
  21.                   eq_setting_callback);
  22. @@ -117,6 +127,16 @@ MENUITEM_SETTING(q_3, &global_settings.eq_band_settings[3].q,
  23.                   eq_setting_callback);
  24.  MENUITEM_SETTING(q_4, &global_settings.eq_band_settings[4].q,
  25.                   eq_setting_callback);
  26. +MENUITEM_SETTING(q_5, &global_settings.eq_band_settings[5].q,
  27. +                 eq_setting_callback);
  28. +MENUITEM_SETTING(q_6, &global_settings.eq_band_settings[6].q,
  29. +                 eq_setting_callback);
  30. +MENUITEM_SETTING(q_7, &global_settings.eq_band_settings[7].q,
  31. +                 eq_setting_callback);
  32. +MENUITEM_SETTING(q_8, &global_settings.eq_band_settings[8].q,
  33. +                 eq_setting_callback);
  34. +MENUITEM_SETTING(q_9, &global_settings.eq_band_settings[9].q,
  35. +                 eq_setting_callback);
  36.  
  37.  MENUITEM_SETTING(gain_0, &global_settings.eq_band_settings[0].gain,
  38.                   eq_setting_callback);
  39. @@ -128,6 +148,16 @@ MENUITEM_SETTING(gain_3, &global_settings.eq_band_settings[3].gain,
  40.                   eq_setting_callback);
  41.  MENUITEM_SETTING(gain_4, &global_settings.eq_band_settings[4].gain,
  42.                   eq_setting_callback);
  43. +MENUITEM_SETTING(gain_5, &global_settings.eq_band_settings[5].gain,
  44. +                 eq_setting_callback);
  45. +MENUITEM_SETTING(gain_6, &global_settings.eq_band_settings[6].gain,
  46. +                 eq_setting_callback);
  47. +MENUITEM_SETTING(gain_7, &global_settings.eq_band_settings[7].gain,
  48. +                 eq_setting_callback);
  49. +MENUITEM_SETTING(gain_8, &global_settings.eq_band_settings[8].gain,
  50. +                 eq_setting_callback);
  51. +MENUITEM_SETTING(gain_9, &global_settings.eq_band_settings[9].gain,
  52. +                 eq_setting_callback);
  53.  
  54.  static char* gainitem_get_name(int selected_item, void * data, char *buffer)
  55.  {
  56. @@ -181,14 +211,46 @@ MENUITEM_FUNCTION_DYNTEXT(gain_item_4, MENU_FUNC_USEPARAM,
  57.                            gainitem_get_name, gainitem_speak_item,
  58.                            &global_settings.eq_band_settings[4].cutoff,
  59.                            NULL, Icon_NOICON);
  60. +MENUITEM_FUNCTION_DYNTEXT(gain_item_5, MENU_FUNC_USEPARAM,
  61. +                          do_option, (void*)&gain_5,
  62. +                          gainitem_get_name, gainitem_speak_item,
  63. +                          &global_settings.eq_band_settings[5].cutoff,
  64. +                          NULL, Icon_NOICON);
  65. +MENUITEM_FUNCTION_DYNTEXT(gain_item_6, MENU_FUNC_USEPARAM,
  66. +                          do_option, (void*)&gain_6,
  67. +                          gainitem_get_name, gainitem_speak_item,
  68. +                          &global_settings.eq_band_settings[6].cutoff,
  69. +                          NULL, Icon_NOICON);
  70. +MENUITEM_FUNCTION_DYNTEXT(gain_item_7, MENU_FUNC_USEPARAM,
  71. +                          do_option, (void*)&gain_7,
  72. +                          gainitem_get_name, gainitem_speak_item,
  73. +                          &global_settings.eq_band_settings[7].cutoff,
  74. +                          NULL, Icon_NOICON);
  75. +MENUITEM_FUNCTION_DYNTEXT(gain_item_8, MENU_FUNC_USEPARAM,
  76. +                          do_option, (void*)&gain_8,
  77. +                          gainitem_get_name, gainitem_speak_item,
  78. +                          &global_settings.eq_band_settings[8].cutoff,
  79. +                          NULL, Icon_NOICON);
  80. +MENUITEM_FUNCTION_DYNTEXT(gain_item_9, MENU_FUNC_USEPARAM,
  81. +                          do_option, (void*)&gain_9,
  82. +                          gainitem_get_name, gainitem_speak_item,
  83. +                          &global_settings.eq_band_settings[9].cutoff,
  84. +                          NULL, Icon_NOICON);
  85.                                      
  86.  MAKE_MENU(gain_menu, ID2P(LANG_EQUALIZER_GAIN), NULL, Icon_NOICON, &gain_item_0,
  87. -            &gain_item_1, &gain_item_2, &gain_item_3, &gain_item_4);
  88. +            &gain_item_1, &gain_item_2, &gain_item_3, &gain_item_4,
  89. +            &gain_item_5, &gain_item_6, &gain_item_7, &gain_item_8,
  90. +           &gain_item_9);
  91.  
  92. -static const struct menu_item_ex *band_items[3][3] = {
  93. +static const struct menu_item_ex *band_items[8][3] = {
  94.      { &cutoff_1, &q_1, &gain_1 },
  95.      { &cutoff_2, &q_2, &gain_2 },
  96. -    { &cutoff_3, &q_3, &gain_3 }
  97. +    { &cutoff_3, &q_3, &gain_3 },
  98. +    { &cutoff_4, &q_4, &gain_4 },
  99. +    { &cutoff_5, &q_5, &gain_5 },
  100. +    { &cutoff_6, &q_6, &gain_6 },
  101. +    { &cutoff_7, &q_7, &gain_7 },
  102. +    { &cutoff_8, &q_8, &gain_8 }
  103.  };
  104.  
  105.  static char* centerband_get_name(int selected_item, void * data, char *buffer)
  106. @@ -240,11 +302,32 @@ MENUITEM_FUNCTION_DYNTEXT(band_3_menu, MENU_FUNC_USEPARAM,
  107.                            do_center_band_menu, (void*)3,
  108.                            centerband_get_name, centerband_speak_item,
  109.                            (void*)3, NULL, Icon_EQ);
  110. -MAKE_MENU(band_4_menu, ID2P(LANG_EQUALIZER_BAND_HIGH_SHELF), NULL,
  111. -            Icon_EQ, &cutoff_4, &q_4, &gain_4);
  112. +MENUITEM_FUNCTION_DYNTEXT(band_4_menu, MENU_FUNC_USEPARAM,
  113. +                          do_center_band_menu, (void*)4,
  114. +                          centerband_get_name, centerband_speak_item,
  115. +                          (void*)4, NULL, Icon_EQ);
  116. +MENUITEM_FUNCTION_DYNTEXT(band_5_menu, MENU_FUNC_USEPARAM,
  117. +                          do_center_band_menu, (void*)5,
  118. +                          centerband_get_name, centerband_speak_item,
  119. +                          (void*)5, NULL, Icon_EQ);
  120. +MENUITEM_FUNCTION_DYNTEXT(band_6_menu, MENU_FUNC_USEPARAM,
  121. +                          do_center_band_menu, (void*)6,
  122. +                          centerband_get_name, centerband_speak_item,
  123. +                          (void*)6, NULL, Icon_EQ);
  124. +MENUITEM_FUNCTION_DYNTEXT(band_7_menu, MENU_FUNC_USEPARAM,
  125. +                          do_center_band_menu, (void*)7,
  126. +                          centerband_get_name, centerband_speak_item,
  127. +                          (void*)7, NULL, Icon_EQ);
  128. +MENUITEM_FUNCTION_DYNTEXT(band_8_menu, MENU_FUNC_USEPARAM,
  129. +                          do_center_band_menu, (void*)8,
  130. +                          centerband_get_name, centerband_speak_item,
  131. +                          (void*)8, NULL, Icon_EQ);
  132. +MAKE_MENU(band_9_menu, ID2P(LANG_EQUALIZER_BAND_HIGH_SHELF), NULL,
  133. +            Icon_EQ, &cutoff_9, &q_9, &gain_9);
  134.  
  135.  MAKE_MENU(advanced_eq_menu_, ID2P(LANG_EQUALIZER_ADVANCED), NULL, Icon_EQ,
  136. -            &band_0_menu, &band_1_menu, &band_2_menu, &band_3_menu, &band_4_menu);
  137. +            &band_0_menu, &band_1_menu, &band_2_menu, &band_3_menu, &band_4_menu,
  138. +            &band_5_menu, &band_6_menu, &band_7_menu, &band_8_menu, &band_9_menu);
  139.  
  140.  
  141.  enum eq_slider_mode {
  142. @@ -300,7 +383,7 @@ static int draw_eq_slider(struct screen * screen, int x, int y,
  143.      if (band == 0) {
  144.          screen->putsxy(x1, y1, "LS: ");
  145.          screen->getstringsize("LS:", &w, &h);
  146. -    } else if (band == 4) {
  147. +    } else if (band == 9) {
  148.          screen->putsxy(x1, y1, "HS: ");
  149.          screen->getstringsize("HS:", &w, &h);
  150.      } else {
  151. @@ -370,9 +453,9 @@ static void draw_eq_sliders(struct screen * screen, int x, int y,
  152.  {
  153.      int height = y;
  154.  
  155. -    start_item = MIN(start_item, 5 - nb_eq_sliders);
  156. +    start_item = MIN(start_item, 10 - nb_eq_sliders);
  157.  
  158. -    for (int i = 0; i < 5; i++) {
  159. +    for (int i = 0; i < 10; i++) {
  160.          struct eq_band_setting *setting = &global_settings.eq_band_settings[i];
  161.          int cutoff = setting->cutoff;
  162.          int q      = setting->q;
  163. @@ -390,9 +473,9 @@ static void draw_eq_sliders(struct screen * screen, int x, int y,
  164.          }
  165.      }
  166.  
  167. -    if (nb_eq_sliders != 5)
  168. +    if (nb_eq_sliders != 10)
  169.          gui_scrollbar_draw(screen, 0, y, SCROLLBAR_SIZE - 1,
  170. -                           screen->lcdheight - y, 5,
  171. +                           screen->lcdheight - y, 10,
  172.                             start_item, start_item + nb_eq_sliders,
  173.                             VERTICAL);
  174.      return;
  175. @@ -431,8 +514,8 @@ bool eq_menu_graphical(void)
  176.          if (height > screens[i].lcdheight)
  177.              nb_eq_sliders[i]--;
  178.  
  179. -        if (nb_eq_sliders[i] > 5)
  180. -            nb_eq_sliders[i] = 5;
  181. +        if (nb_eq_sliders[i] > 10)
  182. +            nb_eq_sliders[i] = 10;
  183.      }
  184.  
  185.      y = h + 1;
  186. @@ -489,12 +572,12 @@ bool eq_menu_graphical(void)
  187.              }
  188.  
  189.              /* Draw scrollbar if needed */
  190. -            if (nb_eq_sliders[i] != 5)
  191. +            if (nb_eq_sliders[i] != 10)
  192.              {
  193.                  if (current_band == 0) {
  194.                      start_item = 0;
  195. -                } else if (current_band == 4) {
  196. -                    start_item = 5 - nb_eq_sliders[i];
  197. +                } else if (current_band == 9) {
  198. +                    start_item = 10 - nb_eq_sliders[i];
  199.                  } else {
  200.                      start_item = current_band - 1;
  201.                  }
  202. @@ -547,13 +630,13 @@ bool eq_menu_graphical(void)
  203.          case ACTION_STD_PREVREPEAT:
  204.              current_band--;
  205.              if (current_band < 0)
  206. -                current_band = 4; /* wrap around */
  207. +                current_band = 9; /* wrap around */
  208.              break;
  209.  
  210.          case ACTION_STD_NEXT:
  211.          case ACTION_STD_NEXTREPEAT:
  212.              current_band++;
  213. -            if (current_band > 4)
  214. +            if (current_band > 9)
  215.                  current_band = 0; /* wrap around */
  216.              break;
  217.  
  218. diff --git a/apps/settings_list.c b/apps/settings_list.c
  219. index ef9fe50..e89723d 100644
  220. --- a/apps/settings_list.c
  221. +++ b/apps/settings_list.c
  222. @@ -1443,16 +1443,31 @@ const struct settings_list settings[] = {
  223.                         60, "eq band 0 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  224.                         EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
  225.      INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[1].cutoff, LANG_EQUALIZER_BAND_CENTER,
  226. -                       200, "eq band 1 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  227. +                       170, "eq band 1 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  228.                         EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
  229.      INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[2].cutoff, LANG_EQUALIZER_BAND_CENTER,
  230. -                       800, "eq band 2 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  231. +                       310, "eq band 2 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  232.                         EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
  233.      INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[3].cutoff, LANG_EQUALIZER_BAND_CENTER,
  234. -                       4000, "eq band 3 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  235. +                       600, "eq band 3 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  236.                         EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
  237.      INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[4].cutoff, LANG_EQUALIZER_BAND_CUTOFF,
  238. -                       12000, "eq band 4 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  239. +                       1000, "eq band 4 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  240. +                       EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
  241. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[5].cutoff, LANG_EQUALIZER_BAND_CUTOFF,
  242. +                       3000, "eq band 5 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  243. +                       EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
  244. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[6].cutoff, LANG_EQUALIZER_BAND_CUTOFF,
  245. +                       6000, "eq band 6 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  246. +                       EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
  247. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[7].cutoff, LANG_EQUALIZER_BAND_CUTOFF,
  248. +                       12000, "eq band 7 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  249. +                       EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
  250. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[8].cutoff, LANG_EQUALIZER_BAND_CUTOFF,
  251. +                       14000, "eq band 8 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  252. +                       EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
  253. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[9].cutoff, LANG_EQUALIZER_BAND_CUTOFF,
  254. +                       16000, "eq band 9 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  255.                         EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
  256.      /* 0..64 (or 0.0 to 6.4) */
  257.      INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[0].q, LANG_EQUALIZER_BAND_Q, 7,
  258. @@ -1467,9 +1482,24 @@ const struct settings_list settings[] = {
  259.      INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[3].q, LANG_EQUALIZER_BAND_Q, 10,
  260.                         "eq band 3 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
  261.                         eq_q_format, get_dec_talkid, NULL),
  262. -    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[4].q, LANG_EQUALIZER_BAND_Q, 7,
  263. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[4].q, LANG_EQUALIZER_BAND_Q, 10,
  264.                         "eq band 4 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
  265.                         eq_q_format, get_dec_talkid, NULL),
  266. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[5].q, LANG_EQUALIZER_BAND_Q, 10,
  267. +                       "eq band 5 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
  268. +                       eq_q_format, get_dec_talkid, NULL),
  269. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[6].q, LANG_EQUALIZER_BAND_Q, 10,
  270. +                       "eq band 6 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
  271. +                       eq_q_format, get_dec_talkid, NULL),
  272. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[7].q, LANG_EQUALIZER_BAND_Q, 10,
  273. +                       "eq band 7 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
  274. +                       eq_q_format, get_dec_talkid, NULL),
  275. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[8].q, LANG_EQUALIZER_BAND_Q, 10,
  276. +                       "eq band 8 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
  277. +                       eq_q_format, get_dec_talkid, NULL),
  278. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[9].q, LANG_EQUALIZER_BAND_Q, 7,
  279. +                       "eq band 9 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
  280. +                       eq_q_format, get_dec_talkid, NULL),
  281.      /* -240..240 (or -24db to +24db) */
  282.      INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[0].gain, LANG_GAIN, 0,
  283.                         "eq band 0 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
  284. @@ -1486,6 +1516,21 @@ const struct settings_list settings[] = {
  285.      INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[4].gain, LANG_GAIN, 0,
  286.                         "eq band 4 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
  287.                         EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
  288. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[5].gain, LANG_GAIN, 0,
  289. +                       "eq band 5 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
  290. +                       EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
  291. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[6].gain, LANG_GAIN, 0,
  292. +                       "eq band 6 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
  293. +                       EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
  294. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[7].gain, LANG_GAIN, 0,
  295. +                       "eq band 7 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
  296. +                       EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
  297. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[8].gain, LANG_GAIN, 0,
  298. +                       "eq band 8 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
  299. +                       EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
  300. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[9].gain, LANG_GAIN, 0,
  301. +                       "eq band 9 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
  302. +                       EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
  303.  
  304.      /* dithering */
  305.      OFFON_SETTING(F_SOUNDSETTING, dithering_enabled, LANG_DITHERING, false,
  306. diff --git a/apps/settings_list.c.orig b/apps/settings_list.c.orig
  307. new file mode 100644
  308. index 0000000..ef9fe50
  309. --- /dev/null
  310. +++ b/apps/settings_list.c.orig
  311. @@ -0,0 +1,1962 @@
  312. +/***************************************************************************
  313. + *             __________               __   ___.
  314. + *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
  315. + *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
  316. + *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
  317. + *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
  318. + *                     \/            \/     \/    \/            \/
  319. + * $Id$
  320. + *
  321. + * Copyright (C) 2007 Jonathan Gordon
  322. + *
  323. + * This program is free software; you can redistribute it and/or
  324. + * modify it under the terms of the GNU General Public License
  325. + * as published by the Free Software Foundation; either version 2
  326. + * of the License, or (at your option) any later version.
  327. + *
  328. + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  329. + * KIND, either express or implied.
  330. + *
  331. + ****************************************************************************/
  332. +
  333. +#include "config.h"
  334. +#include <stdbool.h>
  335. +#include "string-extra.h"
  336. +#include "system.h"
  337. +#include "storage.h"
  338. +#include "lang.h"
  339. +#include "talk.h"
  340. +#include "lcd.h"
  341. +#include "button.h"
  342. +#include "backlight.h"
  343. +#include "sound.h"
  344. +#include "settings.h"
  345. +#include "settings_list.h"
  346. +#include "usb.h"
  347. +#include "audio.h"
  348. +#include "power.h"
  349. +#include "powermgmt.h"
  350. +#include "kernel.h"
  351. +#ifdef HAVE_REMOTE_LCD
  352. +#include "lcd-remote.h"
  353. +#endif
  354. +#include "list.h"
  355. +#include "rbunicode.h"
  356. +#ifdef HAVE_LCD_BITMAP
  357. +#include "peakmeter.h"
  358. +#endif
  359. +#include "menus/eq_menu.h"
  360. +#if CONFIG_TUNER
  361. +#include "radio.h"
  362. +#endif
  363. +#ifdef IPOD_ACCESSORY_PROTOCOL
  364. +#include "iap.h"
  365. +#endif
  366. +#include "statusbar.h"
  367. +#ifdef HAVE_TOUCHSCREEN
  368. +#include "touchscreen.h"
  369. +#include "ctype.h" /* For isspace() */
  370. +#endif
  371. +#ifdef HAVE_HOTKEY
  372. +#include "onplay.h"
  373. +#endif
  374. +
  375. +#define NVRAM(bytes) (bytes<<F_NVRAM_MASK_SHIFT)
  376. +/** NOTE: NVRAM_CONFIG_VERSION is in settings_list.h
  377. +     and you may need to update it if you edit this file */
  378. +
  379. +#define UNUSED {.RESERVED=NULL}
  380. +#define INT(a) {.int_ = a}
  381. +#define UINT(a) {.uint_ = a}
  382. +#define BOOL(a) {.bool_ = a}
  383. +#define CHARPTR(a) {.charptr = a}
  384. +#define UCHARPTR(a) {.ucharptr = a}
  385. +#define FUNCTYPE(a) {.func = a}
  386. +#define NODEFAULT INT(0)
  387. +
  388. +/* in all the following macros the args are:
  389. +    - flags: bitwise | or the F_ bits in settings_list.h
  390. +    - var: pointer to the variable being changed (usually in global_settings)
  391. +    - lang_id: LANG_* id to display in menus and setting screens for the setting
  392. +    - default: the default value for the variable, set if settings are reset
  393. +    - name: the name of the setting in config files
  394. +    - cfg_vals: comma separated list of legal values to write to cfg files.
  395. +                The values correspond to the values 0,1,2,etc. of the setting.
  396. +                NULL if just the number itself should be written to the file.
  397. +                No spaces between the values and the commas!
  398. +    - cb: the callback used by the setting screen.
  399. +*/
  400. +
  401. +/* Use for int settings which use the set_sound() function to set them */
  402. +#define SOUND_SETTING(flags,var,lang_id,name,setting)                      \
  403. +            {flags|F_T_INT|F_T_SOUND|F_SOUNDSETTING, &global_settings.var, \
  404. +                lang_id, NODEFAULT,name,NULL,                              \
  405. +                {.sound_setting=(struct sound_setting[]){{setting}}} }
  406. +
  407. +/* Use for bool variables which don't use LANG_SET_BOOL_YES and LANG_SET_BOOL_NO
  408. +      or dont save as "off" or "on" in the cfg.
  409. +   cfgvals are comma separated values (without spaces after the comma!) to write
  410. +      for 'false' and 'true' (in this order)
  411. +   yes_id is the lang_id for the 'yes' (or 'on') option in the menu
  412. +   no_id is the lang_id for the 'no' (or 'off') option in the menu
  413. + */
  414. +#define BOOL_SETTING(flags,var,lang_id,default,name,cfgvals,yes_id,no_id,cb)\
  415. +            {flags|F_BOOL_SETTING, &global_settings.var,                    \
  416. +                lang_id, BOOL(default),name,cfgvals,                        \
  417. +                {.bool_setting=(struct bool_setting[]){{cb,yes_id,no_id}}} }
  418. +
  419. +/* bool setting which does use LANG_YES and _NO and save as "off,on" */
  420. +#define OFFON_SETTING(flags,var,lang_id,default,name,cb)                    \
  421. +            BOOL_SETTING(flags,var,lang_id,default,name,off_on,             \
  422. +                LANG_SET_BOOL_YES,LANG_SET_BOOL_NO,cb)
  423. +
  424. +/* int variable which is NOT saved to .cfg files,
  425. +    (Use NVRAM() in the flags to save to the nvram (or nvram.bin file) */
  426. +#define SYSTEM_SETTING(flags,var,default)                           \
  427. +            {flags|F_T_INT, &global_status.var,-1, INT(default),    \
  428. +                NULL, NULL, UNUSED}
  429. +
  430. +/* setting which stores as a filename (or another string) in the .cfgvals
  431. +    The string must be a char array (which all of our string settings are),
  432. +    not just a char pointer.
  433. +    prefix: The absolute path to not save in the variable, ex /.rockbox/wps_file
  434. +    suffix: The file extention (usually...) e.g .wps_file
  435. +    If the prefix is set (not NULL), then the suffix must be set as well.
  436. + */
  437. +#define TEXT_SETTING(flags,var,name,default,prefix,suffix)      \
  438. +            {flags|F_T_UCHARPTR, &global_settings.var,-1,           \
  439. +                CHARPTR(default),name,NULL,                         \
  440. +                {.filename_setting=                                 \
  441. +                    (struct filename_setting[]){                    \
  442. +                        {prefix,suffix,sizeof(global_settings.var)}}} }
  443. +
  444. +/*  Used for settings which use the set_option() setting screen.
  445. +    The ... arg is a list of pointers to strings to display in the setting
  446. +    screen. These can either be literal strings, or ID2P(LANG_*) */
  447. +#define CHOICE_SETTING(flags,var,lang_id,default,name,cfg_vals,cb,count,...)   \
  448. +            {flags|F_CHOICE_SETTING|F_T_INT,  &global_settings.var, lang_id,   \
  449. +                INT(default), name, cfg_vals,                                  \
  450. +                {.choice_setting = (struct choice_setting[]){                  \
  451. +                    {cb, count, {.desc = (const unsigned char*[])              \
  452. +                        {__VA_ARGS__}}}}}}
  453. +
  454. +/* Similar to above, except the strings to display are taken from cfg_vals,
  455. +   the ... arg is a list of ID's to talk for the strings, can use TALK_ID()'s */
  456. +#define STRINGCHOICE_SETTING(flags,var,lang_id,default,name,cfg_vals,          \
  457. +                                                                cb,count,...)  \
  458. +            {flags|F_CHOICE_SETTING|F_T_INT|F_CHOICETALKS,                     \
  459. +                &global_settings.var, lang_id,                                 \
  460. +                INT(default), name, cfg_vals,                                  \
  461. +                {.choice_setting = (struct choice_setting[]){                  \
  462. +                    {cb, count, {.talks = (const int[]){__VA_ARGS__}}}}}}
  463. +
  464. +/*  for settings which use the set_int() setting screen.
  465. +    unit is the UNIT_ define to display/talk.
  466. +    the first one saves a string to the config file,
  467. +    the second one saves the variable value to the config file */    
  468. +#define INT_SETTING_W_CFGVALS(flags, var, lang_id, default, name, cfg_vals, \
  469. +                    unit, min, max, step, formatter, get_talk_id, cb)       \
  470. +            {flags|F_INT_SETTING|F_T_INT, &global_settings.var,             \
  471. +                lang_id, INT(default), name, cfg_vals,                      \
  472. +                 {.int_setting = (struct int_setting[]){                    \
  473. +                    {cb, unit, min, max, step, formatter, get_talk_id}}}}
  474. +#define INT_SETTING(flags, var, lang_id, default, name,                 \
  475. +                    unit, min, max, step, formatter, get_talk_id, cb)   \
  476. +            {flags|F_INT_SETTING|F_T_INT, &global_settings.var,         \
  477. +                lang_id, INT(default), name, NULL,                      \
  478. +                 {.int_setting = (struct int_setting[]){                \
  479. +                    {cb, unit, min, max, step, formatter, get_talk_id}}}}
  480. +#define INT_SETTING_NOWRAP(flags, var, lang_id, default, name,             \
  481. +                    unit, min, max, step, formatter, get_talk_id, cb)      \
  482. +            {flags|F_INT_SETTING|F_T_INT|F_NO_WRAP, &global_settings.var,  \
  483. +                lang_id, INT(default), name, NULL,                         \
  484. +                 {.int_setting = (struct int_setting[]){                   \
  485. +                    {cb, unit, min, max, step, formatter, get_talk_id}}}}
  486. +
  487. +#define TABLE_SETTING(flags, var, lang_id, default, name, cfg_vals, \
  488. +                      unit, formatter, get_talk_id, cb, count, ...) \
  489. +            {flags|F_TABLE_SETTING|F_T_INT, &global_settings.var,   \
  490. +                lang_id, INT(default), name, cfg_vals,              \
  491. +                {.table_setting = (struct table_setting[]) {        \
  492. +                    {cb, formatter, get_talk_id, unit, count,       \
  493. +                    (const int[]){__VA_ARGS__}}}}}
  494. +
  495. +#define CUSTOM_SETTING(flags, var, lang_id, default, name,              \
  496. +                       load_from_cfg, write_to_cfg,                     \
  497. +                       is_change, set_default)                          \
  498. +            {flags|F_CUSTOM_SETTING|F_T_CUSTOM|F_BANFROMQS,             \
  499. +                &global_settings.var, lang_id,                          \
  500. +                {.custom = (void*)default}, name, NULL,                 \
  501. +            {.custom_setting = (struct custom_setting[]){               \
  502. +        {load_from_cfg, write_to_cfg, is_change, set_default}}}}
  503. +
  504. +#define VIEWPORT_SETTING(var,name)      \
  505. +        TEXT_SETTING(F_THEMESETTING,var,name,"-", NULL, NULL)
  506. +
  507. +/* some sets of values which are used more than once, to save memory */
  508. +static const char off_on[] = "off,on";
  509. +static const char off_on_ask[] = "off,on,ask";
  510. +static const char off_number_spell[] = "off,number,spell";
  511. +#ifdef HAVE_LCD_BITMAP
  512. +static const char graphic_numeric[] = "graphic,numeric";
  513. +#endif
  514. +
  515. +/* Default theme settings */
  516. +#define DEFAULT_WPSNAME  "cabbiev2"
  517. +#define DEFAULT_SBSNAME  "-"
  518. +#define DEFAULT_FMS_NAME "cabbiev2"
  519. +
  520. +#ifdef HAVE_LCD_BITMAP
  521. +
  522. +#if LCD_HEIGHT <= 64
  523. +  #define DEFAULT_FONT_HEIGHT 8
  524. +  #define DEFAULT_FONTNAME "08-Rockfont"
  525. +#elif LCD_HEIGHT <= 80
  526. +  #define DEFAULT_FONT_HEIGHT 11
  527. +  #define DEFAULT_FONTNAME "11-Sazanami-Mincho"
  528. +#elif (LCD_HEIGHT == 96) && (LCD_WIDTH == 96)   /* sandisk sansa clip zip */
  529. +  #define DEFAULT_FONT_HEIGHT 8
  530. +  #define DEFAULT_FONTNAME "08-Rockfont"
  531. +#elif LCD_HEIGHT <= 220
  532. +  #define DEFAULT_FONT_HEIGHT 12
  533. +#elif LCD_HEIGHT <= 320
  534. +  #define DEFAULT_FONT_HEIGHT 15
  535. +#elif LCD_HEIGHT <= 400
  536. +  #define DEFAULT_FONT_HEIGHT 16
  537. +#elif LCD_HEIGHT <= 480 && LCD_WIDTH < 800
  538. +  #define DEFAULT_FONT_HEIGHT 27
  539. +#else
  540. +  #define DEFAULT_FONT_HEIGHT 35
  541. +#endif
  542. +#define DEFAULT_GLYPHS 250
  543. +#define MIN_GLYPHS 50
  544. +#define MAX_GLYPHS 65540
  545. +
  546. +#else
  547. +  #define DEFAULT_FONT_HEIGHT 12
  548. +#endif
  549. +
  550. +#ifndef DEFAULT_FONTNAME
  551. +/* ugly expansion needed */
  552. +#define _EXPAND2(x) #x
  553. +#define _EXPAND(x) _EXPAND2(x)
  554. +#define DEFAULT_FONTNAME _EXPAND(DEFAULT_FONT_HEIGHT) "-Adobe-Helvetica"
  555. +#endif
  556. +
  557. +#ifdef HAVE_LCD_COLOR
  558. +  #if DEFAULT_FONT_HEIGHT >= 31
  559. +    #define DEFAULT_ICONSET "tango_icons.32x32"
  560. +    #define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.32x32"
  561. +  #elif DEFAULT_FONT_HEIGHT >= 23
  562. +    #define DEFAULT_ICONSET "tango_icons.24x24"
  563. +    #define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.24x24"
  564. +  #elif DEFAULT_FONT_HEIGHT >= 15
  565. +    #define DEFAULT_ICONSET "tango_icons.16x16"
  566. +    #define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.16x16"
  567. +  #elif DEFAULT_FONT_HEIGHT >= 11
  568. +    #define DEFAULT_ICONSET "tango_icons.12x12"
  569. +    #define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.12x12"
  570. +  #elif DEFAULT_FONT_HEIGHT >= 7
  571. +    #define DEFAULT_ICONSET "tango_icons.8x8"
  572. +    #define DEFAULT_VIEWERS_ICONSET "tango_icons_viewers.8x8"
  573. +  #endif
  574. +#elif LCD_DEPTH > 1 /* greyscale */
  575. +  #define DEFAULT_ICONSET "tango_small_mono"
  576. +  #define DEFAULT_VIEWERS_ICONSET "tango_small_viewers_mono"
  577. +#else /* monochrome */
  578. +  #define DEFAULT_ICONSET ""
  579. +  #define DEFAULT_VIEWERS_ICONSET ""
  580. +#endif
  581. +
  582. +#ifdef HAVE_REMOTE_LCD
  583. +#if LCD_REMOTE_HEIGHT <= 64
  584. +  #define DEFAULT_REMOTE_FONTNAME "08-Rockfont"
  585. +#else
  586. +  #define DEFAULT_REMOTE_FONTNAME "-"
  587. +#endif
  588. +#endif /* HAVE_REMOTE_LCD */
  589. +
  590. +#define DEFAULT_THEME_FOREGROUND LCD_RGBPACK(0xce, 0xcf, 0xce)
  591. +#define DEFAULT_THEME_BACKGROUND LCD_RGBPACK(0x00, 0x00, 0x00)
  592. +#define DEFAULT_THEME_SELECTOR_START LCD_RGBPACK(0xff, 0xeb, 0x9c)
  593. +#define DEFAULT_THEME_SELECTOR_END LCD_RGBPACK(0xb5, 0x8e, 0x00)
  594. +#define DEFAULT_THEME_SELECTOR_TEXT LCD_RGBPACK(0x00, 0x00, 0x00)
  595. +
  596. +#define DEFAULT_BACKDROP    BACKDROP_DIR "/cabbiev2.bmp"
  597. +
  598. +#ifdef HAVE_RECORDING
  599. +/* these should be in the config.h files */
  600. +#if CONFIG_CODEC == MAS3587F
  601. +# define DEFAULT_REC_MIC_GAIN 8
  602. +# define DEFAULT_REC_LEFT_GAIN 2
  603. +# define DEFAULT_REC_RIGHT_GAIN 2
  604. +#elif CONFIG_CODEC == SWCODEC
  605. +# ifdef HAVE_UDA1380
  606. +#  define DEFAULT_REC_MIC_GAIN 16
  607. +#  define DEFAULT_REC_LEFT_GAIN 0
  608. +#  define DEFAULT_REC_RIGHT_GAIN 0
  609. +# elif defined(HAVE_TLV320)
  610. +#  define DEFAULT_REC_MIC_GAIN 0
  611. +#  define DEFAULT_REC_LEFT_GAIN 0
  612. +#  define DEFAULT_REC_RIGHT_GAIN 0
  613. +# elif defined(HAVE_WM8975)
  614. +#  define DEFAULT_REC_MIC_GAIN 16
  615. +#  define DEFAULT_REC_LEFT_GAIN 0
  616. +#  define DEFAULT_REC_RIGHT_GAIN 0
  617. +# elif defined(HAVE_WM8758)
  618. +#  define DEFAULT_REC_MIC_GAIN 16
  619. +#  define DEFAULT_REC_LEFT_GAIN 0
  620. +#  define DEFAULT_REC_RIGHT_GAIN 0
  621. +# elif defined(HAVE_WM8731)
  622. +#  define DEFAULT_REC_MIC_GAIN 16
  623. +#  define DEFAULT_REC_LEFT_GAIN 0
  624. +#  define DEFAULT_REC_RIGHT_GAIN 0
  625. +# endif
  626. +#endif
  627. +
  628. +#endif /* HAVE_RECORDING */
  629. +
  630. +#if (CONFIG_PLATFORM & PLATFORM_ANDROID)
  631. +#define DEFAULT_TAGCACHE_SCAN_PATHS "/sdcard"
  632. +#else
  633. +#define DEFAULT_TAGCACHE_SCAN_PATHS "/"
  634. +#endif
  635. +
  636. +#ifdef HAVE_TOUCHSCREEN
  637. +
  638. +static const char* list_pad_formatter(char *buffer, size_t buffer_size,
  639. +                                    int val, const char *unit)
  640. +{
  641. +    switch (val)
  642. +    {
  643. +        case -1: return str(LANG_AUTOMATIC);
  644. +        case  0: return str(LANG_OFF);
  645. +        default: break;
  646. +    }
  647. +    snprintf(buffer, buffer_size, "%d %s", val, unit);
  648. +    return buffer;
  649. +}
  650. +
  651. +static int32_t list_pad_getlang(int value, int unit)
  652. +{
  653. +    switch (value)
  654. +    {
  655. +        case -1: return LANG_AUTOMATIC;
  656. +        case  0: return LANG_OFF;
  657. +        default: return TALK_ID(value, unit);
  658. +    }
  659. +}
  660. +
  661. +#endif /* HAVE_TOUCHSCREEN */
  662. +static const char* formatter_unit_0_is_off(char *buffer, size_t buffer_size,
  663. +                                    int val, const char *unit)
  664. +{
  665. +    if (val == 0)
  666. +        return str(LANG_OFF);
  667. +    else
  668. +        snprintf(buffer, buffer_size, "%d %s", val, unit);
  669. +    return buffer;
  670. +}
  671. +
  672. +static int32_t getlang_unit_0_is_off(int value, int unit)
  673. +{
  674. +    if (value == 0)
  675. +        return LANG_OFF;
  676. +    else
  677. +        return TALK_ID(value,unit);
  678. +}
  679. +
  680. +static const char* formatter_unit_0_is_skip_track(char *buffer, size_t buffer_size,
  681. +                                           int val, const char *unit)
  682. +{
  683. +    (void)unit;
  684. +    if (val == -1)
  685. +        return str(LANG_SKIP_OUTRO);
  686. +    else if (val == 0)
  687. +        return str(LANG_SKIP_TRACK);
  688. +    else if (val % 60 == 0)
  689. +        snprintf(buffer, buffer_size, "%d min", val/60);
  690. +    else
  691. +        snprintf(buffer, buffer_size, "%d s", val);
  692. +    return buffer;
  693. +}
  694. +
  695. +static int32_t getlang_unit_0_is_skip_track(int value, int unit)
  696. +{
  697. +    (void)unit;
  698. +    if (value == -1)
  699. +        return LANG_SKIP_OUTRO;
  700. +    else if (value == 0)
  701. +        return LANG_SKIP_TRACK;
  702. +    else if (value % 60 == 0)
  703. +        return TALK_ID(value/60, UNIT_MIN);
  704. +    else
  705. +        return TALK_ID(value, UNIT_SEC);
  706. +}
  707. +
  708. +#ifdef HAVE_BACKLIGHT
  709. +#ifdef SIMULATOR
  710. +#define DEFAULT_BACKLIGHT_TIMEOUT 0
  711. +#else
  712. +#define DEFAULT_BACKLIGHT_TIMEOUT 15
  713. +#endif
  714. +static const char* backlight_formatter(char *buffer, size_t buffer_size,
  715. +                                int val, const char *unit)
  716. +{
  717. +    if (val == -1)
  718. +        return str(LANG_OFF);
  719. +    else if (val == 0)
  720. +        return str(LANG_ON);
  721. +    else
  722. +        snprintf(buffer, buffer_size, "%d %s", val, unit);
  723. +    return buffer;
  724. +}
  725. +static int32_t backlight_getlang(int value, int unit)
  726. +{
  727. +    if (value == -1)
  728. +        return LANG_OFF;
  729. +    else if (value == 0)
  730. +        return LANG_ON;
  731. +    else
  732. +        return TALK_ID(value, unit);
  733. +}
  734. +#endif
  735. +
  736. +#ifndef HAVE_WHEEL_ACCELERATION
  737. +static const char* scanaccel_formatter(char *buffer, size_t buffer_size,
  738. +        int val, const char *unit)
  739. +{
  740. +    (void)unit;
  741. +    if (val == 0)
  742. +        return str(LANG_OFF);
  743. +    else
  744. +        snprintf(buffer, buffer_size, "Speed up every %ds", val);
  745. +    return buffer;
  746. +}
  747. +#endif
  748. +
  749. +#if CONFIG_CODEC == SWCODEC
  750. +static void crossfeed_cross_set(int val)
  751. +{
  752. +   (void)val;
  753. +   dsp_set_crossfeed_cross_params(global_settings.crossfeed_cross_gain,
  754. +                                  global_settings.crossfeed_hf_attenuation,
  755. +                                  global_settings.crossfeed_hf_cutoff);
  756. +}
  757. +
  758. +static void compressor_set(int val)
  759. +{
  760. +    (void)val;
  761. +    dsp_set_compressor(&global_settings.compressor_settings);
  762. +}
  763. +
  764. +static const char* db_format(char* buffer, size_t buffer_size, int value,
  765. +                      const char* unit)
  766. +{
  767. +    int v = abs(value);
  768. +
  769. +    snprintf(buffer, buffer_size, "%s%d.%d %s", value < 0 ? "-" : "",
  770. +             v / 10, v % 10, unit);
  771. +    return buffer;
  772. +}
  773. +
  774. +static int32_t get_dec_talkid(int value, int unit)
  775. +{
  776. +    return TALK_ID_DECIMAL(value, 1, unit);
  777. +}
  778. +
  779. +static int32_t get_precut_talkid(int value, int unit)
  780. +{
  781. +    return TALK_ID_DECIMAL(-value, 1, unit);
  782. +}
  783. +
  784. +#endif
  785. +#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
  786. +static void set_mdb_enable(bool value)
  787. +{
  788. +    sound_set_mdb_enable((int)value);
  789. +}
  790. +static void set_superbass(bool value)
  791. +{
  792. +    sound_set_superbass((int)value);
  793. +}
  794. +#endif
  795. +
  796. +#ifdef HAVE_QUICKSCREEN
  797. +static int find_setting_by_name(char*name)
  798. +{
  799. +    int i = 0;
  800. +    const struct settings_list *setting;
  801. +    if (!strcmp(name, "-"))
  802. +        return -1;
  803. +    while (i<nb_settings)
  804. +    {
  805. +        setting = &settings[i];
  806. +        if (setting->cfg_name && !strcmp(setting->cfg_name, name))
  807. +        {
  808. +            return i;
  809. +        }
  810. +        i++;
  811. +    }
  812. +    return -1;
  813. +}
  814. +static void qs_load_from_cfg(void* var, char*value)
  815. +{
  816. +    *(int*)var = find_setting_by_name(value);
  817. +}
  818. +static char* qs_write_to_cfg(void* setting, char*buf, int buf_len)
  819. +{
  820. +    int index = *(int*)setting;
  821. +    if (index < 0 || index >= nb_settings - 1)
  822. +    {
  823. +        strlcpy(buf, "-", buf_len);
  824. +        return buf;
  825. +    }
  826. +    const struct settings_list *var = &settings[index];
  827. +    strlcpy(buf, var->cfg_name, buf_len);
  828. +    return buf;
  829. +}
  830. +static bool qs_is_changed(void* setting, void* defaultval)
  831. +{
  832. +    int i = *(int*)setting;
  833. +    if (i < 0 || i >= nb_settings)
  834. +        return false;
  835. +    const struct settings_list *var = &settings[i];
  836. +    return var != find_setting(defaultval, NULL);
  837. +}
  838. +static void qs_set_default(void* setting, void* defaultval)
  839. +{
  840. +    if (defaultval == NULL)
  841. +        *(int*)setting = -1;
  842. +    find_setting(defaultval, (int*)setting);
  843. +}
  844. +#endif
  845. +#ifdef HAVE_TOUCHSCREEN
  846. +
  847. +#if defined(APPLICATION) \
  848. + || defined(ONDA_VX747)  \
  849. + || defined(ONDA_VX767)  \
  850. + || defined(ONDA_VX747P) \
  851. + || defined(ONDA_VX777)
  852. +
  853. +#define DEFAULT_TOUCHSCREEN_MODE TOUCHSCREEN_POINT
  854. +#else
  855. +#define DEFAULT_TOUCHSCREEN_MODE TOUCHSCREEN_BUTTON
  856. +#endif
  857. +
  858. +static void tsc_load_from_cfg(void* setting, char*value)
  859. +{
  860. +    struct touchscreen_parameter *var = (struct touchscreen_parameter*) setting;
  861. +
  862. +    /* Replacement for sscanf(value, "%d ..., &var->A, ...); */
  863. +    int vals[7], count = 0;
  864. +    while(*value != 0 && count < 7)
  865. +    {
  866. +        if(isspace(*value))
  867. +            value++;
  868. +        else
  869. +        {
  870. +            vals[count++] = atoi(value);
  871. +            while(!isspace(*value))
  872. +                value++;
  873. +        }
  874. +    }
  875. +    var->A = vals[0];
  876. +    var->B = vals[1];
  877. +    var->C = vals[2];
  878. +    var->D = vals[3];
  879. +    var->E = vals[4];
  880. +    var->F = vals[5];
  881. +    var->divider = vals[6];
  882. +}
  883. +
  884. +static char* tsc_write_to_cfg(void* setting, char*buf, int buf_len)
  885. +{
  886. +    const struct touchscreen_parameter *var = (const struct touchscreen_parameter*) setting;
  887. +    snprintf(buf, buf_len, "%d %d %d %d %d %d %d", var->A, var->B, var->C, var->D, var->E, var->F, var->divider);
  888. +    return buf;
  889. +}
  890. +static bool tsc_is_changed(void* setting, void* defaultval)
  891. +{
  892. +    return memcmp(setting, defaultval, sizeof(struct touchscreen_parameter)) != 0;
  893. +}
  894. +static void tsc_set_default(void* setting, void* defaultval)
  895. +{
  896. +    memcpy(setting, defaultval, sizeof(struct touchscreen_parameter));
  897. +}
  898. +#endif
  899. +#ifdef HAVE_HOTKEY
  900. +static const char* hotkey_formatter(char* buffer, size_t buffer_size, int value,
  901. +                              const char* unit)
  902. +{
  903. +    (void)buffer;
  904. +    (void)buffer_size;
  905. +    (void)unit;
  906. +    return str(get_hotkey_lang_id(value));
  907. +}
  908. +static int32_t hotkey_getlang(int value, int unit)
  909. +{
  910. +    (void)unit;
  911. +    return get_hotkey_lang_id(value);
  912. +}
  913. +#endif /* HAVE_HOTKEY */
  914. +const struct settings_list settings[] = {
  915. +    /* sound settings */
  916. +    SOUND_SETTING(F_NO_WRAP,volume, LANG_VOLUME, "volume", SOUND_VOLUME),
  917. +    SOUND_SETTING(0, balance, LANG_BALANCE, "balance", SOUND_BALANCE),
  918. +/* Tone controls */
  919. +#ifdef AUDIOHW_HAVE_BASS
  920. +    SOUND_SETTING(F_NO_WRAP,bass, LANG_BASS, "bass", SOUND_BASS),
  921. +#endif
  922. +#ifdef AUDIOHW_HAVE_TREBLE
  923. +    SOUND_SETTING(F_NO_WRAP,treble, LANG_TREBLE, "treble", SOUND_TREBLE),
  924. +#endif
  925. +/* Hardware EQ tone controls */
  926. +#ifdef AUDIOHW_HAVE_EQ
  927. +/* Band gain is generic */
  928. +    SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND1].gain,
  929. +                  LANG_HW_EQ_GAIN, "tone band1 gain", SOUND_EQ_BAND1_GAIN),
  930. +#ifdef AUDIOHW_HAVE_EQ_BAND2
  931. +    SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND2].gain,
  932. +                  LANG_HW_EQ_GAIN, "tone band2 gain", SOUND_EQ_BAND2_GAIN),
  933. +#endif /* AUDIOHW_HAVE_EQ_BAND2 */
  934. +#ifdef AUDIOHW_HAVE_EQ_BAND3
  935. +    SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND3].gain,
  936. +                  LANG_HW_EQ_GAIN, "tone band3 gain", SOUND_EQ_BAND3_GAIN),
  937. +#endif /* AUDIOHW_HAVE_EQ_BAND3 */
  938. +#ifdef AUDIOHW_HAVE_EQ_BAND4
  939. +    SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND4].gain,
  940. +                  LANG_HW_EQ_GAIN, "tone band4 gain", SOUND_EQ_BAND4_GAIN),
  941. +#endif /* AUDIOHW_HAVE_EQ_BAND4 */
  942. +#ifdef AUDIOHW_HAVE_EQ_BAND5
  943. +    SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND5].gain,
  944. +                  LANG_HW_EQ_GAIN, "tone band5 gain", SOUND_EQ_BAND5_GAIN),
  945. +#endif /* AUDIOHW_HAVE_EQ_BAND5 */
  946. +#ifdef HAVE_WM8978
  947. +    /* Frequencies vary with samplerate but at least the user has an idea
  948. +     * about the bands and it will be correct with normal playback rates. */
  949. +/* Band 1 */
  950. +    STRINGCHOICE_SETTING(F_SOUNDSETTING,
  951. +                         hw_eq_bands[AUDIOHW_EQ_BAND1].frequency,
  952. +                         LANG_HW_EQ_FREQUENCY, 0,"tone band1 frequency",
  953. +                         "80 Hz,105 Hz,135 Hz,175 Hz",
  954. +                         sound_set_hw_eq_band1_frequency, 4,
  955. +                         TALK_ID(80, UNIT_HERTZ), TALK_ID(105, UNIT_HERTZ),
  956. +                         TALK_ID(135, UNIT_HERTZ), TALK_ID(175, UNIT_HERTZ)),
  957. +/* Band 2 */
  958. +    STRINGCHOICE_SETTING(F_SOUNDSETTING,
  959. +                         hw_eq_bands[AUDIOHW_EQ_BAND2].frequency,
  960. +                         LANG_HW_EQ_FREQUENCY, 0,"tone band2 frequency",
  961. +                         "230 Hz,300 Hz,385 Hz,500 Hz",
  962. +                         sound_set_hw_eq_band2_frequency, 4,
  963. +                         TALK_ID(230, UNIT_HERTZ), TALK_ID(300, UNIT_HERTZ),
  964. +                         TALK_ID(385, UNIT_HERTZ), TALK_ID(500, UNIT_HERTZ)),
  965. +    CHOICE_SETTING(F_SOUNDSETTING, hw_eq_bands[AUDIOHW_EQ_BAND2].width,
  966. +                   LANG_HW_EQ_WIDTH, 0, "tone band2 width", "narrow,wide",
  967. +                   sound_set_hw_eq_band2_width, 2,
  968. +                   ID2P(LANG_HW_EQ_WIDTH_NARROW), ID2P(LANG_HW_EQ_WIDTH_WIDE)),
  969. +/* Band 3 */
  970. +    STRINGCHOICE_SETTING(F_SOUNDSETTING,
  971. +                         hw_eq_bands[AUDIOHW_EQ_BAND3].frequency,
  972. +                         LANG_HW_EQ_FREQUENCY, 0, "tone band3 frequency",
  973. +                         "650 Hz,850 Hz,1.1 kHz,1.4 kHz",
  974. +                         sound_set_hw_eq_band3_frequency, 4,
  975. +                         TALK_ID(650, UNIT_HERTZ), TALK_ID(850, UNIT_HERTZ),
  976. +                         TALK_ID_DECIMAL(11, 1, UNIT_KHZ),
  977. +                         TALK_ID_DECIMAL(14, 1, UNIT_KHZ)),
  978. +    CHOICE_SETTING(F_SOUNDSETTING,hw_eq_bands[AUDIOHW_EQ_BAND3].width,
  979. +                   LANG_HW_EQ_WIDTH, 0, "tone band3 width", "narrow,wide",
  980. +                   sound_set_hw_eq_band3_width, 2,
  981. +                   ID2P(LANG_HW_EQ_WIDTH_NARROW), ID2P(LANG_HW_EQ_WIDTH_WIDE)),
  982. +/* Band 4 */
  983. +    STRINGCHOICE_SETTING(F_SOUNDSETTING,
  984. +                         hw_eq_bands[AUDIOHW_EQ_BAND4].frequency,
  985. +                         LANG_HW_EQ_FREQUENCY, 0, "tone band4 frequency",
  986. +                         "1.8 kHz,2.4 kHz,3.2 kHz,4.1 kHz",
  987. +                         sound_set_hw_eq_band4_frequency, 4,
  988. +                         TALK_ID_DECIMAL(18, 1, UNIT_KHZ),
  989. +                         TALK_ID_DECIMAL(24, 1, UNIT_KHZ),
  990. +                         TALK_ID_DECIMAL(32, 1, UNIT_KHZ),
  991. +                         TALK_ID_DECIMAL(41, 1, UNIT_KHZ)),
  992. +    CHOICE_SETTING(F_SOUNDSETTING, hw_eq_bands[AUDIOHW_EQ_BAND4].width,
  993. +                   LANG_HW_EQ_WIDTH, 0, "tone band4 width", "narrow,wide",
  994. +                   sound_set_hw_eq_band4_width, 2,
  995. +                   ID2P(LANG_HW_EQ_WIDTH_NARROW), ID2P(LANG_HW_EQ_WIDTH_WIDE)),
  996. +/* Band 5 */
  997. +    STRINGCHOICE_SETTING(F_SOUNDSETTING,
  998. +                         hw_eq_bands[AUDIOHW_EQ_BAND5].frequency,
  999. +                         LANG_HW_EQ_FREQUENCY, 0, "tone band5 frequency",
  1000. +                         "5.3 kHz,6.9 kHz,9.0 kHz,11.7 kHz",
  1001. +                         sound_set_hw_eq_band5_frequency, 4,
  1002. +                         TALK_ID_DECIMAL(53, 1, UNIT_KHZ),
  1003. +                         TALK_ID_DECIMAL(69, 1, UNIT_KHZ),
  1004. +                         TALK_ID_DECIMAL(90, 1, UNIT_KHZ),
  1005. +                         TALK_ID_DECIMAL(117, 1, UNIT_KHZ)),
  1006. +#endif /* HAVE_WM8978 */
  1007. +#endif /* AUDIOHW_HAVE_EQ */
  1008. +/* 3-d enhancement effect */
  1009. +#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
  1010. +    SOUND_SETTING(0,loudness, LANG_LOUDNESS, "loudness", SOUND_LOUDNESS),
  1011. +    STRINGCHOICE_SETTING(F_SOUNDSETTING,avc,LANG_AUTOVOL,0,"auto volume",
  1012. +                         "off,20ms,2,4,8,", sound_set_avc, 5,
  1013. +                         LANG_OFF,TALK_ID(20, UNIT_MS),TALK_ID(2, UNIT_SEC),
  1014. +                         TALK_ID(4, UNIT_SEC),TALK_ID(8, UNIT_SEC)),
  1015. +    OFFON_SETTING(F_SOUNDSETTING, superbass, LANG_SUPERBASS, false, "superbass",
  1016. +                  set_superbass),
  1017. +#endif
  1018. +
  1019. +    CHOICE_SETTING(F_SOUNDSETTING, channel_config, LANG_CHANNEL_CONFIGURATION,
  1020. +                   0,"channels",
  1021. +                   "stereo,mono,custom,mono left,mono right,karaoke",
  1022. +                   sound_set_channels, 6,
  1023. +                   ID2P(LANG_CHANNEL_STEREO), ID2P(LANG_CHANNEL_MONO),
  1024. +                   ID2P(LANG_CHANNEL_CUSTOM), ID2P(LANG_CHANNEL_LEFT),
  1025. +                   ID2P(LANG_CHANNEL_RIGHT), ID2P(LANG_CHANNEL_KARAOKE)),
  1026. +    SOUND_SETTING(F_SOUNDSETTING, stereo_width, LANG_STEREO_WIDTH,
  1027. +                  "stereo_width", SOUND_STEREO_WIDTH),
  1028. +#ifdef AUDIOHW_HAVE_DEPTH_3D
  1029. +    SOUND_SETTING(0,depth_3d, LANG_DEPTH_3D, "3-d enhancement",
  1030. +                  SOUND_DEPTH_3D),
  1031. +#endif
  1032. +    /* playback */
  1033. +    OFFON_SETTING(0, playlist_shuffle, LANG_SHUFFLE, false, "shuffle", NULL),
  1034. +    SYSTEM_SETTING(NVRAM(4), resume_index, -1),
  1035. +    SYSTEM_SETTING(NVRAM(4), resume_crc32, -1),
  1036. +    SYSTEM_SETTING(NVRAM(4), resume_offset, -1),
  1037. +    CHOICE_SETTING(0, repeat_mode, LANG_REPEAT, REPEAT_OFF, "repeat",
  1038. +                   "off,all,one,shuffle"
  1039. +#ifdef AB_REPEAT_ENABLE
  1040. +                   ",ab"
  1041. +#endif
  1042. +                   , NULL,
  1043. +#ifdef AB_REPEAT_ENABLE
  1044. +                   5,
  1045. +#else
  1046. +                   4,
  1047. +#endif
  1048. +                   ID2P(LANG_OFF), ID2P(LANG_ALL), ID2P(LANG_REPEAT_ONE),
  1049. +                   ID2P(LANG_SHUFFLE)
  1050. +#ifdef AB_REPEAT_ENABLE
  1051. +                   ,ID2P(LANG_REPEAT_AB)
  1052. +#endif
  1053. +                  ), /* CHOICE_SETTING( repeat_mode ) */
  1054. +    /* LCD */
  1055. +#ifdef HAVE_LCD_CONTRAST
  1056. +    /* its easier to leave this one un-macro()ed for the time being */
  1057. +    { F_T_INT|F_DEF_ISFUNC|F_INT_SETTING, &global_settings.contrast,
  1058. +        LANG_CONTRAST, FUNCTYPE(lcd_default_contrast), "contrast", NULL , {
  1059. +            .int_setting = (struct int_setting[]) {
  1060. +                { lcd_set_contrast, UNIT_INT, MIN_CONTRAST_SETTING,
  1061. +                  MAX_CONTRAST_SETTING, 1, NULL, NULL }}}},
  1062. +#endif
  1063. +#ifdef HAVE_BACKLIGHT
  1064. +    TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, backlight_timeout, LANG_BACKLIGHT,
  1065. +                    DEFAULT_BACKLIGHT_TIMEOUT,
  1066. +                  "backlight timeout", off_on, UNIT_SEC, backlight_formatter,
  1067. +                  backlight_getlang, backlight_set_timeout, 20,
  1068. +                  -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
  1069. +#if CONFIG_CHARGING
  1070. +    TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, backlight_timeout_plugged,
  1071. +                  LANG_BACKLIGHT_ON_WHEN_CHARGING, 10,
  1072. +                  "backlight timeout plugged", off_on, UNIT_SEC,
  1073. +                  backlight_formatter, backlight_getlang,
  1074. +                  backlight_set_timeout_plugged,  20,
  1075. +                  -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
  1076. +#endif
  1077. +#endif /* HAVE_BACKLIGHT */
  1078. +#ifdef HAVE_LCD_BITMAP
  1079. +#ifdef HAVE_LCD_INVERT
  1080. +    BOOL_SETTING(0, invert, LANG_INVERT, false ,"invert", off_on,
  1081. +                 LANG_INVERT_LCD_INVERSE, LANG_NORMAL, lcd_set_invert_display),
  1082. +#endif
  1083. +#ifdef HAVE_LCD_FLIP
  1084. +    OFFON_SETTING(0, flip_display, LANG_FLIP_DISPLAY, false, "flip display",
  1085. +                  NULL),
  1086. +#endif
  1087. +    /* display */
  1088. +     CHOICE_SETTING(F_TEMPVAR|F_THEMESETTING, cursor_style, LANG_INVERT_CURSOR,
  1089. + #ifdef HAVE_LCD_COLOR
  1090. +                    3, "selector type",
  1091. +                    "pointer,bar (inverse),bar (color),bar (gradient)", NULL, 4,
  1092. +                    ID2P(LANG_INVERT_CURSOR_POINTER),
  1093. +                    ID2P(LANG_INVERT_CURSOR_BAR),
  1094. +                    ID2P(LANG_INVERT_CURSOR_COLOR),
  1095. +                    ID2P(LANG_INVERT_CURSOR_GRADIENT)),
  1096. + #else
  1097. +                    1, "selector type", "pointer,bar (inverse)", NULL, 2,
  1098. +                    ID2P(LANG_INVERT_CURSOR_POINTER),
  1099. +                    ID2P(LANG_INVERT_CURSOR_BAR)),
  1100. + #endif
  1101. +    CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, statusbar,
  1102. +                  LANG_STATUS_BAR, STATUSBAR_TOP, "statusbar","off,top,bottom",
  1103. +                  NULL, 3, ID2P(LANG_OFF), ID2P(LANG_STATUSBAR_TOP),
  1104. +                  ID2P(LANG_STATUSBAR_BOTTOM)),
  1105. +#ifdef HAVE_REMOTE_LCD
  1106. +    CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, remote_statusbar,
  1107. +                  LANG_REMOTE_STATUSBAR, STATUSBAR_TOP, "remote statusbar","off,top,bottom",
  1108. +                  NULL, 3, ID2P(LANG_OFF), ID2P(LANG_STATUSBAR_TOP),
  1109. +                  ID2P(LANG_STATUSBAR_BOTTOM)),
  1110. +#endif
  1111. +    CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, scrollbar,
  1112. +                  LANG_SCROLL_BAR, SCROLLBAR_LEFT, "scrollbar","off,left,right",
  1113. +                  NULL, 3, ID2P(LANG_OFF), ID2P(LANG_LEFT), ID2P(LANG_RIGHT)),
  1114. +    INT_SETTING(F_THEMESETTING, scrollbar_width, LANG_SCROLLBAR_WIDTH, 6,
  1115. +                "scrollbar width",UNIT_INT, 3, MAX(LCD_WIDTH/10,25), 1,
  1116. +                NULL, NULL, NULL),
  1117. +#ifdef HAVE_TOUCHSCREEN
  1118. +    TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, list_line_padding, LANG_LIST_LINE_PADDING,
  1119. +                  -1, "list padding", "auto,off", UNIT_PIXEL, list_pad_formatter,
  1120. +                  list_pad_getlang, NULL, 16,
  1121. +                  -1,0,2,4,6,8,10,12,16,20,24,28,32,38,44,50),
  1122. +#endif
  1123. +#if CONFIG_KEYPAD == RECORDER_PAD
  1124. +    OFFON_SETTING(F_THEMESETTING,buttonbar, LANG_BUTTON_BAR ,true,"buttonbar", NULL),
  1125. +#endif
  1126. +    CHOICE_SETTING(F_THEMESETTING, volume_type, LANG_VOLUME_DISPLAY, 0,
  1127. +                   "volume display", graphic_numeric, NULL, 2,
  1128. +                   ID2P(LANG_DISPLAY_GRAPHIC),
  1129. +                   ID2P(LANG_DISPLAY_NUMERIC)),
  1130. +    CHOICE_SETTING(F_THEMESETTING, battery_display, LANG_BATTERY_DISPLAY, 0,
  1131. +                   "battery display", graphic_numeric, NULL, 2,
  1132. +                   ID2P(LANG_DISPLAY_GRAPHIC), ID2P(LANG_DISPLAY_NUMERIC)),
  1133. +#if CONFIG_RTC
  1134. +    CHOICE_SETTING(0, timeformat, LANG_TIMEFORMAT, 0,
  1135. +        "time format", "24hour,12hour", NULL, 2,
  1136. +        ID2P(LANG_24_HOUR_CLOCK), ID2P(LANG_12_HOUR_CLOCK)),
  1137. +#endif
  1138. +#endif /* HAVE_LCD_BITMAP */
  1139. +    OFFON_SETTING(0,show_icons, LANG_SHOW_ICONS ,true,"show icons", NULL),
  1140. +    /* system */
  1141. +    TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, poweroff, LANG_POWEROFF_IDLE, 10,
  1142. +                  "idle poweroff", "off", UNIT_MIN, formatter_unit_0_is_off,
  1143. +                  getlang_unit_0_is_off, set_poweroff_timeout, 15,
  1144. +                  0,1,2,3,4,5,6,7,8,9,10,15,30,45,60),
  1145. +    SYSTEM_SETTING(NVRAM(4), runtime, 0),
  1146. +    SYSTEM_SETTING(NVRAM(4), topruntime, 0),
  1147. +    INT_SETTING(F_BANFROMQS, max_files_in_playlist,
  1148. +                LANG_MAX_FILES_IN_PLAYLIST,
  1149. +#if MEMORYSIZE > 1
  1150. +                  10000,
  1151. +#else
  1152. +                  400,
  1153. +#endif
  1154. +                  "max files in playlist", UNIT_INT, 1000, 32000, 1000,
  1155. +                  NULL, NULL, NULL),
  1156. +    INT_SETTING(F_BANFROMQS, max_files_in_dir, LANG_MAX_FILES_IN_DIR,
  1157. +#if MEMORYSIZE > 1
  1158. +                  1000,
  1159. +#else
  1160. +                  200,
  1161. +#endif
  1162. +                  "max files in dir", UNIT_INT, 50, 10000, 50,
  1163. +                  NULL, NULL, NULL),
  1164. +/* use this setting for user code even if there's no exchangable battery
  1165. + * support enabled */
  1166. +#if BATTERY_CAPACITY_DEFAULT > 0
  1167. +/* define min/max/inc for this file if there's only one battery */
  1168. +#ifndef BATTERY_CAPACITY_MIN
  1169. +#define BATTERY_CAPACITY_MIN BATTERY_CAPACITY_DEFAULT
  1170. +#define BATTERY_CAPACITY_MAX BATTERY_CAPACITY_DEFAULT
  1171. +#define BATTERY_CAPACITY_INC 0
  1172. +#endif
  1173. +#if defined(IPOD_VIDEO) && !defined(SIMULATOR)
  1174. +    /* its easier to leave this one un-macro()ed for the time being */
  1175. +    { F_T_INT|F_DEF_ISFUNC|F_INT_SETTING, &global_settings.battery_capacity,
  1176. +        LANG_BATTERY_CAPACITY, FUNCTYPE(battery_default_capacity),
  1177. +        "battery capacity", NULL , {
  1178. +            .int_setting = (struct int_setting[]) {
  1179. +                { set_battery_capacity, UNIT_MAH, BATTERY_CAPACITY_MIN,
  1180. +                  BATTERY_CAPACITY_MAX, BATTERY_CAPACITY_INC, NULL, NULL }}}},
  1181. +#else /* IPOD_VIDEO */
  1182. +    INT_SETTING(0, battery_capacity, LANG_BATTERY_CAPACITY,
  1183. +                BATTERY_CAPACITY_DEFAULT, "battery capacity", UNIT_MAH,
  1184. +                BATTERY_CAPACITY_MIN, BATTERY_CAPACITY_MAX,
  1185. +                BATTERY_CAPACITY_INC, NULL, NULL, set_battery_capacity),
  1186. +#endif /* IPOD_VIDEO */
  1187. +#endif
  1188. +#if CONFIG_CHARGING
  1189. +    OFFON_SETTING(NVRAM(1), car_adapter_mode,
  1190. +                  LANG_CAR_ADAPTER_MODE, false, "car adapter mode", NULL),
  1191. +#endif
  1192. +#ifdef IPOD_ACCESSORY_PROTOCOL
  1193. +    CHOICE_SETTING(0, serial_bitrate, LANG_SERIAL_BITRATE, 0, "serial bitrate",
  1194. +                   "auto,9600,19200,38400,57600", iap_bitrate_set, 5, ID2P(LANG_SERIAL_BITRATE_AUTO),
  1195. +           ID2P(LANG_SERIAL_BITRATE_9600),ID2P(LANG_SERIAL_BITRATE_19200),
  1196. +           ID2P(LANG_SERIAL_BITRATE_38400),ID2P(LANG_SERIAL_BITRATE_57600)),
  1197. +#endif
  1198. +#ifdef HAVE_ACCESSORY_SUPPLY
  1199. +    OFFON_SETTING(0, accessory_supply, LANG_ACCESSORY_SUPPLY,
  1200. +                  true, "accessory power supply", accessory_supply_set),
  1201. +#endif
  1202. +#ifdef HAVE_LINEOUT_POWEROFF
  1203. +    OFFON_SETTING(0, lineout_active, LANG_LINEOUT_ONOFF,
  1204. +                  true, "lineout", lineout_set),
  1205. +#endif
  1206. +    /* tuner */
  1207. +#if CONFIG_TUNER
  1208. +    OFFON_SETTING(0,fm_force_mono, LANG_FM_MONO_MODE,
  1209. +                  false, "force fm mono", toggle_mono_mode),
  1210. +                  SYSTEM_SETTING(NVRAM(4),last_frequency,0),
  1211. +#endif
  1212. +
  1213. +#if BATTERY_TYPES_COUNT > 1
  1214. +    CHOICE_SETTING(0, battery_type, LANG_BATTERY_TYPE, 0, "battery type",
  1215. +                   "alkaline,nimh", NULL, 2, ID2P(LANG_BATTERY_TYPE_ALKALINE),
  1216. +                   ID2P(LANG_BATTERY_TYPE_NIMH)),
  1217. +#endif
  1218. +#ifdef HAVE_REMOTE_LCD
  1219. +    /* remote lcd */
  1220. +    INT_SETTING(0, remote_contrast, LANG_CONTRAST,
  1221. +                DEFAULT_REMOTE_CONTRAST_SETTING, "remote contrast", UNIT_INT,
  1222. +                MIN_REMOTE_CONTRAST_SETTING, MAX_REMOTE_CONTRAST_SETTING, 1,
  1223. +                NULL, NULL, lcd_remote_set_contrast),
  1224. +    BOOL_SETTING(0, remote_invert, LANG_INVERT, false ,"remote invert", off_on,
  1225. +                 LANG_INVERT_LCD_INVERSE, LANG_NORMAL,
  1226. +                 lcd_remote_set_invert_display),
  1227. +    OFFON_SETTING(0,remote_flip_display, LANG_FLIP_DISPLAY,
  1228. +                  false,"remote flip display", NULL),
  1229. +    TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, remote_backlight_timeout,
  1230. +                  LANG_BACKLIGHT, 5, "remote backlight timeout", off_on,
  1231. +                  UNIT_SEC, backlight_formatter, backlight_getlang,
  1232. +                  remote_backlight_set_timeout, 20,
  1233. +                  -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
  1234. +#if CONFIG_CHARGING
  1235. +    TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, remote_backlight_timeout_plugged,
  1236. +                  LANG_BACKLIGHT_ON_WHEN_CHARGING, 10,
  1237. +                  "remote backlight timeout plugged", off_on, UNIT_SEC,
  1238. +                  backlight_formatter, backlight_getlang,
  1239. +                  remote_backlight_set_timeout_plugged, 20,
  1240. +                  -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
  1241. +#endif
  1242. +#ifdef HAVE_REMOTE_LCD_TICKING
  1243. +    OFFON_SETTING(0, remote_reduce_ticking, LANG_REDUCE_TICKING,
  1244. +                  false,"remote reduce ticking", NULL),
  1245. +#endif
  1246. +#endif
  1247. +
  1248. +#ifdef HAVE_BACKLIGHT
  1249. +    OFFON_SETTING(0, bl_filter_first_keypress,
  1250. +                  LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false,
  1251. +                  "backlight filters first keypress", NULL),
  1252. +#ifdef HAVE_REMOTE_LCD
  1253. +    OFFON_SETTING(0, remote_bl_filter_first_keypress,
  1254. +                  LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS, false,
  1255. +                  "backlight filters first remote keypress", NULL),
  1256. +#endif
  1257. +#endif /* HAVE_BACKLIGHT */
  1258. +
  1259. +/** End of old RTC config block **/
  1260. +
  1261. +#ifdef HAVE_BACKLIGHT
  1262. +    OFFON_SETTING(0, caption_backlight, LANG_CAPTION_BACKLIGHT,
  1263. +                  false, "caption backlight", NULL),
  1264. +#ifdef HAVE_REMOTE_LCD
  1265. +    OFFON_SETTING(0, remote_caption_backlight, LANG_CAPTION_BACKLIGHT,
  1266. +                  false, "remote caption backlight", NULL),
  1267. +#endif
  1268. +#ifdef HAVE_BACKLIGHT_BRIGHTNESS
  1269. +    INT_SETTING(F_NO_WRAP, brightness, LANG_BRIGHTNESS,
  1270. +                DEFAULT_BRIGHTNESS_SETTING, "brightness",UNIT_INT,
  1271. +                MIN_BRIGHTNESS_SETTING, MAX_BRIGHTNESS_SETTING, 1,
  1272. +                NULL, NULL, backlight_set_brightness),
  1273. +#endif
  1274. +    /* backlight fading */
  1275. +#if defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
  1276. +    TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, backlight_fade_in,
  1277. +                  LANG_BACKLIGHT_FADE_IN, 300, "backlight fade in", "off",
  1278. +                  UNIT_MS, formatter_unit_0_is_off, getlang_unit_0_is_off,
  1279. +                  backlight_set_fade_in, 7,  0,100,200,300,500,1000,2000),
  1280. +    TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, backlight_fade_out,
  1281. +                  LANG_BACKLIGHT_FADE_OUT, 2000, "backlight fade out", "off",
  1282. +                  UNIT_MS, formatter_unit_0_is_off, getlang_unit_0_is_off,
  1283. +                  backlight_set_fade_out, 10,
  1284. +                  0,100,200,300,500,1000,2000,3000,5000,10000),
  1285. +#elif defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING)
  1286. +    OFFON_SETTING(0, backlight_fade_in, LANG_BACKLIGHT_FADE_IN,
  1287. +                    true, "backlight fade in", backlight_set_fade_in),
  1288. +    OFFON_SETTING(0, backlight_fade_out, LANG_BACKLIGHT_FADE_OUT,
  1289. +                    true, "backlight fade out", backlight_set_fade_out),
  1290. +#endif
  1291. +#endif /* HAVE_BACKLIGHT */
  1292. +    INT_SETTING(F_PADTITLE, scroll_speed, LANG_SCROLL_SPEED, 9,"scroll speed",
  1293. +                UNIT_INT, 0, 17, 1, NULL, NULL, lcd_scroll_speed),
  1294. +    INT_SETTING(F_PADTITLE, scroll_delay, LANG_SCROLL_DELAY, 1000,
  1295. +                "scroll delay", UNIT_MS, 0, 2500, 100, NULL,
  1296. +                NULL, lcd_scroll_delay),
  1297. +    INT_SETTING(0, bidir_limit, LANG_BIDIR_SCROLL, 50, "bidir limit",
  1298. +                UNIT_PERCENT, 0, 200, 25, NULL, NULL, lcd_bidir_scroll),
  1299. +#ifdef HAVE_REMOTE_LCD
  1300. +    INT_SETTING(0, remote_scroll_speed, LANG_SCROLL_SPEED, 9,
  1301. +                "remote scroll speed", UNIT_INT, 0,17, 1,
  1302. +                NULL, NULL, lcd_remote_scroll_speed),
  1303. +    INT_SETTING(0, remote_scroll_step, LANG_SCROLL_STEP, 6,
  1304. +                "remote scroll step", UNIT_PIXEL, 1, LCD_REMOTE_WIDTH, 1, NULL,
  1305. +                NULL, lcd_remote_scroll_step),
  1306. +    INT_SETTING(0, remote_scroll_delay, LANG_SCROLL_DELAY, 1000,
  1307. +                "remote scroll delay", UNIT_MS, 0, 2500, 100, NULL, NULL,
  1308. +                lcd_remote_scroll_delay),
  1309. +    INT_SETTING(0, remote_bidir_limit, LANG_BIDIR_SCROLL, 50,
  1310. +                "remote bidir limit", UNIT_PERCENT, 0, 200, 25, NULL, NULL,
  1311. +                lcd_remote_bidir_scroll),
  1312. +#endif
  1313. +#ifdef HAVE_LCD_BITMAP
  1314. +    OFFON_SETTING(0, offset_out_of_view, LANG_SCREEN_SCROLL_VIEW,
  1315. +                  false, "Screen Scrolls Out Of View",
  1316. +                  gui_list_screen_scroll_out_of_view),
  1317. +    INT_SETTING(F_PADTITLE, scroll_step, LANG_SCROLL_STEP, 6, "scroll step",
  1318. +                UNIT_PIXEL, 1, LCD_WIDTH, 1, NULL, NULL, lcd_scroll_step),
  1319. +    INT_SETTING(F_PADTITLE, screen_scroll_step, LANG_SCREEN_SCROLL_STEP, 16,
  1320. +                "screen scroll step", UNIT_PIXEL, 1, LCD_WIDTH, 1, NULL, NULL,
  1321. +                gui_list_screen_scroll_step),
  1322. +#endif /* HAVE_LCD_BITMAP */
  1323. +    OFFON_SETTING(0,scroll_paginated,LANG_SCROLL_PAGINATED,
  1324. +                  false,"scroll paginated",NULL),
  1325. +#ifdef HAVE_LCD_COLOR
  1326. +
  1327. +    {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.fg_color,-1,
  1328. +        INT(DEFAULT_THEME_FOREGROUND),"foreground color",NULL,UNUSED},
  1329. +    {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.bg_color,-1,
  1330. +        INT(DEFAULT_THEME_BACKGROUND),"background color",NULL,UNUSED},
  1331. +    {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.lss_color,-1,
  1332. +        INT(DEFAULT_THEME_SELECTOR_START),"line selector start color",NULL,
  1333. +        UNUSED},
  1334. +    {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.lse_color,-1,
  1335. +        INT(DEFAULT_THEME_SELECTOR_END),"line selector end color",NULL,UNUSED},
  1336. +    {F_T_INT|F_RGB|F_THEMESETTING ,&global_settings.lst_color,-1,
  1337. +        INT(DEFAULT_THEME_SELECTOR_TEXT),"line selector text color",NULL,
  1338. +        UNUSED},
  1339. +
  1340. +#endif
  1341. +    /* more playback */
  1342. +    OFFON_SETTING(0,play_selected,LANG_PLAY_SELECTED,true,"play selected",NULL),
  1343. +    OFFON_SETTING(0,party_mode,LANG_PARTY_MODE,false,"party mode",NULL),
  1344. +    OFFON_SETTING(0,fade_on_stop,LANG_FADE_ON_STOP,true,"volume fade",NULL),
  1345. +    TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, ff_rewind_min_step,
  1346. +                  LANG_FFRW_STEP, 1, "scan min step", NULL, UNIT_SEC,
  1347. +                  NULL, NULL, NULL, 14,  1,2,3,4,5,6,8,10,15,20,25,30,45,60),
  1348. +    CHOICE_SETTING(0, ff_rewind_accel, LANG_FFRW_ACCEL, 2,
  1349. +                   "seek acceleration", "very fast,fast,normal,slow,very slow", NULL, 5,
  1350. +                   ID2P(LANG_VERY_FAST), ID2P(LANG_FAST), ID2P(LANG_NORMAL),
  1351. +                   ID2P(LANG_SLOW) , ID2P(LANG_VERY_SLOW)),
  1352. +#if (CONFIG_CODEC == SWCODEC) && defined(HAVE_DISK_STORAGE)
  1353. +    STRINGCHOICE_SETTING(0, buffer_margin, LANG_MP3BUFFER_MARGIN, 0,"antiskip",
  1354. +                         "5s,15s,30s,1min,2min,3min,5min,10min", NULL, 8,
  1355. +                         TALK_ID(5, UNIT_SEC), TALK_ID(15, UNIT_SEC),
  1356. +                         TALK_ID(30, UNIT_SEC), TALK_ID(1, UNIT_MIN),
  1357. +                         TALK_ID(2, UNIT_MIN), TALK_ID(3, UNIT_MIN),
  1358. +                         TALK_ID(5, UNIT_MIN), TALK_ID(10, UNIT_MIN)),
  1359. +#elif defined(HAVE_DISK_STORAGE)
  1360. +    INT_SETTING(0, buffer_margin, LANG_MP3BUFFER_MARGIN, 0, "antiskip",
  1361. +                UNIT_SEC, 0, 7, 1, NULL, NULL, audio_set_buffer_margin),
  1362. +#endif
  1363. +    /* disk */
  1364. +#ifdef HAVE_DISK_STORAGE
  1365. +    INT_SETTING(0, disk_spindown, LANG_SPINDOWN, 5, "disk spindown",
  1366. +                    UNIT_SEC, 3, 254, 1, NULL, NULL, storage_spindown),
  1367. +#endif /* HAVE_DISK_STORAGE */
  1368. +    /* browser */
  1369. +    TEXT_SETTING(0, start_directory, "start directory", "/", NULL, NULL),
  1370. +    CHOICE_SETTING(0, dirfilter, LANG_FILTER, SHOW_SUPPORTED, "show files",
  1371. +                   "all,supported,music,playlists", NULL, 4, ID2P(LANG_ALL),
  1372. +                   ID2P(LANG_FILTER_SUPPORTED), ID2P(LANG_FILTER_MUSIC),
  1373. +                   ID2P(LANG_PLAYLISTS)),
  1374. +    /* file sorting */
  1375. +    OFFON_SETTING(0, sort_case, LANG_SORT_CASE, false, "sort case", NULL),
  1376. +    CHOICE_SETTING(0, sort_dir, LANG_SORT_DIR, 0 ,
  1377. +                   "sort dirs", "alpha,oldest,newest", NULL, 3,
  1378. +                   ID2P(LANG_SORT_ALPHA), ID2P(LANG_SORT_DATE),
  1379. +                   ID2P(LANG_SORT_DATE_REVERSE)),
  1380. +    CHOICE_SETTING(0, sort_file, LANG_SORT_FILE, 0 ,
  1381. +                   "sort files", "alpha,oldest,newest,type", NULL, 4,
  1382. +                   ID2P(LANG_SORT_ALPHA), ID2P(LANG_SORT_DATE),
  1383. +                   ID2P(LANG_SORT_DATE_REVERSE) , ID2P(LANG_SORT_TYPE)),
  1384. +    CHOICE_SETTING(0, interpret_numbers, LANG_SORT_INTERPRET_NUMBERS, 1,
  1385. +                    "sort interpret number", "digits,numbers",NULL, 2,
  1386. +                    ID2P(LANG_SORT_INTERPRET_AS_DIGIT),
  1387. +                    ID2P(LANG_SORT_INTERPRET_AS_NUMBERS)),
  1388. +    CHOICE_SETTING(0, show_filename_ext, LANG_SHOW_FILENAME_EXT, 3,
  1389. +                   "show filename exts", "off,on,unknown,view_all", NULL , 4 ,
  1390. +                   ID2P(LANG_OFF), ID2P(LANG_ON), ID2P(LANG_UNKNOWN_TYPES),
  1391. +                   ID2P(LANG_EXT_ONLY_VIEW_ALL)),
  1392. +    OFFON_SETTING(0,browse_current,LANG_FOLLOW,false,"follow playlist",NULL),
  1393. +    OFFON_SETTING(0,playlist_viewer_icons,LANG_SHOW_ICONS,true,
  1394. +                  "playlist viewer icons",NULL),
  1395. +    OFFON_SETTING(0,playlist_viewer_indices,LANG_SHOW_INDICES,true,
  1396. +                  "playlist viewer indices",NULL),
  1397. +    CHOICE_SETTING(0, playlist_viewer_track_display, LANG_TRACK_DISPLAY, 0,
  1398. +                   "playlist viewer track display","track name,full path",
  1399. +                   NULL, 2, ID2P(LANG_DISPLAY_TRACK_NAME_ONLY),
  1400. +                   ID2P(LANG_DISPLAY_FULL_PATH)),
  1401. +    CHOICE_SETTING(0, recursive_dir_insert, LANG_RECURSE_DIRECTORY , RECURSE_ON,
  1402. +                   "recursive directory insert", off_on_ask, NULL , 3 ,
  1403. +                   ID2P(LANG_OFF), ID2P(LANG_ON), ID2P(LANG_ASK)),
  1404. +    /* bookmarks */
  1405. +    CHOICE_SETTING(0, autocreatebookmark, LANG_BOOKMARK_SETTINGS_AUTOCREATE,
  1406. +                   BOOKMARK_NO, "autocreate bookmarks",
  1407. +                   "off,on,ask,recent only - on,recent only - ask", NULL, 5,
  1408. +                   ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES),
  1409. +                   ID2P(LANG_ASK), ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_YES),
  1410. +                   ID2P(LANG_BOOKMARK_SETTINGS_RECENT_ONLY_ASK)),
  1411. +    OFFON_SETTING(0, autoupdatebookmark, LANG_BOOKMARK_SETTINGS_AUTOUPDATE,
  1412. +                   false, "autoupdate bookmarks", NULL),
  1413. +    CHOICE_SETTING(0, autoloadbookmark, LANG_BOOKMARK_SETTINGS_AUTOLOAD,
  1414. +                   BOOKMARK_NO, "autoload bookmarks", off_on_ask, NULL, 3,
  1415. +                   ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES),
  1416. +                   ID2P(LANG_ASK)),
  1417. +    CHOICE_SETTING(0, usemrb, LANG_BOOKMARK_SETTINGS_MAINTAIN_RECENT_BOOKMARKS,
  1418. +                   BOOKMARK_NO, "use most-recent-bookmarks",
  1419. +                   "off,on,unique only", NULL, 3, ID2P(LANG_SET_BOOL_NO),
  1420. +                   ID2P(LANG_SET_BOOL_YES),
  1421. +                   ID2P(LANG_BOOKMARK_SETTINGS_UNIQUE_ONLY)),
  1422. +#ifdef HAVE_LCD_BITMAP
  1423. +    /* peak meter */
  1424. +    STRINGCHOICE_SETTING(0, peak_meter_clip_hold, LANG_PM_CLIP_HOLD, 16,
  1425. +                         "peak meter clip hold",
  1426. +                         "on,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,2min"
  1427. +                         ",3min,5min,10min,20min,45min,90min",
  1428. +                         peak_meter_set_clip_hold, 25, LANG_PM_ETERNAL,
  1429. +                         TALK_ID(1, UNIT_SEC), TALK_ID(2, UNIT_SEC),
  1430. +                         TALK_ID(3, UNIT_SEC), TALK_ID(4, UNIT_SEC),
  1431. +                         TALK_ID(5, UNIT_SEC), TALK_ID(6, UNIT_SEC),
  1432. +                         TALK_ID(7, UNIT_SEC), TALK_ID(8, UNIT_SEC),
  1433. +                         TALK_ID(9, UNIT_SEC), TALK_ID(10, UNIT_SEC),
  1434. +                         TALK_ID(15, UNIT_SEC), TALK_ID(20, UNIT_SEC),
  1435. +                         TALK_ID(25, UNIT_SEC), TALK_ID(30, UNIT_SEC),
  1436. +                         TALK_ID(45, UNIT_SEC), TALK_ID(60, UNIT_SEC),
  1437. +                         TALK_ID(90, UNIT_SEC), TALK_ID(2, UNIT_MIN),
  1438. +                         TALK_ID(3, UNIT_MIN), TALK_ID(5, UNIT_MIN),
  1439. +                         TALK_ID(10, UNIT_MIN), TALK_ID(20, UNIT_MIN),
  1440. +                         TALK_ID(45, UNIT_MIN), TALK_ID(90, UNIT_MIN)),
  1441. +    STRINGCHOICE_SETTING(0, peak_meter_hold, LANG_PM_PEAK_HOLD, 3,
  1442. +                         "peak meter hold",
  1443. +                     "off,200ms,300ms,500ms,1,2,3,4,5,6,7,8,9,10,15,20,30,1min",
  1444. +                         NULL, 18, LANG_OFF, TALK_ID(200, UNIT_MS),
  1445. +                         TALK_ID(300, UNIT_MS), TALK_ID(500, UNIT_MS),
  1446. +                         TALK_ID(1, UNIT_SEC), TALK_ID(2, UNIT_SEC),
  1447. +                         TALK_ID(3, UNIT_SEC), TALK_ID(4, UNIT_SEC),
  1448. +                         TALK_ID(5, UNIT_SEC), TALK_ID(6, UNIT_SEC),
  1449. +                         TALK_ID(7, UNIT_SEC), TALK_ID(8, UNIT_SEC),
  1450. +                         TALK_ID(9, UNIT_SEC), TALK_ID(10, UNIT_SEC),
  1451. +                         TALK_ID(15, UNIT_SEC), TALK_ID(20, UNIT_SEC),
  1452. +                         TALK_ID(30, UNIT_SEC), TALK_ID(60, UNIT_SEC)),
  1453. +    INT_SETTING(0, peak_meter_release, LANG_PM_RELEASE, 8, "peak meter release",
  1454. +                UNIT_PM_TICK, 1, 0x7e, 1, NULL, NULL,NULL),
  1455. +    OFFON_SETTING(0,peak_meter_dbfs,LANG_PM_DBFS,true,"peak meter dbfs",NULL),
  1456. +    {F_T_INT, &global_settings.peak_meter_min, LANG_PM_MIN,INT(60),
  1457. +        "peak meter min", NULL, UNUSED},
  1458. +    {F_T_INT, &global_settings.peak_meter_max, LANG_PM_MAX,INT(0),
  1459. +        "peak meter max", NULL, UNUSED},
  1460. +#ifdef HAVE_RECORDING
  1461. +    OFFON_SETTING(0, peak_meter_clipcounter, LANG_PM_CLIPCOUNTER, false,
  1462. +                  "peak meter clipcounter", NULL),
  1463. +#endif /* HAVE_RECORDING */
  1464. +#endif /* HAVE_LCD_BITMAP */
  1465. +#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
  1466. +    SOUND_SETTING(F_SOUNDSETTING, mdb_strength, LANG_MDB_STRENGTH,
  1467. +                  "mdb strength", SOUND_MDB_STRENGTH),
  1468. +    SOUND_SETTING(F_SOUNDSETTING, mdb_harmonics, LANG_MDB_HARMONICS,
  1469. +                  "mdb harmonics", SOUND_MDB_HARMONICS),
  1470. +    SOUND_SETTING(F_SOUNDSETTING, mdb_center, LANG_MDB_CENTER,
  1471. +                  "mdb center", SOUND_MDB_CENTER),
  1472. +    SOUND_SETTING(F_SOUNDSETTING, mdb_shape, LANG_MDB_SHAPE,
  1473. +                  "mdb shape", SOUND_MDB_SHAPE),
  1474. +    OFFON_SETTING(F_SOUNDSETTING, mdb_enable, LANG_MDB_ENABLE,
  1475. +                  false, "mdb enable", set_mdb_enable),
  1476. +#endif
  1477. +#if CONFIG_CODEC == MAS3507D
  1478. +    OFFON_SETTING(F_SOUNDSETTING, line_in,LANG_LINE_IN,false,"line in",NULL),
  1479. +#endif
  1480. +    /* voice */
  1481. +    OFFON_SETTING(F_TEMPVAR, talk_menu, LANG_VOICE_MENU, true, "talk menu", NULL),
  1482. +    CHOICE_SETTING(0, talk_dir, LANG_VOICE_DIR, 0,
  1483. +                   "talk dir", off_number_spell, NULL, 3,
  1484. +                   ID2P(LANG_OFF), ID2P(LANG_VOICE_NUMBER),
  1485. +                   ID2P(LANG_VOICE_SPELL)),
  1486. +    OFFON_SETTING(F_TEMPVAR, talk_dir_clip, LANG_VOICE_DIR_TALK, false,
  1487. +                  "talk dir clip", NULL),
  1488. +    CHOICE_SETTING(0, talk_file, LANG_VOICE_FILE, 0,
  1489. +                   "talk file", off_number_spell, NULL, 3,
  1490. +                   ID2P(LANG_OFF), ID2P(LANG_VOICE_NUMBER),
  1491. +                   ID2P(LANG_VOICE_SPELL)),
  1492. +    OFFON_SETTING(F_TEMPVAR, talk_file_clip, LANG_VOICE_FILE_TALK, false,
  1493. +                  "talk file clip", NULL),
  1494. +    OFFON_SETTING(F_TEMPVAR, talk_filetype, LANG_VOICE_FILETYPE, false,
  1495. +                  "talk filetype", NULL),
  1496. +    OFFON_SETTING(F_TEMPVAR, talk_battery_level, LANG_TALK_BATTERY_LEVEL, false,
  1497. +                  "Announce Battery Level", NULL),
  1498. +
  1499. +#ifdef HAVE_RECORDING
  1500. +    /* recording */
  1501. +    STRINGCHOICE_SETTING(F_RECSETTING, rec_timesplit, LANG_SPLIT_TIME, 0,
  1502. +                         "rec timesplit",
  1503. +                         "off,00:05,00:10,00:15,00:30,01:00,01:14,01:20,02:00,"
  1504. +                         "04:00,06:00,08:00,10:00,12:00,18:00,24:00",
  1505. +                         NULL, 16, LANG_OFF,
  1506. +                         TALK_ID(5, UNIT_MIN), TALK_ID(10, UNIT_MIN),
  1507. +                         TALK_ID(15, UNIT_MIN), TALK_ID(30, UNIT_MIN),
  1508. +                         TALK_ID(60, UNIT_MIN), TALK_ID(74, UNIT_MIN),
  1509. +                         TALK_ID(80, UNIT_MIN), TALK_ID(2, UNIT_HOUR),
  1510. +                         TALK_ID(4, UNIT_HOUR), TALK_ID(6, UNIT_HOUR),
  1511. +                         TALK_ID(8, UNIT_HOUR), TALK_ID(10, UNIT_HOUR),
  1512. +                         TALK_ID(12, UNIT_HOUR), TALK_ID(18, UNIT_HOUR),
  1513. +                         TALK_ID(20, UNIT_HOUR), TALK_ID(24, UNIT_HOUR)),
  1514. +    STRINGCHOICE_SETTING(F_RECSETTING, rec_sizesplit, LANG_SPLIT_SIZE, 0,
  1515. +                         "rec sizesplit",
  1516. +                         "off,5MB,10MB,15MB,32MB,64MB,75MB,100MB,128MB,"
  1517. +                         "256MB,512MB,650MB,700MB,1GB,1.5GB,1.75GB",
  1518. +                         NULL, 16, LANG_OFF,
  1519. +                         TALK_ID(5, UNIT_MB), TALK_ID(10, UNIT_MB),
  1520. +                         TALK_ID(15, UNIT_MB), TALK_ID(32, UNIT_MB),
  1521. +                         TALK_ID(64, UNIT_MB), TALK_ID(75, UNIT_MB),
  1522. +                         TALK_ID(100, UNIT_MB), TALK_ID(128, UNIT_MB),
  1523. +                         TALK_ID(256, UNIT_MB), TALK_ID(512, UNIT_MB),
  1524. +                         TALK_ID(650, UNIT_MB), TALK_ID(700, UNIT_MB),
  1525. +                         TALK_ID(1024, UNIT_MB), TALK_ID(1536, UNIT_MB),
  1526. +                         TALK_ID(1792, UNIT_MB)),
  1527. +    {F_T_INT|F_RECSETTING, &global_settings.rec_channels, LANG_CHANNELS, INT(0),
  1528. +     "rec channels","stereo,mono",UNUSED},
  1529. +#if CONFIG_CODEC == SWCODEC
  1530. +    {F_T_INT|F_RECSETTING, &global_settings.rec_mono_mode,
  1531. +     LANG_RECORDING_MONO_MODE, INT(0), "rec mono mode","L+R,L,R",UNUSED},
  1532. +#endif
  1533. +    CHOICE_SETTING(F_RECSETTING, rec_split_type, LANG_SPLIT_TYPE, 0,
  1534. +                   "rec split type", "Split,Stop,Shutdown", NULL, 3,
  1535. +                   ID2P(LANG_START_NEW_FILE), ID2P(LANG_STOP_RECORDING),ID2P(LANG_STOP_RECORDING_AND_SHUTDOWN)),
  1536. +    CHOICE_SETTING(F_RECSETTING, rec_split_method, LANG_SPLIT_MEASURE, 0,
  1537. +                   "rec split method", "Time,Filesize", NULL, 2,
  1538. +                   ID2P(LANG_TIME), ID2P(LANG_FILESIZE)),
  1539. +    {F_T_INT|F_RECSETTING, &global_settings.rec_source, LANG_RECORDING_SOURCE,
  1540. +        INT(0), "rec source",
  1541. +        &HAVE_MIC_REC_(",mic")
  1542. +        HAVE_LINE_REC_(",line")
  1543. +        HAVE_SPDIF_REC_(",spdif")
  1544. +        HAVE_FMRADIO_REC_(",fmradio")[1],
  1545. +        UNUSED},
  1546. +    INT_SETTING(F_RECSETTING, rec_prerecord_time, LANG_RECORD_PRERECORD_TIME, 0,
  1547. +                "prerecording time", UNIT_SEC, 0, 30, 1,
  1548. +                formatter_unit_0_is_off, getlang_unit_0_is_off, NULL),
  1549. +
  1550. +    TEXT_SETTING(F_RECSETTING, rec_directory, "rec path",
  1551. +                     REC_BASE_DIR, NULL, NULL),
  1552. +#ifdef HAVE_BACKLIGHT
  1553. +    CHOICE_SETTING(F_RECSETTING, cliplight, LANG_CLIP_LIGHT, 0,
  1554. +                   "cliplight", "off,main,both,remote", NULL,
  1555. +#ifdef HAVE_REMOTE_LCD
  1556. +                   4, ID2P(LANG_OFF), ID2P(LANG_MAIN_UNIT),
  1557. +                   ID2P(LANG_REMOTE_MAIN), ID2P(LANG_REMOTE_UNIT)
  1558. +#else
  1559. +                   2, ID2P(LANG_OFF), ID2P(LANG_ON)
  1560. +#endif
  1561. +                  ),
  1562. +#endif
  1563. +#ifdef DEFAULT_REC_MIC_GAIN
  1564. +    {F_T_INT|F_RECSETTING,&global_settings.rec_mic_gain,
  1565. +        LANG_GAIN,INT(DEFAULT_REC_MIC_GAIN),
  1566. +        "rec mic gain",NULL,UNUSED},
  1567. +#endif /* DEFAULT_REC_MIC_GAIN */
  1568. +#ifdef DEFAULT_REC_LEFT_GAIN
  1569. +    {F_T_INT|F_RECSETTING,&global_settings.rec_left_gain,
  1570. +        LANG_GAIN_LEFT,INT(DEFAULT_REC_LEFT_GAIN),
  1571. +        "rec left gain",NULL,UNUSED},
  1572. +#endif /* DEFAULT_REC_LEFT_GAIN */
  1573. +#ifdef DEFAULT_REC_RIGHT_GAIN
  1574. +    {F_T_INT|F_RECSETTING,&global_settings.rec_right_gain,LANG_GAIN_RIGHT,
  1575. +        INT(DEFAULT_REC_RIGHT_GAIN),
  1576. +        "rec right gain",NULL,UNUSED},
  1577. +#endif /* DEFAULT_REC_RIGHT_GAIN */
  1578. +#if CONFIG_CODEC == MAS3587F
  1579. +    {F_T_INT|F_RECSETTING,&global_settings.rec_frequency,
  1580. +        LANG_RECORDING_FREQUENCY, INT(0),
  1581. +        "rec frequency","44,48,32,22,24,16", UNUSED},
  1582. +    INT_SETTING(F_RECSETTING, rec_quality, LANG_RECORDING_QUALITY, 5,
  1583. +                "rec quality", UNIT_INT, 0, 7, 1, NULL, NULL, NULL),
  1584. +    OFFON_SETTING(F_RECSETTING, rec_editable, LANG_RECORDING_EDITABLE, false,
  1585. +                  "editable recordings", NULL),
  1586. +#endif /* CONFIG_CODEC == MAS3587F */
  1587. +#if CONFIG_CODEC == SWCODEC
  1588. +    {F_T_INT|F_RECSETTING,&global_settings.rec_frequency,
  1589. +        LANG_RECORDING_FREQUENCY,INT(REC_FREQ_DEFAULT),
  1590. +        "rec frequency",REC_FREQ_CFG_VAL_LIST,UNUSED},
  1591. +    {F_T_INT|F_RECSETTING,&global_settings.rec_format,
  1592. +        LANG_RECORDING_FORMAT,INT(REC_FORMAT_DEFAULT),
  1593. +        "rec format",REC_FORMAT_CFG_VAL_LIST,UNUSED},
  1594. +    /** Encoder settings start - keep these together **/
  1595. +    /* aiff_enc */
  1596. +    /* (no settings yet) */
  1597. +    /* mp3_enc */
  1598. +    {F_T_INT|F_RECSETTING, &global_settings.mp3_enc_config.bitrate,-1,
  1599. +        INT(MP3_ENC_BITRATE_CFG_DEFAULT),
  1600. +        "mp3_enc bitrate",MP3_ENC_BITRATE_CFG_VALUE_LIST,UNUSED},
  1601. +    /* wav_enc */
  1602. +    /* (no settings yet) */
  1603. +    /* wavpack_enc */
  1604. +    /* (no settings yet) */
  1605. +    /** Encoder settings end **/
  1606. +#endif /* CONFIG_CODEC == SWCODEC */
  1607. +    /* values for the trigger */
  1608. +    INT_SETTING(F_RECSETTING, rec_start_thres_db, LANG_RECORD_START_THRESHOLD, -35,
  1609. +        "trigger start threshold dB", UNIT_DB, VOLUME_MIN/10, 0, 1, NULL, NULL, NULL),
  1610. +    INT_SETTING(F_RECSETTING, rec_start_thres_linear, LANG_RECORD_START_THRESHOLD, 5,
  1611. +        "trigger start threshold linear", UNIT_PERCENT, 0, 100, 1, NULL, NULL, NULL),
  1612. +    INT_SETTING(F_RECSETTING, rec_stop_thres_db, LANG_RECORD_STOP_THRESHOLD, -45,
  1613. +        "trigger stop threshold dB", UNIT_DB, VOLUME_MIN/10, 0, 1, NULL, NULL, NULL),
  1614. +    INT_SETTING(F_RECSETTING, rec_stop_thres_linear, LANG_RECORD_STOP_THRESHOLD, 10,
  1615. +        "trigger stop threshold linear", UNIT_PERCENT, 0, 100, 1, NULL, NULL, NULL),
  1616. +    TABLE_SETTING(F_RECSETTING, rec_start_duration, LANG_MIN_DURATION, 0,
  1617. +        "trigger start duration",
  1618. +        "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
  1619. +        UNIT_SEC, NULL, NULL, NULL, 13,
  1620. +        0,1,2,5,10,15,20,25,30,60,120,300,600),
  1621. +    TABLE_SETTING(F_RECSETTING, rec_stop_postrec, LANG_MIN_DURATION, 0,
  1622. +        "trigger stop duration",
  1623. +        "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
  1624. +        UNIT_SEC, NULL, NULL, NULL, 13,
  1625. +        0,1,2,5,10,15,20,25,30,60,120,300,600),
  1626. +    TABLE_SETTING(F_RECSETTING, rec_stop_gap, LANG_RECORD_STOP_GAP, 1,
  1627. +        "trigger min gap",
  1628. +        "0s,1s,2s,5s,10s,15s,20s,25s,30s,1min,2min,5min,10min",
  1629. +        UNIT_SEC, NULL, NULL, NULL, 13,
  1630. +        0,1,2,5,10,15,20,25,30,60,120,300,600),
  1631. +    CHOICE_SETTING(F_RECSETTING, rec_trigger_mode, LANG_RECORD_TRIGGER, TRIG_MODE_OFF,
  1632. +       "trigger mode","off,once,repeat", NULL ,3,
  1633. +       ID2P(LANG_OFF), ID2P(LANG_RECORD_TRIG_NOREARM), ID2P(LANG_REPEAT)),
  1634. +    CHOICE_SETTING(F_RECSETTING, rec_trigger_type, LANG_RECORD_TRIGGER_TYPE, TRIG_TYPE_STOP,
  1635. +        "trigger type","stop,pause,nf stp", NULL ,3,
  1636. +       ID2P(LANG_RECORD_TRIGGER_STOP), ID2P(LANG_PAUSE), ID2P(LANG_RECORD_TRIGGER_NEWFILESTP)),
  1637. +#endif /* HAVE_RECORDING */
  1638. +
  1639. +#ifdef HAVE_HISTOGRAM
  1640. +     /* TO DO: additional restictions of following REP items? */
  1641. +    TABLE_SETTING(F_RECSETTING, histogram_interval, LANG_HISTOGRAM_INTERVAL, 0,
  1642. +        "histogram interval","0s,1s,2s,4s",
  1643. +        UNIT_SEC, NULL, NULL, NULL, 4, 0,1,2,4),
  1644. +#endif /* HAVE_HISTOGRAM */
  1645. +
  1646. +#ifdef HAVE_SPDIF_POWER
  1647. +    OFFON_SETTING(F_SOUNDSETTING, spdif_enable, LANG_SPDIF_ENABLE, false,
  1648. +                  "spdif enable", spdif_power_enable),
  1649. +#endif
  1650. +    CHOICE_SETTING(0, next_folder, LANG_NEXT_FOLDER, FOLDER_ADVANCE_OFF,
  1651. +                   "folder navigation", "off,on,random",NULL ,3,
  1652. +                   ID2P(LANG_SET_BOOL_NO), ID2P(LANG_SET_BOOL_YES),
  1653. +                   ID2P(LANG_RANDOM)),
  1654. +    BOOL_SETTING(0, constrain_next_folder, LANG_CONSTRAIN_NEXT_FOLDER, false,
  1655. +                 "constrain next folder", off_on,
  1656. +                 LANG_SET_BOOL_YES, LANG_SET_BOOL_NO, NULL),
  1657. +
  1658. +#ifdef HAVE_TAGCACHE
  1659. +#if CONFIG_CODEC == SWCODEC
  1660. +    BOOL_SETTING(0, autoresume_enable, LANG_AUTORESUME, false,
  1661. +                 "autoresume enable", off_on,
  1662. +                 LANG_SET_BOOL_YES, LANG_SET_BOOL_NO, NULL),
  1663. +    CHOICE_SETTING(0, autoresume_automatic, LANG_AUTORESUME_AUTOMATIC,
  1664. +                   AUTORESUME_NEXTTRACK_NEVER,
  1665. +                   "autoresume next track", "never,all,custom",
  1666. +                   NULL, 3,
  1667. +                   ID2P(LANG_SET_BOOL_NO),
  1668. +                   ID2P(LANG_ALWAYS),
  1669. +                   ID2P(LANG_AUTORESUME_CUSTOM)),
  1670. +    TEXT_SETTING(0, autoresume_paths, "autoresume next track paths",
  1671. +                 "/podcast:/podcasts", NULL, NULL),
  1672. +#endif                  
  1673. +
  1674. +    OFFON_SETTING(0, runtimedb, LANG_RUNTIMEDB_ACTIVE, false,
  1675. +                  "gather runtime data", NULL),
  1676. +    TEXT_SETTING(0, tagcache_scan_paths, "database scan paths",
  1677. +                 DEFAULT_TAGCACHE_SCAN_PATHS, NULL, NULL),
  1678. +#endif
  1679. +
  1680. +#if CONFIG_CODEC == SWCODEC
  1681. +    /* replay gain */
  1682. +    CHOICE_SETTING(F_SOUNDSETTING, replaygain_settings.type,
  1683. +                   LANG_REPLAYGAIN_MODE, REPLAYGAIN_SHUFFLE, "replaygain type",
  1684. +                   "track,album,track shuffle,off", NULL, 4, ID2P(LANG_TRACK_GAIN),
  1685. +                   ID2P(LANG_ALBUM_GAIN), ID2P(LANG_SHUFFLE_GAIN), ID2P(LANG_OFF)),
  1686. +    OFFON_SETTING(F_SOUNDSETTING, replaygain_settings.noclip,
  1687. +                  LANG_REPLAYGAIN_NOCLIP, false, "replaygain noclip", NULL),
  1688. +    INT_SETTING_NOWRAP(F_SOUNDSETTING, replaygain_settings.preamp,
  1689. +                       LANG_REPLAYGAIN_PREAMP, 0, "replaygain preamp",
  1690. +                       UNIT_DB, -120, 120, 5, db_format, get_dec_talkid, NULL),
  1691. +
  1692. +    CHOICE_SETTING(0, beep, LANG_BEEP, 0, "beep", "off,weak,moderate,strong",
  1693. +                   NULL, 4, ID2P(LANG_OFF), ID2P(LANG_WEAK),
  1694. +                   ID2P(LANG_MODERATE), ID2P(LANG_STRONG)),
  1695. +
  1696. +#ifdef HAVE_CROSSFADE
  1697. +    /* crossfade */
  1698. +    CHOICE_SETTING(F_SOUNDSETTING, crossfade, LANG_CROSSFADE_ENABLE, 0,
  1699. +                   "crossfade",
  1700. +                   "off,auto track change,man track skip,shuffle,shuffle or man track skip,always",
  1701. +                   NULL, 6, ID2P(LANG_OFF), ID2P(LANG_AUTOTRACKSKIP),
  1702. +                   ID2P(LANG_MANTRACKSKIP), ID2P(LANG_SHUFFLE),
  1703. +                   ID2P(LANG_SHUFFLE_TRACKSKIP), ID2P(LANG_ALWAYS)),
  1704. +    INT_SETTING(F_SOUNDSETTING, crossfade_fade_in_delay,
  1705. +                LANG_CROSSFADE_FADE_IN_DELAY, 0,
  1706. +                "crossfade fade in delay", UNIT_SEC, 0, 7, 1, NULL, NULL, NULL),
  1707. +    INT_SETTING(F_SOUNDSETTING, crossfade_fade_out_delay,
  1708. +                LANG_CROSSFADE_FADE_OUT_DELAY, 0,
  1709. +                "crossfade fade out delay", UNIT_SEC, 0, 7, 1, NULL, NULL,NULL),
  1710. +    INT_SETTING(F_SOUNDSETTING, crossfade_fade_in_duration,
  1711. +                LANG_CROSSFADE_FADE_IN_DURATION, 2,
  1712. +                "crossfade fade in duration", UNIT_SEC, 0, 15, 1, NULL, NULL,
  1713. +                NULL),
  1714. +    INT_SETTING(F_SOUNDSETTING, crossfade_fade_out_duration,
  1715. +                LANG_CROSSFADE_FADE_OUT_DURATION, 2,
  1716. +                "crossfade fade out duration", UNIT_SEC, 0, 15, 1, NULL, NULL,
  1717. +                NULL),
  1718. +    CHOICE_SETTING(F_SOUNDSETTING, crossfade_fade_out_mixmode,
  1719. +                   LANG_CROSSFADE_FADE_OUT_MODE, 0,
  1720. +                   "crossfade fade out mode", "crossfade,mix", NULL, 2,
  1721. +                   ID2P(LANG_CROSSFADE), ID2P(LANG_MIX)),
  1722. +#endif
  1723. +
  1724. +    /* crossfeed */
  1725. +    CHOICE_SETTING(F_SOUNDSETTING, crossfeed, LANG_CROSSFEED, 0,"crossfeed",
  1726. +                   "off,meier,custom", dsp_set_crossfeed_type, 3,
  1727. +                   ID2P(LANG_OFF), ID2P(LANG_CROSSFEED_MEIER),
  1728. +                   ID2P(LANG_CROSSFEED_CUSTOM)),
  1729. +    INT_SETTING_NOWRAP(F_SOUNDSETTING, crossfeed_direct_gain,
  1730. +                       LANG_CROSSFEED_DIRECT_GAIN, -15,
  1731. +                       "crossfeed direct gain", UNIT_DB, -60, 0, 5,
  1732. +                       db_format, get_dec_talkid,dsp_set_crossfeed_direct_gain),
  1733. +    INT_SETTING_NOWRAP(F_SOUNDSETTING, crossfeed_cross_gain,
  1734. +                       LANG_CROSSFEED_CROSS_GAIN, -60,
  1735. +                       "crossfeed cross gain", UNIT_DB, -120, -30, 5,
  1736. +                       db_format, get_dec_talkid, crossfeed_cross_set),
  1737. +    INT_SETTING_NOWRAP(F_SOUNDSETTING, crossfeed_hf_attenuation,
  1738. +                       LANG_CROSSFEED_HF_ATTENUATION, -160,
  1739. +                       "crossfeed hf attenuation", UNIT_DB, -240, -60, 5,
  1740. +                       db_format, get_dec_talkid, crossfeed_cross_set),
  1741. +    INT_SETTING_NOWRAP(F_SOUNDSETTING, crossfeed_hf_cutoff,
  1742. +                       LANG_CROSSFEED_HF_CUTOFF, 700,
  1743. +                       "crossfeed hf cutoff", UNIT_HERTZ, 500, 2000, 100,
  1744. +                       NULL, NULL, crossfeed_cross_set),
  1745. +
  1746. +    /* equalizer */
  1747. +    OFFON_SETTING(F_EQSETTING, eq_enabled, LANG_EQUALIZER_ENABLED, false,
  1748. +                  "eq enabled", NULL),
  1749. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_precut, LANG_EQUALIZER_PRECUT, 0,
  1750. +                       "eq precut", UNIT_DB, 0, 240, 5, eq_precut_format,
  1751. +                       get_precut_talkid, dsp_set_eq_precut),
  1752. +    /* 0..32768 Hz */
  1753. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[0].cutoff, LANG_EQUALIZER_BAND_CUTOFF,
  1754. +                       60, "eq band 0 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  1755. +                       EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
  1756. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[1].cutoff, LANG_EQUALIZER_BAND_CENTER,
  1757. +                       200, "eq band 1 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  1758. +                       EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
  1759. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[2].cutoff, LANG_EQUALIZER_BAND_CENTER,
  1760. +                       800, "eq band 2 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  1761. +                       EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
  1762. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[3].cutoff, LANG_EQUALIZER_BAND_CENTER,
  1763. +                       4000, "eq band 3 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  1764. +                       EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
  1765. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[4].cutoff, LANG_EQUALIZER_BAND_CUTOFF,
  1766. +                       12000, "eq band 4 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN,
  1767. +                       EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL),
  1768. +    /* 0..64 (or 0.0 to 6.4) */
  1769. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[0].q, LANG_EQUALIZER_BAND_Q, 7,
  1770. +                       "eq band 0 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
  1771. +                       eq_q_format, get_dec_talkid, NULL),
  1772. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[1].q, LANG_EQUALIZER_BAND_Q, 10,
  1773. +                       "eq band 1 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
  1774. +                       eq_q_format, get_dec_talkid, NULL),
  1775. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[2].q, LANG_EQUALIZER_BAND_Q, 10,
  1776. +                       "eq band 2 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
  1777. +                       eq_q_format, get_dec_talkid, NULL),
  1778. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[3].q, LANG_EQUALIZER_BAND_Q, 10,
  1779. +                       "eq band 3 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
  1780. +                       eq_q_format, get_dec_talkid, NULL),
  1781. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[4].q, LANG_EQUALIZER_BAND_Q, 7,
  1782. +                       "eq band 4 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP,
  1783. +                       eq_q_format, get_dec_talkid, NULL),
  1784. +    /* -240..240 (or -24db to +24db) */
  1785. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[0].gain, LANG_GAIN, 0,
  1786. +                       "eq band 0 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
  1787. +                       EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
  1788. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[1].gain, LANG_GAIN, 0,
  1789. +                       "eq band 1 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
  1790. +                       EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
  1791. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[2].gain, LANG_GAIN, 0,
  1792. +                       "eq band 2 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
  1793. +                       EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
  1794. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[3].gain, LANG_GAIN, 0,
  1795. +                       "eq band 3 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
  1796. +                       EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
  1797. +    INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[4].gain, LANG_GAIN, 0,
  1798. +                       "eq band 4 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX,
  1799. +                       EQ_GAIN_STEP, db_format, get_dec_talkid, NULL),
  1800. +
  1801. +    /* dithering */
  1802. +    OFFON_SETTING(F_SOUNDSETTING, dithering_enabled, LANG_DITHERING, false,
  1803. +                  "dithering enabled", dsp_dither_enable),
  1804. +
  1805. +#ifdef HAVE_PITCHCONTROL
  1806. +    /* timestretch */
  1807. +    OFFON_SETTING(F_SOUNDSETTING, timestretch_enabled, LANG_TIMESTRETCH, false,
  1808. +                  "timestretch enabled", dsp_timestretch_enable),
  1809. +#endif
  1810. +
  1811. +    /* compressor */
  1812. +    INT_SETTING_NOWRAP(F_SOUNDSETTING, compressor_settings.threshold,
  1813. +                       LANG_COMPRESSOR_THRESHOLD, 0,
  1814. +                       "compressor threshold", UNIT_DB, 0, -24,
  1815. +                       -3, formatter_unit_0_is_off, getlang_unit_0_is_off,
  1816. +                       compressor_set),
  1817. +    CHOICE_SETTING(F_SOUNDSETTING|F_NO_WRAP, compressor_settings.makeup_gain,
  1818. +                   LANG_COMPRESSOR_GAIN, 1, "compressor makeup gain",
  1819. +                   "off,auto", compressor_set, 2,
  1820. +                   ID2P(LANG_OFF), ID2P(LANG_AUTO)),
  1821. +    CHOICE_SETTING(F_SOUNDSETTING|F_NO_WRAP, compressor_settings.ratio,
  1822. +                   LANG_COMPRESSOR_RATIO, 1, "compressor ratio",
  1823. +                   "2:1,4:1,6:1,10:1,limit", compressor_set, 5,
  1824. +                   ID2P(LANG_COMPRESSOR_RATIO_2), ID2P(LANG_COMPRESSOR_RATIO_4),
  1825. +                   ID2P(LANG_COMPRESSOR_RATIO_6), ID2P(LANG_COMPRESSOR_RATIO_10),
  1826. +                   ID2P(LANG_COMPRESSOR_RATIO_LIMIT)),
  1827. +    CHOICE_SETTING(F_SOUNDSETTING|F_NO_WRAP, compressor_settings.knee,
  1828. +                   LANG_COMPRESSOR_KNEE, 1, "compressor knee",
  1829. +                   "hard knee,soft knee", compressor_set, 2,
  1830. +                   ID2P(LANG_COMPRESSOR_HARD_KNEE), ID2P(LANG_COMPRESSOR_SOFT_KNEE)),
  1831. +    INT_SETTING_NOWRAP(F_SOUNDSETTING, compressor_settings.release_time,
  1832. +                       LANG_COMPRESSOR_RELEASE, 500,
  1833. +                       "compressor release time", UNIT_MS, 100, 1000,
  1834. +                       100, NULL, NULL, compressor_set),
  1835. +#endif
  1836. +#ifdef AUDIOHW_HAVE_BASS_CUTOFF
  1837. +    SOUND_SETTING(F_NO_WRAP, bass_cutoff, LANG_BASS_CUTOFF,
  1838. +                  "bass cutoff", SOUND_BASS_CUTOFF),
  1839. +#endif
  1840. +#ifdef AUDIOHW_HAVE_TREBLE_CUTOFF
  1841. +    SOUND_SETTING(F_NO_WRAP, treble_cutoff, LANG_TREBLE_CUTOFF,
  1842. +                  "treble cutoff", SOUND_TREBLE_CUTOFF),
  1843. +#endif
  1844. +#ifdef HAVE_DIRCACHE
  1845. +    /*enable dircache for all targets > 2MB of RAM by default*/
  1846. +    OFFON_SETTING(F_BANFROMQS,dircache,LANG_DIRCACHE_ENABLE,true,"dircache",NULL),
  1847. +    SYSTEM_SETTING(NVRAM(4),dircache_size,0),
  1848. +#endif
  1849. +
  1850. +#ifdef HAVE_TAGCACHE
  1851. +#ifdef HAVE_TC_RAMCACHE
  1852. +    OFFON_SETTING(F_BANFROMQS,tagcache_ram,LANG_TAGCACHE_RAM,false,"tagcache_ram",NULL),
  1853. +#endif
  1854. +    OFFON_SETTING(F_BANFROMQS, tagcache_autoupdate, LANG_TAGCACHE_AUTOUPDATE, false,
  1855. +                  "tagcache_autoupdate", NULL),
  1856. +#endif
  1857. +    CHOICE_SETTING(0, default_codepage, LANG_DEFAULT_CODEPAGE, 0,
  1858. +                   "default codepage",
  1859. +#ifdef HAVE_LCD_BITMAP
  1860. +                   /* The order must match with that in unicode.c */
  1861. +                   "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256,"
  1862. +                   "iso8859-9,iso8859-2,cp1250,cp1252,sjis,gb2312,ksx1001,big5,utf-8",
  1863. +                   set_codepage, 14,
  1864. +                   ID2P(LANG_CODEPAGE_LATIN1),
  1865. +                   ID2P(LANG_CODEPAGE_GREEK),
  1866. +                   ID2P(LANG_CODEPAGE_HEBREW), ID2P(LANG_CODEPAGE_CYRILLIC),
  1867. +                   ID2P(LANG_CODEPAGE_THAI), ID2P(LANG_CODEPAGE_ARABIC),
  1868. +                   ID2P(LANG_CODEPAGE_TURKISH),
  1869. +                   ID2P(LANG_CODEPAGE_LATIN_EXTENDED),
  1870. +                   ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN),
  1871. +                   ID2P(LANG_CODEPAGE_WESTERN_EUROPEAN),
  1872. +                   ID2P(LANG_CODEPAGE_JAPANESE),
  1873. +                   ID2P(LANG_CODEPAGE_SIMPLIFIED), ID2P(LANG_CODEPAGE_KOREAN),
  1874. +                   ID2P(LANG_CODEPAGE_TRADITIONAL), ID2P(LANG_CODEPAGE_UTF8)),
  1875. +#else /* !HAVE_LCD_BITMAP */
  1876. +                   /* The order must match with that in unicode.c */
  1877. +                   "iso8859-1,iso8859-7,cp1251,iso8859-9,iso8859-2,cp1250,cp1252,utf-8",
  1878. +                   set_codepage, 7,
  1879. +                   ID2P(LANG_CODEPAGE_LATIN1), ID2P(LANG_CODEPAGE_GREEK),
  1880. +                   ID2P(LANG_CODEPAGE_CYRILLIC), ID2P(LANG_CODEPAGE_TURKISH),
  1881. +                   ID2P(LANG_CODEPAGE_LATIN_EXTENDED),
  1882. +                   ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN),
  1883. +                   ID2P(LANG_CODEPAGE_WESTERN_EUROPEAN),
  1884. +                   ID2P(LANG_CODEPAGE_UTF8)),
  1885. +#endif
  1886. +    OFFON_SETTING(0, warnon_erase_dynplaylist, LANG_WARN_ERASEDYNPLAYLIST_MENU,
  1887. +                  true, "warn when erasing dynamic playlist",NULL),
  1888. +
  1889. +#ifdef HAVE_BACKLIGHT
  1890. +#ifdef HAS_BUTTON_HOLD
  1891. +    CHOICE_SETTING(0, backlight_on_button_hold, LANG_BACKLIGHT_ON_BUTTON_HOLD,
  1892. +                   1, "backlight on button hold", "normal,off,on",
  1893. +                   backlight_set_on_button_hold, 3,
  1894. +                   ID2P(LANG_NORMAL), ID2P(LANG_OFF), ID2P(LANG_ON)),
  1895. +#endif
  1896. +
  1897. +#ifdef HAVE_LCD_SLEEP_SETTING
  1898. +    STRINGCHOICE_SETTING(0, lcd_sleep_after_backlight_off,
  1899. +                         LANG_LCD_SLEEP_AFTER_BACKLIGHT_OFF, 3,
  1900. +                         "lcd sleep after backlight off",
  1901. +                         "always,never,5,10,15,20,30,45,60,90",
  1902. +                         lcd_set_sleep_after_backlight_off, 10,
  1903. +                         LANG_ALWAYS, LANG_NEVER, TALK_ID(5, UNIT_SEC),
  1904. +                         TALK_ID(10, UNIT_SEC), TALK_ID(15, UNIT_SEC),
  1905. +                         TALK_ID(20, UNIT_SEC), TALK_ID(30, UNIT_SEC),
  1906. +                         TALK_ID(45, UNIT_SEC),TALK_ID(60, UNIT_SEC),
  1907. +                         TALK_ID(90, UNIT_SEC)),
  1908. +#endif /* HAVE_LCD_SLEEP_SETTING */
  1909. +#endif /* HAVE_BACKLIGHT */
  1910. +
  1911. +    OFFON_SETTING(0, hold_lr_for_scroll_in_list, -1, true,
  1912. +                  "hold_lr_for_scroll_in_list",NULL),
  1913. +#ifdef HAVE_LCD_BITMAP
  1914. +    CHOICE_SETTING(0, show_path_in_browser, LANG_SHOW_PATH, SHOW_PATH_CURRENT,
  1915. +                   "show path in browser", "off,current directory,full path",
  1916. +                   NULL, 3, ID2P(LANG_OFF), ID2P(LANG_SHOW_PATH_CURRENT),
  1917. +                   ID2P(LANG_DISPLAY_FULL_PATH)),
  1918. +#endif
  1919. +
  1920. +#ifdef HAVE_AGC
  1921. +    {F_T_INT,&global_settings.rec_agc_preset_mic,LANG_RECORDING_AGC_PRESET,
  1922. +        INT(1),"agc mic preset",NULL,UNUSED},
  1923. +    {F_T_INT,&global_settings.rec_agc_preset_line,LANG_RECORDING_AGC_PRESET,
  1924. +        INT(1),"agc line preset",NULL,UNUSED},
  1925. +    {F_T_INT,&global_settings.rec_agc_maxgain_mic,-1,INT(104),
  1926. +        "agc maximum mic gain",NULL,UNUSED},
  1927. +    {F_T_INT,&global_settings.rec_agc_maxgain_line,-1,INT(96),
  1928. +        "agc maximum line gain",NULL,UNUSED},
  1929. +    {F_T_INT,&global_settings.rec_agc_cliptime,LANG_RECORDING_AGC_CLIPTIME,
  1930. +        INT(1),"agc cliptime","0.2s,0.4s,0.6s,0.8,1s",UNUSED},
  1931. +#endif
  1932. +
  1933. +#ifdef HAVE_REMOTE_LCD
  1934. +#ifdef HAS_REMOTE_BUTTON_HOLD
  1935. +    CHOICE_SETTING(0, remote_backlight_on_button_hold,
  1936. +                   LANG_BACKLIGHT_ON_BUTTON_HOLD, 0,
  1937. +                   "remote backlight on button hold",
  1938. +                   "normal,off,on", remote_backlight_set_on_button_hold, 3,
  1939. +                   ID2P(LANG_NORMAL), ID2P(LANG_OFF), ID2P(LANG_ON)),
  1940. +#endif
  1941. +#endif
  1942. +#ifdef HAVE_HEADPHONE_DETECTION
  1943. +    CHOICE_SETTING(0, unplug_mode, LANG_HEADPHONE_UNPLUG, 0,
  1944. +                   "pause on headphone unplug", "off,pause,pause and resume",
  1945. +                   NULL, 3, ID2P(LANG_OFF), ID2P(LANG_PAUSE),
  1946. +                   ID2P(LANG_HEADPHONE_UNPLUG_RESUME)),
  1947. +    OFFON_SETTING(0, unplug_autoresume,
  1948. +                  LANG_HEADPHONE_UNPLUG_DISABLE_AUTORESUME, false,
  1949. +                  "disable autoresume if phones not present",NULL),
  1950. +#endif
  1951. +    INT_SETTING(0, pause_rewind, LANG_PAUSE_REWIND, 0,
  1952. +                "rewind duration on pause", UNIT_SEC, 0, 15, 1, NULL, NULL,
  1953. +                NULL),
  1954. +#if CONFIG_TUNER
  1955. +    CHOICE_SETTING(0, fm_region, LANG_FM_REGION, 0,
  1956. +                   "fm_region", "eu,us,jp,kr,it,wo", set_radio_region, 6,
  1957. +                   ID2P(LANG_FM_EUROPE), ID2P(LANG_FM_US),
  1958. +                   ID2P(LANG_FM_JAPAN), ID2P(LANG_FM_KOREA),
  1959. +                   ID2P(LANG_FM_ITALY), ID2P(LANG_FM_OTHER)),
  1960. +#endif
  1961. +
  1962. +    OFFON_SETTING(F_BANFROMQS, audioscrobbler, LANG_AUDIOSCROBBLER, false,
  1963. +                  "Last.fm Logging", NULL),
  1964. +#if CONFIG_TUNER
  1965. +    TEXT_SETTING(0, fmr_file, "fmr", "-",
  1966. +                     FMPRESET_PATH "/", ".fmr"),
  1967. +    TEXT_SETTING(F_THEMESETTING,fms_file, "fms",
  1968. +                     DEFAULT_FMS_NAME, SBS_DIR "/", ".fms"),
  1969. +#ifdef HAVE_REMOTE_LCD
  1970. +    TEXT_SETTING(F_THEMESETTING,rfms_file, "rfms",
  1971. +                     DEFAULT_FMS_NAME, SBS_DIR "/", ".rfms"),
  1972. +#endif
  1973. +#endif /* CONFIG_TUNER */
  1974. +#ifdef HAVE_LCD_BITMAP
  1975. +    TEXT_SETTING(F_THEMESETTING, font_file, "font",
  1976. +                     DEFAULT_FONTNAME, FONT_DIR "/", ".fnt"),
  1977. +    INT_SETTING(0, glyphs_to_cache, LANG_GLYPHS, DEFAULT_GLYPHS,
  1978. +                "glyphs", UNIT_INT, MIN_GLYPHS, MAX_GLYPHS, 10,
  1979. +                NULL, NULL, NULL),
  1980. +#endif
  1981. +#ifdef HAVE_REMOTE_LCD
  1982. +    TEXT_SETTING(F_THEMESETTING, remote_font_file, "remote font",
  1983. +                     DEFAULT_REMOTE_FONTNAME, FONT_DIR "/", ".fnt"),
  1984. +#endif
  1985. +    TEXT_SETTING(F_THEMESETTING,wps_file, "wps",
  1986. +                     DEFAULT_WPSNAME, WPS_DIR "/", ".wps"),
  1987. +#ifdef HAVE_LCD_BITMAP
  1988. +    TEXT_SETTING(F_THEMESETTING,sbs_file, "sbs",
  1989. +                     DEFAULT_SBSNAME, SBS_DIR "/", ".sbs"),
  1990. +#endif
  1991. +#ifdef HAVE_REMOTE_LCD
  1992. +    TEXT_SETTING(F_THEMESETTING,rwps_file,"rwps",
  1993. +                     DEFAULT_WPSNAME, WPS_DIR "/", ".rwps"),
  1994. +    TEXT_SETTING(F_THEMESETTING,rsbs_file, "rsbs",
  1995. +                     DEFAULT_SBSNAME, SBS_DIR "/", ".rsbs"),
  1996. +#endif
  1997. +    TEXT_SETTING(0,lang_file,"lang","",LANG_DIR "/",".lng"),
  1998. +#if LCD_DEPTH > 1
  1999. +    TEXT_SETTING(F_THEMESETTING,backdrop_file,"backdrop",
  2000. +                     DEFAULT_BACKDROP, NULL, NULL),
  2001. +#endif
  2002. +#ifdef HAVE_LCD_BITMAP
  2003. +    TEXT_SETTING(0,kbd_file,"kbd","-",ROCKBOX_DIR "/",".kbd"),
  2004. +#endif
  2005. +#ifdef HAVE_USB_CHARGING_ENABLE
  2006. +    CHOICE_SETTING(0, usb_charging, LANG_USB_CHARGING, 1, "usb charging",
  2007. +                   "off,on,force", NULL, 3, ID2P(LANG_SET_BOOL_NO),
  2008. +                   ID2P(LANG_SET_BOOL_YES), ID2P(LANG_FORCE)),
  2009. +#endif
  2010. +    OFFON_SETTING(F_BANFROMQS,cuesheet,LANG_CUESHEET_ENABLE,false,"cuesheet support",
  2011. +                  NULL),
  2012. +    TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, skip_length,
  2013. +                  LANG_SKIP_LENGTH, 0, "skip length",
  2014. +                  "outro,track,1s,2s,3s,5s,7s,10s,15s,20s,30s,45s,1min,90s,2min,3min,5min,10min,15min",
  2015. +                  UNIT_SEC, formatter_unit_0_is_skip_track,
  2016. +                  getlang_unit_0_is_skip_track, NULL,
  2017. +                  19, -1,0,1,2,3,5,7,10,15,20,30,45,60,90,120,180,300,600,900),
  2018. +    CHOICE_SETTING(0, start_in_screen, LANG_START_SCREEN, 1,
  2019. +                   "start in screen", "previous,root,files,"
  2020. +#ifdef HAVE_TAGCACHE
  2021. +#define START_DB_COUNT 1
  2022. +                   "db,"
  2023. +#else
  2024. +#define START_DB_COUNT 0
  2025. +#endif
  2026. +                   "wps,menu,"
  2027. +#ifdef HAVE_RECORDING
  2028. +#define START_REC_COUNT 1
  2029. +                   "recording,"
  2030. +#else
  2031. +#define START_REC_COUNT 0
  2032. +#endif
  2033. +#if CONFIG_TUNER
  2034. +#define START_TUNER_COUNT 1
  2035. +                   "radio,"
  2036. +#else
  2037. +#define START_TUNER_COUNT 0
  2038. +#endif
  2039. +                   "bookmarks"
  2040. +#ifdef HAVE_PICTUREFLOW_INTEGRATION
  2041. +#define START_PF_COUNT 1
  2042. +                   ",pictureflow"
  2043. +#else
  2044. +#define START_PF_COUNT 0
  2045. +#endif
  2046. +                   , NULL,
  2047. +    (6 + START_DB_COUNT + START_REC_COUNT + START_TUNER_COUNT + START_PF_COUNT),
  2048. +                   ID2P(LANG_PREVIOUS_SCREEN), ID2P(LANG_MAIN_MENU),
  2049. +                   ID2P(LANG_DIR_BROWSER),
  2050. +#ifdef HAVE_TAGCACHE
  2051. +                   ID2P(LANG_TAGCACHE),
  2052. +#endif
  2053. +                   ID2P(LANG_RESUME_PLAYBACK), ID2P(LANG_SETTINGS),
  2054. +#ifdef HAVE_RECORDING
  2055. +                   ID2P(LANG_RECORDING),
  2056. +#endif
  2057. +#if CONFIG_TUNER
  2058. +                   ID2P(LANG_FM_RADIO),
  2059. +#endif
  2060. +                   ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS)
  2061. +#ifdef HAVE_PICTUREFLOW_INTEGRATION
  2062. +                   ,ID2P(LANG_ONPLAY_PICTUREFLOW)
  2063. +#endif
  2064. +                  ),
  2065. +    SYSTEM_SETTING(NVRAM(1),last_screen,-1),
  2066. +#if defined(HAVE_RTC_ALARM) && \
  2067. +    (defined(HAVE_RECORDING) || CONFIG_TUNER)
  2068. +    {F_T_INT, &global_settings.alarm_wake_up_screen, LANG_ALARM_WAKEUP_SCREEN,
  2069. +        INT(ALARM_START_WPS), "alarm wakeup screen", ALARM_SETTING_TEXT,UNUSED},
  2070. +#endif /* HAVE_RTC_ALARM */
  2071. +
  2072. +    /* Customizable icons */
  2073. +#ifdef HAVE_LCD_BITMAP
  2074. +    TEXT_SETTING(F_THEMESETTING, icon_file, "iconset", DEFAULT_ICONSET,
  2075. +                     ICON_DIR "/", ".bmp"),
  2076. +    TEXT_SETTING(F_THEMESETTING, viewers_icon_file, "viewers iconset",
  2077. +                     DEFAULT_VIEWERS_ICONSET,
  2078. +                     ICON_DIR "/", ".bmp"),
  2079. +#endif
  2080. +#ifdef HAVE_REMOTE_LCD
  2081. +    TEXT_SETTING(F_THEMESETTING, remote_icon_file, "remote iconset", "-",
  2082. +                     ICON_DIR "/", ".bmp"),
  2083. +    TEXT_SETTING(F_THEMESETTING, remote_viewers_icon_file,
  2084. +                     "remote viewers iconset", "-",
  2085. +                     ICON_DIR "/", ".bmp"),
  2086. +#endif /* HAVE_REMOTE_LCD */
  2087. +#ifdef HAVE_LCD_COLOR
  2088. +    TEXT_SETTING(F_THEMESETTING, colors_file, "filetype colours", "-",
  2089. +                     THEME_DIR "/", ".colours"),
  2090. +#endif
  2091. +#ifdef HAVE_BUTTON_LIGHT
  2092. +    TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, buttonlight_timeout,
  2093. +                  LANG_BUTTONLIGHT_TIMEOUT, 5, "button light timeout", off_on,
  2094. +                  UNIT_SEC, backlight_formatter, backlight_getlang,
  2095. +                  buttonlight_set_timeout, 20,
  2096. +                  -1,0,1,2,3,4,5,6,7,8,9,10,15,20,25,30,45,60,90,120),
  2097. +#endif
  2098. +#ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
  2099. +    INT_SETTING(F_NO_WRAP, buttonlight_brightness, LANG_BUTTONLIGHT_BRIGHTNESS,
  2100. +                DEFAULT_BRIGHTNESS_SETTING,
  2101. +                "button light brightness",UNIT_INT, MIN_BRIGHTNESS_SETTING,
  2102. +                MAX_BRIGHTNESS_SETTING, 1, NULL, NULL,
  2103. +                buttonlight_set_brightness),
  2104. +#endif
  2105. +#ifndef HAVE_WHEEL_ACCELERATION
  2106. +    INT_SETTING(0, list_accel_start_delay, LANG_LISTACCEL_START_DELAY,
  2107. +                2, "list_accel_start_delay", UNIT_SEC, 0, 10, 1,
  2108. +                formatter_unit_0_is_off, getlang_unit_0_is_off, NULL),
  2109. +    INT_SETTING(0, list_accel_wait, LANG_LISTACCEL_ACCEL_SPEED,
  2110. +                3, "list_accel_wait", UNIT_SEC, 1, 10, 1,
  2111. +                scanaccel_formatter, getlang_unit_0_is_off, NULL),
  2112. +#endif /* HAVE_WHEEL_ACCELERATION */
  2113. +#if CONFIG_CODEC == SWCODEC
  2114. +    /* keyclick */
  2115. +#ifdef HAVE_HARDWARE_CLICK
  2116. +    CHOICE_SETTING(0, keyclick, LANG_KEYCLICK_SOFTWARE, 0,
  2117. +                   "keyclick", "off,weak,moderate,strong", NULL, 4,
  2118. +                   ID2P(LANG_OFF), ID2P(LANG_WEAK), ID2P(LANG_MODERATE),
  2119. +                   ID2P(LANG_STRONG)),
  2120. +    OFFON_SETTING(0, keyclick_repeats, LANG_KEYCLICK_REPEATS, false,
  2121. +                  "keyclick repeats", NULL),
  2122. +    OFFON_SETTING(0, keyclick_hardware, LANG_KEYCLICK_HARDWARE, false,
  2123. +        "hardware keyclick", NULL),
  2124. +#else
  2125. +    CHOICE_SETTING(0, keyclick, LANG_KEYCLICK, 0,
  2126. +                   "keyclick", "off,weak,moderate,strong", NULL, 4,
  2127. +                   ID2P(LANG_OFF), ID2P(LANG_WEAK), ID2P(LANG_MODERATE),
  2128. +                   ID2P(LANG_STRONG)),
  2129. +    OFFON_SETTING(0, keyclick_repeats, LANG_KEYCLICK_REPEATS, false,
  2130. +                  "keyclick repeats", NULL),
  2131. +#endif
  2132. +#endif /* CONFIG_CODEC == SWCODEC */
  2133. +    TEXT_SETTING(0, playlist_catalog_dir, "playlist catalog directory",
  2134. +                     PLAYLIST_CATALOG_DEFAULT_DIR, NULL, NULL),
  2135. +    INT_SETTING(0, sleeptimer_duration, LANG_SLEEP_TIMER_DURATION, 30,
  2136. +                "sleeptimer duration",
  2137. +                UNIT_MIN, 5, 300, 5, NULL, NULL, NULL),
  2138. +    OFFON_SETTING(0, sleeptimer_on_startup, LANG_SLEEP_TIMER_ON_POWER_UP, false,
  2139. +                  "sleeptimer on startup", NULL),
  2140. +    OFFON_SETTING(0, keypress_restarts_sleeptimer, LANG_KEYPRESS_RESTARTS_SLEEP_TIMER, false,
  2141. +                  "keypress restarts sleeptimer", set_keypress_restarts_sleep_timer),
  2142. +#ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING
  2143. +    CHOICE_SETTING(0, touchpad_sensitivity, LANG_TOUCHPAD_SENSITIVITY, 0,
  2144. +                   "touchpad sensitivity", "normal,high", touchpad_set_sensitivity, 2,
  2145. +                   ID2P(LANG_NORMAL), ID2P(LANG_HIGH)),
  2146. +#endif
  2147. +#ifdef HAVE_QUICKSCREEN
  2148. +   CUSTOM_SETTING(0, qs_items[QUICKSCREEN_TOP], LANG_TOP_QS_ITEM,
  2149. +                  NULL, "qs top",
  2150. +                  qs_load_from_cfg, qs_write_to_cfg,
  2151. +                  qs_is_changed, qs_set_default),
  2152. +   CUSTOM_SETTING(0, qs_items[QUICKSCREEN_LEFT], LANG_LEFT_QS_ITEM,
  2153. +                  &global_settings.playlist_shuffle, "qs left",
  2154. +                  qs_load_from_cfg, qs_write_to_cfg,
  2155. +                  qs_is_changed, qs_set_default),
  2156. +   CUSTOM_SETTING(0, qs_items[QUICKSCREEN_RIGHT], LANG_RIGHT_QS_ITEM,
  2157. +                  &global_settings.repeat_mode, "qs right",
  2158. +                  qs_load_from_cfg, qs_write_to_cfg,
  2159. +                  qs_is_changed, qs_set_default),
  2160. +   CUSTOM_SETTING(0, qs_items[QUICKSCREEN_BOTTOM], LANG_BOTTOM_QS_ITEM,
  2161. +                  NULL, "qs bottom",
  2162. +                  qs_load_from_cfg, qs_write_to_cfg,
  2163. +                  qs_is_changed, qs_set_default),
  2164. +   OFFON_SETTING(0, shortcuts_replaces_qs, LANG_USE_SHORTCUTS_INSTEAD_OF_QS,
  2165. +                  false, "shortcuts instead of quickscreen", NULL),
  2166. +#endif
  2167. +#ifdef HAVE_SPEAKER
  2168. +    OFFON_SETTING(0, speaker_enabled, LANG_ENABLE_SPEAKER, false, "speaker",
  2169. +                  audiohw_enable_speaker),
  2170. +#endif
  2171. +#ifdef HAVE_TOUCHSCREEN
  2172. +    CHOICE_SETTING(0, touch_mode, LANG_TOUCHSCREEN_MODE, DEFAULT_TOUCHSCREEN_MODE,
  2173. +                   "touchscreen mode", "point,grid", NULL, 2,
  2174. +                   ID2P(LANG_TOUCHSCREEN_POINT), ID2P(LANG_TOUCHSCREEN_GRID)),
  2175. +    CUSTOM_SETTING(0, ts_calibration_data, -1,
  2176. +                    &default_calibration_parameters, "touchscreen calibration",
  2177. +                    tsc_load_from_cfg, tsc_write_to_cfg,
  2178. +                    tsc_is_changed, tsc_set_default),
  2179. +#endif
  2180. +    OFFON_SETTING(0, prevent_skip, LANG_PREVENT_SKIPPING, false, "prevent track skip", NULL),
  2181. +
  2182. +#ifdef HAVE_PITCHCONTROL
  2183. +    OFFON_SETTING(0, pitch_mode_semitone, LANG_SEMITONE, false,
  2184. +                  "Semitone pitch change", NULL),
  2185. +#if CONFIG_CODEC == SWCODEC
  2186. +    OFFON_SETTING(0, pitch_mode_timestretch, LANG_TIMESTRETCH, false,
  2187. +                  "Timestretch mode", NULL),
  2188. +#endif
  2189. +#endif
  2190. +
  2191. +#ifdef USB_ENABLE_HID
  2192. +    OFFON_SETTING(0, usb_hid, LANG_USB_HID, true, "usb hid", usb_set_hid),
  2193. +    CHOICE_SETTING(0, usb_keypad_mode, LANG_USB_KEYPAD_MODE, 0,
  2194. +            "usb keypad mode", "multimedia,presentation,browser"
  2195. +#ifdef HAVE_USB_HID_MOUSE
  2196. +            ",mouse"
  2197. +#endif
  2198. +            , NULL,
  2199. +#ifdef HAVE_USB_HID_MOUSE
  2200. +            4,
  2201. +#else
  2202. +            3,
  2203. +#endif
  2204. +            ID2P(LANG_MULTIMEDIA_MODE), ID2P(LANG_PRESENTATION_MODE),
  2205. +            ID2P(LANG_BROWSER_MODE)
  2206. +#ifdef HAVE_USB_HID_MOUSE
  2207. +            , ID2P(LANG_MOUSE_MODE)
  2208. +#endif
  2209. +    ), /* CHOICE_SETTING( usb_keypad_mode ) */
  2210. +#endif
  2211. +
  2212. +#if defined(USB_ENABLE_STORAGE) && defined(HAVE_MULTIDRIVE)
  2213. +    OFFON_SETTING(0, usb_skip_first_drive, LANG_USB_SKIP_FIRST_DRIVE, false, "usb skip first drive", usb_set_skip_first_drive),
  2214. +#endif
  2215. +
  2216. +    /* Customizable list */
  2217. +#ifdef HAVE_LCD_BITMAP
  2218. +    VIEWPORT_SETTING(ui_vp_config, "ui viewport"),
  2219. +#ifdef HAVE_REMOTE_LCD
  2220. +    VIEWPORT_SETTING(remote_ui_vp_config, "remote ui viewport"),
  2221. +#endif
  2222. +#endif
  2223. +
  2224. +#ifdef HAVE_MORSE_INPUT
  2225. +    OFFON_SETTING(0, morse_input, LANG_MORSE_INPUT, false, "morse input", NULL),
  2226. +#endif
  2227. +
  2228. +#ifdef HAVE_HOTKEY
  2229. +    TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, hotkey_wps,
  2230. +        LANG_HOTKEY_WPS, HOTKEY_VIEW_PLAYLIST, "hotkey wps",
  2231. +        "off,view playlist,show track info,pitchscreen,open with,delete"
  2232. +#ifdef HAVE_PICTUREFLOW_INTEGRATION        
  2233. +        ",pictureflow"
  2234. +#endif
  2235. +        ,UNIT_INT, hotkey_formatter, hotkey_getlang, NULL,
  2236. +#ifdef HAVE_PICTUREFLOW_INTEGRATION        
  2237. +        7,
  2238. +#else
  2239. +        6,
  2240. +#endif
  2241. +        HOTKEY_OFF,
  2242. +        HOTKEY_VIEW_PLAYLIST, HOTKEY_SHOW_TRACK_INFO, HOTKEY_PITCHSCREEN,
  2243. +        HOTKEY_OPEN_WITH, HOTKEY_DELETE
  2244. +#ifdef HAVE_PICTUREFLOW_INTEGRATION        
  2245. +        , HOTKEY_PICTUREFLOW
  2246. +#endif        
  2247. +        ),
  2248. +    TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, hotkey_tree,
  2249. +        LANG_HOTKEY_FILE_BROWSER, HOTKEY_OFF, "hotkey tree",
  2250. +        "off,open with,delete,insert,insert shuffled",
  2251. +        UNIT_INT, hotkey_formatter, hotkey_getlang, NULL, 5, HOTKEY_OFF,
  2252. +        HOTKEY_OPEN_WITH, HOTKEY_DELETE, HOTKEY_INSERT, HOTKEY_INSERT_SHUFFLED),
  2253. +#endif
  2254. +
  2255. +#if CONFIG_CODEC == SWCODEC
  2256. +    INT_SETTING(0, resume_rewind, LANG_RESUME_REWIND, 0,
  2257. +                "resume rewind", UNIT_SEC, 0, 60, 5,
  2258. +                NULL, NULL, NULL),
  2259. +#endif
  2260. +   CUSTOM_SETTING(0, root_menu_customized,
  2261. +                  LANG_ROCKBOX_TITLE, /* lang string here is never actually used */
  2262. +                  NULL, "root menu order",
  2263. +                  root_menu_load_from_cfg, root_menu_write_to_cfg,
  2264. +                  root_menu_is_changed, root_menu_set_default),
  2265. +};
  2266. +
  2267. +const int nb_settings = sizeof(settings)/sizeof(*settings);
  2268. +
  2269. +const struct settings_list* get_settings_list(int*count)
  2270. +{
  2271. +    *count = nb_settings;
  2272. +    return settings;
  2273. +}
  2274. diff --git a/lib/rbcodec/codecs/libopus/celt/_kiss_fft_guts.h b/lib/rbcodec/codecs/libopus/celt/_kiss_fft_guts.h
  2275. index b1fe8fb..63e2548 100644
  2276. --- a/lib/rbcodec/codecs/libopus/celt/_kiss_fft_guts.h
  2277. +++ b/lib/rbcodec/codecs/libopus/celt/_kiss_fft_guts.h
  2278. @@ -81,10 +81,13 @@
  2279.                     : "d0", "d1", "d2", "d3", "cc"); \
  2280.      }
  2281.  #elif defined(CPU_ARM)
  2282. +#if (ARM_ARCH < 5)
  2283. +
  2284. +
  2285.  #   define C_MULC(m,a,b) \
  2286.      { \
  2287.        asm volatile( \
  2288. -                   "ldmia %[ap], {r0,r1}                  \n\t" \
  2289. +                   "ldm %[ap], {r0,r1}                  \n\t" \
  2290.                     "ldrsh r2, [%[bp], #0]                 \n\t" \
  2291.                     "ldrsh r3, [%[bp], #2]                 \n\t" \
  2292.                     \
  2293. @@ -103,6 +106,27 @@
  2294.                     : "r0", "r1", "r2", "r3", "r4"); \
  2295.  }
  2296.  #else
  2297. +/*same as above but using armv5 packed multiplies*/
  2298. +#   define C_MULC(m,a,b) \
  2299. +    { \
  2300. +      asm volatile( \
  2301. +                   "ldm %[ap], {r0,r1}            \n\t" \
  2302. +                   "ldr r2, [%[bp], #0]                \n\t" \
  2303. +                               \
  2304. +                   "smulwb r4, r0, r2               \n\t"  /*r4=a.r*b.r*/    \
  2305. +                   "smlawt %[mr], r1, r2, r4        \n\t"  /*m.r=r4+a.i*b.i*/\
  2306. +                   "mov   %[mr], %[mr], lsl #1      \n\t"  /*Q15 not Q16*/   \
  2307. +                    \
  2308. +                   "smulwb r1, r1, r2               \n\t"  /*r1=a.i*b.r*/    \
  2309. +                   "smulwt r4, r0, r2               \n\t"  /*r4=a.r*b.i*/    \
  2310. +                   "sub %[mi], r1, r4               \n\t" \
  2311. +                   "mov   %[mi], %[mi], lsl #1      \n\t" \
  2312. +                   : [mr] "=r" ((m).r), [mi] "=r" ((m).i) \
  2313. +                   : [ap] "r" (&(a)), [bp] "r" (&(b)) \
  2314. +                   : "r0", "r1", "r2", "r4"); \
  2315. +}
  2316. +#endif /*ARMv5 code*/
  2317. +#else
  2318.  #   define C_MULC(m,a,b) \
  2319.        do{ (m).r = ADD32(S_MUL((a).r,(b).r) , S_MUL((a).i,(b).i)); \
  2320.            (m).i = SUB32(S_MUL((a).i,(b).r) , S_MUL((a).r,(b).i)); }while(0)
  2321. diff --git a/lib/rbcodec/dsp/eq.c b/lib/rbcodec/dsp/eq.c
  2322. index 2e4b9af..d58f095 100644
  2323. --- a/lib/rbcodec/dsp/eq.c
  2324. +++ b/lib/rbcodec/dsp/eq.c
  2325. @@ -32,7 +32,7 @@
  2326.  #include <string.h>
  2327.  
  2328.  /**
  2329. - * Current setup is one lowshelf filters three peaking filters and one
  2330. + * Current setup is one lowshelf filters eight peaking filters and one
  2331.   *  highshelf filter. Varying the number of shelving filters make no sense,
  2332.   *  but adding peaking filters is possible. Check EQ_NUM_BANDS to have
  2333.   *  2 shelving filters and EQ_NUM_BANDS-2 peaking filters.
  2334. diff --git a/lib/rbcodec/dsp/eq.h b/lib/rbcodec/dsp/eq.h
  2335. index 53097be..cce4e51 100644
  2336. --- a/lib/rbcodec/dsp/eq.h
  2337. +++ b/lib/rbcodec/dsp/eq.h
  2338. @@ -25,7 +25,7 @@
  2339.   * Menus and screens must be updated to support changing this from 5
  2340.   * without modifying other stuff (remove comment when this is no longer
  2341.   * true :-) */
  2342. -#define EQ_NUM_BANDS 5
  2343. +#define EQ_NUM_BANDS 10
  2344.  
  2345.  struct eq_band_setting
  2346.  {
  2347. diff --git a/lib/rbcodec/dsp/eqs/Acoustic.cfg b/lib/rbcodec/dsp/eqs/Acoustic.cfg
  2348. deleted file mode 100644
  2349. index 34b5ed8..0000000
  2350. --- a/lib/rbcodec/dsp/eqs/Acoustic.cfg
  2351. +++ /dev/null
  2352. @@ -1,17 +0,0 @@
  2353. -eq enabled: on
  2354. -eq precut: 45
  2355. -eq band 0 cutoff: 60
  2356. -eq band 0 q: 7
  2357. -eq band 0 gain: 45
  2358. -eq band 1 cutoff: 200
  2359. -eq band 1 q: 10
  2360. -eq band 1 gain: 10
  2361. -eq band 2 cutoff: 800
  2362. -eq band 2 q: 10
  2363. -eq band 2 gain: 15
  2364. -eq band 3 cutoff: 4000
  2365. -eq band 3 q: 10
  2366. -eq band 3 gain: 30
  2367. -eq band 4 cutoff: 12000
  2368. -eq band 4 q: 7
  2369. -eq band 4 gain: 20
  2370. diff --git a/lib/rbcodec/dsp/eqs/Bass.cfg b/lib/rbcodec/dsp/eqs/Bass.cfg
  2371. deleted file mode 100644
  2372. index 2742459..0000000
  2373. --- a/lib/rbcodec/dsp/eqs/Bass.cfg
  2374. +++ /dev/null
  2375. @@ -1,17 +0,0 @@
  2376. -eq enabled: on
  2377. -eq precut: 50
  2378. -eq band 0 cutoff: 60
  2379. -eq band 0 q: 7
  2380. -eq band 0 gain: 50
  2381. -eq band 1 cutoff: 200
  2382. -eq band 1 q: 10
  2383. -eq band 1 gain: 35
  2384. -eq band 2 cutoff: 800
  2385. -eq band 2 q: 10
  2386. -eq band 2 gain: 15
  2387. -eq band 3 cutoff: 4000
  2388. -eq band 3 q: 10
  2389. -eq band 3 gain: 5
  2390. -eq band 4 cutoff: 12000
  2391. -eq band 4 q: 7
  2392. -eq band 4 gain: -5
  2393. diff --git a/lib/rbcodec/dsp/eqs/Classical.cfg b/lib/rbcodec/dsp/eqs/Classical.cfg
  2394. index bf2f9f9..f73d15a 100644
  2395. --- a/lib/rbcodec/dsp/eqs/Classical.cfg
  2396. +++ b/lib/rbcodec/dsp/eqs/Classical.cfg
  2397. @@ -1,17 +1,32 @@
  2398. -eq enabled: on
  2399. -eq precut: 50
  2400. +eq enabled: off
  2401. +eq precut: 0
  2402.  eq band 0 cutoff: 60
  2403.  eq band 0 q: 7
  2404. -eq band 0 gain: 50
  2405. -eq band 1 cutoff: 200
  2406. +eq band 0 gain: 0
  2407. +eq band 1 cutoff: 170
  2408.  eq band 1 q: 10
  2409. -eq band 1 gain: 40
  2410. -eq band 2 cutoff: 800
  2411. +eq band 1 gain: 0
  2412. +eq band 2 cutoff: 310
  2413.  eq band 2 q: 10
  2414. -eq band 2 gain: -20
  2415. -eq band 3 cutoff: 4000
  2416. +eq band 2 gain: 0
  2417. +eq band 3 cutoff: 600
  2418.  eq band 3 q: 10
  2419. -eq band 3 gain: 10
  2420. -eq band 4 cutoff: 12000
  2421. -eq band 4 q: 7
  2422. -eq band 4 gain: 20
  2423. +eq band 3 gain: 0
  2424. +eq band 4 cutoff: 1000
  2425. +eq band 4 q: 10
  2426. +eq band 4 gain: 0
  2427. +eq band 5 cutoff: 3000
  2428. +eq band 5 q: 10
  2429. +eq band 5 gain: 0
  2430. +eq band 6 cutoff: 6000
  2431. +eq band 6 q: 10
  2432. +eq band 6 gain: -70
  2433. +eq band 7 cutoff: 12000
  2434. +eq band 7 q: 10
  2435. +eq band 7 gain: -70
  2436. +eq band 8 cutoff: 14000
  2437. +eq band 8 q: 10
  2438. +eq band 8 gain: -70
  2439. +eq band 9 cutoff: 16000
  2440. +eq band 9 q: 7
  2441. +eq band 9 gain: -95
  2442. diff --git a/lib/rbcodec/dsp/eqs/Club.cfg b/lib/rbcodec/dsp/eqs/Club.cfg
  2443. new file mode 100644
  2444. index 0000000..e1ad61a
  2445. --- /dev/null
  2446. +++ b/lib/rbcodec/dsp/eqs/Club.cfg
  2447. @@ -0,0 +1,32 @@
  2448. +eq enabled: off
  2449. +eq precut: 80
  2450. +eq band 0 cutoff: 60
  2451. +eq band 0 q: 7
  2452. +eq band 0 gain: 0
  2453. +eq band 1 cutoff: 170
  2454. +eq band 1 q: 10
  2455. +eq band 1 gain: 0
  2456. +eq band 2 cutoff: 310
  2457. +eq band 2 q: 10
  2458. +eq band 2 gain: 80
  2459. +eq band 3 cutoff: 600
  2460. +eq band 3 q: 10
  2461. +eq band 3 gain: 55
  2462. +eq band 4 cutoff: 1000
  2463. +eq band 4 q: 10
  2464. +eq band 4 gain: 55
  2465. +eq band 5 cutoff: 3000
  2466. +eq band 5 q: 10
  2467. +eq band 5 gain: 55
  2468. +eq band 6 cutoff: 6000
  2469. +eq band 6 q: 10
  2470. +eq band 6 gain: 30
  2471. +eq band 7 cutoff: 12000
  2472. +eq band 7 q: 10
  2473. +eq band 7 gain: 0
  2474. +eq band 8 cutoff: 14000
  2475. +eq band 8 q: 10
  2476. +eq band 8 gain: 0
  2477. +eq band 9 cutoff: 16000
  2478. +eq band 9 q: 7
  2479. +eq band 9 gain: 0
  2480. diff --git a/lib/rbcodec/dsp/eqs/Dance.cfg b/lib/rbcodec/dsp/eqs/Dance.cfg
  2481. new file mode 100644
  2482. index 0000000..4069806
  2483. --- /dev/null
  2484. +++ b/lib/rbcodec/dsp/eqs/Dance.cfg
  2485. @@ -0,0 +1,32 @@
  2486. +eq enabled: off
  2487. +eq precut: 95
  2488. +eq band 0 cutoff: 60
  2489. +eq band 0 q: 7
  2490. +eq band 0 gain: 95
  2491. +eq band 1 cutoff: 170
  2492. +eq band 1 q: 10
  2493. +eq band 1 gain: 70
  2494. +eq band 2 cutoff: 310
  2495. +eq band 2 q: 10
  2496. +eq band 2 gain: 25
  2497. +eq band 3 cutoff: 600
  2498. +eq band 3 q: 10
  2499. +eq band 3 gain: 0
  2500. +eq band 4 cutoff: 1000
  2501. +eq band 4 q: 10
  2502. +eq band 4 gain: 0
  2503. +eq band 5 cutoff: 3000
  2504. +eq band 5 q: 10
  2505. +eq band 5 gain: -55
  2506. +eq band 6 cutoff: 6000
  2507. +eq band 6 q: 10
  2508. +eq band 6 gain: -70
  2509. +eq band 7 cutoff: 12000
  2510. +eq band 7 q: 10
  2511. +eq band 7 gain: -70
  2512. +eq band 8 cutoff: 14000
  2513. +eq band 8 q: 10
  2514. +eq band 8 gain: 0
  2515. +eq band 9 cutoff: 16000
  2516. +eq band 9 q: 7
  2517. +eq band 9 gain: 0
  2518. diff --git a/lib/rbcodec/dsp/eqs/Default.cfg b/lib/rbcodec/dsp/eqs/Default.cfg
  2519. deleted file mode 100644
  2520. index d6f345f..0000000
  2521. --- a/lib/rbcodec/dsp/eqs/Default.cfg
  2522. +++ /dev/null
  2523. @@ -1,17 +0,0 @@
  2524. -eq enabled: off
  2525. -eq precut: 0
  2526. -eq band 0 cutoff: 60
  2527. -eq band 0 q: 7
  2528. -eq band 0 gain: 0
  2529. -eq band 1 cutoff: 200
  2530. -eq band 1 q: 10
  2531. -eq band 1 gain: 0
  2532. -eq band 2 cutoff: 800
  2533. -eq band 2 q: 10
  2534. -eq band 2 gain: 0
  2535. -eq band 3 cutoff: 4000
  2536. -eq band 3 q: 10
  2537. -eq band 3 gain: 0
  2538. -eq band 4 cutoff: 12000
  2539. -eq band 4 q: 7
  2540. -eq band 4 gain: 0
  2541. diff --git a/lib/rbcodec/dsp/eqs/Disco.cfg b/lib/rbcodec/dsp/eqs/Disco.cfg
  2542. deleted file mode 100644
  2543. index f894f26..0000000
  2544. --- a/lib/rbcodec/dsp/eqs/Disco.cfg
  2545. +++ /dev/null
  2546. @@ -1,17 +0,0 @@
  2547. -eq enabled: on
  2548. -eq precut: 45
  2549. -eq band 0 cutoff: 60
  2550. -eq band 0 q: 7
  2551. -eq band 0 gain: 30
  2552. -eq band 1 cutoff: 200
  2553. -eq band 1 q: 10
  2554. -eq band 1 gain: 10
  2555. -eq band 2 cutoff: 800
  2556. -eq band 2 q: 10
  2557. -eq band 2 gain: 45
  2558. -eq band 3 cutoff: 4000
  2559. -eq band 3 q: 10
  2560. -eq band 3 gain: 25
  2561. -eq band 4 cutoff: 12000
  2562. -eq band 4 q: 7
  2563. -eq band 4 gain: 10
  2564. diff --git a/lib/rbcodec/dsp/eqs/Electronic.cfg b/lib/rbcodec/dsp/eqs/Electronic.cfg
  2565. deleted file mode 100644
  2566. index e70c911..0000000
  2567. --- a/lib/rbcodec/dsp/eqs/Electronic.cfg
  2568. +++ /dev/null
  2569. @@ -1,17 +0,0 @@
  2570. -eq enabled: on
  2571. -eq precut: 55
  2572. -eq band 0 cutoff: 60
  2573. -eq band 0 q: 7
  2574. -eq band 0 gain: 45
  2575. -eq band 1 cutoff: 200
  2576. -eq band 1 q: 10
  2577. -eq band 1 gain: 5
  2578. -eq band 2 cutoff: 800
  2579. -eq band 2 q: 10
  2580. -eq band 2 gain: 25
  2581. -eq band 3 cutoff: 4000
  2582. -eq band 3 q: 10
  2583. -eq band 3 gain: 15
  2584. -eq band 4 cutoff: 12000
  2585. -eq band 4 q: 7
  2586. -eq band 4 gain: 55
  2587. diff --git a/lib/rbcodec/dsp/eqs/Flat.cfg b/lib/rbcodec/dsp/eqs/Flat.cfg
  2588. new file mode 100644
  2589. index 0000000..e5cfb2c
  2590. --- /dev/null
  2591. +++ b/lib/rbcodec/dsp/eqs/Flat.cfg
  2592. @@ -0,0 +1,32 @@
  2593. +eq enabled: off
  2594. +eq precut: 0
  2595. +eq band 0 cutoff: 60
  2596. +eq band 0 q: 7
  2597. +eq band 0 gain: 0
  2598. +eq band 1 cutoff: 170
  2599. +eq band 1 q: 10
  2600. +eq band 1 gain: 0
  2601. +eq band 2 cutoff: 310
  2602. +eq band 2 q: 10
  2603. +eq band 2 gain: 0
  2604. +eq band 3 cutoff: 600
  2605. +eq band 3 q: 10
  2606. +eq band 3 gain: 0
  2607. +eq band 4 cutoff: 1000
  2608. +eq band 4 q: 10
  2609. +eq band 4 gain: 0
  2610. +eq band 5 cutoff: 3000
  2611. +eq band 5 q: 10
  2612. +eq band 5 gain: 0
  2613. +eq band 6 cutoff: 6000
  2614. +eq band 6 q: 10
  2615. +eq band 6 gain: 0
  2616. +eq band 7 cutoff: 12000
  2617. +eq band 7 q: 10
  2618. +eq band 7 gain: 0
  2619. +eq band 8 cutoff: 14000
  2620. +eq band 8 q: 10
  2621. +eq band 8 gain: 0
  2622. +eq band 9 cutoff: 16000
  2623. +eq band 9 q: 7
  2624. +eq band 9 gain: 0
  2625. diff --git a/lib/rbcodec/dsp/eqs/Full Bass and Treble.cfg b/lib/rbcodec/dsp/eqs/Full Bass and Treble.cfg
  2626. new file mode 100644
  2627. index 0000000..70576e7
  2628. --- /dev/null
  2629. +++ b/lib/rbcodec/dsp/eqs/Full Bass and Treble.cfg     
  2630. @@ -0,0 +1,32 @@
  2631. +eq enabled: off
  2632. +eq precut: 120
  2633. +eq band 0 cutoff: 60
  2634. +eq band 0 q: 7
  2635. +eq band 0 gain: 70
  2636. +eq band 1 cutoff: 170
  2637. +eq band 1 q: 10
  2638. +eq band 1 gain: 55
  2639. +eq band 2 cutoff: 310
  2640. +eq band 2 q: 10
  2641. +eq band 2 gain: 0
  2642. +eq band 3 cutoff: 600
  2643. +eq band 3 q: 10
  2644. +eq band 3 gain: -70
  2645. +eq band 4 cutoff: 1000
  2646. +eq band 4 q: 10
  2647. +eq band 4 gain: -50
  2648. +eq band 5 cutoff: 3000
  2649. +eq band 5 q: 10
  2650. +eq band 5 gain: 15
  2651. +eq band 6 cutoff: 6000
  2652. +eq band 6 q: 10
  2653. +eq band 6 gain: 80
  2654. +eq band 7 cutoff: 12000
  2655. +eq band 7 q: 10
  2656. +eq band 7 gain: 110
  2657. +eq band 8 cutoff: 14000
  2658. +eq band 8 q: 10
  2659. +eq band 8 gain: 120
  2660. +eq band 9 cutoff: 16000
  2661. +eq band 9 q: 7
  2662. +eq band 9 gain: 120
  2663. diff --git a/lib/rbcodec/dsp/eqs/Full Bass.cfg b/lib/rbcodec/dsp/eqs/Full Bass.cfg
  2664. new file mode 100644
  2665. index 0000000..c73eacf
  2666. --- /dev/null
  2667. +++ b/lib/rbcodec/dsp/eqs/Full Bass.cfg
  2668. @@ -0,0 +1,32 @@
  2669. +eq enabled: off
  2670. +eq precut: 95
  2671. +eq band 0 cutoff: 60
  2672. +eq band 0 q: 7
  2673. +eq band 0 gain: -80
  2674. +eq band 1 cutoff: 170
  2675. +eq band 1 q: 10
  2676. +eq band 1 gain: 95
  2677. +eq band 2 cutoff: 310
  2678. +eq band 2 q: 10
  2679. +eq band 2 gain: 95
  2680. +eq band 3 cutoff: 600
  2681. +eq band 3 q: 10
  2682. +eq band 3 gain: 55
  2683. +eq band 4 cutoff: 1000
  2684. +eq band 4 q: 10
  2685. +eq band 4 gain: 15
  2686. +eq band 5 cutoff: 3000
  2687. +eq band 5 q: 10
  2688. +eq band 5 gain: -40
  2689. +eq band 6 cutoff: 6000
  2690. +eq band 6 q: 10
  2691. +eq band 6 gain: -80
  2692. +eq band 7 cutoff: 12000
  2693. +eq band 7 q: 10
  2694. +eq band 7 gain: -100
  2695. +eq band 8 cutoff: 14000
  2696. +eq band 8 q: 10
  2697. +eq band 8 gain: -110
  2698. +eq band 9 cutoff: 16000
  2699. +eq band 9 q: 7
  2700. +eq band 9 gain: -110
  2701. diff --git a/lib/rbcodec/dsp/eqs/Full Treble.cfg b/lib/rbcodec/dsp/eqs/Full Treble.cfg
  2702. new file mode 100644
  2703. index 0000000..8136a7b
  2704. --- /dev/null
  2705. +++ b/lib/rbcodec/dsp/eqs/Full Treble.cfg      
  2706. @@ -0,0 +1,32 @@
  2707. +eq enabled: off
  2708. +eq precut: 170
  2709. +eq band 0 cutoff: 60
  2710. +eq band 0 q: 7
  2711. +eq band 0 gain: -95
  2712. +eq band 1 cutoff: 170
  2713. +eq band 1 q: 10
  2714. +eq band 1 gain: -95
  2715. +eq band 2 cutoff: 310
  2716. +eq band 2 q: 10
  2717. +eq band 2 gain: -95
  2718. +eq band 3 cutoff: 600
  2719. +eq band 3 q: 10
  2720. +eq band 3 gain: -40
  2721. +eq band 4 cutoff: 1000
  2722. +eq band 4 q: 10
  2723. +eq band 4 gain: 25
  2724. +eq band 5 cutoff: 3000
  2725. +eq band 5 q: 10
  2726. +eq band 5 gain: 110
  2727. +eq band 6 cutoff: 6000
  2728. +eq band 6 q: 10
  2729. +eq band 6 gain: 160
  2730. +eq band 7 cutoff: 12000
  2731. +eq band 7 q: 10
  2732. +eq band 7 gain: 160
  2733. +eq band 8 cutoff: 14000
  2734. +eq band 8 q: 10
  2735. +eq band 8 gain: 160
  2736. +eq band 9 cutoff: 16000
  2737. +eq band 9 q: 7
  2738. +eq band 9 gain: 170
  2739. diff --git a/lib/rbcodec/dsp/eqs/Headphones.cfg b/lib/rbcodec/dsp/eqs/Headphones.cfg
  2740. new file mode 100644
  2741. index 0000000..e5a32fc
  2742. --- /dev/null
  2743. +++ b/lib/rbcodec/dsp/eqs/Headphones.cfg
  2744. @@ -0,0 +1,32 @@
  2745. +eq enabled: off
  2746. +eq precut: 145
  2747. +eq band 0 cutoff: 60
  2748. +eq band 0 q: 7
  2749. +eq band 0 gain: 50
  2750. +eq band 1 cutoff: 170
  2751. +eq band 1 q: 10
  2752. +eq band 1 gain: 110
  2753. +eq band 2 cutoff: 310
  2754. +eq band 2 q: 10
  2755. +eq band 2 gain: 55
  2756. +eq band 3 cutoff: 600
  2757. +eq band 3 q: 10
  2758. +eq band 3 gain: -30
  2759. +eq band 4 cutoff: 1000
  2760. +eq band 4 q: 10
  2761. +eq band 4 gain: -25
  2762. +eq band 5 cutoff: 3000
  2763. +eq band 5 q: 10
  2764. +eq band 5 gain: 15
  2765. +eq band 6 cutoff: 6000
  2766. +eq band 6 q: 10
  2767. +eq band 6 gain: 50
  2768. +eq band 7 cutoff: 12000
  2769. +eq band 7 q: 10
  2770. +eq band 7 gain: 95
  2771. +eq band 8 cutoff: 14000
  2772. +eq band 8 q: 10
  2773. +eq band 8 gain: 130
  2774. +eq band 9 cutoff: 16000
  2775. +eq band 9 q: 7
  2776. +eq band 9 gain: 145
  2777. diff --git a/lib/rbcodec/dsp/eqs/Hip-Hop.cfg b/lib/rbcodec/dsp/eqs/Hip-Hop.cfg
  2778. deleted file mode 100644
  2779. index 2d38425..0000000
  2780. --- a/lib/rbcodec/dsp/eqs/Hip-Hop.cfg
  2781. +++ /dev/null
  2782. @@ -1,17 +0,0 @@
  2783. -eq enabled: on
  2784. -eq precut: 65
  2785. -eq band 0 cutoff: 60
  2786. -eq band 0 q: 7
  2787. -eq band 0 gain: 65
  2788. -eq band 1 cutoff: 200
  2789. -eq band 1 q: 10
  2790. -eq band 1 gain: 25
  2791. -eq band 2 cutoff: 800
  2792. -eq band 2 q: 10
  2793. -eq band 2 gain: -10
  2794. -eq band 3 cutoff: 4000
  2795. -eq band 3 q: 10
  2796. -eq band 3 gain: 15
  2797. -eq band 4 cutoff: 12000
  2798. -eq band 4 q: 7
  2799. -eq band 4 gain: 35
  2800. diff --git a/lib/rbcodec/dsp/eqs/Jazz.cfg b/lib/rbcodec/dsp/eqs/Jazz.cfg
  2801. deleted file mode 100644
  2802. index f576f9f..0000000
  2803. --- a/lib/rbcodec/dsp/eqs/Jazz.cfg
  2804. +++ /dev/null
  2805. @@ -1,17 +0,0 @@
  2806. -eq enabled: on
  2807. -eq precut: 60
  2808. -eq band 0 cutoff: 60
  2809. -eq band 0 q: 7
  2810. -eq band 0 gain: 40
  2811. -eq band 1 cutoff: 200
  2812. -eq band 1 q: 10
  2813. -eq band 1 gain: 15
  2814. -eq band 2 cutoff: 800
  2815. -eq band 2 q: 10
  2816. -eq band 2 gain: -25
  2817. -eq band 3 cutoff: 4000
  2818. -eq band 3 q: 10
  2819. -eq band 3 gain: 5
  2820. -eq band 4 cutoff: 12000
  2821. -eq band 4 q: 7
  2822. -eq band 4 gain: 60
  2823. diff --git a/lib/rbcodec/dsp/eqs/Large Hall.cfg b/lib/rbcodec/dsp/eqs/Large Hall.cfg
  2824. new file mode 100644
  2825. index 0000000..f72a13d
  2826. --- /dev/null
  2827. +++ b/lib/rbcodec/dsp/eqs/Large Hall.cfg       
  2828. @@ -0,0 +1,32 @@
  2829. +eq enabled: off
  2830. +eq precut: 150
  2831. +eq band 0 cutoff: 60
  2832. +eq band 0 q: 7
  2833. +eq band 0 gain: 105
  2834. +eq band 1 cutoff: 170
  2835. +eq band 1 q: 10
  2836. +eq band 1 gain: 105
  2837. +eq band 2 cutoff: 310
  2838. +eq band 2 q: 10
  2839. +eq band 2 gain: 55
  2840. +eq band 3 cutoff: 600
  2841. +eq band 3 q: 10
  2842. +eq band 3 gain: 55
  2843. +eq band 4 cutoff: 1000
  2844. +eq band 4 q: 10
  2845. +eq band 4 gain: 0
  2846. +eq band 5 cutoff: 3000
  2847. +eq band 5 q: 10
  2848. +eq band 5 gain: -50
  2849. +eq band 6 cutoff: 6000
  2850. +eq band 6 q: 10
  2851. +eq band 6 gain: -50
  2852. +eq band 7 cutoff: 12000
  2853. +eq band 7 q: 10
  2854. +eq band 7 gain: -50
  2855. +eq band 8 cutoff: 14000
  2856. +eq band 8 q: 10
  2857. +eq band 8 gain: 0
  2858. +eq band 9 cutoff: 16000
  2859. +eq band 9 q: 7
  2860. +eq band 9 gain: 0
  2861. diff --git a/lib/rbcodec/dsp/eqs/Live.cfg b/lib/rbcodec/dsp/eqs/Live.cfg
  2862. new file mode 100644
  2863. index 0000000..82879eb
  2864. --- /dev/null
  2865. +++ b/lib/rbcodec/dsp/eqs/Live.cfg
  2866. @@ -0,0 +1,32 @@
  2867. +eq enabled: off
  2868. +eq precut: 55
  2869. +eq band 0 cutoff: 60
  2870. +eq band 0 q: 7
  2871. +eq band 0 gain: -50
  2872. +eq band 1 cutoff: 170
  2873. +eq band 1 q: 10
  2874. +eq band 1 gain: 0
  2875. +eq band 2 cutoff: 310
  2876. +eq band 2 q: 10
  2877. +eq band 2 gain: 40
  2878. +eq band 3 cutoff: 600
  2879. +eq band 3 q: 10
  2880. +eq band 3 gain: 55
  2881. +eq band 4 cutoff: 1000
  2882. +eq band 4 q: 10
  2883. +eq band 4 gain: 55
  2884. +eq band 5 cutoff: 3000
  2885. +eq band 5 q: 10
  2886. +eq band 5 gain: 55
  2887. +eq band 6 cutoff: 6000
  2888. +eq band 6 q: 10
  2889. +eq band 6 gain: 40
  2890. +eq band 7 cutoff: 12000
  2891. +eq band 7 q: 10
  2892. +eq band 7 gain: 25
  2893. +eq band 8 cutoff: 14000
  2894. +eq band 8 q: 10
  2895. +eq band 8 gain: 25
  2896. +eq band 9 cutoff: 16000
  2897. +eq band 9 q: 7
  2898. +eq band 9 gain: 25
  2899. diff --git a/lib/rbcodec/dsp/eqs/Lounge.cfg b/lib/rbcodec/dsp/eqs/Lounge.cfg
  2900. deleted file mode 100644
  2901. index 39ae23a..0000000
  2902. --- a/lib/rbcodec/dsp/eqs/Lounge.cfg
  2903. +++ /dev/null
  2904. @@ -1,17 +0,0 @@
  2905. -eq enabled: on
  2906. -eq precut: 20
  2907. -eq band 0 cutoff: 60
  2908. -eq band 0 q: 7
  2909. -eq band 0 gain: -25
  2910. -eq band 1 cutoff: 200
  2911. -eq band 1 q: 10
  2912. -eq band 1 gain: 5
  2913. -eq band 2 cutoff: 800
  2914. -eq band 2 q: 10
  2915. -eq band 2 gain: 20
  2916. -eq band 3 cutoff: 4000
  2917. -eq band 3 q: 10
  2918. -eq band 3 gain: -15
  2919. -eq band 4 cutoff: 12000
  2920. -eq band 4 q: 7
  2921. -eq band 4 gain: 15
  2922. diff --git a/lib/rbcodec/dsp/eqs/Party.cfg b/lib/rbcodec/dsp/eqs/Party.cfg
  2923. new file mode 100644
  2924. index 0000000..4138073
  2925. --- /dev/null
  2926. +++ b/lib/rbcodec/dsp/eqs/Party.cfg
  2927. @@ -0,0 +1,32 @@
  2928. +eq enabled: off
  2929. +eq precut: 70
  2930. +eq band 0 cutoff: 60
  2931. +eq band 0 q: 7
  2932. +eq band 0 gain: 70
  2933. +eq band 1 cutoff: 170
  2934. +eq band 1 q: 10
  2935. +eq band 1 gain: 70
  2936. +eq band 2 cutoff: 310
  2937. +eq band 2 q: 10
  2938. +eq band 2 gain: 0
  2939. +eq band 3 cutoff: 600
  2940. +eq band 3 q: 10
  2941. +eq band 3 gain: 0
  2942. +eq band 4 cutoff: 1000
  2943. +eq band 4 q: 10
  2944. +eq band 4 gain: 0
  2945. +eq band 5 cutoff: 3000
  2946. +eq band 5 q: 10
  2947. +eq band 5 gain: 0
  2948. +eq band 6 cutoff: 6000
  2949. +eq band 6 q: 10
  2950. +eq band 6 gain: 0
  2951. +eq band 7 cutoff: 12000
  2952. +eq band 7 q: 10
  2953. +eq band 7 gain: 0
  2954. +eq band 8 cutoff: 14000
  2955. +eq band 8 q: 10
  2956. +eq band 8 gain: 70
  2957. +eq band 9 cutoff: 16000
  2958. +eq band 9 q: 7
  2959. +eq band 9 gain: 70
  2960. diff --git a/lib/rbcodec/dsp/eqs/Pop.cfg b/lib/rbcodec/dsp/eqs/Pop.cfg
  2961. index 1d8cefe..6d49a85 100644
  2962. --- a/lib/rbcodec/dsp/eqs/Pop.cfg
  2963. +++ b/lib/rbcodec/dsp/eqs/Pop.cfg
  2964. @@ -1,17 +1,32 @@
  2965. -eq enabled: on
  2966. -eq precut: 50
  2967. +eq enabled: off
  2968. +eq precut: 80
  2969.  eq band 0 cutoff: 60
  2970.  eq band 0 q: 7
  2971. -eq band 0 gain: -10
  2972. -eq band 1 cutoff: 200
  2973. +eq band 0 gain: -15
  2974. +eq band 1 cutoff: 170
  2975.  eq band 1 q: 10
  2976. -eq band 1 gain: 5
  2977. -eq band 2 cutoff: 800
  2978. +eq band 1 gain: 50
  2979. +eq band 2 cutoff: 310
  2980.  eq band 2 q: 10
  2981. -eq band 2 gain: 50
  2982. -eq band 3 cutoff: 4000
  2983. +eq band 2 gain: 70
  2984. +eq band 3 cutoff: 600
  2985.  eq band 3 q: 10
  2986. -eq band 3 gain: 15
  2987. -eq band 4 cutoff: 12000
  2988. -eq band 4 q: 7
  2989. -eq band 4 gain: -10
  2990. +eq band 3 gain: 80
  2991. +eq band 4 cutoff: 1000
  2992. +eq band 4 q: 10
  2993. +eq band 4 gain: 55
  2994. +eq band 5 cutoff: 3000
  2995. +eq band 5 q: 10
  2996. +eq band 5 gain: 0
  2997. +eq band 6 cutoff: 6000
  2998. +eq band 6 q: 10
  2999. +eq band 6 gain: -25
  3000. +eq band 7 cutoff: 12000
  3001. +eq band 7 q: 10
  3002. +eq band 7 gain: -25
  3003. +eq band 8 cutoff: 14000
  3004. +eq band 8 q: 10
  3005. +eq band 8 gain: -15
  3006. +eq band 9 cutoff: 16000
  3007. +eq band 9 q: 7
  3008. +eq band 9 gain: -15
  3009. diff --git a/lib/rbcodec/dsp/eqs/R&B.cfg b/lib/rbcodec/dsp/eqs/R&B.cfg
  3010. deleted file mode 100644
  3011. index a460b58..0000000
  3012. --- a/lib/rbcodec/dsp/eqs/R&B.cfg
  3013. +++ /dev/null
  3014. @@ -1,17 +0,0 @@
  3015. -eq enabled: on
  3016. -eq precut: 45
  3017. -eq band 0 cutoff: 60
  3018. -eq band 0 q: 7
  3019. -eq band 0 gain: 35
  3020. -eq band 1 cutoff: 200
  3021. -eq band 1 q: 10
  3022. -eq band 1 gain: 45
  3023. -eq band 2 cutoff: 800
  3024. -eq band 2 q: 10
  3025. -eq band 2 gain: 5
  3026. -eq band 3 cutoff: 4000
  3027. -eq band 3 q: 10
  3028. -eq band 3 gain: 25
  3029. -eq band 4 cutoff: 12000
  3030. -eq band 4 q: 7
  3031. -eq band 4 gain: 30
  3032. diff --git a/lib/rbcodec/dsp/eqs/Reggae.cfg b/lib/rbcodec/dsp/eqs/Reggae.cfg
  3033. new file mode 100644
  3034. index 0000000..80db930
  3035. --- /dev/null
  3036. +++ b/lib/rbcodec/dsp/eqs/Reggae.cfg
  3037. @@ -0,0 +1,32 @@
  3038. +eq enabled: off
  3039. +eq precut: 65
  3040. +eq band 0 cutoff: 60
  3041. +eq band 0 q: 7
  3042. +eq band 0 gain: 0
  3043. +eq band 1 cutoff: 170
  3044. +eq band 1 q: 10
  3045. +eq band 1 gain: 0
  3046. +eq band 2 cutoff: 310
  3047. +eq band 2 q: 10
  3048. +eq band 2 gain: 0
  3049. +eq band 3 cutoff: 600
  3050. +eq band 3 q: 10
  3051. +eq band 3 gain: -55
  3052. +eq band 4 cutoff: 1000
  3053. +eq band 4 q: 10
  3054. +eq band 4 gain: 0
  3055. +eq band 5 cutoff: 3000
  3056. +eq band 5 q: 10
  3057. +eq band 5 gain: 65
  3058. +eq band 6 cutoff: 6000
  3059. +eq band 6 q: 10
  3060. +eq band 6 gain: 65
  3061. +eq band 7 cutoff: 12000
  3062. +eq band 7 q: 10
  3063. +eq band 7 gain: 0
  3064. +eq band 8 cutoff: 14000
  3065. +eq band 8 q: 10
  3066. +eq band 8 gain: 0
  3067. +eq band 9 cutoff: 16000
  3068. +eq band 9 q: 7
  3069. +eq band 9 gain: 0
  3070. diff --git a/lib/rbcodec/dsp/eqs/Rock.cfg b/lib/rbcodec/dsp/eqs/Rock.cfg
  3071. index ec4f035..0a59bde 100644
  3072. --- a/lib/rbcodec/dsp/eqs/Rock.cfg
  3073. +++ b/lib/rbcodec/dsp/eqs/Rock.cfg
  3074. @@ -1,17 +1,32 @@
  3075. -eq enabled: on
  3076. -eq precut: 45
  3077. +eq enabled: off
  3078. +eq precut: 110
  3079.  eq band 0 cutoff: 60
  3080.  eq band 0 q: 7
  3081. -eq band 0 gain: 25
  3082. -eq band 1 cutoff: 200
  3083. +eq band 0 gain: 80
  3084. +eq band 1 cutoff: 170
  3085.  eq band 1 q: 10
  3086. -eq band 1 gain: 10
  3087. -eq band 2 cutoff: 800
  3088. +eq band 1 gain: 50
  3089. +eq band 2 cutoff: 310
  3090.  eq band 2 q: 10
  3091. -eq band 2 gain: 0
  3092. -eq band 3 cutoff: 4000
  3093. +eq band 2 gain: -55
  3094. +eq band 3 cutoff: 600
  3095.  eq band 3 q: 10
  3096. -eq band 3 gain: 20
  3097. -eq band 4 cutoff: 12000
  3098. -eq band 4 q: 7
  3099. -eq band 4 gain: 45
  3100. +eq band 3 gain: -80
  3101. +eq band 4 cutoff: 1000
  3102. +eq band 4 q: 10
  3103. +eq band 4 gain: -30
  3104. +eq band 5 cutoff: 3000
  3105. +eq band 5 q: 10
  3106. +eq band 5 gain: 40
  3107. +eq band 6 cutoff: 6000
  3108. +eq band 6 q: 10
  3109. +eq band 6 gain: 90
  3110. +eq band 7 cutoff: 12000
  3111. +eq band 7 q: 10
  3112. +eq band 7 gain: 110
  3113. +eq band 8 cutoff: 14000
  3114. +eq band 8 q: 10
  3115. +eq band 8 gain: 110
  3116. +eq band 9 cutoff: 16000
  3117. +eq band 9 q: 7
  3118. +eq band 9 gain: 110
  3119. diff --git a/lib/rbcodec/dsp/eqs/Ska.cfg b/lib/rbcodec/dsp/eqs/Ska.cfg
  3120. new file mode 100644
  3121. index 0000000..f04c13c
  3122. --- /dev/null
  3123. +++ b/lib/rbcodec/dsp/eqs/Ska.cfg
  3124. @@ -0,0 +1,32 @@
  3125. +eq enabled: off
  3126. +eq precut: 110
  3127. +eq band 0 cutoff: 60
  3128. +eq band 0 q: 7
  3129. +eq band 0 gain: -25
  3130. +eq band 1 cutoff: 170
  3131. +eq band 1 q: 10
  3132. +eq band 1 gain: -50
  3133. +eq band 2 cutoff: 310
  3134. +eq band 2 q: 10
  3135. +eq band 2 gain: -40
  3136. +eq band 3 cutoff: 600
  3137. +eq band 3 q: 10
  3138. +eq band 3 gain: 0
  3139. +eq band 4 cutoff: 1000
  3140. +eq band 4 q: 10
  3141. +eq band 4 gain: 40
  3142. +eq band 5 cutoff: 3000
  3143. +eq band 5 q: 10
  3144. +eq band 5 gain: 55
  3145. +eq band 6 cutoff: 6000
  3146. +eq band 6 q: 10
  3147. +eq band 6 gain: 90
  3148. +eq band 7 cutoff: 12000
  3149. +eq band 7 q: 10
  3150. +eq band 7 gain: 95
  3151. +eq band 8 cutoff: 14000
  3152. +eq band 8 q: 10
  3153. +eq band 8 gain: 110
  3154. +eq band 9 cutoff: 16000
  3155. +eq band 9 q: 7
  3156. +eq band 9 gain: 95
  3157. diff --git a/lib/rbcodec/dsp/eqs/Soft Rock.cfg b/lib/rbcodec/dsp/eqs/Soft Rock.cfg
  3158. new file mode 100644
  3159. index 0000000..44ac61b
  3160. --- /dev/null
  3161. +++ b/lib/rbcodec/dsp/eqs/Soft Rock.cfg
  3162. @@ -0,0 +1,32 @@
  3163. +eq enabled: off
  3164. +eq precut: 90
  3165. +eq band 0 cutoff: 60
  3166. +eq band 0 q: 7
  3167. +eq band 0 gain: 40
  3168. +eq band 1 cutoff: 170
  3169. +eq band 1 q: 10
  3170. +eq band 1 gain: 40
  3171. +eq band 2 cutoff: 310
  3172. +eq band 2 q: 10
  3173. +eq band 2 gain: 25
  3174. +eq band 3 cutoff: 600
  3175. +eq band 3 q: 10
  3176. +eq band 3 gain: 0
  3177. +eq band 4 cutoff: 1000
  3178. +eq band 4 q: 10
  3179. +eq band 4 gain: -40
  3180. +eq band 5 cutoff: 3000
  3181. +eq band 5 q: 10
  3182. +eq band 5 gain: -55
  3183. +eq band 6 cutoff: 6000
  3184. +eq band 6 q: 10
  3185. +eq band 6 gain: -30
  3186. +eq band 7 cutoff: 12000
  3187. +eq band 7 q: 10
  3188. +eq band 7 gain: 0
  3189. +eq band 8 cutoff: 14000
  3190. +eq band 8 q: 10
  3191. +eq band 8 gain: 25
  3192. +eq band 9 cutoff: 16000
  3193. +eq band 9 q: 7
  3194. +eq band 9 gain: 90
  3195. diff --git a/lib/rbcodec/dsp/eqs/Soft.cfg b/lib/rbcodec/dsp/eqs/Soft.cfg
  3196. new file mode 100644
  3197. index 0000000..6e5eb53
  3198. --- /dev/null
  3199. +++ b/lib/rbcodec/dsp/eqs/Soft.cfg
  3200. @@ -0,0 +1,32 @@
  3201. +eq enabled: off
  3202. +eq precut: 120
  3203. +eq band 0 cutoff: 60
  3204. +eq band 0 q: 7
  3205. +eq band 0 gain: 50
  3206. +eq band 1 cutoff: 170
  3207. +eq band 1 q: 10
  3208. +eq band 1 gain: 15
  3209. +eq band 2 cutoff: 310
  3210. +eq band 2 q: 10
  3211. +eq band 2 gain: 0
  3212. +eq band 3 cutoff: 600
  3213. +eq band 3 q: 10
  3214. +eq band 3 gain: -25
  3215. +eq band 4 cutoff: 1000
  3216. +eq band 4 q: 10
  3217. +eq band 4 gain: 0
  3218. +eq band 5 cutoff: 3000
  3219. +eq band 5 q: 10
  3220. +eq band 5 gain: 40
  3221. +eq band 6 cutoff: 6000
  3222. +eq band 6 q: 10
  3223. +eq band 6 gain: 80
  3224. +eq band 7 cutoff: 12000
  3225. +eq band 7 q: 10
  3226. +eq band 7 gain: 95
  3227. +eq band 8 cutoff: 14000
  3228. +eq band 8 q: 10
  3229. +eq band 8 gain: 110
  3230. +eq band 9 cutoff: 16000
  3231. +eq band 9 q: 7
  3232. +eq band 9 gain: 120
  3233. diff --git a/lib/rbcodec/dsp/eqs/Techno.cfg b/lib/rbcodec/dsp/eqs/Techno.cfg
  3234. new file mode 100644
  3235. index 0000000..3b9e5ad
  3236. --- /dev/null
  3237. +++ b/lib/rbcodec/dsp/eqs/Techno.cfg
  3238. @@ -0,0 +1,32 @@
  3239. +eq enabled: off
  3240. +eq precut: 95
  3241. +eq band 0 cutoff: 60
  3242. +eq band 0 q: 7
  3243. +eq band 0 gain: 80
  3244. +eq band 1 cutoff: 170
  3245. +eq band 1 q: 10
  3246. +eq band 1 gain: 55
  3247. +eq band 2 cutoff: 310
  3248. +eq band 2 q: 10
  3249. +eq band 2 gain: 0
  3250. +eq band 3 cutoff: 600
  3251. +eq band 3 q: 10
  3252. +eq band 3 gain: -55
  3253. +eq band 4 cutoff: 1000
  3254. +eq band 4 q: 10
  3255. +eq band 4 gain: -50
  3256. +eq band 5 cutoff: 3000
  3257. +eq band 5 q: 10
  3258. +eq band 5 gain: 0
  3259. +eq band 6 cutoff: 6000
  3260. +eq band 6 q: 10
  3261. +eq band 6 gain: 80
  3262. +eq band 7 cutoff: 12000
  3263. +eq band 7 q: 10
  3264. +eq band 7 gain: 95
  3265. +eq band 8 cutoff: 14000
  3266. +eq band 8 q: 10
  3267. +eq band 8 gain: 95
  3268. +eq band 9 cutoff: 16000
  3269. +eq band 9 q: 7
  3270. +eq band 9 gain: 90
  3271. diff --git a/lib/rbcodec/dsp/eqs/Vocal.cfg b/lib/rbcodec/dsp/eqs/Vocal.cfg
  3272. deleted file mode 100644
  3273. index 1de754f..0000000
  3274. --- a/lib/rbcodec/dsp/eqs/Vocal.cfg
  3275. +++ /dev/null
  3276. @@ -1,17 +0,0 @@
  3277. -eq enabled: on
  3278. -eq precut: 45
  3279. -eq band 0 cutoff: 60
  3280. -eq band 0 q: 7
  3281. -eq band 0 gain: -45
  3282. -eq band 1 cutoff: 200
  3283. -eq band 1 q: 10
  3284. -eq band 1 gain: 5
  3285. -eq band 2 cutoff: 800
  3286. -eq band 2 q: 10
  3287. -eq band 2 gain: 45
  3288. -eq band 3 cutoff: 4000
  3289. -eq band 3 q: 10
  3290. -eq band 3 gain: 20
  3291. -eq band 4 cutoff: 12000
  3292. -eq band 4 q: 7
  3293. -eq band 4 gain: 0
clone this paste RAW Paste Data