summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2013-05-23 14:19:06 -0400
committerMichael Sevakis <jethead71@rockbox.org>2013-05-23 14:25:37 -0400
commit6e211ab3ac36cf792f6412cd61b8336c12533778 (patch)
treeb4136d81ba1719a24ed60c4bac75862111945024 /firmware/drivers
parentb7e0e1a0a3b44868ddb9ad60210158ccbe220e90 (diff)
downloadrockbox-6e211ab3ac36cf792f6412cd61b8336c12533778.zip
rockbox-6e211ab3ac36cf792f6412cd61b8336c12533778.tar.gz
rockbox-6e211ab3ac36cf792f6412cd61b8336c12533778.tar.bz2
rockbox-6e211ab3ac36cf792f6412cd61b8336c12533778.tar.xz
Remove dsp_callback because DSP is now library code, not app code.
Yep, nope, not necessary anymore. Just call functions directly. Change-Id: I21dc35f8d674c2a9c8379b7cebd5613c1f05b5eb
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/audio/audiohw-swcodec.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/firmware/drivers/audio/audiohw-swcodec.c b/firmware/drivers/audio/audiohw-swcodec.c
index 9cfc2ce..6c86bdf 100644
--- a/firmware/drivers/audio/audiohw-swcodec.c
+++ b/firmware/drivers/audio/audiohw-swcodec.c
@@ -21,56 +21,51 @@
#include "config.h"
#include "system.h"
#include "sound.h"
+#ifdef HAVE_SW_TONE_CONTROLS
+#include "tone_controls.h"
+#endif
+#include "channel_mode.h"
#include "dsp_misc.h"
-/* Linking audio hardware calls to SWCODEC DSP emulation */
-
-static audiohw_swcodec_cb_type callback = NULL;
-
-void audiohw_swcodec_set_callback(audiohw_swcodec_cb_type func)
-{
- callback = func;
-}
-
-/** Functions exported by audiohw.h **/
+/** Functions exported by audiohw.h but implemented in DSP **/
void audiohw_set_channel(int value)
{
- callback(DSP_CALLBACK_SET_CHANNEL_CONFIG, value);
+ channel_mode_set_config(value);
}
void audiohw_set_stereo_width(int value)
{
- callback(DSP_CALLBACK_SET_STEREO_WIDTH, value);
+ channel_mode_custom_set_width(value);
}
#ifdef HAVE_SW_TONE_CONTROLS
void audiohw_set_bass(int value)
{
- callback(DSP_CALLBACK_SET_BASS, value*10);
+ tone_set_bass(value*10);
}
void audiohw_set_treble(int value)
{
- callback(DSP_CALLBACK_SET_TREBLE, value*10);
+ tone_set_treble(value*10);
}
#endif /* HAVE_SW_TONE_CONTROLS */
#ifndef AUDIOHW_HAVE_PRESCALER
void audiohw_set_prescaler(int value)
{
- callback(DSP_CALLBACK_SET_PRESCALE, value);
+ tone_set_prescale(value);
}
#endif /* AUDIOHW_HAVE_PRESCALER */
#ifdef HAVE_PITCHCONTROL
void audiohw_set_pitch(int32_t value)
{
- callback(DSP_CALLBACK_SET_PITCH, value);
+ dsp_set_pitch(value);
}
int32_t audiohw_get_pitch(void)
{
- return callback(DSP_CALLBACK_GET_PITCH, 0);
+ return dsp_get_pitch();
}
#endif /* HAVE_PITCHCONTROL */