From 99b2742cd0de7181677f3aa7222caa5dc358ee12 Mon Sep 17 00:00:00 2001 From: Thom Johansen Date: Wed, 7 Mar 2007 19:11:16 +0000 Subject: Use the new DSP callback functionality in firmware/sound.c to deal with SWCODEC stereo width and channel configuration instead of the old more spread out #ifdef based approach. Rename the DSP functions involved for more consistent naming. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12677 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'apps/settings.c') diff --git a/apps/settings.c b/apps/settings.c index 331229190a..0b2f2d9d40 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -642,20 +642,15 @@ void settings_apply_pm_range(void) void sound_settings_apply(void) { -#ifdef HAVE_SW_TONE_CONTROLS +#if CONFIG_CODEC == SWCODEC sound_set_dsp_callback(dsp_callback); #endif sound_set(SOUND_BASS, global_settings.bass); sound_set(SOUND_TREBLE, global_settings.treble); sound_set(SOUND_BALANCE, global_settings.balance); sound_set(SOUND_VOLUME, global_settings.volume); -#if CONFIG_CODEC == SWCODEC - channels_set(global_settings.channel_config); - stereo_width_set(global_settings.stereo_width); -#else sound_set(SOUND_CHANNELS, global_settings.channel_config); sound_set(SOUND_STEREO_WIDTH, global_settings.stereo_width); -#endif #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) sound_set(SOUND_LOUDNESS, global_settings.loudness); sound_set(SOUND_AVC, global_settings.avc); @@ -952,6 +947,7 @@ static void dec_sound_formatter(char *buffer, int buffer_size, int dec = val % 10; snprintf(buffer, buffer_size, "%c%d.%d %s", sign, integer, dec, unit); } + bool set_sound(const unsigned char * string, int* variable, int setting) @@ -970,14 +966,6 @@ bool set_sound(const unsigned char * string, else if (*unit == 'H') talkunit = UNIT_HERTZ; if (!numdec) -#if CONFIG_CODEC == SWCODEC - /* We need to hijack this one and send it off to apps/dsp.c instead of - firmware/sound.c */ - if (setting == SOUND_STEREO_WIDTH) - return set_int(string, unit, talkunit, variable, &stereo_width_set, - steps, min, max, NULL ); - else -#endif return set_int(string, unit, talkunit, variable, sound_callback, steps, min, max, NULL ); else -- cgit v1.2.3