Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+16 -25
+4 -2
firmware/export/mascodec.h
··· 21 21 #ifndef _MASCODEC_H_ 22 22 #define _MASCODEC_H_ 23 23 24 - int mas_default_read(unsigned short *buf); 24 + /* unused: int mas_default_read(unsigned short *buf); */ 25 + #if CONFIG_CODEC == MAS3507D 25 26 int mas_run(unsigned short address); 27 + #endif 26 28 int mas_readmem(int bank, int addr, unsigned long* dest, int len); 27 29 int mas_writemem(int bank, int addr, const unsigned long* src, int len); 28 30 int mas_readreg(int reg); 29 31 int mas_writereg(int reg, unsigned int val); 30 32 void mas_reset(void); 31 - int mas_direct_config_read(unsigned char reg); 33 + /* unused: int mas_direct_config_read(unsigned char reg); */ 32 34 int mas_direct_config_write(unsigned char reg, unsigned int val); 33 35 int mas_codec_writereg(int reg, unsigned int val); 34 36 int mas_codec_readreg(int reg);
+2 -2
firmware/export/mp3_playback.h
··· 39 39 #endif 40 40 41 41 /* new functions, exported to plugin API */ 42 + #if CONFIG_CODEC == MAS3587F 42 43 void mp3_play_init(void); 44 + #endif 43 45 void mp3_play_data(const unsigned char* start, int size, 44 46 void (*get_more)(unsigned char** start, size_t* size) /* callback fn */ 45 47 ); 46 48 void mp3_play_pause(bool play); 47 49 bool mp3_pause_done(void); 48 50 void mp3_play_stop(void); 49 - long mp3_get_playtime(void); 50 - void mp3_reset_playtime(void); 51 51 bool mp3_is_playing(void); 52 52 unsigned char* mp3_get_pos(void); 53 53 void mp3_shutdown(void);
+2 -21
firmware/target/sh/archos/audio-archos.c
··· 52 52 static bool paused; /* playback is paused */ 53 53 static bool playing; /* We are playing an MP3 stream */ 54 54 55 - /* for measuring the play time */ 56 - static long playstart_tick; 57 - static long cumulative_ticks; 58 - 59 55 /* the registered callback function to ask for more mp3 data */ 60 56 static void (*callback_for_more)(unsigned char**, size_t*); 61 57 ··· 461 457 462 458 /* new functions, to be exported to plugin API */ 463 459 460 + #if CONFIG_CODEC == MAS3587F 464 461 void mp3_play_init(void) 465 462 { 466 463 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) ··· 469 466 playing = false; 470 467 paused = true; 471 468 callback_for_more = NULL; 472 - mp3_reset_playtime(); 473 469 } 470 + #endif 474 471 475 472 void mp3_play_data(const unsigned char* start, int size, 476 473 void (*get_more)(unsigned char** start, size_t* size) /* callback fn */ ··· 503 500 { /* resume playback */ 504 501 SCR0 |= 0x80; 505 502 paused = false; 506 - playstart_tick = current_tick; 507 503 } 508 504 else if (!paused && !play) 509 505 { /* stop playback */ 510 506 SCR0 &= 0x7f; 511 507 paused = true; 512 - cumulative_ticks += current_tick - playstart_tick; 513 508 } 514 509 } 515 510 ··· 534 529 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) 535 530 demand_irq_enable(false); 536 531 #endif 537 - } 538 - 539 - long mp3_get_playtime(void) 540 - { 541 - if (paused) 542 - return cumulative_ticks; 543 - else 544 - return cumulative_ticks + current_tick - playstart_tick; 545 - } 546 - 547 - void mp3_reset_playtime(void) 548 - { 549 - cumulative_ticks = 0; 550 - playstart_tick = current_tick; 551 532 } 552 533 553 534 bool mp3_is_playing(void)
+2
firmware/target/sh/archos/i2c-archos.c
··· 234 234 return x; 235 235 } 236 236 237 + #if 0 /* Currently unused, left for reference and future use */ 237 238 int i2c_read(int address, unsigned char* buf, int count ) 238 239 { 239 240 int i,x=0; ··· 250 251 i2c_stop(); 251 252 return x; 252 253 } 254 + #endif
+6
firmware/target/sh/archos/mascodec-archos.c
··· 30 30 31 31 static int mas_devread(unsigned long *dest, int len); 32 32 33 + #if 0 /* Currently unused, left for reference and future use */ 33 34 int mas_default_read(unsigned short *buf) 34 35 { 35 36 unsigned char *dest = (unsigned char *)buf; ··· 62 63 i2c_end(); 63 64 return ret; 64 65 } 66 + #endif 65 67 68 + #if CONFIG_CODEC == MAS3507D 66 69 int mas_run(unsigned short address) 67 70 { 68 71 int ret = 0; ··· 83 86 i2c_end(); 84 87 return ret; 85 88 } 89 + #endif 86 90 87 91 /* note: 'len' is number of 32-bit words, not number of bytes! */ 88 92 int mas_readmem(int bank, int addr, unsigned long* dest, int len) ··· 307 311 } 308 312 309 313 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) 314 + #if 0 /* Currently unused, left for reference and future use */ 310 315 int mas_direct_config_read(unsigned char reg) 311 316 { 312 317 int ret = 0; ··· 340 345 i2c_end(); 341 346 return ret; 342 347 } 348 + #endif 343 349 344 350 int mas_direct_config_write(unsigned char reg, unsigned int val) 345 351 {