summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2019-07-25 08:03:18 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2019-07-25 08:03:18 -0500
commitb5b43a0fef087afdc3d7a69a3f62fb7dcbfe4e77 (patch)
tree672ee07e7dbdd5d36a9b899f8f247478ff3b839a
parent5f9d1f59d308e5832432d6f3d4e7380ef656521b (diff)
downloadrockbox-b5b43a0fef087afdc3d7a69a3f62fb7dcbfe4e77.tar.gz
rockbox-b5b43a0fef087afdc3d7a69a3f62fb7dcbfe4e77.tar.bz2
rockbox-b5b43a0fef087afdc3d7a69a3f62fb7dcbfe4e77.zip
Fix Red -- sound_current
Remove dependency on settings.g for bootloader ifdef out AUDIOHW_HAVE_EQ Settings these should be indexing the global_settings.hw_eq_bands[AUDIOHW_EQ_BAND_NUM] struct Change-Id: I1d1a8556ef88ce43397b600261696dacdf372034
-rw-r--r--firmware/sound.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/firmware/sound.c b/firmware/sound.c
index 9db30524d6..51b7c08e13 100644
--- a/firmware/sound.c
+++ b/firmware/sound.c
@@ -25,7 +25,10 @@
#include "config.h"
#include "system.h"
#include "sound.h"
+
+#ifndef BOOTLOADER
#include "settings.h" /* sound_current */
+#endif
#ifdef HAVE_SW_VOLUME_CONTROL
#include "pcm_sw_volume.h"
@@ -112,6 +115,7 @@ int sound_current(int setting)
{
switch(setting)
{
+#ifndef BOOTLOADER
#ifndef PLATFORM_HAS_VOLUME_CHANGE
SOUND_CUR_SET(VOLUME, global_settings.volume)
#endif
@@ -144,8 +148,10 @@ int sound_current(int setting)
SOUND_CUR_SET(DEPTH_3D, global_settings.depth_3d)
#endif
#if defined(AUDIOHW_HAVE_FILTER_ROLL_OFF)
- SOUND_CUR_SET(FILTER_ROLL_OFF, global_settings.filter_roll_off)
+ SOUND_CUR_SET(FILTER_ROLL_OFF, global_settings.roll_off)
#endif
+
+#if 0 /*WRONG -- these need to index the hw_eq_bands[AUDIOHW_EQ_BAND_NUM] struct*/
/* Hardware EQ tone controls */
#if defined(AUDIOHW_HAVE_EQ)
SOUND_CUR_SET(EQ_BAND1_GAIN, global_settings.hw_eq_band1_gain)
@@ -184,8 +190,12 @@ int sound_current(int setting)
#if defined(AUDIOHW_HAVE_EQ_BAND5_FREQUENCY)
SOUND_CUR_SET(EQ_BAND5_FREQUENCY, global_settings.hw_eq_band5_frequency)
#endif
+
#endif /* AUDIOHW_HAVE_EQ_BAND5 */
#endif /* AUDIOHW_HAVE_EQ */
+#endif /*IF 0*/
+
+#endif /*ndef BOOTLOADER*/
default:
return INT_MIN;
} /* switch(setting) */