summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/mpeg.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index aa577bc01b..1620c1db8a 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -17,6 +17,7 @@
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19#include <stdbool.h> 19#include <stdbool.h>
20#include "config.h"
20#include "i2c.h" 21#include "i2c.h"
21#include "mas.h" 22#include "mas.h"
22#include "dac.h" 23#include "dac.h"
@@ -481,38 +482,66 @@ static void setup_sci0(void)
481 482
482void mpeg_play(char* trackname) 483void mpeg_play(char* trackname)
483{ 484{
485#ifdef ARCHOS_RECORDER
486 return;
487#endif
488
484 queue_post(&mpeg_queue, MPEG_PLAY, trackname); 489 queue_post(&mpeg_queue, MPEG_PLAY, trackname);
485} 490}
486 491
487void mpeg_stop(void) 492void mpeg_stop(void)
488{ 493{
494#ifdef ARCHOS_RECORDER
495 return;
496#endif
497
489 queue_post(&mpeg_queue, MPEG_STOP, NULL); 498 queue_post(&mpeg_queue, MPEG_STOP, NULL);
490} 499}
491 500
492void mpeg_pause(void) 501void mpeg_pause(void)
493{ 502{
503#ifdef ARCHOS_RECORDER
504 return;
505#endif
506
494 queue_post(&mpeg_queue, MPEG_PAUSE, NULL); 507 queue_post(&mpeg_queue, MPEG_PAUSE, NULL);
495} 508}
496 509
497void mpeg_resume(void) 510void mpeg_resume(void)
498{ 511{
512#ifdef ARCHOS_RECORDER
513 return;
514#endif
515
499 queue_post(&mpeg_queue, MPEG_RESUME, NULL); 516 queue_post(&mpeg_queue, MPEG_RESUME, NULL);
500} 517}
501 518
502void mpeg_volume(int percent) 519void mpeg_volume(int percent)
503{ 520{
521#ifdef ARCHOS_RECORDER
522 return;
523#endif
524
504 int volume = 0x38 * percent / 100; 525 int volume = 0x38 * percent / 100;
505 dac_volume(volume); 526 dac_volume(volume);
506} 527}
507 528
508void mpeg_bass(int percent) 529void mpeg_bass(int percent)
509{ 530{
531#ifdef ARCHOS_RECORDER
532 return;
533#endif
534
510 int bass = 15 * percent / 100; 535 int bass = 15 * percent / 100;
511 mas_writereg(MAS_REG_KBASS, bass_table[bass]); 536 mas_writereg(MAS_REG_KBASS, bass_table[bass]);
512} 537}
513 538
514void mpeg_treble(int percent) 539void mpeg_treble(int percent)
515{ 540{
541#ifdef ARCHOS_RECORDER
542 return;
543#endif
544
516 int treble = 15 * percent / 100; 545 int treble = 15 * percent / 100;
517 mas_writereg(MAS_REG_KTREBLE, treble_table[treble]); 546 mas_writereg(MAS_REG_KTREBLE, treble_table[treble]);
518} 547}
@@ -524,6 +553,10 @@ void mpeg_init(void)
524 setup_sci0(); 553 setup_sci0();
525 i2c_init(); 554 i2c_init();
526 555
556#ifdef ARCHOS_RECORDER
557 return;
558#endif
559
527#ifdef DEBUG 560#ifdef DEBUG
528 { 561 {
529 unsigned char buf[32]; 562 unsigned char buf[32];