summaryrefslogtreecommitdiffstats
path: root/firmware/sound.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2010-05-11 04:02:45 +0000
committerMichael Sevakis <jethead71@rockbox.org>2010-05-11 04:02:45 +0000
commit8ce5b01ec717a8ee1d765ec9c0d4d6f20868092e (patch)
tree00469290ec43bbf5493c14226d766a164b6562d6 /firmware/sound.c
parent7d21e5ab32ef24724c201b5ffc4df3a2637966e7 (diff)
downloadrockbox-8ce5b01ec717a8ee1d765ec9c0d4d6f20868092e.tar.gz
rockbox-8ce5b01ec717a8ee1d765ec9c0d4d6f20868092e.tar.bz2
rockbox-8ce5b01ec717a8ee1d765ec9c0d4d6f20868092e.zip
MRobe100, HD200, Gigabeat F/X (anything with wm8750 or wm8751). Properly prescale bass and treble controls to avoid clipping.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25940 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/sound.c')
-rw-r--r--firmware/sound.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/firmware/sound.c b/firmware/sound.c
index 4f95b6ed50..2973721e1c 100644
--- a/firmware/sound.c
+++ b/firmware/sound.c
@@ -189,8 +189,7 @@ static void set_prescaled_volume(void)
*/
#if defined(HAVE_SW_TONE_CONTROLS) || !(defined(HAVE_WM8975) \
|| defined(HAVE_WM8711) || defined(HAVE_WM8721) || defined(HAVE_WM8731) \
- || defined(HAVE_WM8751) || defined(HAVE_WM8758) || defined(HAVE_WM8985) \
- || defined(HAVE_UDA1341))
+ || defined(HAVE_WM8758) || defined(HAVE_WM8985) || defined(HAVE_UDA1341))
prescale = MAX(current_bass, current_treble);
if (prescale < 0)
@@ -297,7 +296,7 @@ void sound_set_bass(int value)
#if !defined(AUDIOHW_HAVE_CLIPPING)
#if defined(HAVE_WM8750) || defined(HAVE_WM8751)
- current_bass = value;
+ current_bass = value / 15;
#else
current_bass = value * 10;
#endif
@@ -321,7 +320,7 @@ void sound_set_treble(int value)
#if !defined(AUDIOHW_HAVE_CLIPPING)
#if defined(HAVE_WM8750) || defined(HAVE_WM8751)
- current_treble = value;
+ current_treble = value / 15;
#else
current_treble = value * 10;
#endif