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
This commit is contained in:
parent
5f7d612f17
commit
9c07d068da
5 changed files with 16 additions and 25 deletions
|
@ -21,14 +21,16 @@
|
||||||
#ifndef _MASCODEC_H_
|
#ifndef _MASCODEC_H_
|
||||||
#define _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);
|
int mas_run(unsigned short address);
|
||||||
|
#endif
|
||||||
int mas_readmem(int bank, int addr, unsigned long* dest, int len);
|
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_writemem(int bank, int addr, const unsigned long* src, int len);
|
||||||
int mas_readreg(int reg);
|
int mas_readreg(int reg);
|
||||||
int mas_writereg(int reg, unsigned int val);
|
int mas_writereg(int reg, unsigned int val);
|
||||||
void mas_reset(void);
|
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_direct_config_write(unsigned char reg, unsigned int val);
|
||||||
int mas_codec_writereg(int reg, unsigned int val);
|
int mas_codec_writereg(int reg, unsigned int val);
|
||||||
int mas_codec_readreg(int reg);
|
int mas_codec_readreg(int reg);
|
||||||
|
|
|
@ -39,15 +39,15 @@ void demand_irq_enable(bool on);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* new functions, exported to plugin API */
|
/* new functions, exported to plugin API */
|
||||||
|
#if CONFIG_CODEC == MAS3587F
|
||||||
void mp3_play_init(void);
|
void mp3_play_init(void);
|
||||||
|
#endif
|
||||||
void mp3_play_data(const unsigned char* start, int size,
|
void mp3_play_data(const unsigned char* start, int size,
|
||||||
void (*get_more)(unsigned char** start, size_t* size) /* callback fn */
|
void (*get_more)(unsigned char** start, size_t* size) /* callback fn */
|
||||||
);
|
);
|
||||||
void mp3_play_pause(bool play);
|
void mp3_play_pause(bool play);
|
||||||
bool mp3_pause_done(void);
|
bool mp3_pause_done(void);
|
||||||
void mp3_play_stop(void);
|
void mp3_play_stop(void);
|
||||||
long mp3_get_playtime(void);
|
|
||||||
void mp3_reset_playtime(void);
|
|
||||||
bool mp3_is_playing(void);
|
bool mp3_is_playing(void);
|
||||||
unsigned char* mp3_get_pos(void);
|
unsigned char* mp3_get_pos(void);
|
||||||
void mp3_shutdown(void);
|
void mp3_shutdown(void);
|
||||||
|
|
|
@ -52,10 +52,6 @@ extern unsigned shadow_codec_reg0;
|
||||||
static bool paused; /* playback is paused */
|
static bool paused; /* playback is paused */
|
||||||
static bool playing; /* We are playing an MP3 stream */
|
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 */
|
/* the registered callback function to ask for more mp3 data */
|
||||||
static void (*callback_for_more)(unsigned char**, size_t*);
|
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 */
|
/* new functions, to be exported to plugin API */
|
||||||
|
|
||||||
|
#if CONFIG_CODEC == MAS3587F
|
||||||
void mp3_play_init(void)
|
void mp3_play_init(void)
|
||||||
{
|
{
|
||||||
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
|
||||||
|
@ -469,8 +466,8 @@ void mp3_play_init(void)
|
||||||
playing = false;
|
playing = false;
|
||||||
paused = true;
|
paused = true;
|
||||||
callback_for_more = NULL;
|
callback_for_more = NULL;
|
||||||
mp3_reset_playtime();
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void mp3_play_data(const unsigned char* start, int size,
|
void mp3_play_data(const unsigned char* start, int size,
|
||||||
void (*get_more)(unsigned char** start, size_t* size) /* callback fn */
|
void (*get_more)(unsigned char** start, size_t* size) /* callback fn */
|
||||||
|
@ -503,13 +500,11 @@ void mp3_play_pause(bool play)
|
||||||
{ /* resume playback */
|
{ /* resume playback */
|
||||||
SCR0 |= 0x80;
|
SCR0 |= 0x80;
|
||||||
paused = false;
|
paused = false;
|
||||||
playstart_tick = current_tick;
|
|
||||||
}
|
}
|
||||||
else if (!paused && !play)
|
else if (!paused && !play)
|
||||||
{ /* stop playback */
|
{ /* stop playback */
|
||||||
SCR0 &= 0x7f;
|
SCR0 &= 0x7f;
|
||||||
paused = true;
|
paused = true;
|
||||||
cumulative_ticks += current_tick - playstart_tick;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -536,20 +531,6 @@ void mp3_play_stop(void)
|
||||||
#endif
|
#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)
|
bool mp3_is_playing(void)
|
||||||
{
|
{
|
||||||
return playing;
|
return playing;
|
||||||
|
|
|
@ -234,6 +234,7 @@ int i2c_write(int address, const unsigned char* buf, int count )
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 /* Currently unused, left for reference and future use */
|
||||||
int i2c_read(int address, unsigned char* buf, int count )
|
int i2c_read(int address, unsigned char* buf, int count )
|
||||||
{
|
{
|
||||||
int i,x=0;
|
int i,x=0;
|
||||||
|
@ -250,3 +251,4 @@ int i2c_read(int address, unsigned char* buf, int count )
|
||||||
i2c_stop();
|
i2c_stop();
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
static int mas_devread(unsigned long *dest, int len);
|
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)
|
int mas_default_read(unsigned short *buf)
|
||||||
{
|
{
|
||||||
unsigned char *dest = (unsigned char *)buf;
|
unsigned char *dest = (unsigned char *)buf;
|
||||||
|
@ -62,7 +63,9 @@ int mas_default_read(unsigned short *buf)
|
||||||
i2c_end();
|
i2c_end();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_CODEC == MAS3507D
|
||||||
int mas_run(unsigned short address)
|
int mas_run(unsigned short address)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -83,6 +86,7 @@ int mas_run(unsigned short address)
|
||||||
i2c_end();
|
i2c_end();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* note: 'len' is number of 32-bit words, not number of bytes! */
|
/* note: 'len' is number of 32-bit words, not number of bytes! */
|
||||||
int mas_readmem(int bank, int addr, unsigned long* dest, int len)
|
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 (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 mas_direct_config_read(unsigned char reg)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -340,6 +345,7 @@ int mas_direct_config_read(unsigned char reg)
|
||||||
i2c_end();
|
i2c_end();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int mas_direct_config_write(unsigned char reg, unsigned int val)
|
int mas_direct_config_write(unsigned char reg, unsigned int val)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue