diff options
-rw-r--r-- | apps/SOURCES | 3 | ||||
-rw-r--r-- | firmware/sound.c | 7 |
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index d34d7b8b30..6005460a5a 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -159,12 +159,11 @@ radio/radioart.c | |||
159 | #endif | 159 | #endif |
160 | #endif | 160 | #endif |
161 | 161 | ||
162 | fixedpoint.c | ||
163 | |||
164 | #if CONFIG_CODEC == SWCODEC | 162 | #if CONFIG_CODEC == SWCODEC |
165 | #if INPUT_SRC_CAPS != 0 | 163 | #if INPUT_SRC_CAPS != 0 |
166 | audio_path.c | 164 | audio_path.c |
167 | #endif /* INPUT_SRC_CAPS != 0 */ | 165 | #endif /* INPUT_SRC_CAPS != 0 */ |
166 | fixedpoint.c | ||
168 | pcmbuf.c | 167 | pcmbuf.c |
169 | codec_thread.c | 168 | codec_thread.c |
170 | playback.c | 169 | playback.c |
diff --git a/firmware/sound.c b/firmware/sound.c index e6cfe57cf5..f8358c690d 100644 --- a/firmware/sound.c +++ b/firmware/sound.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include "config.h" | 25 | #include "config.h" |
26 | #include "system.h" | 26 | #include "system.h" |
27 | #include "sound.h" | 27 | #include "sound.h" |
28 | #include "fixedpoint.h" | ||
29 | #ifdef HAVE_SW_VOLUME_CONTROL | 28 | #ifdef HAVE_SW_VOLUME_CONTROL |
30 | #include "pcm_sw_volume.h" | 29 | #include "pcm_sw_volume.h" |
31 | #endif /* HAVE_SW_VOLUME_CONTROL */ | 30 | #endif /* HAVE_SW_VOLUME_CONTROL */ |
@@ -128,8 +127,10 @@ static int current_eq_band_gain[AUDIOHW_EQ_BAND_NUM]; /* tenth dB */ | |||
128 | /* Return the sound value scaled to centibels (tenth-decibels) */ | 127 | /* Return the sound value scaled to centibels (tenth-decibels) */ |
129 | static int sound_value_to_cb(int setting, int value) | 128 | static int sound_value_to_cb(int setting, int value) |
130 | { | 129 | { |
131 | long e = (1 - sound_numdecimals(setting)) << 16; | 130 | int shift = 1 - sound_numdecimals(setting); |
132 | return fp_mul(value, fp_exp10(e, 16), 16); | 131 | if (shift < 0) do { value /= 10; } while (++shift); |
132 | if (shift > 0) do { value *= 10; } while (--shift); | ||
133 | return value; | ||
133 | } | 134 | } |
134 | 135 | ||
135 | static void set_prescaled_volume(void) | 136 | static void set_prescaled_volume(void) |