2 /***************************************************************************
4 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
5 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
6 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
7 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
11 * Copyright (C) 2007 Jonathan Gordon
13 * All files in this archive are subject to the GNU General Public License.
14 * See the file COPYING in the source tree root for full license agreement.
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
19 ****************************************************************************/
29 #include "sound_menu.h"
31 #if CONFIG_CODEC == SWCODEC
34 #include "exported_menus.h"
36 /***********************************/
38 #if CONFIG_CODEC == SWCODEC
39 int soundmenu_callback(int action
,const struct menu_item_ex
*this_item
)
44 case ACTION_ENTER_MENUITEM
: /* on entering an item */
45 pcmbuf_set_low_latency(true);
47 case ACTION_EXIT_MENUITEM
: /* on exit */
48 pcmbuf_set_low_latency(false);
54 #define soundmenu_callback NULL
57 MENUITEM_SETTING(volume
, &global_settings
.volume
, soundmenu_callback
);
58 MENUITEM_SETTING(bass
, &global_settings
.bass
, soundmenu_callback
);
59 MENUITEM_SETTING(treble
, &global_settings
.treble
, soundmenu_callback
);
60 MENUITEM_SETTING(balance
, &global_settings
.balance
, soundmenu_callback
);
61 MENUITEM_SETTING(channel_config
, &global_settings
.channel_config
, soundmenu_callback
);
62 MENUITEM_SETTING(stereo_width
, &global_settings
.stereo_width
, soundmenu_callback
);
64 #if CONFIG_CODEC == SWCODEC
65 /* Crossfeed Submenu */
66 MENUITEM_SETTING(crossfeed
, &global_settings
.crossfeed
, soundmenu_callback
);
67 MENUITEM_SETTING(crossfeed_direct_gain
,
68 &global_settings
.crossfeed_direct_gain
, soundmenu_callback
);
69 MENUITEM_SETTING(crossfeed_cross_gain
,
70 &global_settings
.crossfeed_cross_gain
, soundmenu_callback
);
71 MENUITEM_SETTING(crossfeed_hf_attenuation
,
72 &global_settings
.crossfeed_hf_attenuation
, soundmenu_callback
);
73 MENUITEM_SETTING(crossfeed_hf_cutoff
,
74 &global_settings
.crossfeed_hf_cutoff
, soundmenu_callback
);
75 MAKE_MENU(crossfeed_menu
,ID2P(LANG_CROSSFEED
), NULL
, Icon_NOICON
,
76 &crossfeed
, &crossfeed_direct_gain
, &crossfeed_cross_gain
,
77 &crossfeed_hf_attenuation
, &crossfeed_hf_cutoff
);
79 MENUITEM_SETTING(dithering_enabled
,
80 &global_settings
.dithering_enabled
, soundmenu_callback
);
83 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
84 MENUITEM_SETTING(loudness
, &global_settings
.loudness
, NULL
);
85 MENUITEM_SETTING(avc
, &global_settings
.avc
, NULL
);
86 MENUITEM_SETTING(superbass
, &global_settings
.superbass
, NULL
);
87 MENUITEM_SETTING(mdb_enable
, &global_settings
.mdb_enable
, NULL
);
88 MENUITEM_SETTING(mdb_strength
, &global_settings
.mdb_strength
, NULL
);
89 MENUITEM_SETTING(mdb_harmonics
, &global_settings
.mdb_harmonics
, NULL
);
90 MENUITEM_SETTING(mdb_center
, &global_settings
.mdb_center
, NULL
);
91 MENUITEM_SETTING(mdb_shape
, &global_settings
.mdb_shape
, NULL
);
96 MAKE_MENU(sound_settings
, ID2P(LANG_SOUND_SETTINGS
), NULL
, Icon_Audio
,
99 &balance
,&channel_config
,&stereo_width
100 #if CONFIG_CODEC == SWCODEC
101 ,&crossfeed_menu
, &equalizer_menu
, &dithering_enabled
106 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
107 ,&loudness
,&avc
,&superbass
,&mdb_enable
,&mdb_strength
108 ,&mdb_harmonics
,&mdb_center
,&mdb_shape