From 31eda597200bccbfa47dbe05f3f3735590c83a13 Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Mon, 22 Feb 2010 02:42:58 +0000 Subject: as3525v2: build normal firmware properly (Clipv2/+) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24840 a1c6a512-1295-4272-9138-f99709370657 --- apps/debug_menu.c | 2 +- apps/plugins/plugin.lds | 4 ++-- firmware/SOURCES | 2 ++ firmware/export/config/sansaclipplus.h | 4 ++-- firmware/export/config/sansaclipv2.h | 4 ++-- firmware/target/arm/as3525/audio-as3525.c | 7 +++++++ firmware/target/arm/as3525/sd-as3525v2.c | 2 +- firmware/target/arm/as3525/system-as3525.c | 2 +- 8 files changed, 18 insertions(+), 9 deletions(-) diff --git a/apps/debug_menu.c b/apps/debug_menu.c index c8f7cf14f0..83f9b4b716 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -104,7 +104,7 @@ #if CONFIG_CPU == DM320 || CONFIG_CPU == S3C2440 || CONFIG_CPU == TCC7801 \ || CONFIG_CPU == IMX31L || CONFIG_CPU == AS3525 || CONFIG_CPU == JZ4732 \ - || defined(CPU_S5L870X) + || defined(CPU_S5L870X) || CONFIG_CPU == AS3525v2 #include "debug-target.h" #endif diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds index fe38b646d9..82d6354b24 100644 --- a/apps/plugins/plugin.lds +++ b/apps/plugins/plugin.lds @@ -65,7 +65,7 @@ OUTPUT_FORMAT(elf32-littlemips) #include "cpu.h" #define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET - PLUGIN_BUFFER_SIZE - CODEC_SIZE - TTB_SIZE -#elif CONFIG_CPU==AS3525 +#elif CONFIG_CPU==AS3525 || CONFIG_CPU==AS3525v2 #include "cpu.h" #define DRAMORIG DRAM_ORIG #ifdef AMS_LOWMEM @@ -130,7 +130,7 @@ OUTPUT_FORMAT(elf32-littlemips) #define IRAM DRAM #define IRAMSIZE 0 -#elif CONFIG_CPU==AS3525 +#elif CONFIG_CPU==AS3525 || CONFIG_CPU==AS3525v2 #ifdef AMS_LOWMEM #define IRAMSIZE 0 /* simulates no IRAM since codec is already entirely in IRAM */ #define CODEC_ORIGIN (IRAM_ORIG + IRAM_SIZE - CODEC_SIZE) diff --git a/firmware/SOURCES b/firmware/SOURCES index eb3e88fd8b..04404f7960 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -423,7 +423,9 @@ drivers/generic_i2c.c target/arm/adc-as3514.c target/arm/as3525/audio-as3525.c target/arm/as3525/debug-as3525.c +#if CONFIG_TUNER target/arm/as3525/fmradio-i2c-as3525.c +#endif /* CONFIG_TUNER */ target/arm/as3525/i2s-as3525.c target/arm/as3525/pcm-as3525.c #endif /* BOOTLOADER */ diff --git a/firmware/export/config/sansaclipplus.h b/firmware/export/config/sansaclipplus.h index ba70fdd203..216f44c4d6 100644 --- a/firmware/export/config/sansaclipplus.h +++ b/firmware/export/config/sansaclipplus.h @@ -24,7 +24,7 @@ /* Define bitmask of input sources - recordable bitmask can be defined explicitly if different */ -#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO) +#define INPUT_SRC_CAPS (SRC_CAP_MIC /*| SRC_CAP_FMRADIO*/) /* define this if you have a bitmap LCD display */ #define HAVE_LCD_BITMAP @@ -119,7 +119,7 @@ #define AB_REPEAT_ENABLE 1 /* FM Tuner */ -#define CONFIG_TUNER SI4700 /* in fact SI4702 */ +//#define CONFIG_TUNER SI4700 /* in fact SI4702 */ //#define HAVE_TUNER_PWR_CTRL /* Define this for LCD backlight available */ diff --git a/firmware/export/config/sansaclipv2.h b/firmware/export/config/sansaclipv2.h index 513b093f2f..26c54a4509 100644 --- a/firmware/export/config/sansaclipv2.h +++ b/firmware/export/config/sansaclipv2.h @@ -24,7 +24,7 @@ /* Define bitmask of input sources - recordable bitmask can be defined explicitly if different */ -#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO) +#define INPUT_SRC_CAPS (SRC_CAP_MIC /*| SRC_CAP_FMRADIO*/) /* define this if you have a bitmap LCD display */ #define HAVE_LCD_BITMAP @@ -122,7 +122,7 @@ #define AB_REPEAT_ENABLE 1 /* FM Tuner */ -#define CONFIG_TUNER SI4700 /* in fact SI4702 */ +//#define CONFIG_TUNER SI4700 /* in fact SI4702 */ //#define HAVE_TUNER_PWR_CTRL /* Define this for LCD backlight available */ diff --git a/firmware/target/arm/as3525/audio-as3525.c b/firmware/target/arm/as3525/audio-as3525.c index b616153eae..27cbaac3d8 100644 --- a/firmware/target/arm/as3525/audio-as3525.c +++ b/firmware/target/arm/as3525/audio-as3525.c @@ -47,7 +47,9 @@ void audio_input_mux(int source, unsigned flags) case AUDIO_SRC_PLAYBACK: if (source != last_source) { +#if defined(HAVE_RECORDING) || defined(HAVE_FMRADIO_IN) audiohw_set_monitor(false); +#endif #ifdef HAVE_RECORDING audiohw_disable_recording(); #endif @@ -64,6 +66,8 @@ void audio_input_mux(int source, unsigned flags) break; #endif +#if (INPUT_SRC_CAPS & SRC_CAP_FMRADIO) + case AUDIO_SRC_FMRADIO: /* recording and playback */ if (source == last_source #ifdef HAVE_RECORDING @@ -86,9 +90,12 @@ void audio_input_mux(int source, unsigned flags) #ifdef HAVE_RECORDING audiohw_disable_recording(); #endif +#if defined(HAVE_RECORDING) || defined(HAVE_FMRADIO_IN) audiohw_set_monitor(true); /* line 2 analog audio path */ +#endif } break; +#endif /* (INPUT_SRC_CAPS & SRC_CAP_FMRADIO) */ } last_source = source; diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c index 338a6d669f..eef368cfc6 100644 --- a/firmware/target/arm/as3525/sd-as3525v2.c +++ b/firmware/target/arm/as3525/sd-as3525v2.c @@ -191,7 +191,7 @@ static const char sd_thread_name[] = "ata/sd"; static struct mutex sd_mtx SHAREDBSS_ATTR; static struct event_queue sd_queue; #ifndef BOOTLOADER -static bool sd_enabled = false; +bool sd_enabled = false; #endif static struct wakeup transfer_completion_signal; diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index 4473e1ce59..bd6069ea39 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c @@ -336,7 +336,7 @@ void system_init(void) #ifndef BOOTLOADER /* Initialize power management settings */ ascodec_write(AS3514_CVDD_DCDC3, AS314_CP_DCDC3_SETTING); -#ifdef CONFIG_TUNER +#if CONFIG_TUNER fmradio_i2c_init(); #endif #endif /* !BOOTLOADER */ -- cgit v1.2.3