simplify UDA1380 bass and treble code

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13122 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Marcoen Hirschberg 2007-04-12 09:08:49 +00:00
parent 91ea874c71
commit 9291ae50ca
2 changed files with 6 additions and 14 deletions

View file

@ -133,10 +133,10 @@ extern void audiohw_set_monitor(int enable);
#define EQ_MODE_FLAT (0 << 14)
#define EQ_MODE_MIN (1 << 14)
#define EQ_MODE_MAX (3 << 14)
#define BASSL(x) (((x) & 0xF) << 8)
#define BASSR(x) (((x) & 0xF) << 0)
#define TREBLEL(x) (((x) & 0x3) << 12)
#define TREBLER(x) (((x) & 0x3) << 4)
#define BASSL(x) (((x) & 0x1E) << 7)
#define BASSR(x) (((x) & 0x1E) >> 1)
#define TREBLEL(x) (((x) & 0x6) << 11)
#define TREBLER(x) (((x) & 0x6) << 3)
#define BASS_MASK 0x0F0F
#define TREBLE_MASK 0x3030

View file

@ -514,11 +514,7 @@ void sound_set_bass(int value)
mas_writereg(MAS_REG_KBASS, bass_table[value+15]);
current_bass = value * 10;
set_prescaled_volume();
#elif defined(HAVE_UDA1380)
audiohw_set_bass(value >> 1);
current_bass = value * 10;
set_prescaled_volume();
#elif defined HAVE_WM8975 || defined HAVE_WM8758 \
#elif defined HAVE_WM8975 || defined HAVE_WM8758 || defined(HAVE_UDA1380) \
|| defined HAVE_WM8731 || defined(HAVE_WM8721) || defined(HAVE_WM8751)
current_bass = value * 10;
audiohw_set_bass(value);
@ -544,11 +540,7 @@ void sound_set_treble(int value)
mas_writereg(MAS_REG_KTREBLE, treble_table[value+15]);
current_treble = value * 10;
set_prescaled_volume();
#elif defined(HAVE_UDA1380)
audiohw_set_treble(value >> 1);
current_treble = value * 10;
set_prescaled_volume();
#elif defined(HAVE_WM8975) || defined(HAVE_WM8758) \
#elif defined(HAVE_WM8975) || defined(HAVE_WM8758) || defined(HAVE_UDA1380) \
|| defined(HAVE_WM8731) || defined(HAVE_WM8721) || defined(HAVE_WM8751)
audiohw_set_treble(value);
current_treble = value * 10;