summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/pcm-as3525.c
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2009-11-01 23:35:34 +0000
committerRafaël Carré <rafael.carre@gmail.com>2009-11-01 23:35:34 +0000
commitf64a3fe149830e54e75a9847337b08c73e827b2a (patch)
tree84cf903a64ab4749985bceb79d1044e522447ce6 /firmware/target/arm/as3525/pcm-as3525.c
parente28bfd1349ca813cf34d8b327e21e128a6badba1 (diff)
Sansa AMS PCM: remove runtime sanity checks
Unaligned memory ops will cause a data abort anyway Make the check for samplerate at buildtime git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23480 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/pcm-as3525.c')
-rw-r--r--firmware/target/arm/as3525/pcm-as3525.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/firmware/target/arm/as3525/pcm-as3525.c b/firmware/target/arm/as3525/pcm-as3525.c
index f648908474..26e018c82f 100644
--- a/firmware/target/arm/as3525/pcm-as3525.c
+++ b/firmware/target/arm/as3525/pcm-as3525.c
@@ -61,9 +61,6 @@ static void play_start_pcm(void)
if(size > MAX_TRANSFER)
size = MAX_TRANSFER;
- if((unsigned int)dma_start_addr & 3)
- panicf("unaligned pointer!");
-
dma_size -= size;
dma_start_addr += size;
@@ -148,9 +145,8 @@ void pcm_dma_apply_settings(void)
{
unsigned long frequency = pcm_sampr;
+ /* TODO : use a table ? */
const int divider = (((AS3525_PLLA_FREQ/128) + (frequency/2)) / frequency) - 1;
- if(divider < 0 || divider > 511)
- panicf("unsupported frequency %ld", frequency);
int cgu_audio = CGU_AUDIO; /* read register */
cgu_audio &= ~(511 << 2); /* clear i2sout divider */
@@ -266,9 +262,6 @@ void pcm_rec_dma_start(void *addr, size_t size)
rec_start_addr = addr;
rec_size = size;
- if((unsigned int)addr & 3)
- panicf("unaligned pointer!");
-
CGU_PERI |= CGU_I2SIN_APB_CLOCK_ENABLE|CGU_I2SOUT_APB_CLOCK_ENABLE;
CGU_AUDIO |= ((1<<23)|(1<<11));