diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-12-02 04:30:08 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-12-02 04:30:08 +0000 |
commit | 30c3382a48904b4620d6803ea55f615748b5c231 (patch) | |
tree | 67fc628808bf1c317bd9b2e19ae8d0f744ee6ff2 /firmware/target/arm/tms320dm320/dsp/arm.c | |
parent | f0092e739e9810903812f7cf131ebc66d96d18bf (diff) | |
download | rockbox-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.c | 24 |
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 | ||
29 | volatile struct ipc_message status; | 29 | volatile struct ipc_message status; |
30 | 30 | ||
31 | extern int waiting; | 31 | #if defined(HAVE_DEBUG) |
32 | volatile int acked; | 32 | static int acked; |
33 | #endif | ||
34 | |||
33 | interrupt void handle_int0(void) { | 35 | interrupt 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 | ||
52 | void startack(void) | 66 | #if defined(HAVE_DEBUG) |
67 | static void startack(void) | ||
53 | { | 68 | { |
54 | acked = 0; | 69 | acked = 0; |
55 | int_arm(); | 70 | int_arm(); |
56 | } | 71 | } |
57 | 72 | ||
58 | void waitack(void) | 73 | static 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 | ||