summaryrefslogtreecommitdiff
path: root/firmware/target/mips
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-08-08 22:25:04 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-08-08 22:29:29 -0400
commit08c4b708ae52dc6bb5848b72a897e7790da5dd9e (patch)
treec7dbccc45f6ba8c54712f41f6f855030bc8b3a73 /firmware/target/mips
parentbe2c8734cbf3f32fcf3513e8899e3b7596c2c19d (diff)
downloadrockbox-08c4b708ae52dc6bb5848b72a897e7790da5dd9e.tar.gz
rockbox-08c4b708ae52dc6bb5848b72a897e7790da5dd9e.zip
jz4760: Move 11/22/44/88KHz back onto the PLL
PLL1 clock for those frequencies has been dropped from 508 to 169.5 MHz, so it's still a respectable reduction. (I'm not sure how/why it ever worked with the XTAL source, but it did, and was off by an audible amount) Change-Id: I614d87e7dfdfe9210702b9c646d3863c06d6780b
Diffstat (limited to 'firmware/target/mips')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/codec-jz4760.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/codec-jz4760.c b/firmware/target/mips/ingenic_jz47xx/codec-jz4760.c
index 233e6f4ed1..bc4286fd6a 100644
--- a/firmware/target/mips/ingenic_jz47xx/codec-jz4760.c
+++ b/firmware/target/mips/ingenic_jz47xx/codec-jz4760.c
@@ -219,8 +219,10 @@ void audiohw_set_frequency(int fsel)
219 func_mode = 0; 219 func_mode = 0;
220 break; 220 break;
221 case HW_FREQ_11: // 0.7056 MHz 221 case HW_FREQ_11: // 0.7056 MHz
222 pll1_speed = 0; 222 pll1_speed = 508000000 / 3;
223 mclk_div = 272; 223 mclk_div = 180 / 3;
224// pll1_speed = 0;
225// mclk_div = 272;
224 bclk_div = 4; 226 bclk_div = 4;
225 func_mode = 0; 227 func_mode = 0;
226 break; 228 break;
@@ -237,8 +239,10 @@ void audiohw_set_frequency(int fsel)
237 func_mode = 0; 239 func_mode = 0;
238 break; 240 break;
239 case HW_FREQ_22: // 1.4112 MHz 241 case HW_FREQ_22: // 1.4112 MHz
240 pll1_speed = 0; 242 pll1_speed = 508000000 / 3;
241 mclk_div = 136; 243 mclk_div = 90 / 3;
244// pll1_speed = 0;
245// mclk_div = 136;
242 bclk_div = 4; 246 bclk_div = 4;
243 func_mode = 0; 247 func_mode = 0;
244 break; 248 break;
@@ -256,8 +260,10 @@ void audiohw_set_frequency(int fsel)
256 func_mode = 0; 260 func_mode = 0;
257 break; 261 break;
258 case HW_FREQ_44: // 2.8224 MHz 262 case HW_FREQ_44: // 2.8224 MHz
259 pll1_speed = 0; 263 pll1_speed = 508000000 / 3;
260 mclk_div = 68; 264 mclk_div = 45 / 3;
265// pll1_speed = 0;
266// mclk_div = 68;
261 bclk_div = 4; 267 bclk_div = 4;
262 dem = CS4398_DEM_44100; 268 dem = CS4398_DEM_44100;
263 func_mode = 0; 269 func_mode = 0;
@@ -276,8 +282,10 @@ void audiohw_set_frequency(int fsel)
276 func_mode = 1; 282 func_mode = 1;
277 break; 283 break;
278 case HW_FREQ_88: // 5.6448 MHz 284 case HW_FREQ_88: // 5.6448 MHz
279 pll1_speed = 0; 285 pll1_speed = 508000000 / 3;
280 mclk_div = 68; 286 mclk_div = 45 / 3;
287// pll1_speed = 0;
288// mclk_div = 68;
281 bclk_div = 2; 289 bclk_div = 2;
282 func_mode = 1; 290 func_mode = 1;
283 break; 291 break;