Commit Graph

2301 Commits

Author SHA1 Message Date
Geoffrey McRae
5138f470b7 [client/idd] network: add negotiated input service 2026-11-06 14:37:38 +11:00
Geoffrey McRae
d477d169d4 [client] network: add datagram send path 2026-11-06 14:37:38 +11:00
Geoffrey McRae
6eb7c1698c [common] network: use LGProtocol codecs 2026-11-06 14:37:38 +11:00
Geoffrey McRae
04ac46c049 [client] network: add QUIC transport foundation 2026-11-06 14:37:38 +11:00
Geoffrey McRae
ed3b269919 [client] egl: import shared GPU textures 2026-11-06 14:37:38 +11:00
Geoffrey McRae
a3f822685c [build] msquic: add static network dependency 2026-11-06 14:37:37 +11:00
Geoffrey McRae
ca0738ec0d [client] windows: add WASAPI audio support 2026-11-06 14:34:25 +11:00
Geoffrey McRae
eabc56a6de [common/client] platform: abstract runtime services 2026-11-06 14:34:25 +11:00
Geoffrey McRae
a7d2e4592f [client] windows: add native display and input 2026-11-06 14:34:25 +11:00
Geoffrey McRae
18541865f0 [client] egl: add portable texture upload fallback 2026-11-06 14:34:25 +11:00
Geoffrey McRae
7ea69f3d1c [client] input: add platform-neutral keycodes 2026-11-06 14:34:25 +11:00
Geoffrey McRae
382f35e503 [common/client] ivshmem: add portable external frames 2026-11-06 14:34:25 +11:00
Geoffrey McRae
6d367d4ab2 [common/client] platform: make filesystem access portable 2026-11-06 14:34:25 +11:00
Geoffrey McRae
a60da36420 [common] windows: add native path and UTF support 2026-11-06 14:34:25 +11:00
Geoffrey McRae
62a8786fe2 [common/client] platform: add portable worker primitives 2026-11-06 14:34:25 +11:00
Geoffrey McRae
9c8343df96 [common/client] platform: make timing waits portable 2026-11-06 14:34:25 +11:00
Geoffrey McRae
d045ac6ba7 [client] build: add Windows platform composition 2026-11-06 14:34:25 +11:00
Geoffrey McRae
36e170d93a [client/idd] audio: support multiple playback clients
Replace the single-owner PCM queues with one shared LGMP SPMC stream.
Give each admitted client reliable state and an independent playback
cursor, while clients without clock authority resample locally.

Extend the audio protocol with per-client epochs and barriers.
Keep capture exclusive and bound authority backpressure so slow
secondary readers cannot affect the disciplined low-latency path.
2026-11-06 14:34:25 +11:00
Geoffrey McRae
95234cea86 [client] audio: fall back when feedback is unavailable 2026-11-06 14:34:25 +11:00
Geoffrey McRae
56f3305fe8 [client/idd] audio: prevent recording transport stalls
Give microphone data priority over replaceable clock feedback and
reduce feedback traffic on the shared client-to-host FIFO.

Retry short FIFO stalls outside the realtime thread and coalesce
consecutive packets in the existing fixed Windows buffers.

Avoid one broker write per tiny PipeWire quantum without adding
allocations or intentional capture latency.
2026-11-06 14:34:25 +11:00
Geoffrey McRae
efc9952e74 [idd] audio: support 32-bit and common channel layouts
Advertise signed and floating-point 32-bit formats across mono,
stereo, quad, surround, 5.1, and 7.1 at every supported rate.

Carry sample encoding through the broker and LGMP protocol so integer
and floating-point streams remain distinct.

Expand packet, shared-memory, and ring capacity for eight-channel
32-bit audio.
2026-11-06 14:34:25 +11:00
Geoffrey McRae
f7b1133785 [client] audio: poll LGMP streams at 25 microseconds
Use the active polling floor as the maximum wait and advertised
playback delivery reserve. Keep learned scheduling jitter adaptive.
2026-11-06 14:34:25 +11:00
Geoffrey McRae
25d87e1c6d [client] lgmp: test same-generation audio restart
Queue playback STOP, START, and DATA for the same wire generation.
Verify that the client creates a fresh local generation and delivers the
first restarted packet.
2026-11-06 14:34:25 +11:00
Geoffrey McRae
b8ab04507e [client] audio: complete LGMP shutdown release
Treat the binding phase as the authoritative shutdown state after
graceful stream release.

Cover disconnect while the host drains and unbinds both streams.
2026-11-06 14:34:25 +11:00
Geoffrey McRae
f2f3787aec [client] audio: reduce LGMP poll reserve
Reduce the active LGMP poll bound and matching playback reserve from
250 us to 125 us.
2026-11-06 14:34:25 +11:00
Geoffrey McRae
4c395bb488 [client] audio: minimize LGMP playback latency
Scope the legacy latency offset to classic SPICE and use the LGMP
poll bound as its fixed arrival reserve. Keep learned jitter additive.

