diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-26 12:43:54 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-26 12:43:54 +0000 |
commit | 26b25488bad2ff970f820681bdd78fc970a4d07d (patch) | |
tree | c6b9c01861ebe54f3b678fbbd5ff2c02ad6832d3 /firmware/mpeg.c | |
parent | d1d63960b9b79fcac318ddd0571f12594ee697b1 (diff) | |
download | rockbox-26b25488bad2ff970f820681bdd78fc970a4d07d.tar.gz rockbox-26b25488bad2ff970f820681bdd78fc970a4d07d.zip |
Added mas_reset() call, and some error checking
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1197 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r-- | firmware/mpeg.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index fe71b3902b..5f717d60f0 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include "i2c.h" | 21 | #include "i2c.h" |
22 | #include "mas.h" | 22 | #include "mas.h" |
23 | #include "dac.h" | 23 | #include "dac.h" |
24 | #include "sh7034.h" | ||
25 | #include "system.h" | 24 | #include "system.h" |
26 | #include "debug.h" | 25 | #include "debug.h" |
27 | #include "kernel.h" | 26 | #include "kernel.h" |
@@ -612,6 +611,7 @@ void mpeg_treble(int percent) | |||
612 | void mpeg_init(void) | 611 | void mpeg_init(void) |
613 | { | 612 | { |
614 | #ifdef ARCHOS_RECORDER | 613 | #ifdef ARCHOS_RECORDER |
614 | int rc; | ||
615 | unsigned long val; | 615 | unsigned long val; |
616 | #endif | 616 | #endif |
617 | 617 | ||
@@ -619,15 +619,16 @@ void mpeg_init(void) | |||
619 | i2c_init(); | 619 | i2c_init(); |
620 | 620 | ||
621 | #ifdef ARCHOS_RECORDER | 621 | #ifdef ARCHOS_RECORDER |
622 | /* Reset the MAS */ | 622 | mas_reset(); |
623 | PAIOR |= 0x100; | 623 | |
624 | PADR &= ~0x100; | ||
625 | sleep(HZ/100); | ||
626 | PADR |= 0x100; | ||
627 | sleep(HZ/10); | ||
628 | |||
629 | /* Enable the audio CODEC and the DSP core, max analog voltage range */ | 624 | /* Enable the audio CODEC and the DSP core, max analog voltage range */ |
630 | mas_direct_config_write(MAS_CONTROL, 0x8c00); | 625 | rc = mas_direct_config_write(MAS_CONTROL, 0x8c00); |
626 | if(rc < 0) | ||
627 | panicf("mas_ctrl_w: %d", rc); | ||
628 | |||
629 | rc = mas_direct_config_read(MAS_CONTROL); | ||
630 | if(rc < 0) | ||
631 | panicf("mas_ctrl_r: %d", rc); | ||
631 | 632 | ||
632 | /* Max volume on both ears */ | 633 | /* Max volume on both ears */ |
633 | val = 0x80000; | 634 | val = 0x80000; |