diff options
Diffstat (limited to 'apps/settings_list.c')
-rw-r--r-- | apps/settings_list.c | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/apps/settings_list.c b/apps/settings_list.c index 3d5075ce3f..0759b46940 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -250,12 +250,6 @@ static void scanaccel_formatter(char *buffer, size_t buffer_size, | |||
250 | } | 250 | } |
251 | 251 | ||
252 | #if CONFIG_CODEC == SWCODEC | 252 | #if CONFIG_CODEC == SWCODEC |
253 | static void crossfeed_format(char* buffer, size_t buffer_size, int value, | ||
254 | const char* unit) | ||
255 | { | ||
256 | snprintf(buffer, buffer_size, "%s%d.%d %s", value == 0 ? " " : "-", | ||
257 | value / 10, value % 10, unit); | ||
258 | } | ||
259 | static void crossfeed_cross_set(int val) | 253 | static void crossfeed_cross_set(int val) |
260 | { | 254 | { |
261 | (void)val; | 255 | (void)val; |
@@ -264,7 +258,7 @@ static void crossfeed_cross_set(int val) | |||
264 | global_settings.crossfeed_hf_cutoff); | 258 | global_settings.crossfeed_hf_cutoff); |
265 | } | 259 | } |
266 | 260 | ||
267 | static void replaygain_preamp_format(char* buffer, size_t buffer_size, int value, | 261 | static void db_format(char* buffer, size_t buffer_size, int value, |
268 | const char* unit) | 262 | const char* unit) |
269 | { | 263 | { |
270 | int v = abs(value); | 264 | int v = abs(value); |
@@ -274,7 +268,7 @@ static void replaygain_preamp_format(char* buffer, size_t buffer_size, int value | |||
274 | } | 268 | } |
275 | 269 | ||
276 | #endif | 270 | #endif |
277 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | 271 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC -= MAS3539F) |
278 | static void set_mdb_enable(bool value) | 272 | static void set_mdb_enable(bool value) |
279 | { | 273 | { |
280 | sound_set_mdb_enable((int)value); | 274 | sound_set_mdb_enable((int)value); |
@@ -868,7 +862,7 @@ const struct settings_list settings[] = { | |||
868 | OFFON_SETTING(0, replaygain_noclip, LANG_REPLAYGAIN_NOCLIP, | 862 | OFFON_SETTING(0, replaygain_noclip, LANG_REPLAYGAIN_NOCLIP, |
869 | false, "replaygain noclip", NULL), | 863 | false, "replaygain noclip", NULL), |
870 | INT_SETTING_NOWRAP(0, replaygain_preamp, LANG_REPLAYGAIN_PREAMP, 0, "replaygain preamp", | 864 | INT_SETTING_NOWRAP(0, replaygain_preamp, LANG_REPLAYGAIN_PREAMP, 0, "replaygain preamp", |
871 | UNIT_DB, -120, 120, 5, replaygain_preamp_format, NULL, NULL), | 865 | UNIT_DB, -120, 120, 5, db_format, NULL, NULL), |
872 | 866 | ||
873 | CHOICE_SETTING(0, beep, LANG_BEEP, 0, | 867 | CHOICE_SETTING(0, beep, LANG_BEEP, 0, |
874 | "beep", "off,weak,moderate,strong", NULL, 4, | 868 | "beep", "off,weak,moderate,strong", NULL, 4, |
@@ -894,15 +888,15 @@ const struct settings_list settings[] = { | |||
894 | /* crossfeed */ | 888 | /* crossfeed */ |
895 | OFFON_SETTING(0,crossfeed, LANG_CROSSFEED, false, | 889 | OFFON_SETTING(0,crossfeed, LANG_CROSSFEED, false, |
896 | "crossfeed", dsp_set_crossfeed), | 890 | "crossfeed", dsp_set_crossfeed), |
897 | INT_SETTING_NOWRAP(0, crossfeed_direct_gain, LANG_CROSSFEED_DIRECT_GAIN, 15, | 891 | INT_SETTING_NOWRAP(0, crossfeed_direct_gain, LANG_CROSSFEED_DIRECT_GAIN, |
898 | "crossfeed direct gain", UNIT_DB, 0, 60, 5, | 892 | -15, "crossfeed direct gain", UNIT_DB, -60, 0, 5, |
899 | crossfeed_format, NULL, dsp_set_crossfeed_direct_gain), | 893 | db_format, NULL, dsp_set_crossfeed_direct_gain), |
900 | INT_SETTING_NOWRAP(0, crossfeed_cross_gain, LANG_CROSSFEED_CROSS_GAIN, 60, | 894 | INT_SETTING_NOWRAP(0, crossfeed_cross_gain, LANG_CROSSFEED_CROSS_GAIN, -60, |
901 | "crossfeed cross gain", UNIT_DB, 30, 120, 5, | 895 | "crossfeed cross gain", UNIT_DB, -120, -30, 5, |
902 | crossfeed_format, NULL, crossfeed_cross_set), | 896 | db_format, NULL, crossfeed_cross_set), |
903 | INT_SETTING_NOWRAP(0, crossfeed_hf_attenuation, LANG_CROSSFEED_HF_ATTENUATION, 160, | 897 | INT_SETTING_NOWRAP(0, crossfeed_hf_attenuation, LANG_CROSSFEED_HF_ATTENUATION, -160, |
904 | "crossfeed hf attenuation", UNIT_DB, 60, 240, 5, | 898 | "crossfeed hf attenuation", UNIT_DB, -240, -60, 5, |
905 | crossfeed_format, NULL, crossfeed_cross_set), | 899 | db_format, NULL, crossfeed_cross_set), |
906 | INT_SETTING_NOWRAP(0, crossfeed_hf_cutoff, LANG_CROSSFEED_HF_CUTOFF, 700, | 900 | INT_SETTING_NOWRAP(0, crossfeed_hf_cutoff, LANG_CROSSFEED_HF_CUTOFF, 700, |
907 | "crossfeed hf cutoff", UNIT_HERTZ, 500, 2000, 100, | 901 | "crossfeed hf cutoff", UNIT_HERTZ, 500, 2000, 100, |
908 | NULL, NULL, crossfeed_cross_set), | 902 | NULL, NULL, crossfeed_cross_set), |
@@ -948,19 +942,19 @@ const struct settings_list settings[] = { | |||
948 | /* -240..240 (or -24db to +24db) */ | 942 | /* -240..240 (or -24db to +24db) */ |
949 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band0_gain, LANG_GAIN, 0, | 943 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band0_gain, LANG_GAIN, 0, |
950 | "eq band 0 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, | 944 | "eq band 0 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, |
951 | EQ_GAIN_STEP, eq_gain_format, NULL, NULL), | 945 | EQ_GAIN_STEP, db_format, NULL, NULL), |
952 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band1_gain, LANG_GAIN, 0, | 946 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band1_gain, LANG_GAIN, 0, |
953 | "eq band 1 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, | 947 | "eq band 1 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, |
954 | EQ_GAIN_STEP, eq_gain_format, NULL, NULL), | 948 | EQ_GAIN_STEP, db_format, NULL, NULL), |
955 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band2_gain, LANG_GAIN, 0, | 949 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band2_gain, LANG_GAIN, 0, |
956 | "eq band 2 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, | 950 | "eq band 2 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, |
957 | EQ_GAIN_STEP, eq_gain_format, NULL, NULL), | 951 | EQ_GAIN_STEP, db_format, NULL, NULL), |
958 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band3_gain, LANG_GAIN, 0, | 952 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band3_gain, LANG_GAIN, 0, |
959 | "eq band 3 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, | 953 | "eq band 3 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, |
960 | EQ_GAIN_STEP, eq_gain_format, NULL, NULL), | 954 | EQ_GAIN_STEP, db_format, NULL, NULL), |
961 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band4_gain, LANG_GAIN, 0, | 955 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band4_gain, LANG_GAIN, 0, |
962 | "eq band 4 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, | 956 | "eq band 4 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, |
963 | EQ_GAIN_STEP, eq_gain_format, NULL, NULL), | 957 | EQ_GAIN_STEP, db_format, NULL, NULL), |
964 | 958 | ||
965 | /* dithering */ | 959 | /* dithering */ |
966 | OFFON_SETTING(0, dithering_enabled, LANG_DITHERING, | 960 | OFFON_SETTING(0, dithering_enabled, LANG_DITHERING, |