diff options
author | Jens Arnold <amiconn@rockbox.org> | 2004-11-22 01:54:26 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2004-11-22 01:54:26 +0000 |
commit | dbd11c9b42f760a464e89de0f8aff328c43b4de7 (patch) | |
tree | 98283f1a68cd76aca11c753979c12bd97c4978e0 | |
parent | 67b17e118f40c80e7fb260f401cb61c7e733e5de (diff) | |
download | rockbox-dbd11c9b42f760a464e89de0f8aff328c43b4de7.tar.gz rockbox-dbd11c9b42f760a464e89de0f8aff328c43b4de7.zip |
The player also has MAS poweron reset, handle it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5456 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/drivers/mas.c | 15 | ||||
-rw-r--r-- | firmware/mp3_playback.c | 4 |
2 files changed, 15 insertions, 4 deletions
diff --git a/firmware/drivers/mas.c b/firmware/drivers/mas.c index 52a91c5e40..95697a79e9 100644 --- a/firmware/drivers/mas.c +++ b/firmware/drivers/mas.c | |||
@@ -266,11 +266,18 @@ static int mas_devread(unsigned long *dest, int len) | |||
266 | return ret; | 266 | return ret; |
267 | } | 267 | } |
268 | 268 | ||
269 | #if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F) | ||
270 | void mas_reset(void) | 269 | void mas_reset(void) |
271 | { | 270 | { |
272 | or_b(0x01, &PAIORH); | 271 | or_b(0x01, &PAIORH); |
273 | 272 | ||
273 | #if CONFIG_HWCODEC == MAS3507D | ||
274 | or_b(0x01, &PAIORH); | ||
275 | and_b(~0x01, &PADRH); | ||
276 | sleep(HZ/100); | ||
277 | or_b(0x01, &PADRH); | ||
278 | sleep(HZ/5); | ||
279 | |||
280 | #elif (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F) | ||
274 | if(old_recorder) | 281 | if(old_recorder) |
275 | { | 282 | { |
276 | /* Older recorder models don't invert the POR signal */ | 283 | /* Older recorder models don't invert the POR signal */ |
@@ -285,9 +292,11 @@ void mas_reset(void) | |||
285 | sleep(HZ/100); | 292 | sleep(HZ/100); |
286 | or_b(0x01, &PADRH); | 293 | or_b(0x01, &PADRH); |
287 | sleep(HZ/5); | 294 | sleep(HZ/5); |
288 | } | 295 | } |
296 | #endif | ||
289 | } | 297 | } |
290 | 298 | ||
299 | #if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F) | ||
291 | int mas_direct_config_read(unsigned char reg) | 300 | int mas_direct_config_read(unsigned char reg) |
292 | { | 301 | { |
293 | int ret = 0; | 302 | int ret = 0; |
diff --git a/firmware/mp3_playback.c b/firmware/mp3_playback.c index a7284aeff0..cc02505979 100644 --- a/firmware/mp3_playback.c +++ b/firmware/mp3_playback.c | |||
@@ -938,7 +938,9 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness, | |||
938 | or_b(0x01, &PBIORH); /* output for PB8 */ | 938 | or_b(0x01, &PBIORH); /* output for PB8 */ |
939 | #endif | 939 | #endif |
940 | 940 | ||
941 | #if CONFIG_HWCODEC == MAS3587F | 941 | #if CONFIG_HWCODEC == MAS3507D |
942 | mas_reset(); | ||
943 | #elif CONFIG_HWCODEC == MAS3587F | ||
942 | or_b(0x08, &PAIORH); /* output for /PR */ | 944 | or_b(0x08, &PAIORH); /* output for /PR */ |
943 | init_playback(); | 945 | init_playback(); |
944 | 946 | ||