diff options
Diffstat (limited to 'apps/menus/sound_menu.c')
-rw-r--r-- | apps/menus/sound_menu.c | 50 |
1 files changed, 38 insertions, 12 deletions
diff --git a/apps/menus/sound_menu.c b/apps/menus/sound_menu.c index 0ce860cb7c..066b1dabae 100644 --- a/apps/menus/sound_menu.c +++ b/apps/menus/sound_menu.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <stddef.h> | 23 | #include <stddef.h> |
24 | #include <limits.h> | 24 | #include <limits.h> |
25 | #include "config.h" | 25 | #include "config.h" |
26 | #include "sound.h" | ||
26 | #include "lang.h" | 27 | #include "lang.h" |
27 | #include "action.h" | 28 | #include "action.h" |
28 | #include "settings.h" | 29 | #include "settings.h" |
@@ -38,6 +39,7 @@ | |||
38 | /***********************************/ | 39 | /***********************************/ |
39 | /* SOUND MENU */ | 40 | /* SOUND MENU */ |
40 | MENUITEM_SETTING(volume, &global_settings.volume, NULL); | 41 | MENUITEM_SETTING(volume, &global_settings.volume, NULL); |
42 | #ifdef AUDIOHW_HAVE_BASS | ||
41 | MENUITEM_SETTING(bass, &global_settings.bass, | 43 | MENUITEM_SETTING(bass, &global_settings.bass, |
42 | #ifdef HAVE_SW_TONE_CONTROLS | 44 | #ifdef HAVE_SW_TONE_CONTROLS |
43 | lowlatency_callback | 45 | lowlatency_callback |
@@ -45,9 +47,14 @@ MENUITEM_SETTING(bass, &global_settings.bass, | |||
45 | NULL | 47 | NULL |
46 | #endif | 48 | #endif |
47 | ); | 49 | ); |
48 | #ifdef HAVE_WM8758 | 50 | |
49 | MENUITEM_SETTING(bass_cutoff, &global_settings.bass_cutoff, NULL); | 51 | #ifdef AUDIOHW_HAVE_BASS_CUTOFF |
52 | MENUITEM_SETTING(treble_cutoff, &global_settings.treble_cutoff, NULL); | ||
50 | #endif | 53 | #endif |
54 | #endif /* AUDIOHW_HAVE_BASS */ | ||
55 | |||
56 | |||
57 | #ifdef AUDIOHW_HAVE_TREBLE | ||
51 | MENUITEM_SETTING(treble, &global_settings.treble, | 58 | MENUITEM_SETTING(treble, &global_settings.treble, |
52 | #ifdef HAVE_SW_TONE_CONTROLS | 59 | #ifdef HAVE_SW_TONE_CONTROLS |
53 | lowlatency_callback | 60 | lowlatency_callback |
@@ -55,9 +62,13 @@ MENUITEM_SETTING(treble, &global_settings.treble, | |||
55 | NULL | 62 | NULL |
56 | #endif | 63 | #endif |
57 | ); | 64 | ); |
58 | #ifdef HAVE_WM8758 | 65 | |
66 | #ifdef AUDIOHW_HAVE_TREBLE_CUTOFF | ||
59 | MENUITEM_SETTING(treble_cutoff, &global_settings.treble_cutoff, NULL); | 67 | MENUITEM_SETTING(treble_cutoff, &global_settings.treble_cutoff, NULL); |
60 | #endif | 68 | #endif |
69 | #endif /* AUDIOHW_HAVE_TREBLE */ | ||
70 | |||
71 | |||
61 | MENUITEM_SETTING(balance, &global_settings.balance, NULL); | 72 | MENUITEM_SETTING(balance, &global_settings.balance, NULL); |
62 | MENUITEM_SETTING(channel_config, &global_settings.channel_config, | 73 | MENUITEM_SETTING(channel_config, &global_settings.channel_config, |
63 | #if CONFIG_CODEC == SWCODEC | 74 | #if CONFIG_CODEC == SWCODEC |
@@ -74,6 +85,10 @@ MENUITEM_SETTING(stereo_width, &global_settings.stereo_width, | |||
74 | #endif | 85 | #endif |
75 | ); | 86 | ); |
76 | 87 | ||
88 | #ifdef AUDIOHW_HAVE_DEPTH_3D | ||
89 | MENUITEM_SETTING(depth_3d, &global_settings.depth_3d, NULL); | ||
90 | #endif | ||
91 | |||
77 | #if CONFIG_CODEC == SWCODEC | 92 | #if CONFIG_CODEC == SWCODEC |
78 | /* Crossfeed Submenu */ | 93 | /* Crossfeed Submenu */ |
79 | MENUITEM_SETTING(crossfeed, &global_settings.crossfeed, lowlatency_callback); | 94 | MENUITEM_SETTING(crossfeed, &global_settings.crossfeed, lowlatency_callback); |
@@ -137,19 +152,30 @@ static int timestretch_callback(int action,const struct menu_item_ex *this_item) | |||
137 | MENUITEM_SETTING(speaker_enabled, &global_settings.speaker_enabled, NULL); | 152 | MENUITEM_SETTING(speaker_enabled, &global_settings.speaker_enabled, NULL); |
138 | #endif | 153 | #endif |
139 | 154 | ||
140 | 155 | #ifdef AUDIOHW_HAVE_EQ | |
156 | #endif /* AUDIOHW_HAVE_EQ */ | ||
141 | 157 | ||
142 | MAKE_MENU(sound_settings, ID2P(LANG_SOUND_SETTINGS), NULL, Icon_Audio, | 158 | MAKE_MENU(sound_settings, ID2P(LANG_SOUND_SETTINGS), NULL, Icon_Audio, |
143 | &volume, | 159 | &volume |
144 | &bass, | 160 | #ifdef AUDIOHW_HAVE_BASS |
145 | #ifdef HAVE_WM8758 | 161 | ,&bass |
146 | &bass_cutoff, | 162 | #endif |
163 | #ifdef AUDIOHW_HAVE_BASS_CUTOFF | ||
164 | ,&bass_cutoff | ||
165 | #endif | ||
166 | #ifdef AUDIOHW_HAVE_TREBLE | ||
167 | ,&treble | ||
168 | #endif | ||
169 | #ifdef AUDIOHW_HAVE_TREBLE_CUTOFF | ||
170 | ,&treble_cutoff | ||
171 | #endif | ||
172 | #ifdef AUDIOHW_HAVE_EQ | ||
173 | ,&audiohw_eq_tone_controls | ||
147 | #endif | 174 | #endif |
148 | &treble, | 175 | ,&balance,&channel_config,&stereo_width |
149 | #ifdef HAVE_WM8758 | 176 | #ifdef AUDIOHW_HAVE_DEPTH_3D |
150 | &treble_cutoff, | 177 | ,&depth_3d |
151 | #endif | 178 | #endif |
152 | &balance,&channel_config,&stereo_width | ||
153 | #if CONFIG_CODEC == SWCODEC | 179 | #if CONFIG_CODEC == SWCODEC |
154 | ,&crossfeed_menu, &equalizer_menu, &dithering_enabled | 180 | ,&crossfeed_menu, &equalizer_menu, &dithering_enabled |
155 | ,×tretch_enabled | 181 | ,×tretch_enabled |