From c652218d14ec017984c5c3fea973112a6f93956d Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sun, 18 Feb 2007 08:46:12 +0000 Subject: [PATCH] Fix remaining CONFIG_TUNER checks. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12385 a1c6a512-1295-4272-9138-f99709370657 --- apps/main_menu.c | 2 +- apps/recorder/radio.c | 2 +- apps/recorder/radio.h | 2 +- apps/settings.h | 8 ++++---- apps/settings_list.c | 6 +++--- apps/sound_menu.c | 2 +- firmware/drivers/fmradio.c | 2 +- firmware/drivers/power.c | 4 ++-- firmware/export/audio.h | 8 ++++---- firmware/export/power.h | 2 +- firmware/export/tuner.h | 4 ++-- firmware/target/arm/iriver/h10/power-h10.c | 4 ++-- firmware/target/arm/iriver/ifp7xx/power-ifp7xx.c | 4 ++-- firmware/target/coldfire/iriver/h100/power-h100.c | 4 ++-- firmware/target/coldfire/iriver/h300/power-h300.c | 4 ++-- uisimulator/common/fmradio.c | 2 +- 16 files changed, 30 insertions(+), 30 deletions(-) diff --git a/apps/main_menu.c b/apps/main_menu.c index d9419c3a2b..e3cc88fdda 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c @@ -143,7 +143,7 @@ bool main_menu(void) items[i].desc = ID2P(LANG_CUSTOM_THEME); items[i++].function = custom_theme_browse; -#ifdef CONFIG_TUNER +#if CONFIG_TUNER if(radio_hardware_present()) { items[i].desc = ID2P(LANG_FM_RADIO); items[i++].function = radio_screen; diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index a1821de58f..5ee5be14fd 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c @@ -61,7 +61,7 @@ #include "dir.h" #include "action.h" -#ifdef CONFIG_TUNER +#if CONFIG_TUNER #if CONFIG_KEYPAD == RECORDER_PAD #define FM_RECORD diff --git a/apps/recorder/radio.h b/apps/recorder/radio.h index a4f9f1a978..bbc35b71aa 100644 --- a/apps/recorder/radio.h +++ b/apps/recorder/radio.h @@ -23,7 +23,7 @@ #include "fmradio.h" #endif -#ifdef CONFIG_TUNER +#if CONFIG_TUNER void radio_load_presets(char *filename); void radio_init(void); bool radio_screen(void); diff --git a/apps/settings.h b/apps/settings.h index af1d65d78f..52a45c18ae 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -273,7 +273,7 @@ struct system_status #ifdef HAVE_DIRCACHE int dircache_size; /* directory cache structure last size, 22 bits */ #endif -#ifdef CONFIG_TUNER +#if CONFIG_TUNER int last_frequency; /* Last frequency for resuming, in FREQ_STEP units, relative to MIN_FREQ */ #endif @@ -404,7 +404,7 @@ struct user_settings bool resume; /* resume option: 0=off, 1=on */ -#ifdef CONFIG_TUNER +#if CONFIG_TUNER unsigned char fmr_file[MAX_FILENAME+1]; /* last fmr preset */ #endif unsigned char font_file[MAX_FILENAME+1]; /* last font */ @@ -476,7 +476,7 @@ struct user_settings bool fade_on_stop; /* fade on pause/unpause/stop */ bool caption_backlight; /* turn on backlight at end and start of track */ -#ifdef CONFIG_TUNER +#if CONFIG_TUNER int fm_freq_step; /* Frequency step for manual tuning, in kHz */ bool fm_force_mono; /* Forces Mono mode if true */ bool fm_full_range; /* Enables full 10MHz-160MHz range if true, else @@ -663,7 +663,7 @@ struct user_settings int unplug_rw; /* time in s to rewind when pausing */ bool unplug_autoresume; /* disable auto-resume if no phones */ #endif -#ifdef CONFIG_TUNER +#if CONFIG_TUNER int fm_region; #endif bool audioscrobbler; /* Audioscrobbler logging */ diff --git a/apps/settings_list.c b/apps/settings_list.c index ee70e8c40b..be693d1801 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -480,7 +480,7 @@ const struct settings_list settings[] = { LANG_CAR_ADAPTER_MODE, false, "car adapter mode", NULL), #endif /* tuner */ -#ifdef CONFIG_TUNER +#if CONFIG_TUNER OFFON_SETTING(0,fm_force_mono, LANG_FM_MONO_MODE, false,"force fm mono", NULL), SYSTEM_SETTING(NVRAM(4),last_frequency,0), @@ -1022,7 +1022,7 @@ const struct settings_list settings[] = { OFFON_SETTING(0,unplug_autoresume,LANG_UNPLUG_DISABLE_AUTORESUME,false, "disable autoresume if phones not present",NULL), #endif -#ifdef CONFIG_TUNER +#if CONFIG_TUNER {F_T_INT,&global_settings.fm_region,LANG_FM_REGION,INT(0), "fm_region","eu,us,jp,kr",UNUSED}, #endif @@ -1036,7 +1036,7 @@ const struct settings_list settings[] = { #endif /** settings not in the old config blocks **/ -#ifdef CONFIG_TUNER +#if CONFIG_TUNER FILENAME_SETTING(0, fmr_file, "fmr", "", FMPRESET_PATH "/", ".fmr", MAX_FILENAME+1), #endif diff --git a/apps/sound_menu.c b/apps/sound_menu.c index 07f9d4b352..c75b527db7 100644 --- a/apps/sound_menu.c +++ b/apps/sound_menu.c @@ -41,7 +41,7 @@ #include "sound.h" #ifdef HAVE_RECORDING #include "audio.h" -#ifdef CONFIG_TUNER +#if CONFIG_TUNER #include "radio.h" #endif #endif diff --git a/firmware/drivers/fmradio.c b/firmware/drivers/fmradio.c index b7b245e0ce..c64d06e066 100644 --- a/firmware/drivers/fmradio.c +++ b/firmware/drivers/fmradio.c @@ -23,7 +23,7 @@ #include "debug.h" #include "system.h" -#ifdef CONFIG_TUNER +#if CONFIG_TUNER /* Signals: DI (Data In) - PB0 (doubles as data pin for the LCD) diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c index 78e70f7466..9334b8e54a 100644 --- a/firmware/drivers/power.c +++ b/firmware/drivers/power.c @@ -34,7 +34,7 @@ bool charger_enabled; #endif -#ifdef CONFIG_TUNER +#if CONFIG_TUNER static bool powered = false; @@ -59,7 +59,7 @@ bool radio_power(bool status) return old_status; } -#endif /* #ifdef CONFIG_TUNER */ +#endif /* #if CONFIG_TUNER */ #ifndef SIMULATOR diff --git a/firmware/export/audio.h b/firmware/export/audio.h index 716b1ad5d3..ebcb316cd9 100644 --- a/firmware/export/audio.h +++ b/firmware/export/audio.h @@ -136,14 +136,14 @@ enum audio_sources #ifdef HAVE_SPDIF_IN AUDIO_SRC_SPDIF, /* monitor spdif */ #endif -#if defined(HAVE_FMRADIO_IN) || defined(CONFIG_TUNER) +#if defined(HAVE_FMRADIO_IN) || CONFIG_TUNER AUDIO_SRC_FMRADIO, /* monitor fm radio */ #endif /* define new audio sources above this line */ AUDIO_SOURCE_LIST_END, - /* AUDIO_SRC_FMRADIO must be declared #ifdef CONFIG_TUNER but is not in + /* AUDIO_SRC_FMRADIO must be declared #if CONFIG_TUNER but is not in the list of recordable sources. HAVE_FMRADIO_IN implies CONFIG_TUNER. */ -#if defined(HAVE_FMRADIO_IN) || !defined(CONFIG_TUNER) +#if defined(HAVE_FMRADIO_IN) || (CONFIG_TUNER == 0) AUDIO_NUM_SOURCES = AUDIO_SOURCE_LIST_END, #else AUDIO_NUM_SOURCES = AUDIO_SOURCE_LIST_END-1, @@ -155,7 +155,7 @@ enum audio_sources /* selects an audio source for recording or playback */ #define SRCF_PLAYBACK 0x0000 /* default */ #define SRCF_RECORDING 0x1000 -#ifdef CONFIG_TUNER +#if CONFIG_TUNER /* for AUDIO_SRC_FMRADIO */ #define SRCF_FMRADIO_PLAYING 0x0000 /* default */ #define SRCF_FMRADIO_PAUSED 0x2000 diff --git a/firmware/export/power.h b/firmware/export/power.h index 9eed1929fe..cafd6f87c8 100644 --- a/firmware/export/power.h +++ b/firmware/export/power.h @@ -47,7 +47,7 @@ void spdif_power_enable(bool on); bool spdif_powered(void); #endif -#ifdef CONFIG_TUNER +#if CONFIG_TUNER extern bool radio_power(bool status); extern bool radio_powered(void); #endif diff --git a/firmware/export/tuner.h b/firmware/export/tuner.h index 48d9bc97d1..0a13613711 100644 --- a/firmware/export/tuner.h +++ b/firmware/export/tuner.h @@ -37,7 +37,7 @@ #define RADIO_STEREO 2 #define RADIO_ALL 3 /* debug */ -#ifdef CONFIG_TUNER +#if CONFIG_TUNER #if (CONFIG_TUNER & S1A0903X01) void samsung_set(int setting, int value); @@ -49,6 +49,6 @@ void philips_set(int setting, int value); int philips_get(int setting); #endif -#endif /* #ifdef CONFIG_TUNER */ +#endif /* #if CONFIG_TUNER */ #endif diff --git a/firmware/target/arm/iriver/h10/power-h10.c b/firmware/target/arm/iriver/h10/power-h10.c index d53bf88fa6..a3be8125b9 100644 --- a/firmware/target/arm/iriver/h10/power-h10.c +++ b/firmware/target/arm/iriver/h10/power-h10.c @@ -37,7 +37,7 @@ bool charger_enabled; #endif #if 0 -#ifdef CONFIG_TUNER +#if CONFIG_TUNER static bool powered = false; @@ -62,7 +62,7 @@ bool radio_power(bool status) return old_status; } -#endif /* #ifdef CONFIG_TUNER */ +#endif /* #if CONFIG_TUNER */ #endif void power_init(void) diff --git a/firmware/target/arm/iriver/ifp7xx/power-ifp7xx.c b/firmware/target/arm/iriver/ifp7xx/power-ifp7xx.c index 6c5114a84e..1c3cc2b4bf 100644 --- a/firmware/target/arm/iriver/ifp7xx/power-ifp7xx.c +++ b/firmware/target/arm/iriver/ifp7xx/power-ifp7xx.c @@ -27,7 +27,7 @@ #include "logf.h" #include "usb.h" -#ifdef CONFIG_TUNER +#if CONFIG_TUNER static bool powered = false; @@ -44,7 +44,7 @@ bool radio_power(bool status) return old_status; } -#endif /* #ifdef CONFIG_TUNER */ +#endif /* #if CONFIG_TUNER */ #ifndef SIMULATOR diff --git a/firmware/target/coldfire/iriver/h100/power-h100.c b/firmware/target/coldfire/iriver/h100/power-h100.c index 9effeef7c8..75c8bea9dd 100644 --- a/firmware/target/coldfire/iriver/h100/power-h100.c +++ b/firmware/target/coldfire/iriver/h100/power-h100.c @@ -25,7 +25,7 @@ #include "spdif.h" -#ifdef CONFIG_TUNER +#if CONFIG_TUNER static bool powered = false; @@ -41,7 +41,7 @@ bool radio_power(bool status) return old_status; } -#endif /* #ifdef CONFIG_TUNER */ +#endif /* #if CONFIG_TUNER */ #ifndef SIMULATOR diff --git a/firmware/target/coldfire/iriver/h300/power-h300.c b/firmware/target/coldfire/iriver/h300/power-h300.c index 3d726d0714..2875fa2a47 100644 --- a/firmware/target/coldfire/iriver/h300/power-h300.c +++ b/firmware/target/coldfire/iriver/h300/power-h300.c @@ -25,7 +25,7 @@ #include "pcf50606.h" -#ifdef CONFIG_TUNER +#if CONFIG_TUNER static bool powered = false; @@ -41,7 +41,7 @@ bool radio_power(bool status) return old_status; } -#endif /* #ifdef CONFIG_TUNER */ +#endif /* #if CONFIG_TUNER */ #ifndef SIMULATOR diff --git a/uisimulator/common/fmradio.c b/uisimulator/common/fmradio.c index 4ce4d66976..ea6d6f6aa5 100644 --- a/uisimulator/common/fmradio.c +++ b/uisimulator/common/fmradio.c @@ -21,7 +21,7 @@ #include "debug.h" #include "tuner.h" -#ifdef CONFIG_TUNER +#if CONFIG_TUNER static int frequency = 0; static bool mono = false;