diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-03-11 01:18:23 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-03-11 01:18:23 +0000 |
commit | 3c7ada594142b44bfb543f7ec693ac7250176287 (patch) | |
tree | a0a6cc746d5810c2e44643b627d5a181ad9acbdc /firmware/target/arm/tms320dm320/debug-dm320.c | |
parent | 2d9caa9aa3aeebed58772eb6ed4b2f4aed85abf6 (diff) |
Sound working with rockbox PCM interface on the M:Robe 500. Doom and Rockboy run with sound. There are stability problems that need to be looked into causing the player to reset when music playback is attempted.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20284 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tms320dm320/debug-dm320.c')
-rwxr-xr-x | firmware/target/arm/tms320dm320/debug-dm320.c | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/firmware/target/arm/tms320dm320/debug-dm320.c b/firmware/target/arm/tms320dm320/debug-dm320.c index db19a16a07..c09990b1ed 100755 --- a/firmware/target/arm/tms320dm320/debug-dm320.c +++ b/firmware/target/arm/tms320dm320/debug-dm320.c @@ -26,20 +26,55 @@ #include <stdbool.h> #include "button.h" #include "lcd.h" +#include "debug.h" #include "sprintf.h" #include "font.h" +#include "pcm.h" #include "debug-target.h" #include "lcd-target.h" #include "dsp-target.h" +#include "dsp/ipc.h" #ifndef CREATIVE_ZVx #include "tsc2100.h" #endif +#define ARM_BUFFER_SIZE (PCM_SIZE) + +static signed short *the_rover = (signed short *)0x1900000; +static unsigned int index_rover = 0; + +void pcmtest_get_more(unsigned char** start, size_t* size) +{ + unsigned long sdem_addr; + sdem_addr = (unsigned long)the_rover + index_rover; + + *start = (unsigned char*)(sdem_addr); + *size = ARM_BUFFER_SIZE; + + index_rover += ARM_BUFFER_SIZE; + if (index_rover >= 4*1024*1024) + { + index_rover = 0; + } + + DEBUGF("pcm_sdram at 0x%08lx, sdem_addr 0x%08lx", + (unsigned long)the_rover, (unsigned long)sdem_addr); +} + bool __dbg_ports(void) { - dsp_init(); - dsp_wake(); + int fd; + int bytes; + + fd = open("/test.raw", O_RDONLY); + bytes = read(fd, the_rover, 4*1024*1024); + close(fd); + + DEBUGF("read %d rover bytes", bytes); + + pcm_play_data(&pcmtest_get_more,(unsigned char*)the_rover, ARM_BUFFER_SIZE); + return false; } |