summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-09-24 09:42:55 +0000
committerJens Arnold <amiconn@rockbox.org>2005-09-24 09:42:55 +0000
commitd7ad24ed39de98286715708a3e91519f292c89db (patch)
tree3f4449bf2302b7fe691732be3e5fef4d152d824e /firmware
parent524b85fa92afeaf421ec229901e893218135c92e (diff)
downloadrockbox-d7ad24ed39de98286715708a3e91519f292c89db.tar.gz
rockbox-d7ad24ed39de98286715708a3e91519f292c89db.tar.bz2
rockbox-d7ad24ed39de98286715708a3e91519f292c89db.zip
H1x0 radio: Fixed the volume changing issue with non-flat tone controls.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7554 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/uda1380.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/firmware/drivers/uda1380.c b/firmware/drivers/uda1380.c
index c0ff0c7ceb..f38674d731 100644
--- a/firmware/drivers/uda1380.c
+++ b/firmware/drivers/uda1380.c
@@ -266,17 +266,10 @@ void uda1380_set_recvol(int mic_gain, int linein_gain, int adc_volume)
*/
void uda1380_set_monitor(int enable)
{
- if (enable)
- {
- /* enable channel 2 */
- uda1380_write_reg(REG_MIX_VOL, (uda1380_regs[REG_MIX_VOL] & 0x00FF) | MIX_VOL_CH_2(0));
- uda1380_write_reg(REG_MUTE, 0);
- } else
- {
- /* mute channel 2 */
- uda1380_write_reg(REG_MUTE, MUTE_CH2);
- uda1380_write_reg(REG_MIX_VOL, (uda1380_regs[REG_MIX_VOL] & 0x00FF) | MIX_VOL_CH_2(0xff));
- }
+ if (enable) /* enable channel 2 */
+ uda1380_write_reg(REG_MUTE, uda1380_regs[REG_MUTE] & ~MUTE_CH2);
+ else /* mute channel 2 */
+ uda1380_write_reg(REG_MUTE, uda1380_regs[REG_MUTE] | MUTE_CH2);
}
/* Change the order of the noise chaper, 5th order is recommended above 32kHz */