diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2009-02-08 22:32:41 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2009-02-08 22:32:41 +0000 |
commit | 94537f954e67d44fdd9703c062c4ee53599e0e74 (patch) | |
tree | 5dc555914ba4c6f943a90b0804fef9a5fead4a33 /apps | |
parent | 0222d0a5ebcc0be2e511abeb3ea8fbe7b4df8475 (diff) | |
download | rockbox-94537f954e67d44fdd9703c062c4ee53599e0e74.tar.gz rockbox-94537f954e67d44fdd9703c062c4ee53599e0e74.zip |
Gigabeat S: Implement an SDMA API and use it in the PCM driver. Some other miscellaneous adjustments to recording and PCM buffer to accomodate use of physical addresses and cache coherency.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19949 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pcmbuf.c | 5 | ||||
-rw-r--r-- | apps/recorder/pcm_record.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c index 99e56d160d..6e2234880e 100644 --- a/apps/pcmbuf.c +++ b/apps/pcmbuf.c | |||
@@ -1001,6 +1001,11 @@ void pcmbuf_beep(unsigned int frequency, size_t duration, int amplitude) | |||
1001 | /* Give 5ms clearance. */ | 1001 | /* Give 5ms clearance. */ |
1002 | bufstart += NATIVE_FREQUENCY * 4 / 200; | 1002 | bufstart += NATIVE_FREQUENCY * 4 / 200; |
1003 | 1003 | ||
1004 | #ifdef HAVE_PCM_DMA_ADDRESS | ||
1005 | /* Returned peak addresses are DMA addresses */ | ||
1006 | bufend = pcm_dma_addr(bufend); | ||
1007 | #endif | ||
1008 | |||
1004 | /* Wrapped above? */ | 1009 | /* Wrapped above? */ |
1005 | if (bufstart >= bufend) | 1010 | if (bufstart >= bufend) |
1006 | bufstart -= pcmbuf_size; | 1011 | bufstart -= pcmbuf_size; |
diff --git a/apps/recorder/pcm_record.c b/apps/recorder/pcm_record.c index 8642150b18..8657aee1ba 100644 --- a/apps/recorder/pcm_record.c +++ b/apps/recorder/pcm_record.c | |||
@@ -1148,8 +1148,8 @@ static void pcmrec_init(void) | |||
1148 | 1148 | ||
1149 | buffer = audio_get_recording_buffer(&rec_buffer_size); | 1149 | buffer = audio_get_recording_buffer(&rec_buffer_size); |
1150 | 1150 | ||
1151 | /* Line align pcm_buffer 2^4=16 bytes */ | 1151 | /* Line align pcm_buffer 2^5=32 bytes */ |
1152 | pcm_buffer = (unsigned char *)ALIGN_UP_P2((uintptr_t)buffer, 4); | 1152 | pcm_buffer = (unsigned char *)ALIGN_UP_P2((uintptr_t)buffer, 5); |
1153 | enc_buffer = pcm_buffer + ALIGN_UP_P2(PCM_NUM_CHUNKS*PCM_CHUNK_SIZE + | 1153 | enc_buffer = pcm_buffer + ALIGN_UP_P2(PCM_NUM_CHUNKS*PCM_CHUNK_SIZE + |
1154 | PCM_MAX_FEED_SIZE, 2); | 1154 | PCM_MAX_FEED_SIZE, 2); |
1155 | /* Adjust available buffer for possible align advancement */ | 1155 | /* Adjust available buffer for possible align advancement */ |