diff options
Diffstat (limited to 'firmware/sound.c')
-rw-r--r-- | firmware/sound.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/firmware/sound.c b/firmware/sound.c index 4c390f4a5b..e6cfe57cf5 100644 --- a/firmware/sound.c +++ b/firmware/sound.c | |||
@@ -103,13 +103,6 @@ void sound_set(int setting, int value) | |||
103 | sound_set_val(value); | 103 | sound_set_val(value); |
104 | } | 104 | } |
105 | 105 | ||
106 | /* Return the sound value scaled to centibels (tenth-decibels) */ | ||
107 | static int sound_value_to_cb(int setting, int value) | ||
108 | { | ||
109 | long e = (1 - sound_numdecimals(setting)) << 16; | ||
110 | return fp_mul(value, fp_exp10(e, 16), 16); | ||
111 | } | ||
112 | |||
113 | #if !defined(AUDIOHW_HAVE_CLIPPING) | 106 | #if !defined(AUDIOHW_HAVE_CLIPPING) |
114 | /* | 107 | /* |
115 | * The prescaler compensates for any kind of boosts, to prevent clipping. | 108 | * The prescaler compensates for any kind of boosts, to prevent clipping. |
@@ -132,6 +125,13 @@ static int current_bass = 0; /* tenth dB */ | |||
132 | static int current_eq_band_gain[AUDIOHW_EQ_BAND_NUM]; /* tenth dB */ | 125 | static int current_eq_band_gain[AUDIOHW_EQ_BAND_NUM]; /* tenth dB */ |
133 | #endif | 126 | #endif |
134 | 127 | ||
128 | /* Return the sound value scaled to centibels (tenth-decibels) */ | ||
129 | static int sound_value_to_cb(int setting, int value) | ||
130 | { | ||
131 | long e = (1 - sound_numdecimals(setting)) << 16; | ||
132 | return fp_mul(value, fp_exp10(e, 16), 16); | ||
133 | } | ||
134 | |||
135 | static void set_prescaled_volume(void) | 135 | static void set_prescaled_volume(void) |
136 | { | 136 | { |
137 | int prescale = 0; | 137 | int prescale = 0; |