as3525: use the correct uncached address for rec peak buffer
authorfunman <funman@a1c6a512-1295-4272-9138-f99709370657>
Thu, 13 May 2010 08:21:04 +0000 (13 08:21 +0000)
committerfunman <funman@a1c6a512-1295-4272-9138-f99709370657>
Thu, 13 May 2010 08:21:04 +0000 (13 08:21 +0000)
also avoid disabling completely the DMA engine in pitch_detector

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25989 a1c6a512-1295-4272-9138-f99709370657

firmware/target/arm/as3525/pcm-as3525.c

index bddc8b9..5a81cdb 100644 (file)
@@ -260,7 +260,6 @@ void pcm_rec_dma_stop(void)
 {
     dma_disable_channel(1);
     rec_dma_size = 0;
-    dma_release();
 
     I2SOUT_CONTROL &= ~(1<<5); /* source = i2soutif fifo */
     I2SIN_CONTROL &= ~(1<<11); /* disable dma */
@@ -291,6 +290,7 @@ void pcm_rec_dma_start(void *addr, size_t size)
 
 void pcm_rec_dma_close(void)
 {
+    dma_release();
 }
 
 
@@ -311,7 +311,7 @@ void pcm_rec_dma_init(void)
 
 const void * pcm_rec_dma_get_peak_buffer(void)
 {
-    return rec_dma_start_addr;
+    return UNCACHED_ADDR((void*)DMAC_CH_DST_ADDR(1));
 }
 
 #endif /* HAVE_RECORDING */