summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm
diff options
context:
space:
mode:
authorRob Purchase <shotofadds@rockbox.org>2008-09-16 08:09:44 +0000
committerRob Purchase <shotofadds@rockbox.org>2008-09-16 08:09:44 +0000
commit1a08f46329e9f6d7bd55a8a9ad45db27df8a7593 (patch)
tree693d2bd43f42c2d1ba35584e3a0b08f4fcef5969 /firmware/target/arm
parent9cf7ef68c9747fe1baa16a80e28d8cb783ea63f5 (diff)
downloadrockbox-1a08f46329e9f6d7bd55a8a9ad45db27df8a7593.tar.gz
rockbox-1a08f46329e9f6d7bd55a8a9ad45db27df8a7593.zip
Commit fs#9404 (iAudio 7 updates by vitja). Also fixes play/pause behaviour on D2.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18528 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/pcm-telechips.c17
-rw-r--r--firmware/target/arm/tcc77x/crt0.S9
-rw-r--r--firmware/target/arm/tcc77x/iaudio7/ata2501.c4
-rw-r--r--firmware/target/arm/tcc77x/iaudio7/lcd-iaudio7.c10
-rw-r--r--firmware/target/arm/tcc77x/iaudio7/power-iaudio7.c1
5 files changed, 34 insertions, 7 deletions
diff --git a/firmware/target/arm/pcm-telechips.c b/firmware/target/arm/pcm-telechips.c
index a0ad00eb22..63f50f7d78 100644
--- a/firmware/target/arm/pcm-telechips.c
+++ b/firmware/target/arm/pcm-telechips.c
@@ -207,7 +207,11 @@ void pcm_play_unlock(void)
void pcm_play_dma_pause(bool pause)
{
- (void) pause;
+ if (pause) {
+ play_stop_pcm();
+ } else {
+ play_start_pcm();
+ }
}
size_t pcm_get_bytes_waiting(void)
@@ -251,11 +255,12 @@ const void * pcm_rec_dma_get_peak_buffer(int *count)
void pcm_record_more(void *start, size_t size)
{
+ (void) start;
+ (void) size;
}
#endif
-#if defined(COWON_D2)
-/* TODO: hardcoded hex values differs for tcc7xx and tcc8xx */
+#if defined(CPU_TCC77X) || defined(CPU_TCC780X)
void fiq_handler(void) ICODE_ATTR __attribute__((naked));
void fiq_handler(void)
{
@@ -266,10 +271,14 @@ void fiq_handler(void)
* r0-r3 and r12 is a working register.
*/
asm volatile (
+#if defined(CPU_TCC780X)
"mov r8, #0xc000 \n" /* DAI_TX_IRQ_MASK | DAI_RX_IRQ_MASK */
"ldr r9, =0xf3001004 \n" /* CREQ */
+#elif defined(CPU_TCC77X)
+ "mov r8, #0x0030 \n" /* DAI_TX_IRQ_MASK | DAI_RX_IRQ_MASK */
+ "ldr r9, =0x80000104 \n" /* CREQ */
+#endif
"str r8, [r9] \n" /* clear DAI IRQs */
-
"ldmia r11, { r8-r9 } \n" /* r8 = p, r9 = size */
"cmp r9, #0x10 \n" /* is size <16? */
"blt .more_data \n" /* if so, ask pcmbuf for more data */
diff --git a/firmware/target/arm/tcc77x/crt0.S b/firmware/target/arm/tcc77x/crt0.S
index 569930352a..03dc2a9771 100644
--- a/firmware/target/arm/tcc77x/crt0.S
+++ b/firmware/target/arm/tcc77x/crt0.S
@@ -131,6 +131,15 @@ copied_start:
msr cpsr, r0
ldr sp, =fiq_stack
+#ifndef BOOTLOADER
+ /* Load the banked FIQ mode registers with useful values here.
+ These values will be used in the FIQ handler in pcm-telechips.c */
+ .equ DADO_BASE, 0x80000020
+
+ ldr r10, =DADO_BASE
+ ldr r11, =dma_play_data
+#endif
+
/* Let abort and undefined modes use IRQ stack */
mov r0,#0xd7
msr cpsr, r0
diff --git a/firmware/target/arm/tcc77x/iaudio7/ata2501.c b/firmware/target/arm/tcc77x/iaudio7/ata2501.c
index fa165d9d0d..bc39872de6 100644
--- a/firmware/target/arm/tcc77x/iaudio7/ata2501.c
+++ b/firmware/target/arm/tcc77x/iaudio7/ata2501.c
@@ -86,7 +86,7 @@ unsigned short ata2501_read(void)
return ret;
}
-#define ATA2501_TEST
+//#define ATA2501_TEST
#ifdef ATA2501_TEST
#include "lcd.h"
#include "sprintf.h"
@@ -108,7 +108,7 @@ void ata2501_test(void)
while (1) {
unsigned short data;
- int i, line = 0;
+ int line = 0;
data = ata2501_read();
lcd_clear_display();
diff --git a/firmware/target/arm/tcc77x/iaudio7/lcd-iaudio7.c b/firmware/target/arm/tcc77x/iaudio7/lcd-iaudio7.c
index bbc20b6860..0ca18bee67 100644
--- a/firmware/target/arm/tcc77x/iaudio7/lcd-iaudio7.c
+++ b/firmware/target/arm/tcc77x/iaudio7/lcd-iaudio7.c
@@ -31,6 +31,7 @@
#include <cpu.h>
#include <lcd.h>
#include <system-target.h>
+#include <panic.h>
#include "hd66789r.h"
@@ -142,7 +143,7 @@ void lcd_enable(bool on)
if (on) {
_display_on();
-// lcd_call_enable_hook();
+ lcd_call_enable_hook();
} else {
/** Off sequence according to datasheet, p. 130 **/
lcd_write_reg(R_FRAME_CYCLE_CONTROL, 0x0002); /* EQ=0, 18 clks/line */
@@ -242,6 +243,13 @@ void lcd_blit_yuv(unsigned char *const src[3],
int src_x, int src_y, int stride,
int x, int y, int width, int height)
{
+ (void) src;
+ (void) src_x;
+ (void) src_y;
+ (void) stride;
+ (void) x;
+ (void) y;
+
if (!display_on)
return;
diff --git a/firmware/target/arm/tcc77x/iaudio7/power-iaudio7.c b/firmware/target/arm/tcc77x/iaudio7/power-iaudio7.c
index ef012cbbdf..ce7175ef55 100644
--- a/firmware/target/arm/tcc77x/iaudio7/power-iaudio7.c
+++ b/firmware/target/arm/tcc77x/iaudio7/power-iaudio7.c
@@ -73,6 +73,7 @@ void power_touch_panel(bool on)
void ide_power_enable(bool on)
{
+ (void) on;
}
bool ide_powered(void)