From: jethead71 Date: Sat, 15 May 2010 14:16:35 +0000 (+0000) Subject: Hopefully finish off the red from r26051. X-Git-Url: https://repo.or.cz/w/kugel-rb.git/commitdiff_plain/385cdd1334e1df5dddd94763dabecb2c5d6fbca9 Hopefully finish off the red from r26051. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26053 a1c6a512-1295-4272-9138-f99709370657 --- diff --git a/apps/settings.h b/apps/settings.h index c8e8d642a..8c58fed90 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 18fd7c590..da08b4440 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 5d036a672..c6b8e3825 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 ce6d88988..ab9efc91b 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},