[client] usb audio: add asynchronous clock feedback

Advertise an asynchronous UAC2 OUT endpoint with explicit feedback so
Windows paces USB audio from the host playback clock.

Drive feedback from measured backend consumption plus the existing
buffer phase controller. Preserve the local and backend resampler paths
for providers without active feedback.

Keep audio diagnostics in the correct clock domains, report ring and
backend latency separately, and avoid hot-path feedback wakeups.
This commit is contained in:
Geoffrey McRae
2026-08-10 04:44:55 +10:00
parent fa8a95569a
commit 0f3c1db261
5 changed files with 420 additions and 134 deletions

View File

@@ -47,6 +47,10 @@ LG_USBAudio * lgUsbAudio_create(
/* Destroy the LG_USBRedir using this device before destroying the device. */
void lgUsbAudio_destroy(LG_USBAudio * audio);
/* Publish the requested source rate without touching usbredir from the audio
* feedback thread. */
void lgUsbAudio_setFeedbackRate(LG_USBAudio * audio, double sampleRate);
const LG_USBRedirDeviceOps * lgUsbAudio_deviceOps(void);
#endif