diff options
Diffstat (limited to 'apps/settings_list.c')
-rw-r--r-- | apps/settings_list.c | 159 |
1 files changed, 96 insertions, 63 deletions
diff --git a/apps/settings_list.c b/apps/settings_list.c index 9f24c63a84..a505232643 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #ifdef HAVE_LCD_BITMAP | 42 | #ifdef HAVE_LCD_BITMAP |
43 | #include "peakmeter.h" | 43 | #include "peakmeter.h" |
44 | #endif | 44 | #endif |
45 | #include "menus/eq_menu.h" | ||
45 | 46 | ||
46 | /* some sets of values which are used more than once, to save memory */ | 47 | /* some sets of values which are used more than once, to save memory */ |
47 | static const char off_on[] = "off,on"; | 48 | static const char off_on[] = "off,on"; |
@@ -349,6 +350,7 @@ static long jumpscroll_getlang(int value) | |||
349 | return -1; | 350 | return -1; |
350 | } | 351 | } |
351 | #endif /* HAVE_LCD_CHARCELLS */ | 352 | #endif /* HAVE_LCD_CHARCELLS */ |
353 | |||
352 | 354 | ||
353 | const struct settings_list settings[] = { | 355 | const struct settings_list settings[] = { |
354 | /* sound settings */ | 356 | /* sound settings */ |
@@ -857,41 +859,56 @@ const struct settings_list settings[] = { | |||
857 | crossfeed_format, NULL, crossfeed_hf_cutoff_helper), | 859 | crossfeed_format, NULL, crossfeed_hf_cutoff_helper), |
858 | /* equalizer */ | 860 | /* equalizer */ |
859 | OFFON_SETTING(0,eq_enabled,LANG_EQUALIZER_ENABLED,false,"eq enabled",NULL), | 861 | OFFON_SETTING(0,eq_enabled,LANG_EQUALIZER_ENABLED,false,"eq enabled",NULL), |
860 | {F_T_INT,&global_settings.eq_precut,LANG_EQUALIZER_PRECUT,INT(0), | 862 | INT_SETTING(0, eq_precut, LANG_EQUALIZER_PRECUT, 0, "eq precut", |
861 | "eq precut",NULL,UNUSED}, | 863 | UNIT_DB, 0, 240, 5, eq_precut_format, NULL, dsp_set_eq_precut), |
862 | /* 0..32768 Hz */ | 864 | /* 0..32768 Hz */ |
863 | {F_T_INT,&global_settings.eq_band0_cutoff,LANG_EQUALIZER_BAND_CUTOFF,INT(60), | 865 | INT_SETTING(0, eq_band0_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 60, "eq band 0 cutoff", |
864 | "eq band 0 cutoff",NULL,UNUSED}, | 866 | UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, |
865 | {F_T_INT,&global_settings.eq_band1_cutoff,LANG_EQUALIZER_BAND_CUTOFF,INT(200), | 867 | NULL, NULL, NULL), |
866 | "eq band 1 cutoff",NULL,UNUSED}, | 868 | INT_SETTING(0, eq_band1_cutoff, LANG_EQUALIZER_BAND_CENTER, 200, "eq band 1 cutoff", |
867 | {F_T_INT,&global_settings.eq_band2_cutoff,LANG_EQUALIZER_BAND_CUTOFF,INT(800), | 869 | UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, |
868 | "eq band 2 cutoff",NULL,UNUSED}, | 870 | NULL, NULL, NULL), |
869 | {F_T_INT,&global_settings.eq_band3_cutoff,LANG_EQUALIZER_BAND_CUTOFF,INT(4000), | 871 | INT_SETTING(0, eq_band2_cutoff, LANG_EQUALIZER_BAND_CENTER, 800, "eq band 2 cutoff", |
870 | "eq band 3 cutoff",NULL,UNUSED}, | 872 | UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, |
871 | {F_T_INT,&global_settings.eq_band4_cutoff,LANG_EQUALIZER_BAND_CUTOFF,INT(12000), | 873 | NULL, NULL, NULL), |
872 | "eq band 4 cutoff",NULL,UNUSED}, | 874 | INT_SETTING(0, eq_band3_cutoff, LANG_EQUALIZER_BAND_CENTER, 4000, "eq band 3 cutoff", |
875 | UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, | ||
876 | NULL, NULL, NULL), | ||
877 | INT_SETTING(0, eq_band4_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 12000, "eq band 4 cutoff", | ||
878 | UNIT_HERTZ, EQ_CUTOFF_MIN, EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, | ||
879 | NULL, NULL, NULL), | ||
873 | /* 0..64 (or 0.0 to 6.4) */ | 880 | /* 0..64 (or 0.0 to 6.4) */ |
874 | {F_T_INT,&global_settings.eq_band0_q,LANG_EQUALIZER_BAND_Q,INT(7), | 881 | INT_SETTING(0, eq_band0_q, LANG_EQUALIZER_BAND_Q, 7, "eq band 0 q", |
875 | "eq band 0 q",NULL,UNUSED}, | 882 | UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
876 | {F_T_INT,&global_settings.eq_band1_q,LANG_EQUALIZER_BAND_Q,INT(10), | 883 | eq_q_format, NULL, NULL), |
877 | "eq band 1 q",NULL,UNUSED}, | 884 | INT_SETTING(0, eq_band1_q, LANG_EQUALIZER_BAND_Q, 10, "eq band 1 q", |
878 | {F_T_INT,&global_settings.eq_band2_q,LANG_EQUALIZER_BAND_Q,INT(10), | 885 | UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
879 | "eq band 2 q",NULL,UNUSED}, | 886 | eq_q_format, NULL, NULL), |
880 | {F_T_INT,&global_settings.eq_band3_q,LANG_EQUALIZER_BAND_Q,INT(10), | 887 | INT_SETTING(0, eq_band2_q, LANG_EQUALIZER_BAND_Q, 10, "eq band 2 q", |
881 | "eq band 3 q",NULL,UNUSED}, | 888 | UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
882 | {F_T_INT,&global_settings.eq_band4_q,LANG_EQUALIZER_BAND_Q,INT(7), | 889 | eq_q_format, NULL, NULL), |
883 | "eq band 4 q",NULL,UNUSED}, | 890 | INT_SETTING(0, eq_band3_q, LANG_EQUALIZER_BAND_Q, 10, "eq band 3 q", |
891 | UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, | ||
892 | eq_q_format, NULL, NULL), | ||
893 | INT_SETTING(0, eq_band4_q, LANG_EQUALIZER_BAND_Q, 7, "eq band 4 q", | ||
894 | UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, | ||
895 | eq_q_format, NULL, NULL), | ||
884 | /* -240..240 (or -24db to +24db) */ | 896 | /* -240..240 (or -24db to +24db) */ |
885 | {F_T_INT,&global_settings.eq_band0_gain,LANG_EQUALIZER_BAND_GAIN,INT(0), | 897 | INT_SETTING(0, eq_band0_gain, LANG_EQUALIZER_BAND_GAIN, 0, "eq band 0 gain", |
886 | "eq band 0 gain",NULL,UNUSED}, | 898 | UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP, |
887 | {F_T_INT,&global_settings.eq_band1_gain,LANG_EQUALIZER_BAND_GAIN,INT(0), | 899 | eq_gain_format, NULL, NULL), |
888 | "eq band 1 gain",NULL,UNUSED}, | 900 | INT_SETTING(0, eq_band1_gain, LANG_EQUALIZER_BAND_GAIN, 0, "eq band 1 gain", |
889 | {F_T_INT,&global_settings.eq_band2_gain,LANG_EQUALIZER_BAND_GAIN,INT(0), | 901 | UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP, |
890 | "eq band 2 gain",NULL,UNUSED}, | 902 | eq_gain_format, NULL, NULL), |
891 | {F_T_INT,&global_settings.eq_band3_gain,LANG_EQUALIZER_BAND_GAIN,INT(0), | 903 | INT_SETTING(0, eq_band2_gain, LANG_EQUALIZER_BAND_GAIN, 0, "eq band 2 gain", |
892 | "eq band 3 gain",NULL,UNUSED}, | 904 | UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP, |
893 | {F_T_INT,&global_settings.eq_band4_gain,LANG_EQUALIZER_BAND_GAIN,INT(0), | 905 | eq_gain_format, NULL, NULL), |
894 | "eq band 4 gain",NULL,UNUSED}, | 906 | INT_SETTING(0, eq_band3_gain, LANG_EQUALIZER_BAND_GAIN, 0, "eq band 3 gain", |
907 | UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP, | ||
908 | eq_gain_format, NULL, NULL), | ||
909 | INT_SETTING(0, eq_band4_gain, LANG_EQUALIZER_BAND_GAIN, 0, "eq band 4 gain", | ||
910 | UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, EQ_GAIN_STEP, | ||
911 | eq_gain_format, NULL, NULL), | ||
895 | 912 | ||
896 | /* dithering */ | 913 | /* dithering */ |
897 | OFFON_SETTING(0, dithering_enabled, LANG_DITHERING, | 914 | OFFON_SETTING(0, dithering_enabled, LANG_DITHERING, |
@@ -949,41 +966,57 @@ const struct settings_list settings[] = { | |||
949 | OFFON_SETTING(0,eq_hw_enabled,LANG_EQUALIZER_HARDWARE_ENABLED,false, | 966 | OFFON_SETTING(0,eq_hw_enabled,LANG_EQUALIZER_HARDWARE_ENABLED,false, |
950 | "eq hardware enabled",NULL), | 967 | "eq hardware enabled",NULL), |
951 | 968 | ||
952 | {F_T_INT,&global_settings.eq_hw_band0_cutoff,LANG_EQUALIZER_BAND_CUTOFF,INT(1), | 969 | STRINGCHOICE_SETTING(0, eq_hw_band0_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 1, |
953 | "eq hardware band 0 cutoff", | 970 | "eq hardware band 0 cutoff", "80Hz,105Hz,135Hz,175Hz", NULL, 4, |
954 | "80Hz,105Hz,135Hz,175Hz",UNUSED}, | 971 | TALK_ID(80, UNIT_HERTZ), TALK_ID(105, UNIT_HERTZ), |
955 | {F_T_INT,&global_settings.eq_hw_band0_gain,LANG_EQUALIZER_BAND_GAIN,INT(0), | 972 | TALK_ID(135, UNIT_HERTZ), TALK_ID(175, UNIT_HERTZ)), |
956 | "eq hardware band 0 gain",NULL,UNUSED}, | 973 | INT_SETTING(0, eq_hw_band0_gain, LANG_EQUALIZER_BAND_GAIN, 0, |
974 | "eq hardware band 0 gain", UNIT_DB, EQ_HW_GAIN_MIN, | ||
975 | EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL), | ||
957 | 976 | ||
958 | {F_T_INT,&global_settings.eq_hw_band1_center,LANG_EQUALIZER_BAND_CENTER,INT(1), | 977 | STRINGCHOICE_SETTING(0, eq_hw_band1_center, LANG_EQUALIZER_BAND_CENTER, 1, |
959 | "eq hardware band 1 center", | 978 | "eq hardware band 1 center", "230Hz,300Hz,385Hz,500Hz", NULL, 4, |
960 | "230Hz,300Hz,385Hz,500Hz",UNUSED}, | 979 | TALK_ID(230, UNIT_HERTZ), TALK_ID(300, UNIT_HERTZ), |
961 | {F_T_INT,&global_settings.eq_hw_band1_bandwidth,LANG_EQUALIZER_BANDWIDTH,INT(0), | 980 | TALK_ID(385, UNIT_HERTZ), TALK_ID(500, UNIT_HERTZ)), |
962 | "eq hardware band 1 bandwidth","narrow,wide",UNUSED}, | 981 | CHOICE_SETTING(0, eq_hw_band1_bandwidth, LANG_EQUALIZER_BANDWIDTH, 0, |
963 | {F_T_INT,&global_settings.eq_hw_band1_gain,LANG_EQUALIZER_BAND_GAIN,INT(0), | 982 | "eq hardware band 1 bandwidth", "narrow,wide", NULL, 2, |
964 | "eq hardware band 1 gain",NULL,UNUSED}, | 983 | ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_NARROW), |
984 | ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_WIDE)), | ||
985 | INT_SETTING(0, eq_hw_band1_gain, LANG_EQUALIZER_BAND_GAIN, 0, | ||
986 | "eq hardware band 1 gain", UNIT_DB, EQ_HW_GAIN_MIN, | ||
987 | EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL), | ||
965 | 988 | ||
966 | {F_T_INT,&global_settings.eq_hw_band2_center,LANG_EQUALIZER_BAND_CENTER,INT(1), | 989 | STRINGCHOICE_SETTING(0, eq_hw_band2_center, LANG_EQUALIZER_BAND_CENTER, 1, |
967 | "eq hardware band 2 center", | 990 | "eq hardware band 2 center", "650Hz,850Hz,1.1kHz,1.4kHz", NULL, 4, |
968 | "650Hz,850Hz,1.1kHz,1.4kHz",UNUSED}, | 991 | TALK_ID(650, UNIT_HERTZ), TALK_ID(850, UNIT_HERTZ), |
969 | {F_T_INT,&global_settings.eq_hw_band2_bandwidth,LANG_EQUALIZER_BANDWIDTH,INT(0), | 992 | TALK_ID(1100, UNIT_HERTZ), TALK_ID(1400, UNIT_HERTZ)), |
970 | "eq hardware band 2 bandwidth","narrow,wide",UNUSED}, | 993 | CHOICE_SETTING(0, eq_hw_band2_bandwidth, LANG_EQUALIZER_BANDWIDTH, 0, |
971 | {F_T_INT,&global_settings.eq_hw_band2_gain,LANG_EQUALIZER_BAND_GAIN,INT(0), | 994 | "eq hardware band 2 bandwidth", "narrow,wide", NULL, 2, |
972 | "eq hardware band 2 gain",NULL,UNUSED}, | 995 | ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_NARROW), |
996 | ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_WIDE)), | ||
997 | INT_SETTING(0, eq_hw_band2_gain, LANG_EQUALIZER_BAND_GAIN, 0, | ||
998 | "eq hardware band 2 gain", UNIT_DB, EQ_HW_GAIN_MIN, | ||
999 | EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL), | ||
973 | 1000 | ||
974 | {F_T_INT,&global_settings.eq_hw_band3_center,LANG_EQUALIZER_BAND_CENTER,INT(1), | 1001 | STRINGCHOICE_SETTING(0, eq_hw_band3_center, LANG_EQUALIZER_BAND_CENTER, 1, |
975 | "eq hardware band 3 center", | 1002 | "eq hardware band 3 center", "1.8kHz,2.4kHz,3.2kHz,4.1kHz", NULL, 4, |
976 | "1.8kHz,2.4kHz,3.2kHz,4.1kHz",UNUSED}, | 1003 | TALK_ID(1800, UNIT_HERTZ), TALK_ID(2400, UNIT_HERTZ), |
977 | {F_T_INT,&global_settings.eq_hw_band3_bandwidth,LANG_EQUALIZER_BANDWIDTH,INT(0), | 1004 | TALK_ID(3200, UNIT_HERTZ), TALK_ID(4100, UNIT_HERTZ)), |
978 | "eq hardware band 3 bandwidth","narrow,wide",UNUSED}, | 1005 | CHOICE_SETTING(0, eq_hw_band3_bandwidth, LANG_EQUALIZER_BANDWIDTH, 0, |
979 | {F_T_INT,&global_settings.eq_hw_band3_gain,LANG_EQUALIZER_BAND_GAIN,INT(0), | 1006 | "eq hardware band 3 bandwidth", "narrow,wide", NULL, 2, |
980 | "eq hardware band 3 gain",NULL,UNUSED}, | 1007 | ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_NARROW), |
1008 | ID2P(LANG_EQUALIZER_HARDWARE_BANDWIDTH_WIDE)), | ||
1009 | INT_SETTING(0, eq_hw_band3_gain, LANG_EQUALIZER_BAND_GAIN, 0, | ||
1010 | "eq hardware band 3 gain", UNIT_DB, EQ_HW_GAIN_MIN, | ||
1011 | EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL), | ||
981 | 1012 | ||
982 | {F_T_INT,&global_settings.eq_hw_band4_cutoff,LANG_EQUALIZER_BAND_CUTOFF,INT(1), | 1013 | STRINGCHOICE_SETTING(0, eq_hw_band4_cutoff, LANG_EQUALIZER_BAND_CUTOFF, 1, |
983 | "eq hardware band 4 cutoff", | 1014 | "eq hardware band 4 cutoff", "5.3kHz,6.9kHz,9kHz,11.7kHz", NULL, 4, |
984 | "5.3kHz,6.9kHz,9kHz,11.7kHz",UNUSED}, | 1015 | TALK_ID(5300, UNIT_HERTZ), TALK_ID(6900, UNIT_HERTZ), |
985 | {F_T_INT,&global_settings.eq_hw_band4_gain,LANG_EQUALIZER_BAND_GAIN,INT(0), | 1016 | TALK_ID(9000, UNIT_HERTZ), TALK_ID(11700, UNIT_HERTZ)), |
986 | "eq hardware band 4 gain",NULL,UNUSED}, | 1017 | INT_SETTING(0, eq_hw_band4_gain, LANG_EQUALIZER_BAND_GAIN, 0, |
1018 | "eq hardware band 4 gain", UNIT_DB, EQ_HW_GAIN_MIN, | ||
1019 | EQ_HW_GAIN_MAX, EQ_HW_GAIN_STEP, eq_hw_gain_format, NULL, NULL), | ||
987 | #endif | 1020 | #endif |
988 | 1021 | ||
989 | OFFON_SETTING(0,hold_lr_for_scroll_in_list,-1,true, | 1022 | OFFON_SETTING(0,hold_lr_for_scroll_in_list,-1,true, |