summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2009-02-08 22:32:41 +0000
committerMichael Sevakis <jethead71@rockbox.org>2009-02-08 22:32:41 +0000
commit94537f954e67d44fdd9703c062c4ee53599e0e74 (patch)
tree5dc555914ba4c6f943a90b0804fef9a5fead4a33 /apps
parent0222d0a5ebcc0be2e511abeb3ea8fbe7b4df8475 (diff)
downloadrockbox-94537f954e67d44fdd9703c062c4ee53599e0e74.zip
rockbox-94537f954e67d44fdd9703c062c4ee53599e0e74.tar.gz
rockbox-94537f954e67d44fdd9703c062c4ee53599e0e74.tar.bz2
rockbox-94537f954e67d44fdd9703c062c4ee53599e0e74.tar.xz
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.c5
-rw-r--r--apps/recorder/pcm_record.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c
index 99e56d1..6e22348 100644
--- a/apps/pcmbuf.c
+++ b/apps/pcmbuf.c
@@ -1001,6 +1001,11 @@ void pcmbuf_beep(unsigned int frequency, size_t duration, int amplitude)
/* Give 5ms clearance. */
bufstart += NATIVE_FREQUENCY * 4 / 200;
+#ifdef HAVE_PCM_DMA_ADDRESS
+ /* Returned peak addresses are DMA addresses */
+ bufend = pcm_dma_addr(bufend);
+#endif
+
/* Wrapped above? */
if (bufstart >= bufend)
bufstart -= pcmbuf_size;
diff --git a/apps/recorder/pcm_record.c b/apps/recorder/pcm_record.c
index 8642150..8657aee 100644
--- a/apps/recorder/pcm_record.c
+++ b/apps/recorder/pcm_record.c
@@ -1148,8 +1148,8 @@ static void pcmrec_init(void)
buffer = audio_get_recording_buffer(&rec_buffer_size);
- /* Line align pcm_buffer 2^4=16 bytes */
- pcm_buffer = (unsigned char *)ALIGN_UP_P2((uintptr_t)buffer, 4);
+ /* Line align pcm_buffer 2^5=32 bytes */
+ pcm_buffer = (unsigned char *)ALIGN_UP_P2((uintptr_t)buffer, 5);
enc_buffer = pcm_buffer + ALIGN_UP_P2(PCM_NUM_CHUNKS*PCM_CHUNK_SIZE +
PCM_MAX_FEED_SIZE, 2);
/* Adjust available buffer for possible align advancement */