summaryrefslogtreecommitdiff
path: root/apps/settings.c
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/settings.c
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/settings.c')
-rw-r--r--apps/settings.c35
1 files changed, 31 insertions, 4 deletions
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{