diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2010-05-15 13:09:45 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2010-05-15 13:09:45 +0000 |
| commit | 80d0d15ca9b253f8a446f50cf25d3d4b850bcfd1 (patch) | |
| tree | 2598d3a019c33d6f9ea76010fd6d3a8301ef87a0 /apps/settings_list.c | |
| parent | 0f77db73469920f0b0006f696ddb36029338c378 (diff) | |
| download | rockbox-80d0d15ca9b253f8a446f50cf25d3d4b850bcfd1.zip rockbox-80d0d15ca9b253f8a446f50cf25d3d4b850bcfd1.tar.gz rockbox-80d0d15ca9b253f8a446f50cf25d3d4b850bcfd1.tar.bz2 rockbox-80d0d15ca9b253f8a446f50cf25d3d4b850bcfd1.tar.xz | |
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/settings_list.c')
| -rw-r--r-- | apps/settings_list.c | 100 |
1 files changed, 97 insertions, 3 deletions
diff --git a/apps/settings_list.c b/apps/settings_list.c index 1bc7832..d6f5f94 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -29,10 +29,10 @@ #include "lcd.h" #include "button.h" #include "backlight.h" +#include "sound.h" #include "settings.h" #include "settings_list.h" #include "usb.h" -#include "sound.h" #include "dsp.h" #include "audio.h" #include "power.h" @@ -552,9 +552,97 @@ const struct settings_list settings[] = { /* sound settings */ SOUND_SETTING(F_NO_WRAP,volume, LANG_VOLUME, "volume", SOUND_VOLUME), SOUND_SETTING(0, balance, LANG_BALANCE, "balance", SOUND_BALANCE), +/* Tone controls */ +#ifdef AUDIOHW_HAVE_BASS SOUND_SETTING(F_NO_WRAP,bass, LANG_BASS, "bass", SOUND_BASS), +#endif +#ifdef AUDIOHW_HAVE_TREBLE SOUND_SETTING(F_NO_WRAP,treble, LANG_TREBLE, "treble", SOUND_TREBLE), - +#endif +/* Hardware EQ tone controls */ +#ifdef AUDIOHW_HAVE_EQ +/* Band gain is generic */ + SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND1].gain, + LANG_HW_EQ_GAIN, "tone band1 gain", SOUND_EQ_BAND1_GAIN), +#ifdef AUDIOHW_HAVE_EQ_BAND2 + SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND2].gain, + LANG_HW_EQ_GAIN, "tone band2 gain", SOUND_EQ_BAND2_GAIN), +#endif /* AUDIOHW_HAVE_EQ_BAND2 */ +#ifdef AUDIOHW_HAVE_EQ_BAND3 + SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND3].gain, + LANG_HW_EQ_GAIN, "tone band3 gain", SOUND_EQ_BAND3_GAIN), +#endif /* AUDIOHW_HAVE_EQ_BAND3 */ +#ifdef AUDIOHW_HAVE_EQ_BAND4 + SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND4].gain, + LANG_HW_EQ_GAIN, "tone band4 gain", SOUND_EQ_BAND4_GAIN), +#endif /* AUDIOHW_HAVE_EQ_BAND4 */ +#ifdef AUDIOHW_HAVE_EQ_BAND5 + SOUND_SETTING(F_NO_WRAP, hw_eq_bands[AUDIOHW_EQ_BAND5].gain, + LANG_HW_EQ_GAIN, "tone band5 gain", SOUND_EQ_BAND5_GAIN), +#endif /* AUDIOHW_HAVE_EQ_BAND5 */ +#ifdef HAVE_WM8978 + /* Frequencies vary with samplerate but at least the user has an idea + * about the bands and it will be correct with normal playback rates. */ +/* Band 1 */ + STRINGCHOICE_SETTING(F_SOUNDSETTING, + hw_eq_bands[AUDIOHW_EQ_BAND1].frequency, + LANG_HW_EQ_FREQUENCY, 0,"tone band1 frequency", + "80 Hz,105 Hz,135 Hz,175 Hz", + sound_set_hw_eq_band1_frequency, 4, + TALK_ID(80, UNIT_HERTZ), TALK_ID(105, UNIT_HERTZ), + TALK_ID(135, UNIT_HERTZ), TALK_ID(175, UNIT_HERTZ)), +/* Band 2 */ + STRINGCHOICE_SETTING(F_SOUNDSETTING, + hw_eq_bands[AUDIOHW_EQ_BAND2].frequency, + LANG_HW_EQ_FREQUENCY, 0,"tone band2 frequency", + "230 Hz,300 Hz,385 Hz,500 Hz", + sound_set_hw_eq_band2_frequency, 4, + TALK_ID(230, UNIT_HERTZ), TALK_ID(300, UNIT_HERTZ), + TALK_ID(385, UNIT_HERTZ), TALK_ID(500, UNIT_HERTZ)), + CHOICE_SETTING(F_SOUNDSETTING, hw_eq_bands[AUDIOHW_EQ_BAND2].width, + LANG_HW_EQ_WIDTH, 0, "tone band2 width", "narrow,wide", + sound_set_hw_eq_band2_width, 2, + ID2P(LANG_HW_EQ_WIDTH_NARROW), ID2P(LANG_HW_EQ_WIDTH_WIDE)), +/* Band 3 */ + STRINGCHOICE_SETTING(F_SOUNDSETTING, + hw_eq_bands[AUDIOHW_EQ_BAND3].frequency, + LANG_HW_EQ_FREQUENCY, 0, "tone band3 frequency", + "650 Hz,850 Hz,1.1 kHz,1.4 kHz", + sound_set_hw_eq_band3_frequency, 4, + TALK_ID(650, UNIT_HERTZ), TALK_ID(850, UNIT_HERTZ), + TALK_ID_DECIMAL(11, 1, UNIT_KHZ), + TALK_ID_DECIMAL(14, 1, UNIT_KHZ)), + CHOICE_SETTING(F_SOUNDSETTING,hw_eq_bands[AUDIOHW_EQ_BAND3].width, + LANG_HW_EQ_WIDTH, 0, "tone band3 width", "narrow,wide", + sound_set_hw_eq_band3_width, 2, + ID2P(LANG_HW_EQ_WIDTH_NARROW), ID2P(LANG_HW_EQ_WIDTH_WIDE)), +/* Band 4 */ + STRINGCHOICE_SETTING(F_SOUNDSETTING, + hw_eq_bands[AUDIOHW_EQ_BAND4].frequency, + LANG_HW_EQ_FREQUENCY, 0, "tone band4 frequency", + "1.8 kHz,2.4 kHz,3.2 kHz,4.1 kHz", + sound_set_hw_eq_band4_frequency, 4, + TALK_ID_DECIMAL(18, 1, UNIT_KHZ), + TALK_ID_DECIMAL(24, 1, UNIT_KHZ), + TALK_ID_DECIMAL(32, 1, UNIT_KHZ), + TALK_ID_DECIMAL(41, 1, UNIT_KHZ)), + CHOICE_SETTING(F_SOUNDSETTING, hw_eq_bands[AUDIOHW_EQ_BAND4].width, + LANG_HW_EQ_WIDTH, 0, "tone band4 width", "narrow,wide", + sound_set_hw_eq_band4_width, 2, + ID2P(LANG_HW_EQ_WIDTH_NARROW), ID2P(LANG_HW_EQ_WIDTH_WIDE)), +/* Band 5 */ + STRINGCHOICE_SETTING(F_SOUNDSETTING, + hw_eq_bands[AUDIOHW_EQ_BAND5].frequency, + LANG_HW_EQ_FREQUENCY, 0, "tone band5 frequency", + "5.3 kHz,6.9 kHz,9.0 kHz,11.7 kHz", + sound_set_hw_eq_band5_frequency, 4, + TALK_ID_DECIMAL(53, 1, UNIT_KHZ), + TALK_ID_DECIMAL(69, 1, UNIT_KHZ), + TALK_ID_DECIMAL(90, 1, UNIT_KHZ), + TALK_ID_DECIMAL(117, 1, UNIT_KHZ)), +#endif /* HAVE_WM8978 */ +#endif /* AUDIOHW_HAVE_EQ */ +/* 3-d enhancement effect */ #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) SOUND_SETTING(0,loudness, LANG_LOUDNESS, "loudness", SOUND_LOUDNESS), STRINGCHOICE_SETTING(F_SOUNDSETTING,avc,LANG_AUTOVOL,0,"auto volume", @@ -574,6 +662,10 @@ const struct settings_list settings[] = { ID2P(LANG_CHANNEL_RIGHT), ID2P(LANG_CHANNEL_KARAOKE)), SOUND_SETTING(F_SOUNDSETTING, stereo_width, LANG_STEREO_WIDTH, "stereo_width", SOUND_STEREO_WIDTH), +#ifdef AUDIOHW_HAVE_DEPTH_3D + SOUND_SETTING(0,depth_3d, LANG_DEPTH_3D, "3-d enhancement", + SOUND_DEPTH_3D), +#endif /* playback */ OFFON_SETTING(0, playlist_shuffle, LANG_SHUFFLE, false, "shuffle", NULL), SYSTEM_SETTING(NVRAM(4), resume_index, -1), @@ -1332,9 +1424,11 @@ const struct settings_list settings[] = { "compressor release time", UNIT_MS, 100, 1000, 100, NULL, NULL, compressor_set), #endif -#ifdef HAVE_WM8758 +#ifdef AUDIOHW_HAVE_BASS_CUTOFF SOUND_SETTING(F_NO_WRAP, bass_cutoff, LANG_BASS_CUTOFF, "bass cutoff", SOUND_BASS_CUTOFF), +#endif +#ifdef AUDIOHW_HAVE_TREBLE_CUTOFF SOUND_SETTING(F_NO_WRAP, treble_cutoff, LANG_TREBLE_CUTOFF, "treble cutoff", SOUND_TREBLE_CUTOFF), #endif |