diff options
author | Boris Gjenero <dreamlayers@rockbox.org> | 2011-11-22 19:59:31 +0000 |
---|---|---|
committer | Boris Gjenero <dreamlayers@rockbox.org> | 2011-11-22 19:59:31 +0000 |
commit | 9c07d068da6d52323af3ea161cc73ea2402feb79 (patch) | |
tree | 0de7361d06babd99824649796bd9bf1d0b3ed161 /firmware | |
parent | 5f7d612f17c56f954754294f69daf0e1c88ffa9a (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')
-rw-r--r-- | firmware/export/mascodec.h | 6 | ||||
-rw-r--r-- | firmware/export/mp3_playback.h | 4 | ||||
-rw-r--r-- | firmware/target/sh/archos/audio-archos.c | 23 | ||||
-rw-r--r-- | firmware/target/sh/archos/i2c-archos.c | 2 | ||||
-rw-r--r-- | firmware/target/sh/archos/mascodec-archos.c | 6 |
5 files changed, 16 insertions, 25 deletions
diff --git a/firmware/export/mascodec.h b/firmware/export/mascodec.h index f10dc3f1ca..00690ae7dd 100644 --- a/firmware/export/mascodec.h +++ b/firmware/export/mascodec.h @@ -21,14 +21,16 @@ #ifndef _MASCODEC_H_ #define _MASCODEC_H_ -int mas_default_read(unsigned short *buf); +/* unused: int mas_default_read(unsigned short *buf); */ +#if CONFIG_CODEC == MAS3507D int mas_run(unsigned short address); +#endif int mas_readmem(int bank, int addr, unsigned long* dest, int len); int mas_writemem(int bank, int addr, const unsigned long* src, int len); int mas_readreg(int reg); int mas_writereg(int reg, unsigned int val); void mas_reset(void); -int mas_direct_config_read(unsigned char reg); +/* unused: int mas_direct_config_read(unsigned char reg); */ int mas_direct_config_write(unsigned char reg, unsigned int val); int mas_codec_writereg(int reg, unsigned int val); int mas_codec_readreg(int reg); diff --git a/firmware/export/mp3_playback.h b/firmware/export/mp3_playback.h index ded461439d..6fdaa31cac 100644 --- a/firmware/export/mp3_playback.h +++ b/firmware/export/mp3_playback.h @@ -39,15 +39,15 @@ void demand_irq_enable(bool on); #endif /* new functions, exported to plugin API */ +#if CONFIG_CODEC == MAS3587F void mp3_play_init(void); +#endif void mp3_play_data(const unsigned char* start, int size, void (*get_more)(unsigned char** start, size_t* size) /* callback fn */ ); void mp3_play_pause(bool play); bool mp3_pause_done(void); void mp3_play_stop(void); -long mp3_get_playtime(void); -void mp3_reset_playtime(void); bool mp3_is_playing(void); unsigned char* mp3_get_pos(void); void mp3_shutdown(void); 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) { |