diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-05-03 13:52:39 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-05-03 13:52:39 +0000 |
commit | 65a0de3d07731b2857f28261837b5c136f7922d1 (patch) | |
tree | d2a67a6c10da3e5d6a1d47db4c12f328d05df646 /firmware/target/arm | |
parent | a6b31f18c89029c6f19609dc39cbb0abc59daeed (diff) | |
download | rockbox-65a0de3d07731b2857f28261837b5c136f7922d1.tar.gz rockbox-65a0de3d07731b2857f28261837b5c136f7922d1.zip |
Fix red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17317 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c | 58 |
1 files changed, 46 insertions, 12 deletions
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c index 6501125f9e..49f75c26ce 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c +++ b/firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c | |||
@@ -22,21 +22,59 @@ | |||
22 | #include "audio.h" | 22 | #include "audio.h" |
23 | #include "sound.h" | 23 | #include "sound.h" |
24 | #include "file.h" | 24 | #include "file.h" |
25 | #include "dm320.h" | ||
26 | #include "audiohw.h" | ||
27 | #include "dsp-target.h" | ||
25 | 28 | ||
26 | void pcm_postinit(void) | 29 | void pcm_play_dma_init(void) |
27 | { | 30 | { |
31 | IO_CLK_O1DIV = 3; | ||
32 | /* Set GIO25 to CLKOUT1A */ | ||
33 | IO_GIO_FSEL2 |= 3; | ||
34 | sleep(5); | ||
35 | |||
36 | audiohw_init(); | ||
28 | 37 | ||
38 | audiohw_set_frequency(1); | ||
39 | |||
40 | /* init DSP */ | ||
41 | dsp_init(); | ||
29 | } | 42 | } |
30 | 43 | ||
31 | const void * pcm_play_dma_get_peak_buffer(int *count) | 44 | void pcm_postinit(void) |
32 | { | 45 | { |
33 | (void) count; | 46 | audiohw_postinit(); |
34 | return 0; | 47 | /* wake DSP */ |
48 | dsp_wake(); | ||
35 | } | 49 | } |
36 | 50 | ||
37 | void pcm_play_dma_init(void) | 51 | /* set frequency used by the audio hardware */ |
52 | void pcm_set_frequency(unsigned int frequency) | ||
38 | { | 53 | { |
54 | int index; | ||
55 | |||
56 | switch(frequency) | ||
57 | { | ||
58 | case SAMPR_11: | ||
59 | case SAMPR_22: | ||
60 | index = 0; | ||
61 | break; | ||
62 | default: | ||
63 | case SAMPR_44: | ||
64 | index = 1; | ||
65 | break; | ||
66 | case SAMPR_88: | ||
67 | index = 2; | ||
68 | break; | ||
69 | } | ||
70 | |||
71 | audiohw_set_frequency(index); | ||
72 | } /* pcm_set_frequency */ | ||
39 | 73 | ||
74 | const void * pcm_play_dma_get_peak_buffer(int *count) | ||
75 | { | ||
76 | (void) count; | ||
77 | return 0; | ||
40 | } | 78 | } |
41 | 79 | ||
42 | void pcm_apply_settings(void) | 80 | void pcm_apply_settings(void) |
@@ -44,15 +82,11 @@ void pcm_apply_settings(void) | |||
44 | 82 | ||
45 | } | 83 | } |
46 | 84 | ||
47 | void pcm_set_frequency(unsigned int frequency) | ||
48 | { | ||
49 | (void) frequency; | ||
50 | } | ||
51 | |||
52 | void pcm_play_dma_start(const void *addr, size_t size) | 85 | void pcm_play_dma_start(const void *addr, size_t size) |
53 | { | 86 | { |
54 | (void) addr; | 87 | (void)addr; |
55 | (void) size; | 88 | (void)size; |
89 | DEBUGF("pcm_play_dma_start(0x%x, %d)", addr, size); | ||
56 | } | 90 | } |
57 | 91 | ||
58 | void pcm_play_dma_stop(void) | 92 | void pcm_play_dma_stop(void) |