diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2013-05-23 14:19:06 -0400 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2013-05-23 14:25:37 -0400 |
commit | 6e211ab3ac36cf792f6412cd61b8336c12533778 (patch) | |
tree | b4136d81ba1719a24ed60c4bac75862111945024 /lib/rbcodec/dsp | |
parent | b7e0e1a0a3b44868ddb9ad60210158ccbe220e90 (diff) |
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 'lib/rbcodec/dsp')
-rw-r--r-- | lib/rbcodec/dsp/dsp_misc.c | 46 | ||||
-rw-r--r-- | lib/rbcodec/dsp/dsp_misc.h | 17 |
2 files changed, 8 insertions, 55 deletions
diff --git a/lib/rbcodec/dsp/dsp_misc.c b/lib/rbcodec/dsp/dsp_misc.c index a19ef52883..40d198ff50 100644 --- a/lib/rbcodec/dsp/dsp_misc.c +++ b/lib/rbcodec/dsp/dsp_misc.c @@ -116,7 +116,7 @@ static void dsp_pitch_update(struct dsp_config *dsp) fp_div(pitch_ratio, PITCH_SPEED_100, 16)); } -static void dsp_set_pitch(int32_t percent) +void dsp_set_pitch(int32_t percent) { if (percent <= 0) percent = PITCH_SPEED_100; @@ -128,50 +128,12 @@ static void dsp_set_pitch(int32_t percent) dsp_pitch_update(dsp_get_config(CODEC_IDX_AUDIO)); } -#endif /* HAVE_PITCHCONTROL */ - - -/** Firmware callback interface **/ -/* Hook back from firmware/ part of audio, which can't/shouldn't call apps/ - * code directly. */ -int dsp_callback(int msg, intptr_t param) +int32_t dsp_get_pitch(void) { - int retval = 0; - - switch (msg) - { -#ifdef HAVE_SW_TONE_CONTROLS - case DSP_CALLBACK_SET_PRESCALE: - tone_set_prescale(param); - break; - case DSP_CALLBACK_SET_BASS: - tone_set_bass(param); - break; - case DSP_CALLBACK_SET_TREBLE: - tone_set_treble(param); - break; -#endif /* HAVE_SW_TONE_CONTROLS */ - case DSP_CALLBACK_SET_CHANNEL_CONFIG: - channel_mode_set_config(param); - break; - case DSP_CALLBACK_SET_STEREO_WIDTH: - channel_mode_custom_set_width(param); - break; -#ifdef HAVE_PITCHCONTROL - case DSP_CALLBACK_SET_PITCH: - dsp_set_pitch(param); - break; - case DSP_CALLBACK_GET_PITCH: - retval = pitch_ratio; - break; -#endif /* HAVE_PITCHCONTROL */ - default: - break; - } - - return retval; + return pitch_ratio; } +#endif /* HAVE_PITCHCONTROL */ static void INIT_ATTR misc_dsp_init(struct dsp_config *dsp, enum dsp_ids dsp_id) diff --git a/lib/rbcodec/dsp/dsp_misc.h b/lib/rbcodec/dsp/dsp_misc.h index 2583f495c3..2fed9400f2 100644 --- a/lib/rbcodec/dsp/dsp_misc.h +++ b/lib/rbcodec/dsp/dsp_misc.h @@ -54,18 +54,9 @@ struct dsp_replay_gains void dsp_replaygain_set_settings(const struct replaygain_settings *settings); -/* Callback for firmware layers to interface */ -enum -{ - DSP_CALLBACK_SET_PRESCALE = 0, - DSP_CALLBACK_SET_BASS, - DSP_CALLBACK_SET_TREBLE, - DSP_CALLBACK_SET_CHANNEL_CONFIG, - DSP_CALLBACK_SET_STEREO_WIDTH, - DSP_CALLBACK_SET_PITCH, - DSP_CALLBACK_GET_PITCH, -}; - -int dsp_callback(int msg, intptr_t param); +#ifdef HAVE_PITCHCONTROL +void dsp_set_pitch(int32_t pitch); +int32_t dsp_get_pitch(void); +#endif /* HAVE_PITCHCONTROL */ #endif /* DSP_MISC_H */ |