rockbox/firmware
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
..
asm asm: ARMv7-M: replace unity-gain write_samples() asm with memcpy 2026-07-15 22:56:05 -04:00
common Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
drivers rk27xx codec: mix in only the tuner's line, keep the DAC 2026-09-30 08:07:15 -04:00
export YP-CP3: make the WM8750 the I2S master 2026-10-05 22:35:12 +02:00
include Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
kernel 3ds: Port refactor. 2026-09-01 08:39:07 -04:00
libc chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
reggen stm32h743: implement timer API 2026-07-11 17:23:36 -04:00
target YP-CP3: make the WM8750 the I2S master 2026-10-05 22:35:12 +02:00
usbstack rk27xx: keep interrupt and bulk endpoints in separate groups 2026-09-28 16:55:21 +02:00
arabjoin.c
arabjoin.h unicode: Support characters beyond the first unicode plane 2025-09-12 09:24:30 -04:00
ata_idle_notify.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
backlight-sw-fading.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
backlight.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
bidi.c bidi: do not pass non-ASCII codepoints to ispunct() 2026-07-01 21:03:38 -04:00
buflib_malloc.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
buflib_mempool.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
chunk_alloc.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
COPYING
core_alloc.c Fix building Warble when configured as the iPod Video 2026-08-25 08:01:09 -04:00
debug.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
eeprom_settings.c firmware: move iriver flash helper functions into target tree 2026-09-23 13:44:45 -04:00
elf_loader.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
enc_base.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
events.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
firmware.make chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
font.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
font_cache.c unicode: Support characters beyond the first unicode plane 2025-09-12 09:24:30 -04:00
general.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
hangul.c unicode: Support characters beyond the first unicode plane 2025-09-12 09:24:30 -04:00
lc-rock.c Add "rbfs" prefix to native filesystem functions 2026-09-17 16:22:31 -04:00
linuxboot.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
logf.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
lru.c
panic.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
pcm.c pcm_sink: allow per-sink swvol/hwvol selection 2026-08-14 22:39:13 +09:00
pcm_mixer.c pcm_mixer: fix active_channels handling in mixer_handle_sampr_change 2026-07-23 21:17:13 -04:00
pcm_sampr.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
pcm_sw_volume.c swvol: Switch to using WANT_SWVOL_32 in pcm_sw_volume.c 2026-08-14 22:45:14 -04:00
powermgmt.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
profile.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
README
rolo.c ROLO: Get rid of redundant call to audio_hard_stop() 2026-09-23 16:52:01 -04:00
rom.lds
screendump.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
scroll_engine.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
sdmmc.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
sound.c audiohw: remove unused BALANCE_CAP and CLIPPING_CAP 2026-07-20 12:47:12 -04:00
SOURCES rk27xx: name the NAND's FTL scheme in each target's config 2026-10-01 12:15:25 +02:00
storage.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
system.c firmware: move iriver flash helper functions into target tree 2026-09-23 13:44:45 -04:00
timer.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
tuner.c chore: Get rid of *all* vestigal CVS '$Id:$' tags 2026-06-01 16:01:18 -04:00
usb.c FS#14011: Handle usb hosts whose first request is SET_ADDRESS (Anthony Fletcher) 2026-09-27 19:36:21 -04:00

See docs/README