summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tms320dm320/dsp/arm.c
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-12-02 04:30:08 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-12-02 04:30:08 +0000
commit30c3382a48904b4620d6803ea55f615748b5c231 (patch)
tree67fc628808bf1c317bd9b2e19ae8d0f744ee6ff2 /firmware/target/arm/tms320dm320/dsp/arm.c
parentf0092e739e9810903812f7cf131ebc66d96d18bf (diff)
downloadrockbox-30c3382a48904b4620d6803ea55f615748b5c231.tar.gz
rockbox-30c3382a48904b4620d6803ea55f615748b5c231.zip
M:Robe 500: Improve audio DMA shutdown for Pause/Stop and significantly reduce the size of the DSP code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23817 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tms320dm320/dsp/arm.c')
-rw-r--r--firmware/target/arm/tms320dm320/dsp/arm.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/firmware/target/arm/tms320dm320/dsp/arm.c b/firmware/target/arm/tms320dm320/dsp/arm.c
index a2c19c7f62..e0df31c7a1 100644
--- a/firmware/target/arm/tms320dm320/dsp/arm.c
+++ b/firmware/target/arm/tms320dm320/dsp/arm.c
@@ -28,17 +28,27 @@
28 28
29volatile struct ipc_message status; 29volatile struct ipc_message status;
30 30
31extern int waiting; 31#if defined(HAVE_DEBUG)
32volatile int acked; 32static int acked;
33#endif
34
33interrupt void handle_int0(void) { 35interrupt void handle_int0(void) {
34 IFR = 1; 36 IFR = 1;
37
38#if defined(HAVE_DEBUG)
35 acked = 1; 39 acked = 1;
40#endif
41
36 waiting = 0; 42 waiting = 0;
37 43
38 if(dma0_stopped==0) 44 if(dma0_stopped==0)
39 { 45 {
40 if(!(DMPREC&0x01)) 46 if(!(DMPREC&0x01))
41 { 47 {
48 /* Give the HPIB access to refill first */
49 rebuffer();
50
51 /* Start the MCBSP DMA */
42 DMPREC |= 1; 52 DMPREC |= 1;
43 audiohw_start(); 53 audiohw_start();
44 } 54 }
@@ -47,15 +57,20 @@ interrupt void handle_int0(void) {
47 rebuffer(); 57 rebuffer();
48 } 58 }
49 } 59 }
60 else
61 {
62 rebuffer();
63 }
50} 64}
51 65
52void startack(void) 66#if defined(HAVE_DEBUG)
67static void startack(void)
53{ 68{
54 acked = 0; 69 acked = 0;
55 int_arm(); 70 int_arm();
56} 71}
57 72
58void waitack(void) 73static void waitack(void)
59{ 74{
60 /* Wait until ARM has picked up data. */ 75 /* Wait until ARM has picked up data. */
61 while (!acked) 76 while (!acked)
@@ -78,3 +93,4 @@ void debugf(const char *fmt, ...) {
78 93
79 acked = 2; 94 acked = 2;
80} 95}
96#endif