2007-02-08 04:33:41 +00:00
|
|
|
|
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
2007-02-13 00:32:17 +00:00
|
|
|
* $Id$
|
2007-02-08 04:33:41 +00:00
|
|
|
*
|
|
|
|
* Copyright (C) 2007 Jonathan Gordon
|
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2007-02-08 04:33:41 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <limits.h>
|
|
|
|
#include "config.h"
|
|
|
|
#include "lang.h"
|
|
|
|
#include "action.h"
|
|
|
|
#include "settings.h"
|
|
|
|
#include "menu.h"
|
|
|
|
#include "sound_menu.h"
|
2007-02-08 10:28:42 +00:00
|
|
|
#include "eq_menu.h"
|
2007-02-19 02:14:51 +00:00
|
|
|
#include "exported_menus.h"
|
2008-03-03 11:06:04 +00:00
|
|
|
#include "menu_common.h"
|
2007-02-08 04:33:41 +00:00
|
|
|
|
2007-02-08 10:28:42 +00:00
|
|
|
/***********************************/
|
|
|
|
/* SOUND MENU */
|
2008-03-03 11:06:04 +00:00
|
|
|
MENUITEM_SETTING(volume, &global_settings.volume, NULL);
|
|
|
|
MENUITEM_SETTING(bass, &global_settings.bass,
|
|
|
|
#ifdef HAVE_SW_TONE_CONTROLS
|
|
|
|
lowlatency_callback
|
2007-02-08 10:28:42 +00:00
|
|
|
#else
|
2008-03-03 11:06:04 +00:00
|
|
|
NULL
|
2007-02-08 10:28:42 +00:00
|
|
|
#endif
|
2008-03-03 11:06:04 +00:00
|
|
|
);
|
2007-11-24 07:51:00 +00:00
|
|
|
#ifdef HAVE_WM8758
|
2008-03-03 11:06:04 +00:00
|
|
|
MENUITEM_SETTING(bass_cutoff, &global_settings.bass_cutoff, NULL);
|
2007-11-24 07:51:00 +00:00
|
|
|
#endif
|
2008-03-03 11:06:04 +00:00
|
|
|
MENUITEM_SETTING(treble, &global_settings.treble,
|
|
|
|
#ifdef HAVE_SW_TONE_CONTROLS
|
|
|
|
lowlatency_callback
|
|
|
|
#else
|
|
|
|
NULL
|
|
|
|
#endif
|
|
|
|
);
|
2007-11-24 07:51:00 +00:00
|
|
|
#ifdef HAVE_WM8758
|
2008-03-03 11:06:04 +00:00
|
|
|
MENUITEM_SETTING(treble_cutoff, &global_settings.treble_cutoff, NULL);
|
|
|
|
#endif
|
|
|
|
MENUITEM_SETTING(balance, &global_settings.balance, NULL);
|
|
|
|
MENUITEM_SETTING(channel_config, &global_settings.channel_config,
|
|
|
|
#if CONFIG_CODEC == SWCODEC
|
|
|
|
lowlatency_callback
|
|
|
|
#else
|
|
|
|
NULL
|
|
|
|
#endif
|
|
|
|
);
|
|
|
|
MENUITEM_SETTING(stereo_width, &global_settings.stereo_width,
|
|
|
|
#if CONFIG_CODEC == SWCODEC
|
|
|
|
lowlatency_callback
|
|
|
|
#else
|
|
|
|
NULL
|
2007-11-24 07:51:00 +00:00
|
|
|
#endif
|
2008-03-03 11:06:04 +00:00
|
|
|
);
|
2007-02-08 10:28:42 +00:00
|
|
|
|
|
|
|
#if CONFIG_CODEC == SWCODEC
|
|
|
|
/* Crossfeed Submenu */
|
2008-03-03 11:06:04 +00:00
|
|
|
MENUITEM_SETTING(crossfeed, &global_settings.crossfeed, lowlatency_callback);
|
2007-02-08 10:28:42 +00:00
|
|
|
MENUITEM_SETTING(crossfeed_direct_gain,
|
2008-03-03 11:06:04 +00:00
|
|
|
&global_settings.crossfeed_direct_gain, lowlatency_callback);
|
2007-02-08 10:28:42 +00:00
|
|
|
MENUITEM_SETTING(crossfeed_cross_gain,
|
2008-03-03 11:06:04 +00:00
|
|
|
&global_settings.crossfeed_cross_gain, lowlatency_callback);
|
2007-02-08 10:28:42 +00:00
|
|
|
MENUITEM_SETTING(crossfeed_hf_attenuation,
|
2008-03-03 11:06:04 +00:00
|
|
|
&global_settings.crossfeed_hf_attenuation, lowlatency_callback);
|
2007-02-08 10:28:42 +00:00
|
|
|
MENUITEM_SETTING(crossfeed_hf_cutoff,
|
2008-03-03 11:06:04 +00:00
|
|
|
&global_settings.crossfeed_hf_cutoff, lowlatency_callback);
|
2007-03-03 13:52:14 +00:00
|
|
|
MAKE_MENU(crossfeed_menu,ID2P(LANG_CROSSFEED), NULL, Icon_NOICON,
|
2007-02-08 10:28:42 +00:00
|
|
|
&crossfeed, &crossfeed_direct_gain, &crossfeed_cross_gain,
|
|
|
|
&crossfeed_hf_attenuation, &crossfeed_hf_cutoff);
|
|
|
|
|
|
|
|
MENUITEM_SETTING(dithering_enabled,
|
2008-03-03 11:06:04 +00:00
|
|
|
&global_settings.dithering_enabled, lowlatency_callback);
|
2007-02-08 10:28:42 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
|
|
|
MENUITEM_SETTING(loudness, &global_settings.loudness, NULL);
|
|
|
|
MENUITEM_SETTING(avc, &global_settings.avc, NULL);
|
|
|
|
MENUITEM_SETTING(superbass, &global_settings.superbass, NULL);
|
|
|
|
MENUITEM_SETTING(mdb_enable, &global_settings.mdb_enable, NULL);
|
|
|
|
MENUITEM_SETTING(mdb_strength, &global_settings.mdb_strength, NULL);
|
|
|
|
MENUITEM_SETTING(mdb_harmonics, &global_settings.mdb_harmonics, NULL);
|
|
|
|
MENUITEM_SETTING(mdb_center, &global_settings.mdb_center, NULL);
|
|
|
|
MENUITEM_SETTING(mdb_shape, &global_settings.mdb_shape, NULL);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-03-03 13:52:14 +00:00
|
|
|
MAKE_MENU(sound_settings, ID2P(LANG_SOUND_SETTINGS), NULL, Icon_Audio,
|
2007-02-08 10:28:42 +00:00
|
|
|
&volume,
|
2007-11-24 07:51:00 +00:00
|
|
|
&bass,
|
|
|
|
#ifdef HAVE_WM8758
|
|
|
|
&bass_cutoff,
|
|
|
|
#endif
|
|
|
|
&treble,
|
|
|
|
#ifdef HAVE_WM8758
|
|
|
|
&treble_cutoff,
|
|
|
|
#endif
|
2007-02-08 10:28:42 +00:00
|
|
|
&balance,&channel_config,&stereo_width
|
|
|
|
#if CONFIG_CODEC == SWCODEC
|
2007-02-19 02:14:51 +00:00
|
|
|
,&crossfeed_menu, &equalizer_menu, &dithering_enabled
|
2007-02-08 10:28:42 +00:00
|
|
|
#endif
|
|
|
|
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
|
|
|
,&loudness,&avc,&superbass,&mdb_enable,&mdb_strength
|
|
|
|
,&mdb_harmonics,&mdb_center,&mdb_shape
|
|
|
|
#endif
|
|
|
|
);
|
|
|
|
|