summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/eq_menu.c15
-rw-r--r--apps/eq_menu.h1
-rw-r--r--apps/settings.c4
3 files changed, 15 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}
diff --git a/apps/eq_menu.h b/apps/eq_menu.h
index 928a97238a..e432ea91e3 100644
--- a/apps/eq_menu.h
+++ b/apps/eq_menu.h
@@ -27,6 +27,7 @@ bool eq_menu_graphical(void);
27bool eq_menu(void); 27bool eq_menu(void);
28#ifdef HAVE_WM8758 28#ifdef HAVE_WM8758
29bool eq_hw_menu(void); 29bool eq_hw_menu(void);
30void eq_hw_enable(bool enable);
30#endif 31#endif
31 32
32#endif 33#endif
diff --git a/apps/settings.c b/apps/settings.c
index d298ec8d60..778d99f4e9 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -1242,6 +1242,10 @@ void settings_apply(void)
1242 } 1242 }
1243#endif 1243#endif
1244 1244
1245#ifdef HAVE_WM8758
1246 eq_hw_enable(global_settings.eq_hw_enabled);
1247#endif
1248
1245#ifdef HAVE_SPDIF_POWER 1249#ifdef HAVE_SPDIF_POWER
1246 spdif_power_enable(global_settings.spdif_enable); 1250 spdif_power_enable(global_settings.spdif_enable);
1247#endif 1251#endif