summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
authorBoris Gjenero <dreamlayers@rockbox.org>2011-11-22 19:59:31 +0000
committerBoris Gjenero <dreamlayers@rockbox.org>2011-11-22 19:59:31 +0000
commit9c07d068da6d52323af3ea161cc73ea2402feb79 (patch)
tree0de7361d06babd99824649796bd9bf1d0b3ed161 /firmware/target
parent5f7d612f17c56f954754294f69daf0e1c88ffa9a (diff)
FS#12378 : Removal of Archos HWCODEC unused code and data. Several large hardware-specific functions are kept for reference or future use.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31043 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/sh/archos/audio-archos.c23
-rw-r--r--firmware/target/sh/archos/i2c-archos.c2
-rw-r--r--firmware/target/sh/archos/mascodec-archos.c6
3 files changed, 10 insertions, 21 deletions
diff --git a/firmware/target/sh/archos/audio-archos.c b/firmware/target/sh/archos/audio-archos.c
index e2d8b6f157..9dfcb9cb97 100644
--- a/firmware/target/sh/archos/audio-archos.c
+++ b/firmware/target/sh/archos/audio-archos.c
@@ -52,10 +52,6 @@ extern unsigned shadow_codec_reg0;
static bool paused; /* playback is paused */
static bool playing; /* We are playing an MP3 stream */
-/* for measuring the play time */
-static long playstart_tick;
-static long cumulative_ticks;
-
/* the registered callback function to ask for more mp3 data */
static void (*callback_for_more)(unsigned char**, size_t*);
@@ -461,6 +457,7 @@ void mp3_shutdown(void)
/* new functions, to be exported to plugin API */
+#if CONFIG_CODEC == MAS3587F
void mp3_play_init(void)
{
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
@@ -469,8 +466,8 @@ void mp3_play_init(void)
playing = false;
paused = true;
callback_for_more = NULL;
- mp3_reset_playtime();
}
+#endif
void mp3_play_data(const unsigned char* start, int size,
void (*get_more)(unsigned char** start, size_t* size) /* callback fn */
@@ -503,13 +500,11 @@ void mp3_play_pause(bool play)
{ /* resume playback */
SCR0 |= 0x80;
paused = false;
- playstart_tick = current_tick;
}
else if (!paused && !play)
{ /* stop playback */
SCR0 &= 0x7f;
paused = true;
- cumulative_ticks += current_tick - playstart_tick;
}
}
@@ -536,20 +531,6 @@ void mp3_play_stop(void)
#endif
}
-long mp3_get_playtime(void)
-{
- if (paused)
- return cumulative_ticks;
- else
- return cumulative_ticks + current_tick - playstart_tick;
-}
-
-void mp3_reset_playtime(void)
-{
- cumulative_ticks = 0;
- playstart_tick = current_tick;
-}
-
bool mp3_is_playing(void)
{
return playing;
diff --git a/firmware/target/sh/archos/i2c-archos.c b/firmware/target/sh/archos/i2c-archos.c
index b3a53240b4..5b415926f2 100644
--- a/firmware/target/sh/archos/i2c-archos.c
+++ b/firmware/target/sh/archos/i2c-archos.c
@@ -234,6 +234,7 @@ int i2c_write(int address, const unsigned char* buf, int count )
return x;
}
+#if 0 /* Currently unused, left for reference and future use */
int i2c_read(int address, unsigned char* buf, int count )
{
int i,x=0;
@@ -250,3 +251,4 @@ int i2c_read(int address, unsigned char* buf, int count )
i2c_stop();
return x;
}
+#endif
diff --git a/firmware/target/sh/archos/mascodec-archos.c b/firmware/target/sh/archos/mascodec-archos.c
index 1eb6e1044d..faa5c7ef2b 100644
--- a/firmware/target/sh/archos/mascodec-archos.c
+++ b/firmware/target/sh/archos/mascodec-archos.c
@@ -30,6 +30,7 @@
static int mas_devread(unsigned long *dest, int len);
+#if 0 /* Currently unused, left for reference and future use */
int mas_default_read(unsigned short *buf)
{
unsigned char *dest = (unsigned char *)buf;
@@ -62,7 +63,9 @@ int mas_default_read(unsigned short *buf)
i2c_end();
return ret;
}
+#endif
+#if CONFIG_CODEC == MAS3507D
int mas_run(unsigned short address)
{
int ret = 0;
@@ -83,6 +86,7 @@ int mas_run(unsigned short address)
i2c_end();
return ret;
}
+#endif
/* note: 'len' is number of 32-bit words, not number of bytes! */
int mas_readmem(int bank, int addr, unsigned long* dest, int len)
@@ -307,6 +311,7 @@ void mas_reset(void)
}
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
+#if 0 /* Currently unused, left for reference and future use */
int mas_direct_config_read(unsigned char reg)
{
int ret = 0;
@@ -340,6 +345,7 @@ int mas_direct_config_read(unsigned char reg)
i2c_end();
return ret;
}
+#endif
int mas_direct_config_write(unsigned char reg, unsigned int val)
{