summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sparmann <theseven@rockbox.org>2011-01-06 23:59:32 +0000
committerMichael Sparmann <theseven@rockbox.org>2011-01-06 23:59:32 +0000
commit249d628ab8859f65d20d4c61cf8a3b3299053aa3 (patch)
tree226991c7036cddc4e985ceb85afded87d8666a1e
parentdaa3c36248d6dc1f2d1f529870a29a4fcf77b110 (diff)
iPod Classic: Unmute amplifiers when setting volume (fixes resuming paused playback)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28982 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/audio/cs42l55.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/firmware/drivers/audio/cs42l55.c b/firmware/drivers/audio/cs42l55.c
index 4d922d77d2..79b6d283b6 100644
--- a/firmware/drivers/audio/cs42l55.c
+++ b/firmware/drivers/audio/cs42l55.c
@@ -128,8 +128,10 @@ void audiohw_set_master_vol(int vol_l, int vol_r)
/* 0000000 == 0dB (0x0) */
/* 1000100 == -60dB (0x44, this is actually -58dB) */
- cscodec_setbits(HPACTL, HPACTL_HPAVOL_MASK, vol_l << HPACTL_HPAVOL_SHIFT);
- cscodec_setbits(HPBCTL, HPBCTL_HPBVOL_MASK, vol_r << HPBCTL_HPBVOL_SHIFT);
+ cscodec_setbits(HPACTL, HPACTL_HPAVOL_MASK | HPACTL_HPAMUTE,
+ vol_l << HPACTL_HPAVOL_SHIFT);
+ cscodec_setbits(HPBCTL, HPBCTL_HPBVOL_MASK | HPBCTL_HPBMUTE,
+ vol_r << HPBCTL_HPBVOL_SHIFT);
}
void audiohw_set_lineout_vol(int vol_l, int vol_r)
@@ -139,9 +141,9 @@ void audiohw_set_lineout_vol(int vol_l, int vol_r)
/* 0000000 == 0dB (0x0) */
/* 1000100 == -60dB (0x44, this is actually -58dB) */
- cscodec_setbits(LINEACTL, LINEACTL_LINEAVOL_MASK,
+ cscodec_setbits(LINEACTL, LINEACTL_LINEAVOL_MASK | LINEACTL_LINEAMUTE,
vol_l << LINEACTL_LINEAVOL_SHIFT);
- cscodec_setbits(LINEBCTL, LINEBCTL_LINEBVOL_MASK,
+ cscodec_setbits(LINEBCTL, LINEBCTL_LINEBVOL_MASK | LINEBCTL_LINEBMUTE,
vol_r << LINEBCTL_LINEBVOL_SHIFT);
}