rockbox/firmware/target/arm
Marcin Bukat ce968e7da1 rk27xx: don't reprogram the codec PLL for an unchanged rate
Every start of recording applies the sample rate again, mostly
unchanged, and set_codec_freq() reprogrammed the codec PLL each time.
That glitches MCLK and every I2S clock made of it, right before the
recording receiver is reset and starts on them. Whether it then kept
its framing came down to code timing: on the Samsung YP-CP3 the
recording screen's peak meter showed one channel empty and the other
saturated on some visits, and builds with debug code added never did.

The PLL is now left alone when it already runs the rate asked for. On a
real change the lock bit, which may still show the old lock at first,
is polled only after the 0.3 ms the datasheet gives for locking, with a
timeout of at least a full tick, and the clocks get 1 ms more to settle
before anything starts on them.

Tested on a YP-CP3, together with the codec as I2S master: the peak
meter on every one of many visits to the recording screen, with the
microphone and FM, and at 22 kHz.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: I2267e17c5bc7d8044715e762dbb6b92f45af4dcc
2026-10-05 22:35:12 +02:00
..
as3525 usb: let controller drivers handle SET_ADDRESS requests 2026-09-26 13:23:01 -04:00
imx31 firmware: limit system_memory_guard() to coldfire targets 2026-09-23 13:12:48 -04:00
imx233 imx233: Increase bootloader's firmware buffer size to 2MB 2026-09-29 15:15:45 -04:00
ipod ipodnano3g: power, RTC, backlight, battery and audio 2026-09-20 08:53:53 -04:00
iriver chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
olympus chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
pbell chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
philips chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
pp firmware: limit system_memory_guard() to coldfire targets 2026-09-23 13:12:48 -04:00
rk27xx rk27xx: don't reprogram the codec PLL for an unchanged rate 2026-10-05 22:35:12 +02:00
s3c2440 firmware: limit system_memory_guard() to coldfire targets 2026-09-23 13:12:48 -04:00
s5l8700 firmware: limit system_memory_guard() to coldfire targets 2026-09-23 13:12:48 -04:00
s5l8702 firmware: limit system_memory_guard() to coldfire targets 2026-09-23 13:12:48 -04:00
samsung chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
sandisk chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
stm32 firmware: limit system_memory_guard() to coldfire targets 2026-09-23 13:12:48 -04:00
tcc780x firmware: limit system_memory_guard() to coldfire targets 2026-09-23 13:12:48 -04:00
tms320dm320 usb: let controller drivers handle SET_ADDRESS requests 2026-09-26 13:23:01 -04:00
ata-as-arm.S chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
ata-nand-telechips.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
bits-armv4.S chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
bits-armv6.S chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
cpucache-arm.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
cpucache-armv7m.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
cpucache-armv7m.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
crt0.S chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
i2c-telechips.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
lcd-c200_c200v2.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
lcd-ssd1815.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
mmu-arm.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
mmu-arm.S chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
mmu-armv6.S chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
nvic-arm.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
pcm-telechips.c pcm_sink: allow per-sink swvol/hwvol selection 2026-08-14 22:39:13 +09:00
powermgmt-ascodec.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
system-arm-classic.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
system-arm-classic.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
system-arm-micro.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
system-arm-micro.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
system-arm.h chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
uc87xx.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
usb-drv-arc.c usb: accept replacement SETUP after an abandoned control transfer 2026-09-27 09:19:39 -04:00
usb-s3c6400x.c usb: let controller drivers handle SET_ADDRESS requests 2026-09-26 13:23:01 -04:00
usb-tcc.c usb: let controller drivers handle SET_ADDRESS requests 2026-09-26 13:23:01 -04:00
vectors-arm-micro.S chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
wmcodec-telechips.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00