summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2010-08-01 09:33:29 +0000
committerBertrik Sikken <bertrik@sikken.nl>2010-08-01 09:33:29 +0000
commit9b6d895276230fe66721bf3622af0ff17aa7a1b2 (patch)
treecd935e9671c3129ed1d046067b824d3011c845ac /firmware
parent451aa862448a119af2faf52ac5410f491d3138d1 (diff)
downloadrockbox-9b6d895276230fe66721bf3622af0ff17aa7a1b2.tar.gz
rockbox-9b6d895276230fe66721bf3622af0ff17aa7a1b2.tar.bz2
rockbox-9b6d895276230fe66721bf3622af0ff17aa7a1b2.zip
Various minor cleanups for cowon d2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27646 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/audio/wm8985.c14
-rw-r--r--firmware/target/arm/pcm-telechips.c1
-rw-r--r--firmware/target/arm/tcc780x/cowond2/touchscreen-cowond2.c1
-rw-r--r--firmware/target/arm/usb-tcc.c1
4 files changed, 15 insertions, 2 deletions
diff --git a/firmware/drivers/audio/wm8985.c b/firmware/drivers/audio/wm8985.c
index a76e20e57b..06b3fa3b44 100644
--- a/firmware/drivers/audio/wm8985.c
+++ b/firmware/drivers/audio/wm8985.c
@@ -109,8 +109,8 @@ const struct sound_settings_info audiohw_settings[] = {
};
/* shadow registers */
-unsigned int eq1_reg;
-unsigned int eq5_reg;
+static unsigned int eq1_reg;
+static unsigned int eq5_reg;
/* convert tenth of dB volume (-89..6) to master volume register value */
int tenthdb2master(int db)
@@ -250,29 +250,37 @@ void audiohw_set_aux_vol(int vol_l, int vol_r)
wmcodec_write(ROUTMIX, 0x111 | (vol_r << 5) );
}
+#ifdef AUDIOHW_HAVE_BASS
void audiohw_set_bass(int value)
{
eq1_reg = (eq1_reg & ~EQ_GAIN_MASK) | EQ_GAIN_VALUE(value);
wmcodec_write(EQ1, 0x100 | eq1_reg);
}
+#endif /* AUDIOHW_HAVE_BASS */
+#ifdef AUDIOHW_HAVE_BASS_CUTOFF
void audiohw_set_bass_cutoff(int value)
{
eq1_reg = (eq1_reg & ~EQ_CUTOFF_MASK) | EQ_CUTOFF_VALUE(value);
wmcodec_write(EQ1, 0x100 | eq1_reg);
}
+#endif /* AUDIOHW_HAVE_BASS_CUTOFF */
+#ifdef AUDIOHW_HAVE_TREBLE
void audiohw_set_treble(int value)
{
eq5_reg = (eq5_reg & ~EQ_GAIN_MASK) | EQ_GAIN_VALUE(value);
wmcodec_write(EQ5, eq5_reg);
}
+#endif /* AUDIOHW_HAVE_TREBLE */
+#ifdef AUDIOHW_HAVE_TREBLE_CUTOFF
void audiohw_set_treble_cutoff(int value)
{
eq5_reg = (eq5_reg & ~EQ_CUTOFF_MASK) | EQ_CUTOFF_VALUE(value);
wmcodec_write(EQ5, eq5_reg);
}
+#endif /* AUDIOHW_HAVE_TREBLE_CUTOFF */
/* Nice shutdown of WM8985 codec */
void audiohw_close(void)
@@ -286,6 +294,7 @@ void audiohw_close(void)
wmcodec_write(PWRMGMT2, 0x40);
}
+#if 0 /* function is currently unused */
/* Note: Disable output before calling this function */
void audiohw_set_sample_rate(int fsel)
{
@@ -294,6 +303,7 @@ void audiohw_set_sample_rate(int fsel)
driver in Rockbox, so this may need to change in the future. */
(void)fsel;
}
+#endif
#ifdef HAVE_RECORDING
void audiohw_enable_recording(bool source_mic)
diff --git a/firmware/target/arm/pcm-telechips.c b/firmware/target/arm/pcm-telechips.c
index d718ca38ac..851ebee7de 100644
--- a/firmware/target/arm/pcm-telechips.c
+++ b/firmware/target/arm/pcm-telechips.c
@@ -25,6 +25,7 @@
#include "logf.h"
#include "audio.h"
#include "sound.h"
+#include "i2s.h"
#include "pcm.h"
struct dma_data
diff --git a/firmware/target/arm/tcc780x/cowond2/touchscreen-cowond2.c b/firmware/target/arm/tcc780x/cowond2/touchscreen-cowond2.c
index 6f56df529b..1135d34701 100644
--- a/firmware/target/arm/tcc780x/cowond2/touchscreen-cowond2.c
+++ b/firmware/target/arm/tcc780x/cowond2/touchscreen-cowond2.c
@@ -23,6 +23,7 @@
#include "button.h"
#include "pcf50606.h"
#include "touchscreen.h"
+#include "touchscreen-target.h"
#include "stdlib.h"
#include "power-target.h"
#include "tsc200x.h"
diff --git a/firmware/target/arm/usb-tcc.c b/firmware/target/arm/usb-tcc.c
index 1b5f16c223..d295a24801 100644
--- a/firmware/target/arm/usb-tcc.c
+++ b/firmware/target/arm/usb-tcc.c
@@ -23,6 +23,7 @@
#include "usb.h"
#include "usb-tcc.h"
+#include "usb-target.h"
#include "cpu.h"
#include "system.h"