diff options
-rw-r--r-- | firmware/drivers/audio/as3514.c | 11 |
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 | ||
66 | const struct sound_settings_info audiohw_settings[] = { | 66 | const 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 | ||
294 | void audiohw_set_lineout_vol(int vol_l, int vol_r) | 301 | void audiohw_set_lineout_vol(int vol_l, int vol_r) |