Hopefully finish off the red from r26051.
authorjethead71 <jethead71@a1c6a512-1295-4272-9138-f99709370657>
Sat, 15 May 2010 14:16:35 +0000 (15 14:16 +0000)
committerjethead71 <jethead71@a1c6a512-1295-4272-9138-f99709370657>
Sat, 15 May 2010 14:16:35 +0000 (15 14:16 +0000)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26053 a1c6a512-1295-4272-9138-f99709370657

apps/settings.h
firmware/drivers/audio/wm8985.c
firmware/export/wm8985.h
firmware/target/mips/ingenic_jz47xx/codec-jz4740.c

index c8e8d64..8c58fed 100644 (file)
@@ -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
 
index 18fd7c5..da08b44 100644 (file)
@@ -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 */
index 5d036a6..c6b8e38 100644 (file)
 #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);
 
index ce6d889..ab9efc9 100644 (file)
@@ -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},