diff options
| author | Frank Gevaerts <frank@gevaerts.be> | 2010-08-31 19:06:04 +0000 |
|---|---|---|
| committer | Frank Gevaerts <frank@gevaerts.be> | 2010-08-31 19:06:04 +0000 |
| commit | a1cf4ced837327c718061feedf96d512328f5cc8 (patch) | |
| tree | 2c51950d2c48715aede1e3d4d3e0a1a137885378 | |
| parent | b9201e3c6fcfdcb2d1e14f5593fc0ff98af40290 (diff) | |
| download | rockbox-a1cf4ced837327c718061feedf96d512328f5cc8.zip rockbox-a1cf4ced837327c718061feedf96d512328f5cc8.tar.gz rockbox-a1cf4ced837327c718061feedf96d512328f5cc8.tar.bz2 rockbox-a1cf4ced837327c718061feedf96d512328f5cc8.tar.xz | |
Unify 32mb and 64mb ipod video builds - FS#11580
Since memory on 32mb ipod videos is mapped twice, a 64mb build still has codecs and plugins mapped in a usable area. This means that all that needs to be done to support 32mb and 64mb boards with the same build is to adjust audiobufend to avoid using more than the actually present RAM.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27960 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/debug_menu.c | 10 | ||||
| -rw-r--r-- | apps/main.c | 7 | ||||
| -rw-r--r-- | firmware/export/buffer.h | 5 | ||||
| -rw-r--r-- | firmware/export/config/ipodvideo.h | 13 | ||||
| -rw-r--r-- | firmware/target/arm/ipod/app.lds | 4 | ||||
| -rw-r--r-- | manual/configure_rockbox/system_options.tex | 6 | ||||
| -rwxr-xr-x | tools/configure | 1 |
7 files changed, 30 insertions, 16 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index ba01147..c0a476d 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -1601,12 +1601,10 @@ static bool view_battery(void) lcd_putsf(0, 7, "Headphone: %s", headphone ? "connected" : "disconnected"); #ifdef IPOD_VIDEO - x = (adc_read(ADC_4066_ISTAT) * 2400) / -#if MEM == 64 - (1024 * 2); -#else - (1024 * 3); -#endif + if(probed_ramsize == 64) + x = (adc_read(ADC_4066_ISTAT) * 2400) / (1024 * 2); + else + x = (adc_read(ADC_4066_ISTAT) * 2400) / (1024 * 3); lcd_putsf(0, 8, "Ibat: %d mA", x); lcd_putsf(0, 9, "Vbat * Ibat: %d mW", x * y / 1000); #endif diff --git a/apps/main.c b/apps/main.c index ceaa85f..0c2f075 100644 --- a/apps/main.c +++ b/apps/main.c @@ -422,6 +422,13 @@ static void init(void) #endif system_init(); +#if defined(IPOD_VIDEO) + audiobufend=(unsigned char *)audiobufend_lds; + if(MEM==64 && probed_ramsize!=64) + { + audiobufend -= (32<<20); + } +#endif kernel_init(); #ifdef HAVE_ADJUSTABLE_CPU_FREQ diff --git a/firmware/export/buffer.h b/firmware/export/buffer.h index ae8886b..f0525ed 100644 --- a/firmware/export/buffer.h +++ b/firmware/export/buffer.h @@ -24,7 +24,12 @@ #include "config.h" /* defined in linker script */ #if (CONFIG_PLATFORM & PLATFORM_NATIVE) +#if defined(IPOD_VIDEO) +extern unsigned char *audiobufend_lds[]; +unsigned char *audiobufend; +#else extern unsigned char audiobufend[]; +#endif #else extern unsigned char *audiobufend; #endif diff --git a/firmware/export/config/ipodvideo.h b/firmware/export/config/ipodvideo.h index e0c3bfb..82391d1 100644 --- a/firmware/export/config/ipodvideo.h +++ b/firmware/export/config/ipodvideo.h @@ -136,15 +136,10 @@ #define HAVE_HEADPHONE_DETECTION /* Type of mobile power */ -#if (MEM==32) /* this is the 30GB-model */ -# define BATTERY_CAPACITY_DEFAULT 400 /* default battery capacity for the 30GB model */ -# define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ -# define BATTERY_CAPACITY_MAX 1000 /* max. capacity selectable */ -#else /* these are the 60/80GB-models */ -# define BATTERY_CAPACITY_DEFAULT 600 /* default battery capacity for the 60/80GB model */ -# define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */ -# define BATTERY_CAPACITY_MAX 1400 /* max. capacity selectable */ -#endif +#define BATTERY_CAPACITY_DEFAULT 400 /* default battery capacity for the */ + /* 30GB model. 60/80GB would have 600 */ +#define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ +#define BATTERY_CAPACITY_MAX 1400 /* max. capacity selectable */ #define BATTERY_CAPACITY_INC 50 /* capacity increment */ #define BATTERY_TYPES_COUNT 1 /* only one type */ diff --git a/firmware/target/arm/ipod/app.lds b/firmware/target/arm/ipod/app.lds index ec26fdb..f8e6906 100644 --- a/firmware/target/arm/ipod/app.lds +++ b/firmware/target/arm/ipod/app.lds @@ -192,7 +192,11 @@ SECTIONS .audiobufend ENDAUDIOADDR (NOLOAD) : { +#ifdef IPOD_VIDEO + audiobufend_lds = .; +#else audiobufend = .; +#endif _audiobufend = .; } > DRAM diff --git a/manual/configure_rockbox/system_options.tex b/manual/configure_rockbox/system_options.tex index c9e526a..9e70a0e 100644 --- a/manual/configure_rockbox/system_options.tex +++ b/manual/configure_rockbox/system_options.tex @@ -38,7 +38,7 @@ \opt{ipodmini}{400~mAh (1G) or 630~mAh (2G)}% \opt{ipodcolor}{700~mAh}% \opt{ipodnano}{300~mAh}% - \opt{ipodvideo}{400~mAh (30~GB) or 600~mAh (60/80~GB)}% + \opt{ipodvideo}{400~mAh}% \opt{ipod4g}{630~mAh}% \opt{ipod3g}{630~mAh}% \opt{ipod1g2g}{1200~mAh}% @@ -52,6 +52,10 @@ calculation. Changing this setting has no effect whatsoever on actual battery life. This setting only affects the accuracy of the runtime estimation as shown on screen. + \opt{ipodvideo}{Rockbox does not automatically distinguish + between the 60/80~GB models and the 30~GB models which determine the + default value. If your \dap{} is a 60~GB or 80~GB model + set the value to 600~mAh for more accuracy in the runtime estimation.} \opt{iaudiom3,iaudiom5,iaudiox5}{Rockbox does not automatically distinguish between the ``L'' models and the ``simple'' models which determine the default value. If your \dap{} is an diff --git a/tools/configure b/tools/configure index e554c3d..1742e28 100755 --- a/tools/configure +++ b/tools/configure @@ -1467,6 +1467,7 @@ fi target_id=15 modelname="ipodvideo" target="-DIPOD_VIDEO" + memory=64 # always. This is reduced at runtime if needed arm7tdmicc tool="$rootdir/tools/scramble -add=ipvd" bmp2rb_mono="$rootdir/tools/bmp2rb -f 0" |