feat(native-usb): add 32-frame HD gameplay rumble and USB flight diagnostics

Preserve native frequency/amplitude timelines for DualSense PCM output,
remove the unsupported 64-frame path, and retain compatibility rumble for
other controllers. Use the validated 300 MHz sampling phase and restrict
non-bondable Classic discovery autoconnect to previously paired peers.

Buffer native-hub UART stdout and release USB IRQs around port-reset
callbacks. Add observer liveness and pre-SETUP root-response observations
without changing recovery behavior. Cover transport and haptics boundaries.

Record the user-accepted 0.108 trial: controls remained responsive and
rumble felt fine. Instrumentation changes timing; the disconnect root
cause and long-term reliability remain unqualified.

Validation: 624 tests, 11 affected firmware/probe builds, and on-device
concurrent USB and HD-auto-start checks. Private captures, generated
images, and unrelated working-tree files are intentionally excluded.
This commit is contained in:
Joey Yakimowich-Payne 2026-09-19 17:03:46 -06:00
commit 80b788099b
46 changed files with 2873 additions and 412 deletions

View file

@ -2,6 +2,7 @@
#include <stdbool.h>
#include <stdint.h>
#include "core/native_haptics.h"
#ifdef __cplusplus
extern "C" {
@ -51,10 +52,10 @@ void probe_controller_input_set_native_features(uint8_t features);
// Supply each child's advertised, validated nine-byte stick record. Native
// output stays unavailable until that child's calibration has been supplied.
void probe_controller_input_set_full_stick_calibration(uint8_t instance, const uint8_t calibration[9]);
// Native single-actuator gameplay envelope for this virtual half. Backend owns
// binding/generation checks, profile gain, finite playback and stale-stream stop.
bool probe_controller_input_submit_rumble(uint8_t instance, const uint8_t* magnitudes,
uint8_t count);
// Lossless native waveform for this virtual half. Backend owns source binding,
// profile gain, selected HD output and bounded conventional fallback.
bool probe_controller_input_submit_rumble(uint8_t instance,
const NativeHapticsActuatorFrame* frame);
void probe_controller_input_cancel_rumble(uint8_t instance);
#endif
// Core0 native07/08 output. Disable discards queued/prepared data; repeated