summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-02-26 20:29:29 +0000
committerDave Chapman <dave@dchapman.com>2006-02-26 20:29:29 +0000
commita1e2a52e3e542d689ff990056a0d64553d94225d (patch)
tree702e9c0da54a5a02e901cfc2e7b74b50aa957b4e
parentecdadcbaed5bddbd3693af5fc7bc8f2dccd8c3ff (diff)
downloadrockbox-a1e2a52e3e542d689ff990056a0d64553d94225d.tar.gz
rockbox-a1e2a52e3e542d689ff990056a0d64553d94225d.zip
iPod 3G - small audio fixes, but it still isn't working.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8850 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/crt0.S8
-rw-r--r--firmware/export/pp5002.h2
-rw-r--r--firmware/pcm_playback.c12
3 files changed, 15 insertions, 7 deletions
diff --git a/firmware/crt0.S b/firmware/crt0.S
index 75ff55423a..061ffebeab 100644
--- a/firmware/crt0.S
+++ b/firmware/crt0.S
@@ -348,9 +348,17 @@ prefetch_abort_handler:
b UIE
fiq_handler:
+#if CONFIG_CPU == PP5020
@ Branch straight to FIQ handler in pcm_playback.c. This also handles the
@ the correct return sequence.
ldr pc, =fiq
+#else
+ stmfd sp!, {r0-r3, r12, lr}
+ mov lr, pc
+ ldr pc, =fiq
+ ldmfd sp!, {r0-r3, r12, lr}
+ subs pc, lr, #4
+#endif
data_abort_handler:
sub r0, lr, #8
diff --git a/firmware/export/pp5002.h b/firmware/export/pp5002.h
index 3104fde6f8..807c2e2708 100644
--- a/firmware/export/pp5002.h
+++ b/firmware/export/pp5002.h
@@ -95,6 +95,8 @@
#define GPIO_MASK (1 << GPIO_IRQ)
#define SER0_MASK (1 << SER0_IRQ)
#define SER1_MASK (1 << SER1_IRQ)
+#define DMA_OUT_MASK (1 << DMA_OUT_IRQ)
+
#define TIMER1_VAL (*(volatile unsigned long *)(0xcf001104))
#define TIMER1_CFG (*(volatile unsigned long *)(0xcf001100))
diff --git a/firmware/pcm_playback.c b/firmware/pcm_playback.c
index af642e4d43..6d60c40fdb 100644
--- a/firmware/pcm_playback.c
+++ b/firmware/pcm_playback.c
@@ -333,8 +333,6 @@ static int pcm_freq = 0x6; /* 44.1 is default */
unsigned short* p IBSS_ATTR;
long p_size IBSS_ATTR;
-#define PP5002_DMA_OUT_MASK (1 << DMA_OUT_IRQ)
-
static void dma_start(const void *addr, size_t size)
{
p=(unsigned short*)addr;
@@ -348,8 +346,8 @@ static void dma_start(const void *addr, size_t size)
outl(I2S_MASK, 0x60004024);
#else
/* setup I2S interrupt for FIQ */
- outl(inl(0xcf00103c) | PP5002_DMA_OUT_MASK, 0xcf00103c);
- outl(PP5002_DMA_OUT_MASK, 0xcf001034);
+ outl(inl(0xcf00103c) | DMA_OUT_MASK, 0xcf00103c);
+ outl(DMA_OUT_MASK, 0xcf001034);
#endif
/* Clear the FIQ disable bit in cpsr_c */
@@ -370,7 +368,7 @@ static void dma_start(const void *addr, size_t size)
#if CONFIG_CPU == PP5020
IISCONFIG |= 0x2;
#elif CONFIG_CPU == PP5002
- IISFIFO_CFG &= ~(1<<9);
+ IISFIFO_CFG |= (1<<9);
#endif
return;
}
@@ -483,7 +481,7 @@ void pcm_play_pause(bool play)
#if CONFIG_CPU == PP5020
IISCONFIG |= 0x2;
#elif CONFIG_CPU == PP5002
- IISFIFO_CFG &= ~(1<<9);
+ IISFIFO_CFG |= (1<<9);
#endif
return;
}
@@ -643,7 +641,7 @@ void fiq(void)
#if CONFIG_CPU == PP5020
IISCONFIG |= 0x2;
#elif CONFIG_CPU == PP5002
- IISFIFO_CFG &= ~(1<<9);
+ IISFIFO_CFG |= (1<<9);
#endif
return;
}