Commit Graph

59 Commits

Author SHA1 Message Date
Alex P 2c935c8487 refactor(audio): improve process monitoring with dynamic clock ticks
- Extract monitoring constants and configuration into centralized locations
- Implement dynamic clock ticks detection for more accurate CPU metrics
- Add warmup samples and bounds checking for CPU percentage calculation
- Replace hardcoded values with constants for better maintainability
2025-08-23 23:35:38 +00:00
Alex P ee5cfbc224 refactor(audio): improve performance and simplify code structure
- Move audio server logic to dedicated package and simplify main.go
- Optimize buffer pool implementation and remove redundant logging
- Improve process monitoring with synchronized metrics updates
- Enhance microphone contention manager with simplified logic
- Replace mutex with atomic operations for metrics tracking
2025-08-23 22:54:01 +00:00
Alex P b7599a4221 [WIP] Updates: audio output & input subprocesses memory & cpu usage 2025-08-23 21:51:24 +00:00
Alex P 782f15a742 [WIP] Updates: audio output & input subprocesses memory & cpu usage 2025-08-23 21:36:57 +00:00
Alex P ad407a05ff [WIP] Updates: audio output & input subprocesses memory & cpu usage 2025-08-23 21:19:28 +00:00
Alex P b55235b640 [WIP] Updates: audio output & input subprocesses memory & cpu usage 2025-08-23 21:06:02 +00:00
Alex P bdcfc29d70 refactor(audio): rename audio-server flag to audio-output-server for clarity
docs: update development documentation with new make targets
refactor: simplify audio quality presets implementation
style: remove redundant comments and align error handling
chore: add lint-ui-fix target to Makefile
2025-08-23 12:18:33 +00:00
Alex P 38b171d39f feat(audio): add system memory endpoint and process metrics monitoring
- Add new /system/memory endpoint to expose total system memory
- Implement process metrics collection for audio and microphone processes
- Update UI to display real-time process metrics with charts
- Replace environment variable check with CLI flag for audio input server
- Improve audio metrics broadcasting with 1-second intervals
- Add memory usage capping for CPU percentage metrics
2025-08-23 11:41:03 +00:00
Alex P 390c929dda Fix: go lint errors 2025-08-22 23:23:07 +00:00
Alex P 29e51ed50d Improvements, Fixes: enhanced audio metrics (including prometheus format), fixed lint errors 2025-08-22 23:20:22 +00:00
Alex P 6e910cbe05 Fix: linter errors 2025-08-22 22:28:15 +00:00
Alex P 5d266f6103 Fix: linter errors 2025-08-22 22:26:15 +00:00
Alex P cec27b054e Fix: linter errors 2025-08-22 22:23:50 +00:00
Alex P 48f1750895 Fix: audio subprocess handling, avg atency audio metric 2025-08-22 22:21:41 +00:00
Alex P e2a89c54d3 Fix: linting errors 2025-08-22 22:07:35 +00:00
Alex P a4b3fe6e33 Fix: golangci-lint 2025-08-22 21:21:09 +00:00
Alex P 2de5a05aab [WIP] Performance Enhancements: move audion processing into a separate process 2025-08-22 12:04:30 +00:00
Alex P 89555f1528 perf(audio): optimize audio processing with batching and atomic operations
- Implement batch audio processing to reduce CGO overhead
- Replace mutexes with atomic operations for contention management
- Add buffer pooling to reduce allocations
- Optimize microphone operation cooldown with lock-free approach
- Improve error handling with pre-allocated error objects
2025-08-13 14:49:08 +00:00
Alex P 483a7e2890 [WIP] Fix: performance issues 2025-08-13 11:35:11 +00:00
Alex P 807a9c3d24 build(audio): update cgo LDFLAGS to use env vars for library versions 2025-08-12 13:35:39 +00:00
Alex P 811dd5f3d9 perf(usbgadget): reduce input latency by pre-opening HID files and removing throttling
Pre-open HID files during initialization to minimize I/O overhead during operation. Remove mouse event throttling mechanism to improve input responsiveness. Keep HID files open on write errors to avoid repeated file operations.
2025-08-12 10:07:58 +00:00
Alex P 75a46e366c Stability: prevent race condition when clicking on Mic Start, Stop buttons in quick succession 2025-08-05 09:02:21 +03:00
Alex P 4a3f1b76a9 Separation of Concerns: Move the audio-related code into the audio internal package 2025-08-05 02:04:37 +03:00
Alex P bfbd8c11ce Efficiency Improvements: Switch to websocket-based communication for audio metrics & status 2025-08-05 01:43:58 +03:00
Alex P d4bde5f6bf Finetuning: further perf. tunning 2025-08-05 01:05:06 +03:00
Alex P a899a0e930 Improvements, Fixes: reduce mouse lag when audio is on 2025-08-04 23:29:47 +03:00
Alex P d3dfb05198 [WIP] Updates: audio input support 2025-08-04 20:08:54 +03:00
Alex P fee474bbf7 [#315] Updates: add advanced audio support 2025-08-02 02:23:37 +00:00
Marc Brooks b4525b8760
chore/ Fix go lint error (#683) 2025-07-11 23:41:05 +02:00
rmschooley 3359f8fca4
Remove Out Endpoint Descriptors from Absolute Mouse and Relative Mouse (#542)
* Update hid_mouse_absolute.go

Added attribute to remove unnecessary out endpoint.

* Update hid_mouse_relative.go

Added attribute to remove unnecessary out endpoint.

* Update hid_keyboard.go

Added attribute to explicitly keep currently needed out endpoint and to make listed attributes consistent across the keyboard and mouse devices.

---------

Co-authored-by: Aveline <352441+ym@users.noreply.github.com>
2025-07-11 17:43:37 +02:00
Daniel Collins ef95643a86
Implement HTTP proxy option (#515). (#521)
This commit adds a "Proxy" field to the network settings screen, which
can be used to specify a HTTP proxy for any outgoing requests from the
device.
2025-07-11 17:43:22 +02:00
Marc Brooks 11a095c0f6
feat(ntp): enhances time sync with DHCP NTP and custom servers (#625)
* Ensure the mDNS mode is set every time network state changes

Eliminates (mostly) duplicate code

* Add custom NTP and HTTP time sync servers

Since the ordering may have been previously defaulted and saved as "ntp,http", but that was being ignored and fallback-defaults were being used, in Ordering, `ntp` means use the fallback NTP servers, and `http` means use the fallback HTTP URLs. Thus `ntp_user_provided` and `http_user_provided` are the user specified static lists.

* Add support for using DHCP-provided NTP server
2025-07-11 08:04:19 +02:00
Marc Brooks 393bc122d4
chore: fix the base usb configuration (#610)
In reviewing the config.go settings for idProduct and bcdDevice are not formatted correctly. All examples on GitHub have 0x0104 and 0x0100 respectively. The idProduct value gets overwritten with valid values when you change the configuration (because they are correct in the options), but until you do the USB initialization will not be correct.
2025-07-09 23:57:51 +02:00
Aveline 9c9335da31
chore: typo 'supression' should be 'suppression' (#671) 2025-07-03 17:28:00 +02:00
Aveline 73f5659618
fix(usbgadget): add lock for logWithSupression (#653) 2025-07-01 12:54:38 +02:00
Qishuai Liu bf731a8dcb Merge remote-tracking branch 'upstream/dev' into feat/usb-audio 2025-06-22 00:36:01 +09:00
Aveline 3e7d8fb0f5
feat(usbgadget): suppress duplicate error logs (#630). 2025-06-20 18:52:37 +02:00
ronskvm cf9c6e5cc8
chore(hid): change absolute mouse usb interface descriptor's subclass field to zero
Changed absolute mouse usb interface descriptor's subclass field to zero.
2025-06-19 09:11:21 +02:00
Aveline 19871517ec
fix(timesync): queryMultipleHttp hanging if all servers are unreachable (#605) 2025-06-13 00:49:26 +02:00
Ben Kochie 58ade3b551
fix: Update metric naming (#602)
Fix up metric names to follow best practice naming conventions[0].

[0]: https://prometheus.io/docs/practices/naming/

Signed-off-by: SuperQ <superq@gmail.com>
2025-06-12 13:41:43 +02:00
Alex Ballas a7693df92c
fix: the screen doesn't dim or turn off
* Fix for #531

Fix for https://github.com/jetkvm/kvm/issues/531

* typo

* Skip processing if lease hasn't changed to avoid unnecessary wake-ups

* Add comment to clarify the need to stop the tickers
2025-06-03 01:28:14 +02:00
Aveline a28676cd94
feat(websecure): add support for ed25519 certificates (#513) 2025-05-25 11:09:58 +02:00
Aveline 0c5c69f2d3
feat: sync keyboard led status (#502) 2025-05-23 00:12:18 +02:00
Aveline a0f6d01465
fix(usbgadget): do not panic if a change isn't found (#481)
* fix(usbgadget): do not panic if a change isn't found

* chore(usbgadget): rebind usb after updating config
2025-05-20 00:34:32 +02:00
Aveline eeb103adf9
fix: configFS might not be mounted if the directory exists (#479) 2025-05-19 23:59:02 +02:00
Aveline 5ba08de566
fix: unit test not returning error when test fails
* fix: unit test not returning error when test fails

* chore: add unit test to smoketest.yml

* fix: make linter happy
2025-05-19 22:51:11 +02:00
Aveline 7a9fb7cbb1
chore(usbgadget): update usbgadget config only when needed (#474) 2025-05-19 21:48:43 +02:00
rmschooley 0a4a1af80e
Improve/Simplify Mouse Wheel Scroll Behavior (#470)
* Improve/Simplify Mouse Wheel Scroll Behavior

* Update hid_mouse_absolute.go

Attempt to fix line reported as improperly formatted by lint.

* Update utils.go

Removed abs() function since lint states it is no longer used.
2025-05-19 13:03:33 +02:00
Aveline fea89a0d23
chore: run golang tests 2025-05-16 19:53:01 +02:00
Qishuai Liu 64abec0aa3 feat: add usb gadget audio config 2025-05-14 23:15:45 +09:00