Compare commits

...
Author SHA1 Message Date
MarcelineVPQandClaude Opus 4.8 333201e1ec fix: USB-faithful out-of-box defaults (1000Hz polling, mic off)
Audit of every default behavior vs a wired-USB DualSense found the firmware already near-identical for input; only two defaults diverged meaningfully:

- polling_rate_mode 0 (250Hz) -> 2 (realtime/1000Hz): match a wired DS5's 1ms input latency instead of polling 4x slower. Mode 2 also bypasses the report-throttle used by the 250/500Hz modes. NEEDS HIL SOAK-TEST (realtime drops the throttle) before this branch merges to master.

- bt_mic_enable 1 -> 0 (off): the BT mic has a known 2x-playback-rate bug (#10), so it is opt-in until root-caused on hardware.

Both only affect fresh flashes / Reset-to-defaults; existing saved configs keep their values.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 19:24:06 -06:00
2 changed files with 21 additions and 6 deletions
+9
View File
@@ -8,6 +8,15 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Version
## [Unreleased] ## [Unreleased]
### Changed
- **`polling_rate_mode` now defaults to realtime / 1000 Hz** (was 250 Hz) so a fresh flash matches a wired DualSense's 1 ms input latency instead of polling 4× slower. Mode 2 also bypasses the report-throttling used by the 250/500 Hz modes, forwarding every BT input report immediately. Existing saved configs keep their value; this only affects fresh flashes / Reset-to-defaults. (Out-of-box "acts like USB" pass.)
- **`bt_mic_enable` now defaults to Off** (was On) — the DualSense BT microphone path has a confirmed playback-rate bug (issue #10: recordings come out ~2× too fast / half-duration). Until that's root-caused on hardware, the mic is opt-in: fresh flashes / Reset-to-defaults boot with it off, and it can be turned on from the OLED **Settings** screen (`BT Mic`) or the web config. Existing saved configs keep their current value. (Web config default should be flipped to match in `DS5Dongle-OLED-Config-Web`.)
### Known issues
- **BT microphone records ~2× too fast (#10).** The mic playout stage is wall-clock paced at 10 ms / 480 samples into a 48 kHz endpoint, which should be real-time, so the 2× points at the on-wire frame size/rate differing from the assumed 480 samples. Needs the OLED **Diagnostics** `Mic dec=` (samples per `opus_decode`) and `Mic in/s` (arrival rate) read on hardware to make the fix deterministic — `Mic dec=240` would confirm a half-rate stream. Mic is opt-in (off by default) in the meantime.
--- ---
## [0.6.11-oled-edition] — 2026-06-02 ## [0.6.11-oled-edition] — 2026-06-02
+12 -6
View File
@@ -67,9 +67,11 @@ void config_valid() {
body->disable_pico_led = 0; body->disable_pico_led = 0;
printf("[Config] disable_pico_led is invalid\n"); printf("[Config] disable_pico_led is invalid\n");
} }
if (body->polling_rate_mode > 2) { if (body->polling_rate_mode > 2) { // 0xFF erased / out of range → default
body->polling_rate_mode = 0; body->polling_rate_mode = 2; // realtime / 1000 Hz — match a wired DS5's
printf("[Config] polling_rate_mode is invalid\n"); // 1 ms polling (was 0 / 250 Hz). Existing
// saved configs keep their value.
printf("[Config] polling_rate_mode invalid, defaulting to 2 (1000 Hz)\n");
} }
if (body->audio_buffer_length < 16 || body->audio_buffer_length > 128) { if (body->audio_buffer_length < 16 || body->audio_buffer_length > 128) {
body->audio_buffer_length = 16; // low buffer avoids the DS5's periodic re-buffer gap body->audio_buffer_length = 16; // low buffer avoids the DS5's periodic re-buffer gap
@@ -109,9 +111,13 @@ void config_valid() {
body->screen_off_timeout = 15; // mirrors the original 15-min off tier body->screen_off_timeout = 15; // mirrors the original 15-min off tier
printf("[Config] screen_off_timeout invalid, defaulting to 15 min\n"); printf("[Config] screen_off_timeout invalid, defaulting to 15 min\n");
} }
if (body->bt_mic_enable > 1) { // 0xFF erased / upgrade → default ON if (body->bt_mic_enable > 1) { // 0xFF erased / upgrade → default OFF
body->bt_mic_enable = 1; body->bt_mic_enable = 0; // opt-in: the BT mic path has a known
printf("[Config] bt_mic_enable invalid, defaulting to 1 (on)\n"); // 2x-playback-rate bug (#10), so it is
// off until explicitly enabled (Settings
// screen / web config). Existing saved
// configs keep their value.
printf("[Config] bt_mic_enable invalid, defaulting to 0 (off)\n");
} }
if (body->screen_brightness > 3) { // kBrightLevels has 4 entries (0..3) if (body->screen_brightness > 3) { // kBrightLevels has 4 entries (0..3)
body->screen_brightness = 0; // full brightness body->screen_brightness = 0; // full brightness