summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-05-03 13:52:39 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-05-03 13:52:39 +0000
commit65a0de3d07731b2857f28261837b5c136f7922d1 (patch)
treed2a67a6c10da3e5d6a1d47db4c12f328d05df646 /firmware
parenta6b31f18c89029c6f19609dc39cbb0abc59daeed (diff)
Fix red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17317 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/tms320dm320/creative-zvm/pcm-creativezvm.c58
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 @@
#include "audio.h"
#include "sound.h"
#include "file.h"
+#include "dm320.h"
+#include "audiohw.h"
+#include "dsp-target.h"
-void pcm_postinit(void)
+void pcm_play_dma_init(void)
{
+ IO_CLK_O1DIV = 3;
+ /* Set GIO25 to CLKOUT1A */
+ IO_GIO_FSEL2 |= 3;
+ sleep(5);
+
+ audiohw_init();
+ audiohw_set_frequency(1);
+
+ /* init DSP */
+ dsp_init();
}
-const void * pcm_play_dma_get_peak_buffer(int *count)
+void pcm_postinit(void)
{
- (void) count;
- return 0;
+ audiohw_postinit();
+ /* wake DSP */
+ dsp_wake();
}
-void pcm_play_dma_init(void)
+/* set frequency used by the audio hardware */
+void pcm_set_frequency(unsigned int frequency)
{
+ int index;
+
+ switch(frequency)
+ {
+ case SAMPR_11:
+ case SAMPR_22:
+ index = 0;
+ break;
+ default:
+ case SAMPR_44:
+ index = 1;
+ break;
+ case SAMPR_88:
+ index = 2;
+ break;
+ }
+
+ audiohw_set_frequency(index);
+} /* pcm_set_frequency */
+const void * pcm_play_dma_get_peak_buffer(int *count)
+{
+ (void) count;
+ return 0;
}
void pcm_apply_settings(void)
@@ -44,15 +82,11 @@ void pcm_apply_settings(void)
}
-void pcm_set_frequency(unsigned int frequency)
-{
- (void) frequency;
-}
-
void pcm_play_dma_start(const void *addr, size_t size)
{
- (void) addr;
- (void) size;
+ (void)addr;
+ (void)size;
+ DEBUGF("pcm_play_dma_start(0x%x, %d)", addr, size);
}
void pcm_play_dma_stop(void)