From e73a175d6d73f3241e157c416c1f03cab241e0e1 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 15 May 2010 14:16:35 +0000 Subject: [PATCH] Hopefully finish off the red from r26051. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26053 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.h | 4 +++- firmware/drivers/audio/wm8985.c | 4 ++++ firmware/export/wm8985.h | 6 ++++++ firmware/target/mips/ingenic_jz47xx/codec-jz4740.c | 6 +++++- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/apps/settings.h b/apps/settings.h index c8e8d642a2..8c58fed900 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -336,8 +336,10 @@ struct user_settings bool superbass; /* true/false */ #endif -#if defined(HAVE_WM8758) || defined(HAVE_WM8978) +#ifdef AUDIOHW_HAVE_BASS_CUTOFF int bass_cutoff; +#endif +#ifdef AUDIOHW_HAVE_TREBLE_CUTOFF int treble_cutoff; #endif diff --git a/firmware/drivers/audio/wm8985.c b/firmware/drivers/audio/wm8985.c index 18fd7c590b..da08b44402 100644 --- a/firmware/drivers/audio/wm8985.c +++ b/firmware/drivers/audio/wm8985.c @@ -99,8 +99,12 @@ const struct sound_settings_info audiohw_settings[] = { [SOUND_RIGHT_GAIN] = {"dB", 1, 1,-128, 96, 0}, [SOUND_MIC_GAIN] = {"dB", 1, 1,-128, 108, 16}, #endif +#ifdef AUDIOHW_HAVE_BASS_CUTOFF [SOUND_BASS_CUTOFF] = {"", 0, 1, 1, 4, 1}, +#endif +#ifdef AUDIOHW_HAVE_TREBLE_CUTOFF [SOUND_TREBLE_CUTOFF] = {"", 0, 1, 1, 4, 1}, +#endif }; /* shadow registers */ diff --git a/firmware/export/wm8985.h b/firmware/export/wm8985.h index 5d036a672f..c6b8e3825f 100644 --- a/firmware/export/wm8985.h +++ b/firmware/export/wm8985.h @@ -26,7 +26,13 @@ #define VOLUME_MIN -570 #define VOLUME_MAX 60 +#ifdef COWON_D2 +/* FIXME: somehow something was out of sync in the .lang, settings and caps. Keep the + * cutoffs disabled until someone with the device works it out. */ +#define AUDIOHW_CAPS (BASS_CAP | TREBLE_CAP) +#else #define AUDIOHW_CAPS (BASS_CAP | TREBLE_CAP | BASS_CUTOFF_CAP | TREBLE_CUTOFF_CAP) +#endif extern int tenthdb2master(int db); diff --git a/firmware/target/mips/ingenic_jz47xx/codec-jz4740.c b/firmware/target/mips/ingenic_jz47xx/codec-jz4740.c index ce6d889885..ab9efc91b0 100644 --- a/firmware/target/mips/ingenic_jz47xx/codec-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/codec-jz4740.c @@ -21,7 +21,7 @@ #include "config.h" #include "audio.h" -#include "audiohw.h" +#include "sound.h" #include "jz4740.h" #include "system.h" @@ -33,8 +33,12 @@ const struct sound_settings_info audiohw_settings[] = { [SOUND_VOLUME] = {"dB", 0, 1, 0, 6, 0}, #endif /* HAVE_SW_TONE_CONTROLS */ +#ifdef AUDIOHW_HAVE_BASS [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0}, +#endif +#ifdef AUDIOHW_HAVE_TREBLE [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0}, +#endif [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100},