Add 10-band Rockbox equalizer
Links rockbox-dsp 0.1 from crates.io — a Rust wrapper around the fixed-point
Rockbox DSP pipeline (10-band EQ + tone + resampler + more).
Config
- fin-config: eq_enabled + eq_band_settings at the top level, matching the
on-disk shape rockbox uses so presets round-trip. A fresh config is
auto-populated with the ISO-octave flat preset (32 Hz → 16 kHz, Q 7.0,
0 dB) via Config::ensure_eq_bands() on load, so the sliders always show
10 bands and the DSP has something meaningful to process. Old configs
with fewer bands get padded to 10 without touching what's there.
Audio path
- SymphoniaPlayer owns an Option<Dsp> singleton, lazy-initialised on the
first track load. When eq_enabled is true, the *current* track's post-
resample samples run through Dsp (f32 → i16 saturating → dsp_process →
i16 → f32) before volume + ReplayGain + fade multiply. Non-stereo output
bypasses (rockbox-dsp is stereo-only).
- The next track during a crossfade always bypasses — the Rockbox pipeline
is a process-wide singleton (CODEC_IDX_AUDIO), can't run two streams.
- New PlayerCommand::SetEq for live toggle + band updates without a
reload; SetReplayGain-style forwarding through LocalRenderer.
- main.rs applies cfg.eq_enabled + cfg.eq_band_settings on startup.
TUI
- New EqSliders widget: 10 vertical block-char slider columns with a
+N.N dB label above, "dB" unit hint, and a Hz/kHz cutoff label below.
Selected band gets highlighted; a ±24 dB axis label sits in the corner.
- Settings screen grew a 3-row layout — global config, EQ panel, servers.
- Keybindings: E toggles EQ. On Settings: [ / ] cycle bands, Shift+↑/↓
bump the selected band's gain by ±1 dB. Changes persist to config.toml
immediately and are reapplied to the running DSP.
- Player bar shows a compact "EQ" badge when active.
- Help hint + README table of contents + keybindings table updated with
a new "Equalizer" sub-section describing the on-disk format, keys, and
the licensing implication (linking Rockbox DSP makes the binary GPL).
Verified live: Settings screen renders 10 sliders at the ISO cutoffs; E
lights the panel border; ] moves to band 3 (125 Hz); five Shift+Up
presses take it to +5.0 dB with the status line and the slider fill
updating in step; config.toml persists gain = 50 on band 3.