From 8391526f794b296e5b6edd5707bbf25b5be73e17 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Mon, 28 Apr 2008 08:37:18 +0000 Subject: * introduce AUDIOHW_CAPS to define which audio codec can do what kind of operations in hw, e.g. setting bass * added documentation why and when we need the software based prescaler * implement audiohw_set_bass and audiohw_set_treble for mas35xx * clean up sound_set_bass and sound_set_treble * simplify some #ifdef logic * fix special handling of WM8751 - looking for tester :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17274 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/audiohw.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'firmware/export/audiohw.h') diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h index b3493b86d9..d450613aff 100644 --- a/firmware/export/audiohw.h +++ b/firmware/export/audiohw.h @@ -23,6 +23,10 @@ #include "config.h" #include +/* define some audiohw caps */ +#define TREBLE_CAP (1 << 0) +#define BASS_CAP (1 << 1) + #ifdef HAVE_UDA1380 #include "uda1380.h" #elif defined(HAVE_WM8751) @@ -49,6 +53,17 @@ #include "tsc2100.h" #endif +/* convert caps into defines */ +#ifdef AUDIOHW_CAPS +#if (AUDIOHW_CAPS & TREBLE_CAP) +#define AUDIOHW_HAVE_TREBLE +#endif + +#if (AUDIOHW_CAPS & BASS_CAP) +#define AUDIOHW_HAVE_BASS +#endif +#endif /* AUDIOHW_CAPS */ + enum { SOUND_VOLUME = 0, SOUND_BASS, @@ -141,6 +156,26 @@ void audiohw_mute(bool mute); */ void audiohw_enable_output(bool enable); +#ifdef AUDIOHW_HAVE_TREBLE +/** + * Set new treble value. + * @param val to set. + * NOTE: AUDIOHW_CAPS need to contain + * TREBLE_CAP + */ +void audiohw_set_treble(int val); +#endif + +#ifdef AUDIOHW_HAVE_BASS +/** + * Set new bass value. + * @param val to set. + * NOTE: AUDIOHW_CAPS need to contain + * BASS_CAP + */ +void audiohw_set_bass(int val); +#endif + #ifdef HAVE_RECORDING /** -- cgit v1.2.3