blob: d953db93b3eb6ce5e44b48c763ead30933b03fca [file] [log] [blame]
Jonathan Gordon4718a1e2007-02-08 04:33:41 +00001
2/***************************************************************************
3 * __________ __ ___.
4 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
5 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
6 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
7 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
8 * \/ \/ \/ \/ \/
Jonathan Gordon4e73b532007-02-13 00:32:17 +00009 * $Id$
Jonathan Gordon4718a1e2007-02-08 04:33:41 +000010 *
11 * Copyright (C) 2007 Jonathan Gordon
12 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000013 * 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.
Jonathan Gordon4718a1e2007-02-08 04:33:41 +000017 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 ****************************************************************************/
22
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"
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +000032#include "eq_menu.h"
Jonathan Gordon2801a872007-02-19 02:14:51 +000033#include "exported_menus.h"
Dan Everton04663192008-03-03 11:06:04 +000034#include "menu_common.h"
Jonathan Gordon4718a1e2007-02-08 04:33:41 +000035
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +000036/***********************************/
37/* SOUND MENU */
Dan Everton04663192008-03-03 11:06:04 +000038MENUITEM_SETTING(volume, &global_settings.volume, NULL);
39MENUITEM_SETTING(bass, &global_settings.bass,
40#ifdef HAVE_SW_TONE_CONTROLS
41 lowlatency_callback
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +000042#else
Dan Everton04663192008-03-03 11:06:04 +000043 NULL
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +000044#endif
Dan Everton04663192008-03-03 11:06:04 +000045);
Dan Evertond7e1f772007-11-24 07:51:00 +000046#ifdef HAVE_WM8758
Dan Everton04663192008-03-03 11:06:04 +000047MENUITEM_SETTING(bass_cutoff, &global_settings.bass_cutoff, NULL);
Dan Evertond7e1f772007-11-24 07:51:00 +000048#endif
Dan Everton04663192008-03-03 11:06:04 +000049MENUITEM_SETTING(treble, &global_settings.treble,
50#ifdef HAVE_SW_TONE_CONTROLS
51 lowlatency_callback
52#else
53 NULL
54#endif
55);
Dan Evertond7e1f772007-11-24 07:51:00 +000056#ifdef HAVE_WM8758
Dan Everton04663192008-03-03 11:06:04 +000057MENUITEM_SETTING(treble_cutoff, &global_settings.treble_cutoff, NULL);
Dan Evertond7e1f772007-11-24 07:51:00 +000058#endif
Dan Everton04663192008-03-03 11:06:04 +000059MENUITEM_SETTING(balance, &global_settings.balance, NULL);
60MENUITEM_SETTING(channel_config, &global_settings.channel_config,
61#if CONFIG_CODEC == SWCODEC
62 lowlatency_callback
63#else
64 NULL
65#endif
66);
67MENUITEM_SETTING(stereo_width, &global_settings.stereo_width,
68#if CONFIG_CODEC == SWCODEC
69 lowlatency_callback
70#else
71 NULL
72#endif
73);
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +000074
75#if CONFIG_CODEC == SWCODEC
76 /* Crossfeed Submenu */
Dan Everton04663192008-03-03 11:06:04 +000077 MENUITEM_SETTING(crossfeed, &global_settings.crossfeed, lowlatency_callback);
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +000078 MENUITEM_SETTING(crossfeed_direct_gain,
Dan Everton04663192008-03-03 11:06:04 +000079 &global_settings.crossfeed_direct_gain, lowlatency_callback);
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +000080 MENUITEM_SETTING(crossfeed_cross_gain,
Dan Everton04663192008-03-03 11:06:04 +000081 &global_settings.crossfeed_cross_gain, lowlatency_callback);
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +000082 MENUITEM_SETTING(crossfeed_hf_attenuation,
Dan Everton04663192008-03-03 11:06:04 +000083 &global_settings.crossfeed_hf_attenuation, lowlatency_callback);
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +000084 MENUITEM_SETTING(crossfeed_hf_cutoff,
Dan Everton04663192008-03-03 11:06:04 +000085 &global_settings.crossfeed_hf_cutoff, lowlatency_callback);
Jonathan Gordon02a87172007-03-03 13:52:14 +000086 MAKE_MENU(crossfeed_menu,ID2P(LANG_CROSSFEED), NULL, Icon_NOICON,
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +000087 &crossfeed, &crossfeed_direct_gain, &crossfeed_cross_gain,
88 &crossfeed_hf_attenuation, &crossfeed_hf_cutoff);
89
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +000090 MENUITEM_SETTING(dithering_enabled,
Dan Everton04663192008-03-03 11:06:04 +000091 &global_settings.dithering_enabled, lowlatency_callback);
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +000092#endif
93
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
104
105
106
Jonathan Gordon02a87172007-03-03 13:52:14 +0000107MAKE_MENU(sound_settings, ID2P(LANG_SOUND_SETTINGS), NULL, Icon_Audio,
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +0000108 &volume,
Dan Evertond7e1f772007-11-24 07:51:00 +0000109 &bass,
110#ifdef HAVE_WM8758
111 &bass_cutoff,
112#endif
113 &treble,
114#ifdef HAVE_WM8758
115 &treble_cutoff,
116#endif
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +0000117 &balance,&channel_config,&stereo_width
118#if CONFIG_CODEC == SWCODEC
Jonathan Gordon2801a872007-02-19 02:14:51 +0000119 ,&crossfeed_menu, &equalizer_menu, &dithering_enabled
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +0000120#endif
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +0000121#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
122 ,&loudness,&avc,&superbass,&mdb_enable,&mdb_strength
123 ,&mdb_harmonics,&mdb_center,&mdb_shape
124#endif
125 );
Jonathan Gordonfe3cfcc2007-02-08 10:28:42 +0000126