summaryrefslogtreecommitdiff
path: root/apps/eq_menu.c
diff options
context:
space:
mode:
authorDan Everton <dan@iocaine.org>2006-09-05 11:48:17 +0000
committerDan Everton <dan@iocaine.org>2006-09-05 11:48:17 +0000
commitcf5f256a931479dbe0eed192caa0e7a425aafe19 (patch)
tree51c5fd150763de39206240b56b57acac3d0c147f /apps/eq_menu.c
parentd939663ee9c7406ca5fc7f8795ef4815c5b46703 (diff)
downloadrockbox-cf5f256a931479dbe0eed192caa0e7a425aafe19.tar.gz
rockbox-cf5f256a931479dbe0eed192caa0e7a425aafe19.zip
At startup enable the hardware equalizer if it's set to be on.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10888 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/eq_menu.c')
-rw-r--r--apps/eq_menu.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/eq_menu.c b/apps/eq_menu.c
index 0743490723..7bd6e814ce 100644
--- a/apps/eq_menu.c
+++ b/apps/eq_menu.c
@@ -1004,13 +1004,10 @@ static bool eq_hw_set_band4_gain(void)
1004 return result; 1004 return result;
1005} 1005}
1006 1006
1007static bool eq_hw_enabled(void) 1007void eq_hw_enable(bool enable)
1008{ 1008{
1009 bool result = set_bool(str(LANG_EQUALIZER_HARDWARE_ENABLED),
1010 &global_settings.eq_hw_enabled);
1011
1012#ifndef SIMULATOR 1009#ifndef SIMULATOR
1013 if (global_settings.eq_hw_enabled) { 1010 if (enable) {
1014 wmcodec_set_equalizer_band(0, global_settings.eq_hw_band0_cutoff, 1011 wmcodec_set_equalizer_band(0, global_settings.eq_hw_band0_cutoff,
1015 0, global_settings.eq_hw_band0_gain); 1012 0, global_settings.eq_hw_band0_gain);
1016 wmcodec_set_equalizer_band(1, global_settings.eq_hw_band1_center, 1013 wmcodec_set_equalizer_band(1, global_settings.eq_hw_band1_center,
@@ -1035,6 +1032,14 @@ static bool eq_hw_enabled(void)
1035 wmcodec_set_equalizer_band(4, global_settings.eq_hw_band4_cutoff, 0, 0); 1032 wmcodec_set_equalizer_band(4, global_settings.eq_hw_band4_cutoff, 0, 0);
1036 } 1033 }
1037#endif 1034#endif
1035}
1036
1037static bool eq_hw_enabled(void)
1038{
1039 bool result = set_bool(str(LANG_EQUALIZER_HARDWARE_ENABLED),
1040 &global_settings.eq_hw_enabled);
1041
1042 eq_hw_enable(global_settings.eq_hw_enabled);
1038 1043
1039 return result; 1044 return result;
1040} 1045}