diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-10-07 20:14:32 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-10-07 20:14:32 +0000 |
commit | 4512f1a14f78b764df1df934b8f95907ca7635cc (patch) | |
tree | 04233a362704efa31e962b1f1a1a901869abeb16 /firmware/target/arm/pcm-pp.c | |
parent | 1de497228a360288384e7a0c9754d49d10008adb (diff) | |
download | rockbox-4512f1a14f78b764df1df934b8f95907ca7635cc.tar.gz rockbox-4512f1a14f78b764df1df934b8f95907ca7635cc.zip |
Finally get packed samples to work in a nice way on H10 in IIS mode. Add some more register defs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15026 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/pcm-pp.c')
-rw-r--r-- | firmware/target/arm/pcm-pp.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/firmware/target/arm/pcm-pp.c b/firmware/target/arm/pcm-pp.c index 119c54d71b..ba2b6e5ada 100644 --- a/firmware/target/arm/pcm-pp.c +++ b/firmware/target/arm/pcm-pp.c | |||
@@ -29,11 +29,12 @@ | |||
29 | of working settings. DMA-compatible settings should be found for here, i2s, | 29 | of working settings. DMA-compatible settings should be found for here, i2s, |
30 | and codec setup using "arithmetic" the hardware supports like halfword | 30 | and codec setup using "arithmetic" the hardware supports like halfword |
31 | swapping. Try to use 32-bit packed in IIS modes if possible. */ | 31 | swapping. Try to use 32-bit packed in IIS modes if possible. */ |
32 | #if defined(SANSA_C200) || defined(SANSA_E200) | 32 | #if defined(SANSA_C200) || defined(SANSA_E200) \ |
33 | || defined(IRIVER_H10) || defined(IRIVER_H10_5GB) | ||
33 | /* 16-bit, L-R packed into 32 bits with left in the least significant halfword */ | 34 | /* 16-bit, L-R packed into 32 bits with left in the least significant halfword */ |
34 | #define SAMPLE_SIZE 16 | 35 | #define SAMPLE_SIZE 16 |
35 | #define TRANSFER_SIZE 32 | 36 | #define TRANSFER_SIZE 32 |
36 | #elif defined(IRIVER_H10) || defined(IRIVER_H10_5GB) | 37 | #elif 0 |
37 | /* 16-bit, one left 16-bit sample followed by one right 16-bit sample */ | 38 | /* 16-bit, one left 16-bit sample followed by one right 16-bit sample */ |
38 | #define SAMPLE_SIZE 16 | 39 | #define SAMPLE_SIZE 16 |
39 | #define TRANSFER_SIZE 16 | 40 | #define TRANSFER_SIZE 16 |
@@ -204,10 +205,10 @@ void fiq_playback(void) | |||
204 | } | 205 | } |
205 | #if SAMPLE_SIZE == 16 | 206 | #if SAMPLE_SIZE == 16 |
206 | #if TRANSFER_SIZE == 16 | 207 | #if TRANSFER_SIZE == 16 |
207 | IISFIFO_WRH = *dma_play_data.p++; | 208 | IISFIFO_WRH = *dma_play_data.p++; |
208 | IISFIFO_WRH = *dma_play_data.p++; | 209 | IISFIFO_WRH = *dma_play_data.p++; |
209 | #elif TRANSFER_SIZE == 32 | 210 | #elif TRANSFER_SIZE == 32 |
210 | IISFIFO_WR = *dma_play_data.p++; | 211 | IISFIFO_WR = *dma_play_data.p++; |
211 | #endif | 212 | #endif |
212 | #elif SAMPLE_SIZE == 32 | 213 | #elif SAMPLE_SIZE == 32 |
213 | IISFIFO_WR = *dma_play_data.p++ << 16; | 214 | IISFIFO_WR = *dma_play_data.p++ << 16; |
@@ -294,8 +295,8 @@ static void play_stop_pcm(void) | |||
294 | 295 | ||
295 | void pcm_play_dma_start(const void *addr, size_t size) | 296 | void pcm_play_dma_start(const void *addr, size_t size) |
296 | { | 297 | { |
297 | dma_play_data.p = (void *)addr; | 298 | dma_play_data.p = (void *)(((uintptr_t)addr + 2) & ~3); |
298 | dma_play_data.size = size; | 299 | dma_play_data.size = (size & ~3); |
299 | 300 | ||
300 | #if NUM_CORES > 1 | 301 | #if NUM_CORES > 1 |
301 | /* This will become more important later - and different ! */ | 302 | /* This will become more important later - and different ! */ |