forked from len0rd/rockbox
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
This commit is contained in:
parent
d939663ee9
commit
cf5f256a93
3 changed files with 15 additions and 5 deletions
|
|
@ -1004,13 +1004,10 @@ static bool eq_hw_set_band4_gain(void)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool eq_hw_enabled(void)
|
void eq_hw_enable(bool enable)
|
||||||
{
|
{
|
||||||
bool result = set_bool(str(LANG_EQUALIZER_HARDWARE_ENABLED),
|
|
||||||
&global_settings.eq_hw_enabled);
|
|
||||||
|
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
if (global_settings.eq_hw_enabled) {
|
if (enable) {
|
||||||
wmcodec_set_equalizer_band(0, global_settings.eq_hw_band0_cutoff,
|
wmcodec_set_equalizer_band(0, global_settings.eq_hw_band0_cutoff,
|
||||||
0, global_settings.eq_hw_band0_gain);
|
0, global_settings.eq_hw_band0_gain);
|
||||||
wmcodec_set_equalizer_band(1, global_settings.eq_hw_band1_center,
|
wmcodec_set_equalizer_band(1, global_settings.eq_hw_band1_center,
|
||||||
|
|
@ -1035,6 +1032,14 @@ static bool eq_hw_enabled(void)
|
||||||
wmcodec_set_equalizer_band(4, global_settings.eq_hw_band4_cutoff, 0, 0);
|
wmcodec_set_equalizer_band(4, global_settings.eq_hw_band4_cutoff, 0, 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool eq_hw_enabled(void)
|
||||||
|
{
|
||||||
|
bool result = set_bool(str(LANG_EQUALIZER_HARDWARE_ENABLED),
|
||||||
|
&global_settings.eq_hw_enabled);
|
||||||
|
|
||||||
|
eq_hw_enable(global_settings.eq_hw_enabled);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ bool eq_menu_graphical(void);
|
||||||
bool eq_menu(void);
|
bool eq_menu(void);
|
||||||
#ifdef HAVE_WM8758
|
#ifdef HAVE_WM8758
|
||||||
bool eq_hw_menu(void);
|
bool eq_hw_menu(void);
|
||||||
|
void eq_hw_enable(bool enable);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1242,6 +1242,10 @@ void settings_apply(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_WM8758
|
||||||
|
eq_hw_enable(global_settings.eq_hw_enabled);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SPDIF_POWER
|
#ifdef HAVE_SPDIF_POWER
|
||||||
spdif_power_enable(global_settings.spdif_enable);
|
spdif_power_enable(global_settings.spdif_enable);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue