rbutil: fix h10_5gbmtp download issue.
[kugel-rb.git] / apps / menus / sound_menu.c
blobd953db93b3eb6ce5e44b48c763ead30933b03fca
2 /***************************************************************************
3 * __________ __ ___.
4 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
5 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
6 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
7 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
8 * \/ \/ \/ \/ \/
9 * $Id$
11 * Copyright (C) 2007 Jonathan Gordon
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
21 ****************************************************************************/
23 #include <stdbool.h>
24 #include <stddef.h>
25 #include <limits.h>
26 #include "config.h"
27 #include "lang.h"
28 #include "action.h"
29 #include "settings.h"
30 #include "menu.h"
31 #include "sound_menu.h"
32 #include "eq_menu.h"
33 #include "exported_menus.h"
34 #include "menu_common.h"
36 /***********************************/
37 /* SOUND MENU */
38 MENUITEM_SETTING(volume, &global_settings.volume, NULL);
39 MENUITEM_SETTING(bass, &global_settings.bass,
40 #ifdef HAVE_SW_TONE_CONTROLS
41 lowlatency_callback
42 #else
43 NULL
44 #endif
46 #ifdef HAVE_WM8758
47 MENUITEM_SETTING(bass_cutoff, &global_settings.bass_cutoff, NULL);
48 #endif
49 MENUITEM_SETTING(treble, &global_settings.treble,
50 #ifdef HAVE_SW_TONE_CONTROLS
51 lowlatency_callback
52 #else
53 NULL
54 #endif
56 #ifdef HAVE_WM8758
57 MENUITEM_SETTING(treble_cutoff, &global_settings.treble_cutoff, NULL);
58 #endif
59 MENUITEM_SETTING(balance, &global_settings.balance, NULL);
60 MENUITEM_SETTING(channel_config, &global_settings.channel_config,
61 #if CONFIG_CODEC == SWCODEC
62 lowlatency_callback
63 #else
64 NULL
65 #endif
67 MENUITEM_SETTING(stereo_width, &global_settings.stereo_width,
68 #if CONFIG_CODEC == SWCODEC
69 lowlatency_callback
70 #else
71 NULL
72 #endif
75 #if CONFIG_CODEC == SWCODEC
76 /* Crossfeed Submenu */
77 MENUITEM_SETTING(crossfeed, &global_settings.crossfeed, lowlatency_callback);
78 MENUITEM_SETTING(crossfeed_direct_gain,
79 &global_settings.crossfeed_direct_gain, lowlatency_callback);
80 MENUITEM_SETTING(crossfeed_cross_gain,
81 &global_settings.crossfeed_cross_gain, lowlatency_callback);
82 MENUITEM_SETTING(crossfeed_hf_attenuation,
83 &global_settings.crossfeed_hf_attenuation, lowlatency_callback);
84 MENUITEM_SETTING(crossfeed_hf_cutoff,
85 &global_settings.crossfeed_hf_cutoff, lowlatency_callback);
86 MAKE_MENU(crossfeed_menu,ID2P(LANG_CROSSFEED), NULL, Icon_NOICON,
87 &crossfeed, &crossfeed_direct_gain, &crossfeed_cross_gain,
88 &crossfeed_hf_attenuation, &crossfeed_hf_cutoff);
90 MENUITEM_SETTING(dithering_enabled,
91 &global_settings.dithering_enabled, lowlatency_callback);
92 #endif
94 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
95 MENUITEM_SETTING(loudness, &global_settings.loudness, NULL);
96 MENUITEM_SETTING(avc, &global_settings.avc, NULL);
97 MENUITEM_SETTING(superbass, &global_settings.superbass, NULL);
98 MENUITEM_SETTING(mdb_enable, &global_settings.mdb_enable, NULL);
99 MENUITEM_SETTING(mdb_strength, &global_settings.mdb_strength, NULL);
100 MENUITEM_SETTING(mdb_harmonics, &global_settings.mdb_harmonics, NULL);
101 MENUITEM_SETTING(mdb_center, &global_settings.mdb_center, NULL);
102 MENUITEM_SETTING(mdb_shape, &global_settings.mdb_shape, NULL);
103 #endif
107 MAKE_MENU(sound_settings, ID2P(LANG_SOUND_SETTINGS), NULL, Icon_Audio,
108 &volume,
109 &bass,
110 #ifdef HAVE_WM8758
111 &bass_cutoff,
112 #endif
113 &treble,
114 #ifdef HAVE_WM8758
115 &treble_cutoff,
116 #endif
117 &balance,&channel_config,&stereo_width
118 #if CONFIG_CODEC == SWCODEC
119 ,&crossfeed_menu, &equalizer_menu, &dithering_enabled
120 #endif
121 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
122 ,&loudness,&avc,&superbass,&mdb_enable,&mdb_strength
123 ,&mdb_harmonics,&mdb_center,&mdb_shape
124 #endif