summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2013-04-25 16:37:12 -0400
committerMichael Sevakis <jethead71@rockbox.org>2013-04-25 16:37:12 -0400
commit8829e909b4e756bfb2ad9210eec61d0dc55e1731 (patch)
tree25b423e7ef361c0f0bd69da4f6eeb924b13b0ab4
parentecaa40166000e3d6b49542d42804127c0a6079e2 (diff)
downloadrockbox-8829e909b4e756bfb2ad9210eec61d0dc55e1731.tar.gz
rockbox-8829e909b4e756bfb2ad9210eec61d0dc55e1731.zip
Bass/Treble caps should exist implicitly with HAVE_SW_TONE_CONTROLS.
If AUDIOHW_CAPS is defined without explicit BASS_CAP/TREBLE_CAP while HAVE_SW_TONE_CONTROLS is defined, AUDIOHW_HAVE_BASS/TREBLE should be defined or otherwise the tone controls won't show up. TREBLE/BASS were being defined if AUDIOHW_CAPS was NOT defined, but the same rule should apply if the codec needs to specify other caps but doesn't use hardware tone controls. (I'm surprised noone noticed some settings gone missing :-) Change-Id: I85b5c467bab07bb62362a0dc2d582267ac2d8ec9
-rw-r--r--firmware/export/audiohw.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h
index e3b9623262..843ac0c0c4 100644
--- a/firmware/export/audiohw.h
+++ b/firmware/export/audiohw.h
@@ -116,16 +116,6 @@ struct sound_settings_info
116#define AUDIOHW_HAVE_MONO_VOLUME 116#define AUDIOHW_HAVE_MONO_VOLUME
117#endif 117#endif
118 118
119/* Some values are the same for every codec and can be defined here one
120 time. */
121#ifdef HAVE_SW_TONE_CONTROLS
122AUDIOHW_SETTING(BASS, "dB", 0, 1, -24, 24, 0)
123AUDIOHW_SETTING(TREBLE, "dB", 0, 1, -24, 24, 0)
124#endif /* HAVE_SW_TONE_CONTROLS */
125AUDIOHW_SETTING(BALANCE, "%", 0, 1, -100, 100, 0)
126AUDIOHW_SETTING(CHANNELS, "", 0, 1, 0, 5, 0)
127AUDIOHW_SETTING(STEREO_WIDTH, "%", 0, 5, 0, 250, 100)
128
129/* convert caps into defines */ 119/* convert caps into defines */
130#ifdef AUDIOHW_CAPS 120#ifdef AUDIOHW_CAPS
131/* Tone controls */ 121/* Tone controls */
@@ -282,14 +272,13 @@ enum AUDIOHW_EQ_SETTINGS
282#define AUDIOHW_HAVE_MIC_GAIN 272#define AUDIOHW_HAVE_MIC_GAIN
283#endif 273#endif
284#endif /* HAVE_RECORDING */ 274#endif /* HAVE_RECORDING */
275#endif /* AUDIOHW_CAPS */
285 276
286#else /* ndef AUDIOHW_CAPS */ 277#ifdef HAVE_SW_TONE_CONTROLS
287#if defined (HAVE_SW_TONE_CONTROLS)
288/* Needed for proper sound support */ 278/* Needed for proper sound support */
289#define AUDIOHW_HAVE_BASS 279#define AUDIOHW_HAVE_BASS
290#define AUDIOHW_HAVE_TREBLE 280#define AUDIOHW_HAVE_TREBLE
291#endif 281#endif /* HAVE_SW_TONE_CONTROLS */
292#endif /* AUDIOHW_CAPS */
293 282
294/* Generate enumeration of SOUND_xxx constants */ 283/* Generate enumeration of SOUND_xxx constants */
295#include "audiohw_settings.h" 284#include "audiohw_settings.h"
@@ -548,4 +537,15 @@ typedef int (*audiohw_swcodec_cb_type)(int msg, intptr_t param);
548void audiohw_swcodec_set_callback(audiohw_swcodec_cb_type func); 537void audiohw_swcodec_set_callback(audiohw_swcodec_cb_type func);
549#endif /* CONFIG_CODEC == SWCODEC */ 538#endif /* CONFIG_CODEC == SWCODEC */
550 539
540/**
541 * Some setting are the same for every codec and can be defined here.
542 */
543#ifdef HAVE_SW_TONE_CONTROLS
544AUDIOHW_SETTING(BASS, "dB", 0, 1, -24, 24, 0)
545AUDIOHW_SETTING(TREBLE, "dB", 0, 1, -24, 24, 0)
546#endif /* HAVE_SW_TONE_CONTROLS */
547AUDIOHW_SETTING(BALANCE, "%", 0, 1, -100, 100, 0)
548AUDIOHW_SETTING(CHANNELS, "", 0, 1, 0, 5, 0)
549AUDIOHW_SETTING(STEREO_WIDTH, "%", 0, 5, 0, 250, 100)
550
551#endif /* _AUDIOHW_H_ */ 551#endif /* _AUDIOHW_H_ */