summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-05-14 08:35:53 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-05-14 08:35:53 +0000
commit8cce39bb9f3368ddb324f7b757a62c573d16cc55 (patch)
tree96791c398978f33beb75aa1898c33ce366684ea6 /firmware
parent39e4b84e643b4527688fbc01b61dc3769910f28c (diff)
downloadrockbox-8cce39bb9f3368ddb324f7b757a62c573d16cc55.tar.gz
rockbox-8cce39bb9f3368ddb324f7b757a62c573d16cc55.zip
as3514: mute headphones at the lowest volume
change lowest step from -74dB to -73dB, as it really is -73.5dB and is rounded to -73 fix FS#11237 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26010 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/audio/as3514.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c
index 64fa7ac13c..25a7bef796 100644
--- a/firmware/drivers/audio/as3514.c
+++ b/firmware/drivers/audio/as3514.c
@@ -64,7 +64,7 @@
64#endif 64#endif
65 65
66const struct sound_settings_info audiohw_settings[] = { 66const struct sound_settings_info audiohw_settings[] = {
67 [SOUND_VOLUME] = {"dB", 0, 1, -74, 6, -25}, 67 [SOUND_VOLUME] = {"dB", 0, 1, -73, 6, -25},
68 /* HAVE_SW_TONE_CONTROLS */ 68 /* HAVE_SW_TONE_CONTROLS */
69 [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0}, 69 [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0},
70 [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0}, 70 [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0},
@@ -240,7 +240,6 @@ static void audiohw_mute(bool mute)
240{ 240{
241 if (mute) { 241 if (mute) {
242 as3514_set(AS3514_HPH_OUT_L, HPH_OUT_L_HP_MUTE); 242 as3514_set(AS3514_HPH_OUT_L, HPH_OUT_L_HP_MUTE);
243
244 } else { 243 } else {
245 as3514_clear(AS3514_HPH_OUT_L, HPH_OUT_L_HP_MUTE); 244 as3514_clear(AS3514_HPH_OUT_L, HPH_OUT_L_HP_MUTE);
246 } 245 }
@@ -263,6 +262,12 @@ void audiohw_set_master_vol(int vol_l, int vol_r)
263 unsigned int hph_r, hph_l; 262 unsigned int hph_r, hph_l;
264 unsigned int mix_l, mix_r; 263 unsigned int mix_l, mix_r;
265 264
265 if(vol_l == 0 && vol_r == 0)
266 {
267 audiohw_mute(true);
268 return;
269 }
270
266 /* We combine the mixer channel volume range with the headphone volume 271 /* We combine the mixer channel volume range with the headphone volume
267 range - keep first stage as loud as possible */ 272 range - keep first stage as loud as possible */
268 if (vol_r <= 0x16) { 273 if (vol_r <= 0x16) {
@@ -289,6 +294,8 @@ void audiohw_set_master_vol(int vol_l, int vol_r)
289#endif 294#endif
290 as3514_write_masked(AS3514_HPH_OUT_R, hph_r, AS3514_VOL_MASK); 295 as3514_write_masked(AS3514_HPH_OUT_R, hph_r, AS3514_VOL_MASK);
291 as3514_write_masked(AS3514_HPH_OUT_L, hph_l, AS3514_VOL_MASK); 296 as3514_write_masked(AS3514_HPH_OUT_L, hph_l, AS3514_VOL_MASK);
297
298 audiohw_mute(false);
292} 299}
293 300
294void audiohw_set_lineout_vol(int vol_l, int vol_r) 301void audiohw_set_lineout_vol(int vol_l, int vol_r)