rockbox/firmware/target/arm
Marcin Bukat 361913fdd2 YP-CP3: make the WM8750 the I2S master
The WM8750 frames its ADC on ADCLRC and its DAC on DACLRC. As the I2S
slave both are inputs, and the rk27xx has a single LRCK, which on the
YP-CP3 evidently does not reach ADCLRC: with the rk27xx as the master,
the recording DMA got exact zeros on most visits to the recording
screen and real samples only by chance, sometimes changing partway
through a visit. That stays so with the codec PLL no longer glitching
the I2S clocks (previous commit); with the codec as the master it does
not happen.

The codec now drives BCLK and both LRCKs itself, and the rk27xx I2S
transmitter and receiver are slaves. The codec's MCLK still comes from
the rk27xx codec PLL at 256 fs, so sample rates stay exact. The
original firmware runs the codec as master too, but off a fixed 12 MHz
in USB mode.

RK27XX_I2S_MCLK says the rk27xx makes the codec's MCLK, apart from
CODEC_SLAVE, which also makes it the I2S master. The YP-CP3 drops
CODEC_SLAVE for RK27XX_I2S_MCLK, and the WM8750 driver sets its master
bit as it does for any codec that is not a slave.

Tested on a YP-CP3: playback, FM radio, the recording screen's peak
meter on every visit, recording from the microphone and from FM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change-Id: I0dc93d3b2c45fddf61649702a931d11806e78cbf
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 YP-CP3: make the WM8750 the I2S master 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