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"