From ba9040a82b15c18b242134474a6e1d571ed686a3 Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Sun, 10 Jan 2010 14:24:45 +0000 Subject: Sansa AMS: allow use of PLL B for more accurate audio sample rate (0.04% instead 0.15% error) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24211 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/as3525/system-as3525.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'firmware/target/arm/as3525/system-as3525.c') diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index 75539ba8d7..13b406a6b8 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c @@ -285,8 +285,15 @@ void system_init(void) CGU_PROC = 0; /* fclk 24 MHz */ CGU_PERI &= ~0x7f; /* pclk 24 MHz */ + CGU_PLLASUP = 0; /* enable PLLA */ CGU_PLLA = AS3525_PLLA_SETTING; while(!(CGU_INTCTRL & (1<<0))); /* wait until PLLA is locked */ + +#if (AS3525_MCLK_SEL == AS3525_CLK_PLLB) + CGU_PLLBSUP = 0; /* enable PLLB */ + CGU_PLLB = AS3525_PLLB_SETTING; + while(!(CGU_INTCTRL & (1<<1))); /* wait until PLLB is locked */ +#endif /* Set FCLK frequency */ CGU_PROC = ((AS3525_FCLK_POSTDIV << 4) | -- cgit v1.2.3