From fc47f142426b32ad385b904ae53ca736d1f599c9 Mon Sep 17 00:00:00 2001 From: Dan Everton Date: Wed, 11 Apr 2007 09:13:13 +0000 Subject: [PATCH] Move iPod Video hardware equalizer init to audio_init() after the hardware is enabled. Should fix the issue where the hardware equalizer settings would not be reapplied after a restart. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13106 a1c6a512-1295-4272-9138-f99709370657 --- apps/playback.c | 7 +++++++ apps/settings.c | 10 +--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/apps/playback.c b/apps/playback.c index fd1c30c5e5..a4f5bee9fc 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -82,6 +82,10 @@ #include "talk.h" #endif +#ifdef HAVE_WM8758 +#include "menus/eq_menu.h" +#endif + #define PLAYBACK_VOICE @@ -3842,5 +3846,8 @@ void audio_init(void) audio_is_initialized = true; sound_settings_apply(); +#ifdef HAVE_WM8758 + eq_hw_enable(global_settings.eq_hw_enabled); +#endif audio_set_buffer_margin(global_settings.buffer_margin); } /* audio_init */ diff --git a/apps/settings.c b/apps/settings.c index 96bdc8a0f5..b0e84619a6 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -88,10 +88,6 @@ const char rec_base_directory[] = REC_BASE_DIR; #endif #endif /* CONFIG_CODEC == SWCODEC */ -#ifdef HAVE_WM8758 -#include "menus/eq_menu.h" -#endif - #define NVRAM_BLOCK_SIZE 44 #ifdef HAVE_LCD_BITMAP @@ -827,9 +823,9 @@ void settings_apply(void) global_settings.crossfeed_hf_attenuation, global_settings.crossfeed_hf_cutoff); + /* Configure software equalizer, hardware eq is handled in audio_init() */ dsp_set_eq(global_settings.eq_enabled); dsp_set_eq_precut(global_settings.eq_precut); - /* Update all EQ bands */ for(i = 0; i < 5; i++) { dsp_set_eq_coefs(i); } @@ -837,10 +833,6 @@ void settings_apply(void) dsp_dither_enable(global_settings.dithering_enabled); #endif -#ifdef HAVE_WM8758 - eq_hw_enable(global_settings.eq_hw_enabled); -#endif - #ifdef HAVE_SPDIF_POWER spdif_power_enable(global_settings.spdif_enable); #endif