summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2010-05-15 13:09:45 +0000
committerMichael Sevakis <jethead71@rockbox.org>2010-05-15 13:09:45 +0000
commit80d0d15ca9b253f8a446f50cf25d3d4b850bcfd1 (patch)
tree2598d3a019c33d6f9ea76010fd6d3a8301ef87a0 /apps
parent0f77db73469920f0b0006f696ddb36029338c378 (diff)
downloadrockbox-80d0d15ca9b253f8a446f50cf25d3d4b850bcfd1.tar.gz
rockbox-80d0d15ca9b253f8a446f50cf25d3d4b850bcfd1.zip
Gigabeat S: Fully enable access to hardware tone controls and 3-D effect feature. Under the hood, it's designated a hardware equalizer since it is one. Implement code framework for hardware EQ in general. Menu aspect is well abstracted and so the UI and strings can be changed around if taste doesn't quite suit. So far the emphasis is distinction of the UI labelling from the software EQ so that it's clear the settings are for a different thing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26051 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/SOURCES3
-rw-r--r--apps/lang/english.lang137
-rw-r--r--apps/menus/audiohw_eq_menu.c244
-rw-r--r--apps/menus/exported_menus.h3
-rw-r--r--apps/menus/sound_menu.c50
-rw-r--r--apps/plugin.c3
-rw-r--r--apps/plugin.h7
-rw-r--r--apps/plugins/mpegplayer/mpeg_settings.c35
-rw-r--r--apps/settings.c35
-rw-r--r--apps/settings.h21
-rw-r--r--apps/settings_list.c100
11 files changed, 617 insertions, 21 deletions
diff --git a/apps/SOURCES b/apps/SOURCES
index 2642fa16b1..2bd4018751 100644
--- a/apps/SOURCES
+++ b/apps/SOURCES
@@ -16,6 +16,9 @@ menus/menu_common.c
16menus/display_menu.c 16menus/display_menu.c
17menus/theme_menu.c 17menus/theme_menu.c
18#if CONFIG_CODEC == SWCODEC 18#if CONFIG_CODEC == SWCODEC
19#ifdef HAVE_WM8978
20menus/audiohw_eq_menu.c
21#endif
19menus/eq_menu.c 22menus/eq_menu.c
20buffering.c 23buffering.c
21voice_thread.c 24voice_thread.c
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index c079a4affd..4a4fb2c73a 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -13595,3 +13595,140 @@
13595 radio: "" 13595 radio: ""
13596 </voice> 13596 </voice>
13597</phrase> 13597</phrase>
13598<phrase>
13599 id: LANG_HW_EQ_TONE_CONTROLS
13600 desc: in sound_menu, hardware equalizer tone controls
13601 user: core
13602 <source>
13603 *: none
13604 gigabeats: "Tone Controls"
13605 </source>
13606 <dest>
13607 *: none
13608 gigabeats: "Tone Controls"
13609 </dest>
13610 <voice>
13611 *: none
13612 gigabeats: "Tone Controls"
13613 </voice>
13614</phrase>
13615<phrase>
13616 id: LANG_HW_EQ_TONE_CONTROLS_ADVANCED
13617 desc: in sound_menu, advanced settings for hardware equalizer tone controls
13618 user: core
13619 <source>
13620 *: none
13621 gigabeats: "Advanced Tone Control Settings"
13622 </source>
13623 <dest>
13624 *: none
13625 gigabeats: "Advanced Tone Control Settings"
13626 </dest>
13627 <voice>
13628 *: none
13629 gigabeats: "Advanced Tone Control Settings"
13630 </voice>
13631</phrase>
13632<phrase>
13633 id: LANG_HW_EQ_GAIN
13634 desc: in sound_menu, hardware equalizer tone controls filter gain
13635 user: core
13636 <source>
13637 *: none
13638 gigabeats: "Band %d Gain"
13639 </source>
13640 <dest>
13641 *: none
13642 gigabeats: "Band %d Gain"
13643 </dest>
13644 <voice>
13645 *: none
13646 gigabeats: "Band Gain"
13647 </voice>
13648</phrase>
13649<phrase>
13650 id: LANG_HW_EQ_FREQUENCY
13651 desc: in sound_menu, hardware equalizer tone controls shelf filter cutoff frequency
13652 user: core
13653 <source>
13654 *: none
13655 gigabeats: "Band %d Frequency"
13656 </source>
13657 <dest>
13658 *: none
13659 gigabeats: "Band %d Frequency"
13660 </dest>
13661 <voice>
13662 *: none
13663 gigabeats: "Band Frequency"
13664 </voice>
13665</phrase>
13666<phrase>
13667 id: LANG_HW_EQ_WIDTH
13668 desc: in sound_menu, hardware equalizer tone controls peak bandwith setting
13669 user: core
13670 <source>
13671 *: none
13672 gigabeats: "Band %d Width"
13673 </source>
13674 <dest>
13675 *: none
13676 gigabeats: "Band %d Width"
13677 </dest>
13678 <voice>
13679 *: none
13680 gigabeats: "Band Width"
13681 </voice>
13682</phrase>
13683<phrase>
13684 id: LANG_HW_EQ_WIDTH_NARROW
13685 desc: in sound_menu, hardware equalizer tone controls narrow bandwith setting
13686 user: core
13687 <source>
13688 *: none
13689 gigabeats: "Narrow"
13690 </source>
13691 <dest>
13692 *: none
13693 gigabeats: "Narrow"
13694 </dest>
13695 <voice>
13696 *: none
13697 gigabeats: "Narrow"
13698 </voice>
13699</phrase>
13700<phrase>
13701 id: LANG_HW_EQ_WIDTH_WIDE
13702 desc: in sound_menu, hardware equalizer tone controls wide bandwidth setting
13703 user: core
13704 <source>
13705 *: none
13706 gigabeats: "Wide"
13707 </source>
13708 <dest>
13709 *: none
13710 gigabeats: "Wide"
13711 </dest>
13712 <voice>
13713 *: none
13714 gigabeats: "Wide"
13715 </voice>
13716</phrase>
13717<phrase>
13718 id: LANG_DEPTH_3D
13719 desc: in sound_menu, amount of 3D enhancement effect
13720 user: core
13721 <source>
13722 *: none
13723 gigabeats: "3-D Enhancement"
13724 </source>
13725 <dest>
13726 *: none
13727 gigabeats: "3-D Enhancement"
13728 </dest>
13729 <voice>
13730 *: none
13731 gigabeats: "3-D Enhancement"
13732 </voice>
13733</phrase>
13734
diff --git a/apps/menus/audiohw_eq_menu.c b/apps/menus/audiohw_eq_menu.c
new file mode 100644
index 0000000000..1027d6a0b8
--- /dev/null
+++ b/apps/menus/audiohw_eq_menu.c
@@ -0,0 +1,244 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2010 Michael Sevakis
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#include <stdio.h>
22#include "config.h"
23#include "sound.h"
24#include "settings.h"
25#include "lang.h"
26#include "menu.h"
27#include "talk.h"
28
29#define HW_EQ_IDX(band, setting) ((void *)(((setting) << 8) | (band)))
30#define HW_EQ_IDX_BAND(data) ((uint8_t)(uintptr_t)(data))
31#define HW_EQ_IDX_SETTING(data) ((uint8_t)((uintptr_t)(data) >> 8))
32
33static unsigned short hw_eq_setting_lang_ids[AUDIOHW_EQ_SETTING_NUM] =
34{
35 LANG_HW_EQ_GAIN,
36#ifdef AUDIOHW_HAVE_EQ_FREQUENCY
37 LANG_HW_EQ_FREQUENCY,
38#endif
39#ifdef AUDIOHW_HAVE_EQ_WIDTH
40 LANG_HW_EQ_WIDTH,
41#endif
42};
43
44static char * hw_eq_get_name(int selected_item, void * data, char *buffer)
45{
46 snprintf(buffer, MAX_PATH,
47 str(hw_eq_setting_lang_ids[HW_EQ_IDX_SETTING(data)]),
48 HW_EQ_IDX_BAND(data) + 1);
49 return buffer;
50 (void)selected_item;
51}
52
53static int hw_eq_speak_item(int selected_item, void * data)
54{
55 talk_id(hw_eq_setting_lang_ids[HW_EQ_IDX_SETTING(data)], false);
56 talk_number(HW_EQ_IDX_BAND(data) + 1, true);
57 return 0;
58 (void)selected_item;
59}
60
61static int hw_eq_do_band_setting(void *param)
62{
63 int band = HW_EQ_IDX_BAND(param);
64 int setting = HW_EQ_IDX_SETTING(param);
65 char desc[MAX_PATH];
66 struct menu_callback_with_desc cbwdesc =
67 {
68 .menu_callback = NULL,
69 .desc = hw_eq_get_name(0, param, desc),
70 .icon_id = Icon_NOICON
71 };
72 struct menu_item_ex item =
73 {
74 .flags = MT_SETTING_W_TEXT | MENU_HAS_DESC,
75 { .variable = (void*)(&global_settings.hw_eq_bands[band].gain + setting) },
76 { .callback_and_desc = &cbwdesc }
77 };
78 do_setting_from_menu(&item, NULL);
79 return 0;
80}
81
82MENUITEM_FUNCTION_DYNTEXT(hw_eq_band1_gain, MENU_FUNC_USEPARAM,
83 hw_eq_do_band_setting,
84 HW_EQ_IDX(AUDIOHW_EQ_BAND1, AUDIOHW_EQ_GAIN),
85 hw_eq_get_name, hw_eq_speak_item,
86 HW_EQ_IDX(AUDIOHW_EQ_BAND1, AUDIOHW_EQ_GAIN),
87 NULL, Icon_Menu_setting);
88#ifdef AUDIOHW_HAVE_EQ_BAND1_FREQUENCY
89MENUITEM_FUNCTION_DYNTEXT(hw_eq_band1_frequency, MENU_FUNC_USEPARAM,
90 hw_eq_do_band_setting,
91 HW_EQ_IDX(AUDIOHW_EQ_BAND1, AUDIOHW_EQ_FREQUENCY),
92 hw_eq_get_name, hw_eq_speak_item,
93 HW_EQ_IDX(AUDIOHW_EQ_BAND1, AUDIOHW_EQ_FREQUENCY),
94 NULL, Icon_NOICON);
95#endif
96#ifdef AUDIOHW_HAVE_EQ_BAND2
97MENUITEM_FUNCTION_DYNTEXT(hw_eq_band2_gain, MENU_FUNC_USEPARAM,
98 hw_eq_do_band_setting,
99 HW_EQ_IDX(AUDIOHW_EQ_BAND2, AUDIOHW_EQ_GAIN),
100 hw_eq_get_name, hw_eq_speak_item,
101 HW_EQ_IDX(AUDIOHW_EQ_BAND2, AUDIOHW_EQ_GAIN),
102 NULL, Icon_Menu_setting);
103#ifdef AUDIOHW_HAVE_EQ_BAND2_FREQUENCY
104MENUITEM_FUNCTION_DYNTEXT(hw_eq_band2_frequency, MENU_FUNC_USEPARAM,
105 hw_eq_do_band_setting,
106 HW_EQ_IDX(AUDIOHW_EQ_BAND2, AUDIOHW_EQ_FREQUENCY),
107 hw_eq_get_name, hw_eq_speak_item,
108 HW_EQ_IDX(AUDIOHW_EQ_BAND2, AUDIOHW_EQ_FREQUENCY),
109 NULL, Icon_NOICON);
110#endif
111#ifdef AUDIOHW_HAVE_EQ_BAND2_WIDTH
112MENUITEM_FUNCTION_DYNTEXT(hw_eq_band2_width, MENU_FUNC_USEPARAM,
113 hw_eq_do_band_setting,
114 HW_EQ_IDX(AUDIOHW_EQ_BAND2, AUDIOHW_EQ_WIDTH),
115 hw_eq_get_name, hw_eq_speak_item,
116 HW_EQ_IDX(AUDIOHW_EQ_BAND2, AUDIOHW_EQ_WIDTH),
117 NULL, Icon_NOICON);
118#endif
119#endif /* AUDIOHW_HAVE_EQ_BAND2 */
120#ifdef AUDIOHW_HAVE_EQ_BAND3
121MENUITEM_FUNCTION_DYNTEXT(hw_eq_band3_gain, MENU_FUNC_USEPARAM,
122 hw_eq_do_band_setting,
123 HW_EQ_IDX(AUDIOHW_EQ_BAND3, AUDIOHW_EQ_GAIN),
124 hw_eq_get_name, hw_eq_speak_item,
125 HW_EQ_IDX(AUDIOHW_EQ_BAND3, AUDIOHW_EQ_GAIN),
126 NULL, Icon_Menu_setting);
127#ifdef AUDIOHW_HAVE_EQ_BAND3_FREQUENCY
128MENUITEM_FUNCTION_DYNTEXT(hw_eq_band3_frequency, MENU_FUNC_USEPARAM,
129 hw_eq_do_band_setting,
130 HW_EQ_IDX(AUDIOHW_EQ_BAND3, AUDIOHW_EQ_FREQUENCY),
131 hw_eq_get_name, hw_eq_speak_item,
132 HW_EQ_IDX(AUDIOHW_EQ_BAND3, AUDIOHW_EQ_FREQUENCY),
133 NULL, Icon_NOICON);
134#endif
135#ifdef AUDIOHW_HAVE_EQ_BAND3_WIDTH
136MENUITEM_FUNCTION_DYNTEXT(hw_eq_band3_width, MENU_FUNC_USEPARAM,
137 hw_eq_do_band_setting,
138 HW_EQ_IDX(AUDIOHW_EQ_BAND3, AUDIOHW_EQ_WIDTH),
139 hw_eq_get_name, hw_eq_speak_item,
140 HW_EQ_IDX(AUDIOHW_EQ_BAND3, AUDIOHW_EQ_WIDTH),
141 NULL, Icon_NOICON);
142#endif
143#endif /* AUDIOHW_HAVE_EQ_BAND3 */
144#ifdef AUDIOHW_HAVE_EQ_BAND4
145MENUITEM_FUNCTION_DYNTEXT(hw_eq_band4_gain, MENU_FUNC_USEPARAM,
146 hw_eq_do_band_setting,
147 HW_EQ_IDX(AUDIOHW_EQ_BAND4, AUDIOHW_EQ_GAIN),
148 hw_eq_get_name, hw_eq_speak_item,
149 HW_EQ_IDX(AUDIOHW_EQ_BAND4, AUDIOHW_EQ_GAIN),
150 NULL, Icon_Menu_setting);
151#ifdef AUDIOHW_HAVE_EQ_BAND4_FREQUENCY
152MENUITEM_FUNCTION_DYNTEXT(hw_eq_band4_frequency, MENU_FUNC_USEPARAM,
153 hw_eq_do_band_setting,
154 HW_EQ_IDX(AUDIOHW_EQ_BAND4, AUDIOHW_EQ_FREQUENCY),
155 hw_eq_get_name, hw_eq_speak_item,
156 HW_EQ_IDX(AUDIOHW_EQ_BAND4, AUDIOHW_EQ_FREQUENCY),
157 NULL, Icon_NOICON);
158#endif
159#ifdef AUDIOHW_HAVE_EQ_BAND4_WIDTH
160MENUITEM_FUNCTION_DYNTEXT(hw_eq_band4_width, MENU_FUNC_USEPARAM,
161 hw_eq_do_band_setting,
162 HW_EQ_IDX(AUDIOHW_EQ_BAND4, AUDIOHW_EQ_WIDTH),
163 hw_eq_get_name, hw_eq_speak_item,
164 HW_EQ_IDX(AUDIOHW_EQ_BAND4, AUDIOHW_EQ_WIDTH),
165 NULL, Icon_NOICON);
166#endif
167#endif /* AUDIOHW_HAVE_EQ_BAND4 */
168#ifdef AUDIOHW_HAVE_EQ_BAND5
169MENUITEM_FUNCTION_DYNTEXT(hw_eq_band5_gain, MENU_FUNC_USEPARAM,
170 hw_eq_do_band_setting,
171 HW_EQ_IDX(AUDIOHW_EQ_BAND5, AUDIOHW_EQ_GAIN),
172 hw_eq_get_name, hw_eq_speak_item,
173 HW_EQ_IDX(AUDIOHW_EQ_BAND5, AUDIOHW_EQ_GAIN),
174 NULL, Icon_Menu_setting);
175#ifdef AUDIOHW_HAVE_EQ_BAND5_FREQUENCY
176MENUITEM_FUNCTION_DYNTEXT(hw_eq_band5_frequency, MENU_FUNC_USEPARAM,
177 hw_eq_do_band_setting,
178 HW_EQ_IDX(AUDIOHW_EQ_BAND5, AUDIOHW_EQ_FREQUENCY),
179 hw_eq_get_name, hw_eq_speak_item,
180 HW_EQ_IDX(AUDIOHW_EQ_BAND5, AUDIOHW_EQ_FREQUENCY),
181 NULL, Icon_NOICON);
182#endif
183#endif /* AUDIOHW_HAVE_EQ_BAND5 */
184
185/* Submenu for multiple "tone controls". Gain + all advanced settings. */
186MAKE_MENU(hardware_eq_tone_controls_advanced, ID2P(LANG_HW_EQ_TONE_CONTROLS_ADVANCED),
187 NULL, Icon_NOICON
188 ,&hw_eq_band1_gain
189#ifdef AUDIOHW_HAVE_EQ_BAND1_FREQUENCY
190 ,&hw_eq_band1_frequency
191#endif
192#ifdef AUDIOHW_HAVE_EQ_BAND2
193 ,&hw_eq_band2_gain
194#ifdef AUDIOHW_HAVE_EQ_BAND2_FREQUENCY
195 ,&hw_eq_band2_frequency
196#endif
197#ifdef AUDIOHW_HAVE_EQ_BAND2_WIDTH
198 ,&hw_eq_band2_width
199#endif
200#endif /* AUDIOHW_HAVE_EQ_BAND2 */
201#ifdef AUDIOHW_HAVE_EQ_BAND3
202 ,&hw_eq_band3_gain
203#ifdef AUDIOHW_HAVE_EQ_BAND3_FREQUENCY
204 ,&hw_eq_band3_frequency
205#endif
206#ifdef AUDIOHW_HAVE_EQ_BAND3_WIDTH
207 ,&hw_eq_band3_width
208#endif
209#endif /* AUDIOHW_HAVE_EQ_BAND3 */
210#ifdef AUDIOHW_HAVE_EQ_BAND4
211 ,&hw_eq_band4_gain
212#ifdef AUDIOHW_HAVE_EQ_BAND4_FREQUENCY
213 ,&hw_eq_band4_frequency
214#endif
215#ifdef AUDIOHW_HAVE_EQ_BAND4_WIDTH
216 ,&hw_eq_band4_width
217#endif
218#endif /* AUDIOHW_HAVE_EQ_BAND4 */
219#ifdef AUDIOHW_HAVE_EQ_BAND5
220 ,&hw_eq_band5_gain
221#ifdef AUDIOHW_HAVE_EQ_BAND5_FREQUENCY
222 ,&hw_eq_band5_frequency
223#endif
224#endif /* AUDIOHW_HAVE_EQ_BAND5 */
225 );
226/* Shows only the gains + advanced settings submenu */
227MAKE_MENU(audiohw_eq_tone_controls, ID2P(LANG_HW_EQ_TONE_CONTROLS),
228 NULL, Icon_NOICON
229 ,&hw_eq_band1_gain
230#ifdef AUDIOHW_HAVE_EQ_BAND2
231 ,&hw_eq_band2_gain
232#endif
233#ifdef AUDIOHW_HAVE_EQ_BAND3
234 ,&hw_eq_band3_gain
235#endif
236#ifdef AUDIOHW_HAVE_EQ_BAND4
237 ,&hw_eq_band4_gain
238#endif
239#ifdef AUDIOHW_HAVE_EQ_BAND5
240 ,&hw_eq_band5_gain
241#endif
242 ,&hardware_eq_tone_controls_advanced
243 );
244
diff --git a/apps/menus/exported_menus.h b/apps/menus/exported_menus.h
index 9fb39cbf8f..37b5ff31d0 100644
--- a/apps/menus/exported_menus.h
+++ b/apps/menus/exported_menus.h
@@ -40,6 +40,9 @@ extern const struct menu_item_ex
40 playlist_settings, /* playlist_menu.c */ 40 playlist_settings, /* playlist_menu.c */
41 playlist_options, /* playlist_menu.c */ 41 playlist_options, /* playlist_menu.c */
42 equalizer_menu, /* eq_menu.c */ 42 equalizer_menu, /* eq_menu.c */
43#ifdef AUDIOHW_HAVE_EQ
44 audiohw_eq_tone_controls, /* audiohw_eq_menu.c */
45#endif
43 info_menu, /* info_menu.c */ 46 info_menu, /* info_menu.c */
44 theme_menu; /* theme_menu.c */ 47 theme_menu; /* theme_menu.c */
45 48
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 */
40MENUITEM_SETTING(volume, &global_settings.volume, NULL); 41MENUITEM_SETTING(volume, &global_settings.volume, NULL);
42#ifdef AUDIOHW_HAVE_BASS
41MENUITEM_SETTING(bass, &global_settings.bass, 43MENUITEM_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
49MENUITEM_SETTING(bass_cutoff, &global_settings.bass_cutoff, NULL); 51#ifdef AUDIOHW_HAVE_BASS_CUTOFF
52MENUITEM_SETTING(treble_cutoff, &global_settings.treble_cutoff, NULL);
50#endif 53#endif
54#endif /* AUDIOHW_HAVE_BASS */
55
56
57#ifdef AUDIOHW_HAVE_TREBLE
51MENUITEM_SETTING(treble, &global_settings.treble, 58MENUITEM_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
59MENUITEM_SETTING(treble_cutoff, &global_settings.treble_cutoff, NULL); 67MENUITEM_SETTING(treble_cutoff, &global_settings.treble_cutoff, NULL);
60#endif 68#endif
69#endif /* AUDIOHW_HAVE_TREBLE */
70
71
61MENUITEM_SETTING(balance, &global_settings.balance, NULL); 72MENUITEM_SETTING(balance, &global_settings.balance, NULL);
62MENUITEM_SETTING(channel_config, &global_settings.channel_config, 73MENUITEM_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
89MENUITEM_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
142MAKE_MENU(sound_settings, ID2P(LANG_SOUND_SETTINGS), NULL, Icon_Audio, 158MAKE_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 ,&timestretch_enabled 181 ,&timestretch_enabled
diff --git a/apps/plugin.c b/apps/plugin.c
index b60e2d6768..90380a0039 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -721,6 +721,9 @@ static const struct plugin_api rockbox_api = {
721 round_value_to_list32, 721 round_value_to_list32,
722#endif 722#endif
723 723
724#ifdef AUDIOHW_HAVE_EQ
725 sound_enum_hw_eq_band_setting,
726#endif
724}; 727};
725 728
726int plugin_load(const char* plugin, const void* parameter) 729int plugin_load(const char* plugin, const void* parameter)
diff --git a/apps/plugin.h b/apps/plugin.h
index 5aaa6380b7..108a283596 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -142,7 +142,7 @@ void* plugin_get_buffer(size_t *buffer_size);
142#define PLUGIN_MAGIC 0x526F634B /* RocK */ 142#define PLUGIN_MAGIC 0x526F634B /* RocK */
143 143
144/* increase this every time the api struct changes */ 144/* increase this every time the api struct changes */
145#define PLUGIN_API_VERSION 184 145#define PLUGIN_API_VERSION 185
146 146
147/* update this to latest version if a change to the api struct breaks 147/* update this to latest version if a change to the api struct breaks
148 backwards compatibility (and please take the opportunity to sort in any 148 backwards compatibility (and please take the opportunity to sort in any
@@ -884,6 +884,11 @@ int (*round_value_to_list32)(unsigned long value,
884 int count, 884 int count,
885 bool signd); 885 bool signd);
886#endif 886#endif
887
888#ifdef AUDIOHW_HAVE_EQ
889 int (*sound_enum_hw_eq_band_setting)(unsigned int band,
890 unsigned int band_setting);
891#endif /* AUDIOHW_HAVE_EQ */
887}; 892};
888 893
889/* plugin header */ 894/* plugin header */
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index 6c8a2b8e3e..1ac2476b25 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -403,18 +403,53 @@ static void sync_audio_setting(int setting, bool global)
403 switch (setting) 403 switch (setting)
404 { 404 {
405 case MPEG_AUDIO_TONE_CONTROLS: 405 case MPEG_AUDIO_TONE_CONTROLS:
406 #if defined(AUDIOHW_HAVE_BASS) || defined(AUDIOHW_HAVE_TREBLE)
406 if (global || settings.tone_controls) 407 if (global || settings.tone_controls)
407 { 408 {
409 #ifdef AUDIOHW_HAVE_BASS
408 val0 = rb->global_settings->bass; 410 val0 = rb->global_settings->bass;
411 #endif
412 #ifdef AUDIOHW_HAVE_TREBLE
409 val1 = rb->global_settings->treble; 413 val1 = rb->global_settings->treble;
414 #endif
410 } 415 }
411 else 416 else
412 { 417 {
418 #ifdef AUDIOHW_HAVE_BASS
413 val0 = rb->sound_default(SOUND_BASS); 419 val0 = rb->sound_default(SOUND_BASS);
420 #endif
421 #ifdef AUDIOHW_HAVE_TREBLE
414 val1 = rb->sound_default(SOUND_TREBLE); 422 val1 = rb->sound_default(SOUND_TREBLE);
423 #endif
415 } 424 }
425 #ifdef AUDIOHW_HAVE_BASS
416 rb->sound_set(SOUND_BASS, val0); 426 rb->sound_set(SOUND_BASS, val0);
427 #endif
428 #ifdef AUDIOHW_HAVE_TREBLE
417 rb->sound_set(SOUND_TREBLE, val1); 429 rb->sound_set(SOUND_TREBLE, val1);
430 #endif
431 #endif /* AUDIOHW_HAVE_BASS || AUDIOHW_HAVE_TREBLE */
432
433 #ifdef AUDIOHW_HAVE_EQ
434 for (val1 = 0;; val1++)
435 {
436 int setting = rb->sound_enum_hw_eq_band_setting(val1, AUDIOHW_EQ_GAIN);
437
438 if (setting == -1)
439 break;
440
441 if (global || settings.tone_controls)
442 {
443 val0 = rb->global_settings->hw_eq_bands[val1].gain;
444 }
445 else
446 {
447 val0 = rb->sound_default(setting);
448 }
449
450 rb->sound_set(setting, val0);
451 }
452 #endif /* AUDIOHW_HAVE_EQ */
418 break; 453 break;
419 454
420 case MPEG_AUDIO_CHANNEL_MODES: 455 case MPEG_AUDIO_CHANNEL_MODES:
diff --git a/apps/settings.c b/apps/settings.c
index 4901957263..6349372326 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -27,6 +27,7 @@
27#include "config.h" 27#include "config.h"
28#include "action.h" 28#include "action.h"
29#include "crc32.h" 29#include "crc32.h"
30#include "sound.h"
30#include "settings.h" 31#include "settings.h"
31#include "debug.h" 32#include "debug.h"
32#include "usb.h" 33#include "usb.h"
@@ -55,7 +56,6 @@
55#include "powermgmt.h" 56#include "powermgmt.h"
56#include "keyboard.h" 57#include "keyboard.h"
57#include "version.h" 58#include "version.h"
58#include "sound.h"
59#include "rbunicode.h" 59#include "rbunicode.h"
60#include "dircache.h" 60#include "dircache.h"
61#include "splash.h" 61#include "splash.h"
@@ -718,8 +718,12 @@ void sound_settings_apply(void)
718#if CONFIG_CODEC == SWCODEC 718#if CONFIG_CODEC == SWCODEC
719 sound_set_dsp_callback(dsp_callback); 719 sound_set_dsp_callback(dsp_callback);
720#endif 720#endif
721#ifdef AUDIOHW_HAVE_BASS
721 sound_set(SOUND_BASS, global_settings.bass); 722 sound_set(SOUND_BASS, global_settings.bass);
723#endif
724#ifdef AUDIOHW_HAVE_TREBLE
722 sound_set(SOUND_TREBLE, global_settings.treble); 725 sound_set(SOUND_TREBLE, global_settings.treble);
726#endif
723 sound_set(SOUND_BALANCE, global_settings.balance); 727 sound_set(SOUND_BALANCE, global_settings.balance);
724 sound_set(SOUND_VOLUME, global_settings.volume); 728 sound_set(SOUND_VOLUME, global_settings.volume);
725 sound_set(SOUND_CHANNELS, global_settings.channel_config); 729 sound_set(SOUND_CHANNELS, global_settings.channel_config);
@@ -734,13 +738,36 @@ void sound_settings_apply(void)
734 sound_set(SOUND_MDB_ENABLE, global_settings.mdb_enable); 738 sound_set(SOUND_MDB_ENABLE, global_settings.mdb_enable);
735 sound_set(SOUND_SUPERBASS, global_settings.superbass); 739 sound_set(SOUND_SUPERBASS, global_settings.superbass);
736#endif 740#endif
737 741#ifdef AUDIOHW_HAVE_BASS_CUTOFF
738#ifdef HAVE_WM8758
739 sound_set(SOUND_BASS_CUTOFF, global_settings.bass_cutoff); 742 sound_set(SOUND_BASS_CUTOFF, global_settings.bass_cutoff);
743#endif
744#ifdef AUDIOHW_HAVE_TREBLE_CUTOFF
740 sound_set(SOUND_TREBLE_CUTOFF, global_settings.treble_cutoff); 745 sound_set(SOUND_TREBLE_CUTOFF, global_settings.treble_cutoff);
741#endif 746#endif
742} 747#ifdef AUDIOHW_HAVE_DEPTH_3D
748 sound_set(SOUND_DEPTH_3D, global_settings.depth_3d);
749#endif
750#ifdef AUDIOHW_HAVE_EQ
751 int b;
743 752
753 for (b = 0; b < AUDIOHW_EQ_BAND_NUM; b++)
754 {
755 int setting = sound_enum_hw_eq_band_setting(b, AUDIOHW_EQ_GAIN);
756 sound_set(setting, global_settings.hw_eq_bands[b].gain);
757
758#ifdef AUDIOHW_HAVE_EQ_FREQUENCY
759 setting = sound_enum_hw_eq_band_setting(b, AUDIOHW_EQ_FREQUENCY);
760 if (setting != -1)
761 sound_set(setting, global_settings.hw_eq_bands[b].frequency);
762#endif /* AUDIOHW_HAVE_EQ_FREQUENCY */
763#ifdef AUDIOHW_HAVE_EQ_WIDTH
764 setting = sound_enum_hw_eq_band_setting(b, AUDIOHW_EQ_WIDTH);
765 if (setting != -1)
766 sound_set(setting, global_settings.hw_eq_bands[b].width);
767#endif /* AUDIOHW_HAVE_EQ_WIDTH */
768 }
769#endif
770}
744 771
745void settings_apply(bool read_disk) 772void settings_apply(bool read_disk)
746{ 773{
diff --git a/apps/settings.h b/apps/settings.h
index 2fdff9918a..c8e8d642a2 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -336,7 +336,7 @@ struct user_settings
336 bool superbass; /* true/false */ 336 bool superbass; /* true/false */
337#endif 337#endif
338 338
339#ifdef HAVE_WM8758 339#if defined(HAVE_WM8758) || defined(HAVE_WM8978)
340 int bass_cutoff; 340 int bass_cutoff;
341 int treble_cutoff; 341 int treble_cutoff;
342#endif 342#endif
@@ -831,6 +831,25 @@ struct user_settings
831 /* When resuming playback (after a stop), rewind this number of seconds */ 831 /* When resuming playback (after a stop), rewind this number of seconds */
832 int resume_rewind; 832 int resume_rewind;
833#endif 833#endif
834
835#ifdef AUDIOHW_HAVE_DEPTH_3D
836 int depth_3d;
837#endif
838
839#ifdef AUDIOHW_HAVE_EQ
840 /** Hardware EQ tone controls **/
841 struct hw_eq_band
842 {
843 /* Maintain the order of members or sound_menu has to be changed */
844 int gain;
845#ifdef AUDIOHW_HAVE_EQ_FREQUENCY
846 int frequency;
847#endif
848#ifdef AUDIOHW_HAVE_EQ_WIDTH
849 int width;
850#endif
851 } hw_eq_bands[AUDIOHW_EQ_BAND_NUM];
852#endif /* AUDIOHW_HAVE_EQ */
834}; 853};
835 854
836/** global variables **/ 855/** global variables **/
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 1bc783219f..d6f5f94f66 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -29,10 +29,10 @@
29#include "lcd.h" 29#include "lcd.h"
30#include "button.h" 30#include "button.h"
31#include "backlight.h" 31#include "backlight.h"
32#include "sound.h"
32#include "settings.h" 33#include "settings.h"
33#include "settings_list.h" 34#include "settings_list.h"
34#include "usb.h" 35#include "usb.h"
35#include "sound.h"
36#include "dsp.h" 36#include "dsp.h"
37#include "audio.h" 37#include "audio.h"
38#include "power.h" 38#include "power.h"
@@ -552,9 +552,97 @@ const struct settings_list settings[] = {
552 /* sound settings */ 552 /* sound settings */
553 SOUND_SETTING(F_NO_WRAP,volume, LANG_VOLUME, "volume", SOUND_VOLUME), 553 SOUND_SETTING(F_NO_WRAP,volume, LANG_VOLUME, "volume", SOUND_VOLUME),
554 SOUND_SETTING(0, balance, LANG_BALANCE, "balance", SOUND_BALANCE), 554 SOUND_SETTING(0, balance, LANG_BALANCE, "balance", SOUND_BALANCE),
555/* Tone controls */
556#ifdef AUDIOHW_HAVE_BASS
555 SOUND_SETTING(F_NO_WRAP,bass, LANG_BASS, "bass", SOUND_BASS), 557 SOUND_SETTING(F_NO_WRAP,bass, LANG_BASS, "bass", SOUND_BASS),
558#endif
559#ifdef AUDIOHW_HAVE_TREBLE
556 SOUND_SETTING(F_NO_WRAP,treble, LANG_TREBLE, "treble", SOUND_TREBLE), 560 SOUND_SETTING(F_NO_WRAP,treble, LANG_TREBLE, "treble", SOUND_TREBLE),
557 561#endif
562/* Hardware EQ tone controls */
563#ifdef AUDIOHW_HAVE_EQ
564/* Band gain is generic */
565 SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND1].gain,
566 LANG_HW_EQ_GAIN, "tone band1 gain", SOUND_EQ_BAND1_GAIN),
567#ifdef AUDIOHW_HAVE_EQ_BAND2
568 SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND2].gain,
569 LANG_HW_EQ_GAIN, "tone band2 gain", SOUND_EQ_BAND2_GAIN),
570#endif /* AUDIOHW_HAVE_EQ_BAND2 */
571#ifdef AUDIOHW_HAVE_EQ_BAND3
572 SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND3].gain,
573 LANG_HW_EQ_GAIN, "tone band3 gain", SOUND_EQ_BAND3_GAIN),
574#endif /* AUDIOHW_HAVE_EQ_BAND3 */
575#ifdef AUDIOHW_HAVE_EQ_BAND4
576 SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND4].gain,
577 LANG_HW_EQ_GAIN, "tone band4 gain", SOUND_EQ_BAND4_GAIN),
578#endif /* AUDIOHW_HAVE_EQ_BAND4 */
579#ifdef AUDIOHW_HAVE_EQ_BAND5
580 SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND5].gain,
581 LANG_HW_EQ_GAIN, "tone band5 gain", SOUND_EQ_BAND5_GAIN),
582#endif /* AUDIOHW_HAVE_EQ_BAND5 */
583#ifdef HAVE_WM8978
584 /* Frequencies vary with samplerate but at least the user has an idea
585 * about the bands and it will be correct with normal playback rates. */
586/* Band 1 */
587 STRINGCHOICE_SETTING(F_SOUNDSETTING,
588 hw_eq_bands[AUDIOHW_EQ_BAND1].frequency,
589 LANG_HW_EQ_FREQUENCY, 0,"tone band1 frequency",
590 "80 Hz,105 Hz,135 Hz,175 Hz",
591 sound_set_hw_eq_band1_frequency, 4,
592 TALK_ID(80, UNIT_HERTZ), TALK_ID(105, UNIT_HERTZ),
593 TALK_ID(135, UNIT_HERTZ), TALK_ID(175, UNIT_HERTZ)),
594/* Band 2 */
595 STRINGCHOICE_SETTING(F_SOUNDSETTING,
596 hw_eq_bands[AUDIOHW_EQ_BAND2].frequency,
597 LANG_HW_EQ_FREQUENCY, 0,"tone band2 frequency",
598 "230 Hz,300 Hz,385 Hz,500 Hz",
599 sound_set_hw_eq_band2_frequency, 4,
600 TALK_ID(230, UNIT_HERTZ), TALK_ID(300, UNIT_HERTZ),
601 TALK_ID(385, UNIT_HERTZ), TALK_ID(500, UNIT_HERTZ)),
602 CHOICE_SETTING(F_SOUNDSETTING, hw_eq_bands[AUDIOHW_EQ_BAND2].width,
603 LANG_HW_EQ_WIDTH, 0, "tone band2 width", "narrow,wide",
604 sound_set_hw_eq_band2_width, 2,
605 ID2P(LANG_HW_EQ_WIDTH_NARROW), ID2P(LANG_HW_EQ_WIDTH_WIDE)),
606/* Band 3 */
607 STRINGCHOICE_SETTING(F_SOUNDSETTING,
608 hw_eq_bands[AUDIOHW_EQ_BAND3].frequency,
609 LANG_HW_EQ_FREQUENCY, 0, "tone band3 frequency",
610 "650 Hz,850 Hz,1.1 kHz,1.4 kHz",
611 sound_set_hw_eq_band3_frequency, 4,
612 TALK_ID(650, UNIT_HERTZ), TALK_ID(850, UNIT_HERTZ),
613 TALK_ID_DECIMAL(11, 1, UNIT_KHZ),
614 TALK_ID_DECIMAL(14, 1, UNIT_KHZ)),
615 CHOICE_SETTING(F_SOUNDSETTING,hw_eq_bands[AUDIOHW_EQ_BAND3].width,
616 LANG_HW_EQ_WIDTH, 0, "tone band3 width", "narrow,wide",
617 sound_set_hw_eq_band3_width, 2,
618 ID2P(LANG_HW_EQ_WIDTH_NARROW), ID2P(LANG_HW_EQ_WIDTH_WIDE)),
619/* Band 4 */
620 STRINGCHOICE_SETTING(F_SOUNDSETTING,
621 hw_eq_bands[AUDIOHW_EQ_BAND4].frequency,
622 LANG_HW_EQ_FREQUENCY, 0, "tone band4 frequency",
623 "1.8 kHz,2.4 kHz,3.2 kHz,4.1 kHz",
624 sound_set_hw_eq_band4_frequency, 4,
625 TALK_ID_DECIMAL(18, 1, UNIT_KHZ),
626 TALK_ID_DECIMAL(24, 1, UNIT_KHZ),
627 TALK_ID_DECIMAL(32, 1, UNIT_KHZ),
628 TALK_ID_DECIMAL(41, 1, UNIT_KHZ)),
629 CHOICE_SETTING(F_SOUNDSETTING, hw_eq_bands[AUDIOHW_EQ_BAND4].width,
630 LANG_HW_EQ_WIDTH, 0, "tone band4 width", "narrow,wide",
631 sound_set_hw_eq_band4_width, 2,
632 ID2P(LANG_HW_EQ_WIDTH_NARROW), ID2P(LANG_HW_EQ_WIDTH_WIDE)),
633/* Band 5 */
634 STRINGCHOICE_SETTING(F_SOUNDSETTING,
635 hw_eq_bands[AUDIOHW_EQ_BAND5].frequency,
636 LANG_HW_EQ_FREQUENCY, 0, "tone band5 frequency",
637 "5.3 kHz,6.9 kHz,9.0 kHz,11.7 kHz",
638 sound_set_hw_eq_band5_frequency, 4,
639 TALK_ID_DECIMAL(53, 1, UNIT_KHZ),
640 TALK_ID_DECIMAL(69, 1, UNIT_KHZ),
641 TALK_ID_DECIMAL(90, 1, UNIT_KHZ),
642 TALK_ID_DECIMAL(117, 1, UNIT_KHZ)),
643#endif /* HAVE_WM8978 */
644#endif /* AUDIOHW_HAVE_EQ */
645/* 3-d enhancement effect */
558#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) 646#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
559 SOUND_SETTING(0,loudness, LANG_LOUDNESS, "loudness", SOUND_LOUDNESS), 647 SOUND_SETTING(0,loudness, LANG_LOUDNESS, "loudness", SOUND_LOUDNESS),
560 STRINGCHOICE_SETTING(F_SOUNDSETTING,avc,LANG_AUTOVOL,0,"auto volume", 648 STRINGCHOICE_SETTING(F_SOUNDSETTING,avc,LANG_AUTOVOL,0,"auto volume",
@@ -574,6 +662,10 @@ const struct settings_list settings[] = {
574 ID2P(LANG_CHANNEL_RIGHT), ID2P(LANG_CHANNEL_KARAOKE)), 662 ID2P(LANG_CHANNEL_RIGHT), ID2P(LANG_CHANNEL_KARAOKE)),
575 SOUND_SETTING(F_SOUNDSETTING, stereo_width, LANG_STEREO_WIDTH, 663 SOUND_SETTING(F_SOUNDSETTING, stereo_width, LANG_STEREO_WIDTH,
576 "stereo_width", SOUND_STEREO_WIDTH), 664 "stereo_width", SOUND_STEREO_WIDTH),
665#ifdef AUDIOHW_HAVE_DEPTH_3D
666 SOUND_SETTING(0,depth_3d, LANG_DEPTH_3D, "3-d enhancement",
667 SOUND_DEPTH_3D),
668#endif
577 /* playback */ 669 /* playback */
578 OFFON_SETTING(0, playlist_shuffle, LANG_SHUFFLE, false, "shuffle", NULL), 670 OFFON_SETTING(0, playlist_shuffle, LANG_SHUFFLE, false, "shuffle", NULL),
579 SYSTEM_SETTING(NVRAM(4), resume_index, -1), 671 SYSTEM_SETTING(NVRAM(4), resume_index, -1),
@@ -1332,9 +1424,11 @@ const struct settings_list settings[] = {
1332 "compressor release time", UNIT_MS, 100, 1000, 1424 "compressor release time", UNIT_MS, 100, 1000,
1333 100, NULL, NULL, compressor_set), 1425 100, NULL, NULL, compressor_set),
1334#endif 1426#endif
1335#ifdef HAVE_WM8758 1427#ifdef AUDIOHW_HAVE_BASS_CUTOFF
1336 SOUND_SETTING(F_NO_WRAP, bass_cutoff, LANG_BASS_CUTOFF, 1428 SOUND_SETTING(F_NO_WRAP, bass_cutoff, LANG_BASS_CUTOFF,
1337 "bass cutoff", SOUND_BASS_CUTOFF), 1429 "bass cutoff", SOUND_BASS_CUTOFF),
1430#endif
1431#ifdef AUDIOHW_HAVE_TREBLE_CUTOFF
1338 SOUND_SETTING(F_NO_WRAP, treble_cutoff, LANG_TREBLE_CUTOFF, 1432 SOUND_SETTING(F_NO_WRAP, treble_cutoff, LANG_TREBLE_CUTOFF,
1339 "treble cutoff", SOUND_TREBLE_CUTOFF), 1433 "treble cutoff", SOUND_TREBLE_CUTOFF),
1340#endif 1434#endif