Select provider clock feedback only when the current remote endpoint
advertises it, avoiding a failed startup attempt on broker v1.
2026-11-06 14:34:25 +11:00
Geoffrey McRae
2fa376b31b [client] audio: reduce LGMP stream latency
Poll active audio streams every 25 to 250 microseconds and reset the
adaptive delay whenever records arrive.
2026-11-06 14:34:25 +11:00
Geoffrey McRae
3cd005ac74 [client] audio: add optional LGMP transport 2026-11-06 14:32:14 +11:00
Geoffrey McRae
e55cb8bd61 [common] audio: define the mediated LGMP stream protocol
Advertise optional audio mediation separately from runtime driver
availability, then negotiate ownership through the existing LGMP
client-control path.

Define fixed playback and capture stream records for packed PCM,
endpoint state, clock feedback, and targeted descriptor discovery.
Keep the LGMP queue table, recovery sidecar, and submodule unchanged.
2026-11-06 14:01:34 +11:00
Geoffrey McRae
cdba29f2f6 [client] clipboard: keep controls responsive during stalls
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Release LGMP stream slots before dispatching clipboard data so an X11
INCR consumer cannot prevent control queue acknowledgements.

Retain one bounded record in client memory while the sink is blocked.
Cancel abandoned X11 transfers after requestor destruction or a finite
progress timeout.
2026-10-08 10:16:51 +11:00
Geoffrey McRae
6214dccf12 [client] input: defer LED sync while unavailable 2026-10-08 10:16:49 +11:00
Geoffrey McRae
8fbe3e7454 [repos] lgprotocol: import shared protocol definitions
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Add LGProtocol as a pinned submodule and consume its KVMFR protocol
definitions throughout the client, host, IDD, OBS, and profiler.

Keep Looking Glass framebuffer helpers local while removing duplicated
protocol headers and migrating users to KVMFR-scoped types.
2026-09-01 20:58:25 +10:00
Geoffrey McRae
54ea580e35 [client] wayland: reuse remote clipboard text
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2026-08-25 23:23:00 +10:00
Geoffrey McRae
b888be0ec3 [client] clipboard: advertise standard text formats 2026-08-25 22:22:21 +10:00
Geoffrey McRae
4e75351c78 [client] transport: allow packed BGR storage heights 2026-08-24 19:13:11 +10:00
Geoffrey McRae
f3a6964ade [client] lgmp: align cursor transform snapshots 2026-08-24 19:13:11 +10:00
Geoffrey McRae
957e4ee54b [client] lgmp: validate frame message alignment 2026-08-24 19:13:11 +10:00
Geoffrey McRae
357d5fd3c5 [client] lgmp: snapshot session records 2026-08-24 19:13:11 +10:00
Geoffrey McRae
56ea0cfaba [client] opengl: validate framebuffer uploads 2026-08-24 19:13:11 +10:00
Geoffrey McRae
50b7ca603a [client] opengl: retain deferred frame leases 2026-08-24 19:13:11 +10:00
Geoffrey McRae
b78b92a53f [client] opengl: clean up failed configuration 2026-08-24 19:13:10 +10:00
Geoffrey McRae
556e771926 [client] lgmp: bound pointer payloads 2026-08-24 19:13:10 +10:00
Geoffrey McRae
ef8636cbeb [client] lgmp: snapshot and validate frame layouts 2026-08-24 19:13:10 +10:00
Geoffrey McRae
50b1c9b2e2 [client] cursor: validate shape geometry 2026-08-24 19:13:10 +10:00
Geoffrey McRae
8cb6a6873e [client] audio: recover physical underrun debt
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
A stable clock model can request a negative recovery slew while the
unbounded ring is physically underrun. This leaves the reader ahead of
the writer indefinitely and outputs silence until playback is restarted.

Floor active recovery at the physical low-water requirement. Rebase the
device-clock phase by any extra refill so modeled latency remains at the
target without restarting the underrun correction cycle.

Add a deterministic regression for negative physical debt opposing the
stable clock model.
2026-08-22 19:33:27 +10:00
Geoffrey McRae
366a748549 [client] pipewire: honor playback quantum
Do not treat the capacity of an allocated PipeWire buffer as the
requested playback period when PipeWire supplies no per-buffer hint.
Use the current stream quantum when available and fall back to the
configured period.
2026-08-22 18:53:22 +10:00
Geoffrey McRae
ebf764ae25 [client] audio: reset playback cleanly on resume
Count one underrun per starvation episode and end the sync diagnostics
epoch when a logical source stops.

Resume a compatible backend synchronously so data after a same-wire
restart is accepted immediately. Rebase the first post-idle device tick
without passing a long gap through the short-step clock filter.

Cancel in-flight backlog trims before fresh audio can be queued.
2026-08-22 18:53:22 +10:00
Geoffrey McRae
d8e7966087 [client] audio: fix underrun clock recovery
Recover stable local playback in the device clock domain and restart
rate control from the measured feed-forward clock ratio.

Ignore catch-up packet sizing until the normal source cadence returns.
2026-08-22 18:53:22 +10:00
Geoffrey McRae
5b106015de [client] audio: ignore jitter after underruns
Do not learn late delivery from packets that already caused an
underrun and media-clock rebase. Preserve learned jitter only across
continuous playback.
2026-08-22 18:53:22 +10:00
Geoffrey McRae
7476e56ded [client] spice: terminate fallback after MAIN loss
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Treat a missing SPICE MAIN channel as terminal in PureSpice.

Check fallback session health before activation and publication.
2026-08-21 20:36:36 +10:00