Commit Graph

351 Commits

Author SHA1 Message Date
Alex P f24443e072 Improvement: automatically resume audio when the audio usb gadget is re-enabled from settings 2025-08-25 11:05:42 +00:00
Alex P 2afe2ca539 Fix: USB Gadgets updates 2025-08-25 10:41:53 +00:00
Alex P bc53523fbb Fix: USB Gadgets update 2025-08-25 09:19:03 +00:00
Alex P 44a35aa5c2 feat(audio): add socket buffer configuration and monitoring
Add socket buffer configuration support with metrics collection for audio IPC connections. This improves performance monitoring and allows tuning socket buffers for optimal audio streaming performance.

- Introduce SocketBufferConfig struct with default and high-load presets
- Add socket buffer configuration to AudioServer and AudioInputServer
- Implement socket buffer metrics collection (size, utilization, overflow)
- Add new Prometheus metrics for socket buffer monitoring
2025-08-24 23:56:58 +00:00
Alex P 3a28105f56 Fix: linting errors 2025-08-24 23:36:29 +00:00
Alex P a9a1082bcc Docs: Updated documentation 2025-08-24 23:15:46 +00:00
Alex e0f7b1d930
Merge branch 'dev' into feat/audio-support 2025-08-25 02:08:12 +03:00
Marc Brooks 5188717bb9 fix: useJsonRpc "any" issue
PR #743 didn't have all the files included in the commit.
Mea culpa, many apologies.
2025-08-24 22:58:35 +00:00
Alex Ballas 70e49a1cac chore: ensure that rpc messages get processed sequentially and avoid phantom and repeated key presses (#744) 2025-08-24 22:57:37 +00:00
Marc Brooks 9d40263eed fix: compiler error (#743)
Using { send } gives the resp a type instead of any
2025-08-24 22:54:26 +00:00
Adam Shiervani 0651faeceb feat: improve custom jiggler settings and add timezone support (#742)
* feat: add timezone support to jiggler and fix custom settings persistence

- Add timezone field to JigglerConfig with comprehensive IANA timezone list
- Fix custom settings not loading current values
- Remove business hours preset, add as examples in custom settings
- Improve error handling for invalid cron expressions

* fix: format jiggler.go with gofmt

* fix: add embedded timezone data and validation

- Import time/tzdata to embed timezone database in binary
- Add timezone validation in runJigglerCronTab() to gracefully fallback to UTC
- Add timezone to debug logging in rpcSetJigglerConfig
- Fixes 'unknown time zone' errors when system lacks timezone data

* refactor: add timezone field comments from jiggler options

* chore: move tzdata to backend

* refactor: fix JigglerSetting linting

- Adjusted useEffect dependency to include send function for better data fetching
- Modified layout classes for improved responsiveness and consistency
- Cleaned up code formatting for better readability

---------

Co-authored-by: Siyuan Miao <i@xswan.net>
2025-08-24 22:54:26 +00:00
Serhii 199cca83ed Update mount list for new Debian 13 release (#739)
* Update mount list for new Debian 13 release

* Keep Debian 12 Bookworm as old-stable release
2025-08-24 22:54:26 +00:00
Marc Brooks a3b2b46f49 Lint fix from last merge. (#733) 2025-08-24 22:54:26 +00:00
jackislanding f729675a3f Added crontab scheduler for jiggler (#316) 2025-08-24 22:54:26 +00:00
Marc Brooks 785a68d923 chore(ui)/package upgrades (#724)
| Package                          | From     | To           |
| -------------------------------- | ----------- | ------------ |
| @headlessui/react        | 2.2.4     | 2.2.7        |
| framer-motion              | 12.23.3 | 12.23.12 |
| react                                | 19.1.0   | 19.1.1     |
| react-dom                       | 19.1.0   | 19.1.1    |
| react-simple-keyboard | 3.8.93   | 3.8.106  |
|@eslint/js                         | 9.30.1   | 9.32.0    |
| @types/react                  | 19.1.8   | 19.1.9    |
| @types/react-dom         | 19.1.8   | 19.1.9   |
|eslint                                 | 9.30.1   | 9.32.0    |
|eslint-config-prettier       | 10.1.5   | 10.1.8   |
| typescript                         |  5.8.3    | 5.9.2     |
2025-08-24 22:54:26 +00:00
Alex P 57b7bafcc1 feat(audio): implement comprehensive audio optimization system
- Add AdaptiveOptimizer for real-time parameter adjustment based on latency metrics
- Add AdaptiveBufferConfig for dynamic buffer sizing based on system load
- Implement BatchAudioProcessor for reduced CGO call overhead
- Add AudioBufferPool with sync.Pool for optimized memory allocation
- Implement LatencyMonitor with exponential moving averages
- Add MemoryMetrics for comprehensive memory usage tracking
- Implement PriorityScheduler with SCHED_FIFO for real-time audio processing
- Add zero-copy operations to minimize memory copying in audio pipeline
- Enhance IPC architecture with intelligent frame dropping
- Add comprehensive Prometheus metrics for performance monitoring
- Implement triple-goroutine architecture for audio input processing
- Add adaptive buffering and performance feedback loops
2025-08-24 22:33:49 +00:00
Marc Brooks d952480c2a
fix: useJsonRpc "any" issue
PR #743 didn't have all the files included in the commit.
Mea culpa, many apologies.
2025-08-24 11:40:43 +02:00
Alex P 88679cda2f 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 76174f4486 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 27a999c58a [WIP] Updates: audio output & input subprocesses memory & cpu usage 2025-08-23 21:51:24 +00:00
Alex P ddc2f90016 [WIP] Updates: audio output & input subprocesses memory & cpu usage 2025-08-23 21:36:57 +00:00
Alex P 692f7ddb2d [WIP] Updates: audio output & input subprocesses memory & cpu usage 2025-08-23 21:19:28 +00:00
Alex P 38ad145863 [WIP] Updates: audio output & input subprocesses memory & cpu usage 2025-08-23 21:06:02 +00:00
Alex P 879ea5e472 Fix: fix audio input by reverting change 2025-08-23 16:41:45 +00:00
Alex P 2082b1a671 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 5e28a6c429 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 0e1c896aa2 Fix: go lint errors 2025-08-22 23:23:07 +00:00
Alex P 0ed84257f6 Improvements, Fixes: enhanced audio metrics (including prometheus format), fixed lint errors 2025-08-22 23:20:22 +00:00
Alex P 32055f5762 Cleanup: remove polling fallback for /audio/mute status 2025-08-22 22:54:05 +00:00
Alex P 97bcb3c1ea Fix: linter errors 2025-08-22 22:29:48 +00:00
Alex P 6ecb829334 Fix: linter errors 2025-08-22 22:28:15 +00:00
Alex P e360348829 Fix: linter errors 2025-08-22 22:26:15 +00:00
Alex P 1e1677b35a Fix: linter errors 2025-08-22 22:23:50 +00:00
Alex P 3c1e9b8dc2 Fix: audio subprocess handling, avg atency audio metric 2025-08-22 22:21:41 +00:00
Alex P 62d4ec2f89 Fix: audio subprocess handling 2025-08-22 22:17:27 +00:00
Alex P aeb7a12c72 Fix: linting errors 2025-08-22 22:07:35 +00:00
Alex P 671d875890 Fix: literal /home/vscode in cache paths 2025-08-22 21:49:15 +00:00
Alex P 7129bd5521 Fix: workflow indentation 2025-08-22 21:43:51 +00:00
Alex P bd4fbef6dc Tweak: steps order 2025-08-22 21:43:17 +00:00
Alex P b3373e56de Improvement: use cache save/restore actions 2025-08-22 21:41:44 +00:00
Alex P 73e8897fc3 Improvement: Automatically invalidate cache 2025-08-22 21:37:53 +00:00
Alex P de0077a351 Fix: always save cache 2025-08-22 21:34:27 +00:00
Alex P 4875c243d3 Fix: Lint env vars 2025-08-22 21:30:24 +00:00
Alex P 071129a9ec Fix: use absolute path for caching 2025-08-22 21:26:37 +00:00
Alex P dee8a0b5a1 Fix: golangci-lint 2025-08-22 21:21:09 +00:00
Alex P a976ce1da9 Updates: set LDFLAGS and CFLAGS for the lint steps 2025-08-22 21:15:25 +00:00
Alex P d5295d0e4b Updates: golangci-lint workflow 2025-08-22 21:06:40 +00:00
Alex Ballas 8e27cd6b60
chore: ensure that rpc messages get processed sequentially and avoid phantom and repeated key presses (#744) 2025-08-22 20:15:46 +02:00
Alex P 423d5775e3 [WIP] Performance Enhancements: move audion processing into a separate process 2025-08-22 12:04:30 +00:00
Marc Brooks bb87fb5a1a
fix: compiler error (#743)
Using { send } gives the resp a type instead of any
2025-08-22 12:15:27 +02:00