summaryrefslogtreecommitdiff
path: root/firmware/drivers/audio/erosqlinux_codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/audio/erosqlinux_codec.c')
-rw-r--r--firmware/drivers/audio/erosqlinux_codec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/drivers/audio/erosqlinux_codec.c b/firmware/drivers/audio/erosqlinux_codec.c
index 2b7d819e82..02c35e3c00 100644
--- a/firmware/drivers/audio/erosqlinux_codec.c
+++ b/firmware/drivers/audio/erosqlinux_codec.c
@@ -151,7 +151,7 @@ void audiohw_set_frequency(int fsel)
151} 151}
152 152
153/* min/max for pcm volume */ 153/* min/max for pcm volume */
154const int min_pcm = -430; 154const int min_pcm = -740;
155const int max_pcm = 0; 155const int max_pcm = 0;
156 156
157void audiohw_set_volume(int vol_l, int vol_r) 157void audiohw_set_volume(int vol_l, int vol_r)
@@ -169,7 +169,7 @@ void audiohw_set_volume(int vol_l, int vol_r)
169 output gain, we have to back off on the PCM signal 169 output gain, we have to back off on the PCM signal
170 to avoid blowing out the signal. 170 to avoid blowing out the signal.
171 */ 171 */
172 l = r = global_settings.volume_limit; 172 l = r = global_settings.volume_limit * 10;
173 } else { 173 } else {
174 l = vol_l_hw; 174 l = vol_l_hw;
175 r = vol_r_hw; 175 r = vol_r_hw;
@@ -177,7 +177,7 @@ void audiohw_set_volume(int vol_l, int vol_r)
177 177
178 int sw_volume_l = l <= min_pcm ? min_pcm : MIN(l, max_pcm); 178 int sw_volume_l = l <= min_pcm ? min_pcm : MIN(l, max_pcm);
179 int sw_volume_r = r <= min_pcm ? min_pcm : MIN(r, max_pcm); 179 int sw_volume_r = r <= min_pcm ? min_pcm : MIN(r, max_pcm);
180 pcm_set_mixer_volume(sw_volume_l / 10, sw_volume_r / 10); 180 pcm_set_mixer_volume(sw_volume_l / 20, sw_volume_r / 20);
181} 181}
182 182
183void audiohw_set_lineout_volume(int vol_l, int vol_r) 183void audiohw_set_lineout_volume(int vol_l, int vol_r)
@@ -190,7 +190,7 @@ void audiohw_set_lineout_volume(int vol_l, int vol_r)
190 (void)vol_r; 190 (void)vol_r;
191 191
192 if (lineout_inserted()) { 192 if (lineout_inserted()) {
193 l = r = global_settings.volume_limit; 193 l = r = global_settings.volume_limit * 10;
194 } else { 194 } else {
195 l = vol_l_hw; 195 l = vol_l_hw;
196 r = vol_r_hw; 196 r = vol_r_hw;
@@ -198,5 +198,5 @@ void audiohw_set_lineout_volume(int vol_l, int vol_r)
198 198
199 int sw_volume_l = l <= min_pcm ? min_pcm : MIN(l, max_pcm); 199 int sw_volume_l = l <= min_pcm ? min_pcm : MIN(l, max_pcm);
200 int sw_volume_r = r <= min_pcm ? min_pcm : MIN(r, max_pcm); 200 int sw_volume_r = r <= min_pcm ? min_pcm : MIN(r, max_pcm);
201 pcm_set_mixer_volume(sw_volume_l / 10, sw_volume_r / 10); 201 pcm_set_mixer_volume(sw_volume_l / 20, sw_volume_r / 20);
202} 202}