diff --git a/firmware/SOURCES b/firmware/SOURCES index f43f331df7..1a3a85f4fb 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -179,6 +179,9 @@ drivers/tuner/s1a0903x01.c #if (CONFIG_TUNER & TEA5767) drivers/tuner/tea5767.c #endif /* (CONFIG_TUNER & TEA5767) */ +#if (CONFIG_TUNER & SI4700) +drivers/tuner/si4700.c +#endif /* (CONFIG_TUNER & SI4700) */ #endif /*SIMULATOR */ #endif /* CONFIG_TUNER */ diff --git a/firmware/drivers/tuner/si4700.c b/firmware/drivers/tuner/si4700.c new file mode 100644 index 0000000000..9233afae24 --- /dev/null +++ b/firmware/drivers/tuner/si4700.c @@ -0,0 +1,47 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Tuner "middleware" for Silicon Labs SI4700 chip + * + * Copyright (C) 2008 ??? + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#include "config.h" +#include +#include +#include +#include "kernel.h" +#include "tuner.h" /* tuner abstraction interface */ +#include "fmradio.h" +#include "fmradio_i2c.h" /* physical interface driver */ + +/* tuner abstraction layer: set something to the tuner */ +int si4700_set(int setting, int value) +{ + (void)setting; + (void)value; + + return 1; +} + +/* tuner abstraction layer: read something from the tuner */ +int si4700_get(int setting) +{ + (void)setting; + + return -1; +} diff --git a/firmware/export/si4700.h b/firmware/export/si4700.h new file mode 100644 index 0000000000..a740ae03ab --- /dev/null +++ b/firmware/export/si4700.h @@ -0,0 +1,36 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * + * $Id$ + * + * Tuner header for the Silicon Labs SI4700 + * + * Copyright (C) 2008 Dave Chapman + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#ifndef _SI4700_H_ +#define _SI4700_H_ + +int si4700_set(int setting, int value); +int si4700_get(int setting); + +#ifndef CONFIG_TUNER_MULTI +#define tuner_set si4700_set +#define tuner_get si4700_get +#endif + +#endif /* _SI4700_H_ */ diff --git a/firmware/export/tuner.h b/firmware/export/tuner.h index a081472fa1..8f1839a7bb 100644 --- a/firmware/export/tuner.h +++ b/firmware/export/tuner.h @@ -102,6 +102,11 @@ extern int (*tuner_get)(int setting); #include "tea5767.h" #endif +/* Silicon Labs 4700 */ +#if (CONFIG_TUNER & SI4700) +#include "si4700.h" +#endif + #endif /* SIMULATOR */ /* Additional messages that get enumerated after tuner driver headers */ diff --git a/firmware/export/usb.h b/firmware/export/usb.h index 4275fa9c6a..00517b2475 100644 --- a/firmware/export/usb.h +++ b/firmware/export/usb.h @@ -64,6 +64,7 @@ enum { #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ (CONFIG_KEYPAD == SANSA_C200_PAD) || \ (CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ + (CONFIG_KEYPAD == SANSA_FUZE_PAD) || \ (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) #define USBPOWER_BUTTON BUTTON_SELECT #define USBPOWER_BTN_IGNORE BUTTON_POWER diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c index 828e025870..291b7cbef0 100644 --- a/firmware/target/arm/as3525/ata_sd_as3525.c +++ b/firmware/target/arm/as3525/ata_sd_as3525.c @@ -690,4 +690,28 @@ tCardInfo *card_get_info_target(int card_no) return &card; } +bool card_detect_target(void) +{ +#ifdef HAVE_HOTSWAP + /* TODO */ + return false; +#else + return false; +#endif +} + +#ifdef HAVE_HOTSWAP +void card_enable_monitoring_target(bool on) +{ + if (on) + { + /* TODO */ + } + else + { + /* TODO */ + } +} +#endif + #endif /* BOOTLOADER */ diff --git a/firmware/target/arm/as3525/pcm-as3525.c b/firmware/target/arm/as3525/pcm-as3525.c index e2c31ad047..d91450c9cf 100644 --- a/firmware/target/arm/as3525/pcm-as3525.c +++ b/firmware/target/arm/as3525/pcm-as3525.c @@ -74,3 +74,49 @@ const void * pcm_play_dma_get_peak_buffer(int *count) { return NULL; } + + +/**************************************************************************** + ** Recording DMA transfer + **/ +#ifdef HAVE_RECORDING +void pcm_rec_lock(void) +{ +} + +void pcm_rec_unlock(void) +{ +} + +void pcm_record_more(void *start, size_t size) +{ + (void)start; + (void)size; +} + +void pcm_rec_dma_stop(void) +{ +} + +void pcm_rec_dma_start(void *addr, size_t size) +{ + (void)addr; + (void)size; +} + +void pcm_rec_dma_close(void) +{ +} + + +void pcm_rec_dma_init(void) +{ +} + + +const void * pcm_rec_dma_get_peak_buffer(int *count) +{ + (void)count; +} + +#endif /* HAVE_RECORDING */ diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c index 7a5c1156ff..84ef108b62 100644 --- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c +++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c @@ -338,6 +338,11 @@ bool lcd_enabled(void) return display_on; } +void lcd_sleep(void) +{ + /* TODO */ +} + /*** update functions ***/ /* Performance function to blit a YUV bitmap directly to the LCD diff --git a/firmware/target/arm/as3525/sansa-e200v2/system-target.h b/firmware/target/arm/as3525/sansa-e200v2/system-target.h index b712d1c124..19ddd03b7c 100644 --- a/firmware/target/arm/as3525/sansa-e200v2/system-target.h +++ b/firmware/target/arm/as3525/sansa-e200v2/system-target.h @@ -24,5 +24,7 @@ #include "system-arm.h" #define CPUFREQ_MAX 250000000 +#define CPUFREQ_DEFAULT 250000000 +#define CPUFREQ_NORMAL 250000000 #endif /* SYSTEM_TARGET_H */ diff --git a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c index 36006beffb..dd6d4552e0 100644 --- a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c +++ b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c @@ -199,8 +199,9 @@ static void _display_on(void) } /* I'm guessing this function is lcd_enable, but it may not be... */ -void lcd_enable(int r0) +void lcd_enable(bool on) { + int r0 = on; #if 0 r4 = 0x1db12; [r4] = 1; @@ -249,6 +250,36 @@ void lcd_enable(int r0) #endif } +bool lcd_enabled(void) +{ + return display_on; +} + +void lcd_sleep(void) +{ + /* TODO */ +} + +/*** update functions ***/ + +/* Performance function to blit a YUV bitmap directly to the LCD + * src_x, src_y, width and height should be even + * x, y, width and height have to be within LCD bounds + */ +void lcd_blit_yuv(unsigned char * const src[3], + int src_x, int src_y, int stride, + int x, int y, int width, int height) +{ + (void)src; + (void)src_x; + (void)src_y; + (void)stride; + (void)x; + (void)y; + (void)width; + (void)height; +} + void lcd_init_device() { as3525_dbop_init(); diff --git a/firmware/target/arm/as3525/sansa-fuze/system-target.h b/firmware/target/arm/as3525/sansa-fuze/system-target.h index b712d1c124..553ce90846 100644 --- a/firmware/target/arm/as3525/sansa-fuze/system-target.h +++ b/firmware/target/arm/as3525/sansa-fuze/system-target.h @@ -24,5 +24,7 @@ #include "system-arm.h" #define CPUFREQ_MAX 250000000 +#define CPUFREQ_DEFAULT 250000000 +#define CPUFREQ_NORMAL 250000000 #endif /* SYSTEM_TARGET_H */ diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index 7653985d19..f42387d024 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c @@ -167,14 +167,16 @@ static void sdram_init(void) MPMC_DYNAMIC_tRRD = 2; MPMC_DYNAMIC_tMRD = 2; -#if defined(SANSA_CLIP) || defined(SANSA_M200V4) || defined(SANSA_FUZE) -# define MEMORY_MODEL 0x21 - /* 16 bits external bus, low power SDRAM, 16 Mbits = 2 Mbytes */ -#elif defined(SANSA_E200V2) -# define MEMORY_MODEL 0x5 - /* 16 bits external bus, high performance SDRAM, 64 Mbits = 8 Mbytes */ +#if defined(SANSA_CLIP) || defined(SANSA_M200V4) +/* 16 bits external bus, low power SDRAM, 16 Mbits = 2 Mbytes */ +#define MEMORY_MODEL 0x21 + +#elif defined(SANSA_E200V2) || defined(SANSA_FUZE) +/* 16 bits external bus, high performance SDRAM, 64 Mbits = 8 Mbytes */ +#define MEMORY_MODEL 0x5 + #else -# error "The external memory in your player is unknown" +#error "The external memory in your player is unknown" #endif MPMC_DYNAMIC_RASCAS_0 = (2<<8)|2; /* CAS & RAS latency = 2 clock cycles */ diff --git a/tools/configure b/tools/configure index 42015df145..a817f5db67 100755 --- a/tools/configure +++ b/tools/configure @@ -1743,7 +1743,7 @@ fi target_id=53 modelname="fuze" target="-DSANSA_FUZE" - memory=2 + memory=8 arm9tdmicc bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" bmp2rb_native="$rootdir/tools/bmp2rb -f 4"