summaryrefslogtreecommitdiff
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
parent39e4b84e643b4527688fbc01b61dc3769910f28c (diff)
downloadrockbox-8cce39bb9f3368ddb324f7b757a62c573d16cc55.zip
rockbox-8cce39bb9f3368ddb324f7b757a62c573d16cc55.tar.gz
rockbox-8cce39bb9f3368ddb324f7b757a62c573d16cc55.tar.bz2
rockbox-8cce39bb9f3368ddb324f7b757a62c573d16cc55.tar.xz
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
-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 64fa7ac..25a7bef 100644
--- a/firmware/drivers/audio/as3514.c
+++ b/firmware/drivers/audio/as3514.c
@@ -64,7 +64,7 @@
#endif
const struct sound_settings_info audiohw_settings[] = {
- [SOUND_VOLUME] = {"dB", 0, 1, -74, 6, -25},
+ [SOUND_VOLUME] = {"dB", 0, 1, -73, 6, -25},
/* HAVE_SW_TONE_CONTROLS */
[SOUND_BASS] = {"dB", 0, 1, -24, 24, 0},
[SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0},
@@ -240,7 +240,6 @@ static void audiohw_mute(bool mute)
{
if (mute) {
as3514_set(AS3514_HPH_OUT_L, HPH_OUT_L_HP_MUTE);
-
} else {
as3514_clear(AS3514_HPH_OUT_L, HPH_OUT_L_HP_MUTE);
}
@@ -263,6 +262,12 @@ void audiohw_set_master_vol(int vol_l, int vol_r)
unsigned int hph_r, hph_l;
unsigned int mix_l, mix_r;
+ if(vol_l == 0 && vol_r == 0)
+ {
+ audiohw_mute(true);
+ return;
+ }
+
/* We combine the mixer channel volume range with the headphone volume
range - keep first stage as loud as possible */
if (vol_r <= 0x16) {
@@ -289,6 +294,8 @@ void audiohw_set_master_vol(int vol_l, int vol_r)
#endif
as3514_write_masked(AS3514_HPH_OUT_R, hph_r, AS3514_VOL_MASK);
as3514_write_masked(AS3514_HPH_OUT_L, hph_l, AS3514_VOL_MASK);
+
+ audiohw_mute(false);
}
void audiohw_set_lineout_vol(int vol_l, int vol_r)