summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorTomasz Malesinski <tomal@rockbox.org>2006-08-12 23:01:52 +0000
committerTomasz Malesinski <tomal@rockbox.org>2006-08-12 23:01:52 +0000
commit28910e7e17786607d0286f2901d77a83d55a7f2c (patch)
treeaf59a984937d627f40dc93b63a17f124bc7aa155 /apps
parentc1810b31f170e887668652ff4e3d76c392a5fb70 (diff)
downloadrockbox-28910e7e17786607d0286f2901d77a83d55a7f2c.tar.gz
rockbox-28910e7e17786607d0286f2901d77a83d55a7f2c.tar.bz2
rockbox-28910e7e17786607d0286f2901d77a83d55a7f2c.zip
Various lower limits and sizes for targets with 1MB of RAM (Iriver iFP7xx).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10556 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/pcmbuf.c4
-rw-r--r--apps/pcmbuf.h6
-rw-r--r--apps/playback.c12
-rw-r--r--apps/playback.h5
-rw-r--r--apps/settings.c7
5 files changed, 34 insertions, 0 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c
index 2075fc66e7..eb8b2a3f3d 100644
--- a/apps/pcmbuf.c
+++ b/apps/pcmbuf.c
@@ -740,7 +740,11 @@ static bool prepare_insert(size_t length)
{
pcmbuf_boost(true);
/* Pre-buffer 1s. */
+#if MEMORYSIZE <= 1
+ if (!LOW_DATA(1))
+#else
if (!LOW_DATA(4))
+#endif
{
logf("pcm starting");
pcmbuf_play_start();
diff --git a/apps/pcmbuf.h b/apps/pcmbuf.h
index 15633d5214..18a6894fee 100644
--- a/apps/pcmbuf.h
+++ b/apps/pcmbuf.h
@@ -19,12 +19,18 @@
#ifndef PCMBUF_H
#define PCMBUF_H
+#if MEMORYSIZE > 1
#define PCMBUF_TARGET_CHUNK 32768 /* This is the target fill size of chunks
on the pcm buffer */
#define PCMBUF_MINAVG_CHUNK 24576 /* This is the minimum average size of
chunks on the pcm buffer (or we run out
of buffer descriptors, which is
non-fatal) */
+#else
+#define PCMBUF_TARGET_CHUNK 16384
+#define PCMBUF_MINAVG_CHUNK 12288
+#endif
+
#define PCMBUF_MIN_CHUNK 4096 /* We try to never feed a chunk smaller than
this to the DMA */
#define PCMBUF_MIX_CHUNK 8192 /* This is the maximum size of one packet
diff --git a/apps/playback.c b/apps/playback.c
index 11d266b92f..04f67ef4fb 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -136,8 +136,13 @@ enum {
};
/* As defined in plugins/lib/xxx2wav.h */
+#if MEMORYSIZE > 1
#define MALLOC_BUFSIZE (512*1024)
#define GUARD_BUFSIZE (32*1024)
+#else
+#define MALLOC_BUFSIZE (100*1024)
+#define GUARD_BUFSIZE (8*1024)
+#endif
/* As defined in plugin.lds */
#if CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002
@@ -2930,11 +2935,14 @@ void audio_set_crossfade(int enable)
size_t size;
bool was_playing = (playing && audio_is_initialized);
size_t offset = 0;
+#if MEMORYSIZE > 1
int seconds = 1;
+#endif
if (!filebuf)
return; /* Audio buffers not yet set up */
+#if MEMORYSIZE > 1
if (enable)
seconds = global_settings.crossfade_fade_out_delay
+ global_settings.crossfade_fade_out_duration;
@@ -2943,6 +2951,10 @@ void audio_set_crossfade(int enable)
seconds += 2;
logf("buf len: %d", seconds);
size = seconds * (NATIVE_FREQUENCY*4);
+#else
+ enable = 0;
+ size = NATIVE_FREQUENCY*2;
+#endif
if (pcmbuf_get_bufsize() == size)
return ;
diff --git a/apps/playback.h b/apps/playback.h
index 2f4e19b04f..98e0784efe 100644
--- a/apps/playback.h
+++ b/apps/playback.h
@@ -33,7 +33,12 @@
/* Not yet implemented. */
#define CODEC_SET_AUDIOBUF_WATERMARK 4
+#if MEMORYSIZE > 1
#define MAX_TRACK 32
+#else
+#define MAX_TRACK 8
+#endif
+
#define MAX_TRACK_MASK (MAX_TRACK-1)
struct track_info {
diff --git a/apps/settings.c b/apps/settings.c
index 3c036d8594..87789bc617 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -269,10 +269,17 @@ static const struct bit_entry rtc_bits[] =
"idle poweroff", "off,1,2,3,4,5,6,7,8,9,10,15,30,45,60" },
{18, S_O(runtime), 0, NULL, NULL },
{18, S_O(topruntime), 0, NULL, NULL },
+#if MEMORYSIZE > 1
{15, S_O(max_files_in_playlist), 10000,
"max files in playlist", NULL }, /* 1000...20000 */
{14, S_O(max_files_in_dir), 400,
"max files in dir", NULL }, /* 50...10000 */
+#else
+ {15, S_O(max_files_in_playlist), 1000,
+ "max files in playlist", NULL }, /* 1000...20000 */
+ {14, S_O(max_files_in_dir), 200,
+ "max files in dir", NULL }, /* 50...10000 */
+#endif
/* battery */
{12, S_O(battery_capacity), BATTERY_CAPACITY_DEFAULT, "battery capacity",
NULL }, /* 1500...3200 for NiMH, 2200...3200 for LiIon,