Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
283 commits
Select commit Hold shift + click to select a range
73e8897
Improvement: Automatically invalidate cache
pennycoders Aug 22, 2025
b3373e5
Improvement: use cache save/restore actions
pennycoders Aug 22, 2025
bd4fbef
Tweak: steps order
pennycoders Aug 22, 2025
7129bd5
Fix: workflow indentation
pennycoders Aug 22, 2025
671d875
Fix: literal /home/vscode in cache paths
pennycoders Aug 22, 2025
aeb7a12
Fix: linting errors
pennycoders Aug 22, 2025
62d4ec2
Fix: audio subprocess handling
pennycoders Aug 22, 2025
3c1e9b8
Fix: audio subprocess handling, avg atency audio metric
pennycoders Aug 22, 2025
1e1677b
Fix: linter errors
pennycoders Aug 22, 2025
e360348
Fix: linter errors
pennycoders Aug 22, 2025
6ecb829
Fix: linter errors
pennycoders Aug 22, 2025
97bcb3c
Fix: linter errors
pennycoders Aug 22, 2025
32055f5
Cleanup: remove polling fallback for /audio/mute status
pennycoders Aug 22, 2025
0ed8425
Improvements, Fixes: enhanced audio metrics (including prometheus for…
pennycoders Aug 22, 2025
0e1c896
Fix: go lint errors
pennycoders Aug 22, 2025
5e28a6c
feat(audio): add system memory endpoint and process metrics monitoring
pennycoders Aug 23, 2025
2082b1a
refactor(audio): rename audio-server flag to audio-output-server for …
pennycoders Aug 23, 2025
879ea5e
Fix: fix audio input by reverting change
pennycoders Aug 23, 2025
38ad145
[WIP] Updates: audio output & input subprocesses memory & cpu usage
pennycoders Aug 23, 2025
692f7dd
[WIP] Updates: audio output & input subprocesses memory & cpu usage
pennycoders Aug 23, 2025
ddc2f90
[WIP] Updates: audio output & input subprocesses memory & cpu usage
pennycoders Aug 23, 2025
27a999c
[WIP] Updates: audio output & input subprocesses memory & cpu usage
pennycoders Aug 23, 2025
76174f4
refactor(audio): improve performance and simplify code structure
pennycoders Aug 23, 2025
88679cd
refactor(audio): improve process monitoring with dynamic clock ticks
pennycoders Aug 23, 2025
57b7baf
feat(audio): implement comprehensive audio optimization system
pennycoders Aug 24, 2025
785a68d
chore(ui)/package upgrades (#724)
IDisposable Aug 12, 2025
f729675
Added crontab scheduler for jiggler (#316)
jackislanding Aug 12, 2025
a3b2b46
Lint fix from last merge. (#733)
IDisposable Aug 13, 2025
199cca8
Update mount list for new Debian 13 release (#739)
kt315ua Aug 18, 2025
0651fae
feat: improve custom jiggler settings and add timezone support (#742)
adamshiervani Aug 19, 2025
9d40263
fix: compiler error (#743)
IDisposable Aug 22, 2025
70e49a1
chore: ensure that rpc messages get processed sequentially and avoid …
alexballas Aug 22, 2025
5188717
fix: useJsonRpc "any" issue
IDisposable Aug 24, 2025
e0f7b1d
Merge branch 'dev' into feat/audio-support
pennycoders Aug 24, 2025
a9a1082
Docs: Updated documentation
pennycoders Aug 24, 2025
3a28105
Fix: linting errors
pennycoders Aug 24, 2025
44a35aa
feat(audio): add socket buffer configuration and monitoring
pennycoders Aug 24, 2025
bc53523
Fix: USB Gadgets update
pennycoders Aug 25, 2025
2afe2ca
Fix: USB Gadgets updates
pennycoders Aug 25, 2025
f24443e
Improvement: automatically resume audio when the audio usb gadget is …
pennycoders Aug 25, 2025
1a0377b
Improvement: automatically resume audio when the audio usb gadget is …
pennycoders Aug 25, 2025
6f02870
fix(audio): improve audio device state management
pennycoders Aug 25, 2025
c89d678
refactor(audio): remove unused context from audio input manager
pennycoders Aug 25, 2025
d1c192b
feat(audio): add real-time USB audio config updates and validation
pennycoders Aug 25, 2025
7ec583e
refactor(audio): centralize config and remove debug logs
pennycoders Aug 25, 2025
35a666e
refactor(audio): centralize configuration constants in audio module
pennycoders Aug 25, 2025
9e343b3
refactor(audio): move hardcoded values to config for better flexibility
pennycoders Aug 25, 2025
c521692
refactor(audio): centralize config constants and update usage
pennycoders Aug 25, 2025
60a6e6c
refactor(audio): centralize config values and improve documentation
pennycoders Aug 25, 2025
34f8829
refactor(audio): improve configuration handling and validation
pennycoders Aug 25, 2025
6898a6e
feat(audio): add granular metrics collection and comprehensive error …
pennycoders Aug 25, 2025
fff2d2b
feat(usbgadget): add nil checks for gadget operations and cleanup tests
pennycoders Aug 25, 2025
e4ed2b8
refactor(audio): rename audio components for clarity and add validation
pennycoders Aug 26, 2025
b1f85db
feat(audio): enhance error handling and add device health monitoring
pennycoders Aug 26, 2025
6a68e23
refactor(audio): improve error handling and memory management
pennycoders Aug 26, 2025
e8d12ba
style(audio): fix formatting and add missing newlines
pennycoders Aug 26, 2025
8fb0b9f
feat(audio): centralize audio configuration and improve debugging
pennycoders Aug 27, 2025
dc2db8e
feat(audio): add comprehensive input validation and base components
pennycoders Aug 27, 2025
50e0419
refactor(audio): standardize log levels and messages across components
pennycoders Aug 27, 2025
cb20956
refactor(AudioControlPopover): simplify audio metrics display and rem…
pennycoders Aug 27, 2025
6355dd8
feat(audio): add pool hit tracking and optimize buffer management
pennycoders Aug 27, 2025
9dda569
feat(audio): enhance validation and add logging standards
pennycoders Aug 27, 2025
e3e7b89
style(audio): fix formatting and add missing newlines
pennycoders Aug 27, 2025
25363ce
perf(audio): replace frame validation with ultra-fast version
pennycoders Aug 27, 2025
cdf0b20
perf(audio): optimize validation and buffer pool with caching
pennycoders Aug 27, 2025
ece36ce
feat(audio): optimize validation and add dynamic opus encoder configu…
pennycoders Aug 27, 2025
3efe2f2
refactor(audio/validation): improve frame data validation with specif…
pennycoders Aug 27, 2025
758bbbf
feat(audio): add latency histogram metrics collection and visualization
pennycoders Aug 28, 2025
f9adb43
feat(audio): add latency metrics collection for input and output
pennycoders Aug 28, 2025
fe45719
refactor(audio): remove granular latency metrics and histogram functi…
pennycoders Aug 28, 2025
0d4176c
refactor(audio): centralize metrics collection with new registry
pennycoders Aug 28, 2025
9c0aff4
feat(audio): implement audio input supervisor and opus config management
pennycoders Aug 28, 2025
858859e
perf(audio): optimize audio config for RV1106 SoC compatibility
pennycoders Aug 28, 2025
6adcc26
feat(audio): add goroutine cache cleanup and process reuse
pennycoders Aug 29, 2025
fd76083
feat(audio): implement dynamic Opus config updates and optimize audio…
pennycoders Sep 1, 2025
f51f6da
fix(audio): improve logging for Opus config and subprocess status
pennycoders Sep 1, 2025
dfbf924
fix(audio): improve audio initialization and process termination hand…
pennycoders Sep 1, 2025
950ca2b
fix(audio): improve process termination handling in input supervisor
pennycoders Sep 1, 2025
8110be6
feat(audio): optimize audio processing with batch processing and goro…
pennycoders Sep 3, 2025
d7b67e5
feat(audio): implement goroutine pool for task processing
pennycoders Sep 3, 2025
f9781f1
perf(audio): increase worker pool sizes and optimize worker management
pennycoders Sep 3, 2025
1b7198a
feat(audio): implement sized buffer pool and config caching
pennycoders Sep 3, 2025
2ab90e7
feat(audio): add validation cache fields to AudioConfigCache
pennycoders Sep 3, 2025
9f1dd28
feat(audio): add batch write processing and improve thread management
pennycoders Sep 3, 2025
370178e
fix(audio): remove arm architecture restriction from cgo build tags
pennycoders Sep 3, 2025
5353c1c
perf(audio): optimize opus decode-write with separate buffers
pennycoders Sep 3, 2025
a557987
perf(audio): optimize hotpath by removing redundant checks and logging
pennycoders Sep 3, 2025
a741f05
fix(audio): add proper locking for config cache updates
pennycoders Sep 3, 2025
260f62e
perf(audio): optimize audio processing paths and reduce overhead
pennycoders Sep 3, 2025
5c55da0
perf(audio): optimize metrics collection and logging overhead
pennycoders Sep 3, 2025
ca365f1
feat(audio): add subprocess pre-warming to reduce activation latency
pennycoders Sep 3, 2025
2568660
feat(metrics): add configurable metrics collection and performance op…
pennycoders Sep 3, 2025
a3702da
Cleanup: reduce PR complexity
pennycoders Sep 3, 2025
5dc0432
[WIP] Cleanup: decrease PR complexity
pennycoders Sep 3, 2025
476a245
[WIP] Cleanup: Reduce PR complexity
pennycoders Sep 3, 2025
b497444
[WIP] Cleanup: reduce PR complexity
pennycoders Sep 3, 2025
b63404c
[WIP] Cleanup: reduce PR complexity
pennycoders Sep 3, 2025
6f15fdf
perf(build): update ARM optimization flags for better compatibility
pennycoders Sep 4, 2025
cdf6731
[WIP] Performance Updates:
pennycoders Sep 4, 2025
c404596
Audio Input resiliency. Make sure the IPC client always recovers
pennycoders Sep 4, 2025
c1cc8dd
refactor(audio): remove audio input subprocess pre-warming feature
pennycoders Sep 4, 2025
4075057
[WIP] Cleanup: Reduce PR Complexity
pennycoders Sep 4, 2025
463f34e
Fix: audio output not working due to too agressive timeout
pennycoders Sep 5, 2025
1a0c7a8
refactor(audio): rename latency config fields for clarity
pennycoders Sep 5, 2025
fcd07b2
perf(audio): enhance buffer pool performance with adaptive caching
pennycoders Sep 5, 2025
9cb976a
Merge branch 'dev' into feat/audio-support
pennycoders Sep 5, 2025
d907267
Updates: merge 'dev' intu 'feat/audio-support'
pennycoders Sep 5, 2025
0a38451
feat(audio): add audio handlers and refactor session management
pennycoders Sep 5, 2025
2c2f2d4
Refactoring: Move most audio business logic into the audio package
pennycoders Sep 5, 2025
e45bec4
Fix: currently selected preset not coming from the API
pennycoders Sep 5, 2025
1584373
Fix: quality not updating in the Audio Control Popover when changed
pennycoders Sep 5, 2025
d3bbe1b
refactor(audio): standardize component logging names and cleanup
pennycoders Sep 5, 2025
8a189ba
[WIP] Updates / FIles reorg: reduce PR complexity
pennycoders Sep 5, 2025
947b4f9
[WIP] Updates: Reduce PR complexity
pennycoders Sep 5, 2025
d3e2b2d
fix(audio): correct mute state broadcast in audio control service
pennycoders Sep 5, 2025
5a0dce9
Fix: Microphone & audio on page load, PID field parsing in audio inp…
pennycoders Sep 6, 2025
b267348
feat(audio): add microphone stop endpoint and improve mute handling
pennycoders Sep 6, 2025
e27f1cf
fix(AudioControlPopover): swap mute button theme and labels for clari…
pennycoders Sep 6, 2025
7d39a27
[WIP] Improvements: improve Audio Input Activation / Deactivation pro…
pennycoders Sep 7, 2025
e3b4bb2
refactor(audio): replace mute functionality with start/stop for micro…
pennycoders Sep 7, 2025
bfdbbdc
[WIP] Simplification
pennycoders Sep 7, 2025
96a6a0f
refactor(audio): improve process management and error handling
pennycoders Sep 7, 2025
a2a87b4
refactor(audio): move channel and process management to base supervisor
pennycoders Sep 7, 2025
6890f17
refactor(audio): consolidate supervision logic into base implementation
pennycoders Sep 8, 2025
a6913bf
perf(audio): make refCount operations atomic and optimize frame pooling
pennycoders Sep 8, 2025
323d258
refactor(audio): improve memory management with atomic operations and…
pennycoders Sep 8, 2025
df58e04
feat(audio): implement zero-copy batch processing with reference coun…
pennycoders Sep 8, 2025
219c972
Merge branch 'dev' into feat/audio-support
pennycoders Sep 8, 2025
91f9dba
feat(audio): improve audio quality handling and recovery mechanisms
pennycoders Sep 8, 2025
1d1658d
refactor(audio): replace GetConfig() calls with direct Config access
pennycoders Sep 8, 2025
6f10010
refactor(audio): remove redundant config variable assignments
pennycoders Sep 8, 2025
8cf0b63
perf(audio): increase buffer sizes and timeouts for quality change bu…
pennycoders Sep 8, 2025
0893eb8
feat(audio): improve reliability with graceful degradation and async …
pennycoders Sep 8, 2025
f873b50
fix(audio): adjust congestion and CPU thresholds for single-core system
pennycoders Sep 8, 2025
89e68f5
[WIP] Change playback latency spikes on Audio Output Quality changes
pennycoders Sep 8, 2025
aa21b4b
Updates: increase congestion treshold multiplier
pennycoders Sep 8, 2025
845eade
[WIP] Fix: Audio Latency issues: move audio to a dedicated media stream
pennycoders Sep 9, 2025
0ebfc76
[WIP] Cleanup: PR SImplification
pennycoders Sep 9, 2025
00e5148
[WIP] Cleanup: reduce PR complexity
pennycoders Sep 9, 2025
f71d180
[WIP] Cleanup: reduce PR complexity
pennycoders Sep 9, 2025
2bc7e50
[WIP] Cleanup, Refactor: Reduce PR complexity, common IPC layer
pennycoders Sep 9, 2025
3c6184d
[Milestone] Improvement: In-flight audio output quality update
pennycoders Sep 9, 2025
bda92b4
[Milestone] Fix: in-flight audio input quality updates
pennycoders Sep 9, 2025
a5d1ef1
refactor(audio): optimize performance and simplify code
pennycoders Sep 9, 2025
5d4f4d8
UX Improvement: keep Mic state accross page refreshes
pennycoders Sep 9, 2025
0f2aa9a
feat(audio): improve socket handling and validation performance
pennycoders Sep 9, 2025
02acee0
Fix: Audio Output Enable / Disable
pennycoders Sep 9, 2025
eca1e6a
Cleanup: implement PR Review suggestions
pennycoders Sep 9, 2025
8cff7d6
pr-optimizations,perf(input): optimize JSON-RPC input handling with u…
pennycoders Sep 9, 2025
2a81497
Improvements: input performance
pennycoders Sep 9, 2025
d4c10ae
Updates: use uint64 since we won't have negative numbers here
pennycoders Sep 9, 2025
f48c3fe
[WIP] Updates, Cleanup: use uint64 for non-negative values
pennycoders Sep 9, 2025
e0b6e61
Updates: defer the mutex unlock
pennycoders Sep 9, 2025
eab0261
Cleanup: remove devLog with calculated param
pennycoders Sep 9, 2025
5da357b
[WIP] Cleanup: Remove hid optimization code, as it is out of scope
pennycoders Sep 9, 2025
0e76023
Improvement (Maintainability): Make all C code more manageable by mov…
pennycoders Sep 11, 2025
15baf93
Merge branch 'dev' into feat/audio-support
pennycoders Sep 11, 2025
9e43921
Fix: add accidentally removed test file back, devcontainer build proc…
pennycoders Sep 12, 2025
49d62f8
Cleanup: only set PKG_CONFIG_PATH once
pennycoders Sep 12, 2025
557aa58
Cleanup: Simplify Makefile by exporting all needed env vars at the top
pennycoders Sep 12, 2025
0eaad6b
Merge branch 'dev' into feat/audio-support
pennycoders Sep 13, 2025
b6858ab
[WIP] Cleanup / Refinement: PR Review
pennycoders Sep 14, 2025
c8630e7
[WIP] Cleanpup: Remove audio input quality settings to reduce complexity
pennycoders Sep 15, 2025
e296949
Fix: indentation
pennycoders Sep 15, 2025
9d6bd99
[WIP] Cleanpup: Remove audio input quality settings to reduce complexity
pennycoders Sep 15, 2025
cca1fe7
[WIP] Cleanpup: Remove audio input quality settings to reduce complexity
pennycoders Sep 15, 2025
ca38ebe
[WIP] Fix: add commented code back
pennycoders Sep 15, 2025
b040b8f
[WIP] Optimizations: Optimize audio system
pennycoders Sep 15, 2025
ebb7960
Fix: pcm_snd_wait won't work when device is busy
pennycoders Sep 15, 2025
7ab4a0e
[WIP] Simplification: PR Simplification
pennycoders Sep 15, 2025
996016b
[WIP] Cleanup: remove unnecessary complexity
pennycoders Sep 15, 2025
e894470
[WIP] Cleanup: function naming
pennycoders Sep 16, 2025
fb98c4e
[WIP] Maintainability: Add debug / trace logs to make it easy to debu…
pennycoders Sep 16, 2025
5e257b3
[WIP] Add debug logging throughout the audio system
pennycoders Sep 16, 2025
0944c88
[WIP] Maintainability Improvement: Add debug logging throughout the a…
pennycoders Sep 16, 2025
1f88dab
[WIP] Maintainability Improvement: Add debug logging throughout the a…
pennycoders Sep 16, 2025
b23cc50
[WIP] Cleanup: removed redundant code
pennycoders Sep 16, 2025
a8b58b5
[WIP] Cleanup: removed redundant code
pennycoders Sep 16, 2025
647eca4
Cleanup: removed redundant code, comments, etc.
pennycoders Sep 16, 2025
7ffb9e1
Cleanup: removed redundant code, comments, etc.
pennycoders Sep 16, 2025
8a3f1b6
Cleanup, Optimizations: Small aaudio optimizations
pennycoders Sep 16, 2025
2f7bf55
Cleanup, Optimizations: Small aaudio optimizations
pennycoders Sep 16, 2025
26e7180
Cleanup, Optimizations: Small aaudio optimizations
pennycoders Sep 16, 2025
a5fb3bf
Fix: remove misplaced const
pennycoders Sep 16, 2025
caa0a60
Cleanup: removed redundant code
pennycoders Sep 16, 2025
0027001
Cleanup: removed redundant code
pennycoders Sep 16, 2025
55bcfb5
Consistency: keep if block multi-line
pennycoders Sep 16, 2025
eca3c52
PR Review Optimization: As recommended, use ternary operators instead…
pennycoders Sep 16, 2025
140a803
perf(audio): add ARM NEON SIMD optimizations for audio processing
pennycoders Sep 16, 2025
17c3c4b
PR Cleanup: reset .golangci.yml to its original state
pennycoders Sep 19, 2025
3e24a3c
Merge branch 'dev' into feat/audio-support
pennycoders Sep 19, 2025
1dbc6c9
[WIP] Cleanup: PR cleanup
pennycoders Sep 19, 2025
432303e
[WIP] Cleanup: PR Cleanup
pennycoders Sep 19, 2025
f2edfa6
[WIP] Cleanup: PR Cleanup
pennycoders Sep 19, 2025
8b86124
[WIP] Cleanup: PR Cleanup
pennycoders Sep 19, 2025
6ee79b7
[WIP] Cleanup: PR Cleanup
pennycoders Sep 19, 2025
274854b
[WIP] Cleanup: PR Cleanup
pennycoders Sep 19, 2025
cd87aa4
[WIP] Cleanup: PR Cleanup
pennycoders Sep 19, 2025
b6d093f
[WIP] Cleanup: PR cleanup - restore commented logs
pennycoders Sep 20, 2025
439f57c
[WIP] CLeanup: Remove unused or redundant code or comments
pennycoders Sep 20, 2025
a84f63c
Fix: make sure audio output enable / disable doesn't need a refresh i…
pennycoders Sep 20, 2025
f2ad918
[WIP] Improvements: Improve audio resume mechanism after Hardware Set…
pennycoders Sep 21, 2025
dec0b9d
[WIP] Improvements: Improve audio resume mechanism after Hardware Set…
pennycoders Sep 21, 2025
093f2bb
Improvement: improve audio input restauration mechanism
pennycoders Sep 21, 2025
4dec696
[WIP] Improvements, Bugfixes: Improve audio experience when running i…
pennycoders Sep 21, 2025
b63af01
[WIP] Improvements, Bugfixes: Improve audio experience when running i…
pennycoders Sep 21, 2025
7060f9e
[WIP] Improvements, Bugfixes: Improve audio experience when running i…
pennycoders Sep 21, 2025
d311dee
[WIP] Improvements, Bugfixes: Improve audio experience when running i…
pennycoders Sep 21, 2025
630571d
[WIP] Improvements, Bugfixes: Improve audio experience when running i…
pennycoders Sep 21, 2025
dcce0fe
Merge branch 'dev' into feat/audio-support
pennycoders Sep 26, 2025
6c6a1de
[WIP] Updates: simplify audio system
pennycoders Sep 30, 2025
680607e
[WIP] Updates: simplify audio system
pennycoders Sep 30, 2025
f6dd605
[WIP] Updates: simplify audio system
pennycoders Sep 30, 2025
753c613
[WIP] Updates: simplify audio system
pennycoders Sep 30, 2025
01719e0
[WIP] Updates: simplify audio system
pennycoders Sep 30, 2025
76b80da
Updates: adjust gain to avoid audio artifacts
pennycoders Sep 30, 2025
fc38830
[WIP] Updates: simplify audio system
pennycoders Sep 30, 2025
e989cad
[WIP] Fix: crackling sound when seeking forwars
pennycoders Sep 30, 2025
05b347f
[WIP] Fix: crackling sound when seeking forwars
pennycoders Sep 30, 2025
7dc57bc
[WIP] Fix: crackling sound when seeking forward after migrating to HD…
pennycoders Sep 30, 2025
35b5dbd
[WIP] Cleanup: cleanup audio code after HDMI switch
pennycoders Sep 30, 2025
70ef719
Cleanup: remove silence detection
pennycoders Sep 30, 2025
160a925
Merge branch 'dev' into feat/audio-support
pennycoders Sep 30, 2025
bdcac6a
[WIP] Updates: update build flows to work with the CGO jetkvm_native
pennycoders Oct 1, 2025
ef5c25e
Updates: integrate all dev branch changes
pennycoders Oct 1, 2025
74f73d9
Merge branch 'dev' into feat/audio-support
pennycoders Oct 1, 2025
6ccd9fd
[WIP] Updates: use native C binaries for audio
pennycoders Oct 1, 2025
4c12783
[WIP] Updates: reduce PR complexity
pennycoders Oct 1, 2025
56c02f1
[WIP] Updates: reduce PR complexity
pennycoders Oct 1, 2025
257993e
[WIP] Updates: reduce PR complexity
pennycoders Oct 1, 2025
178c748
[WIP] Updates: reduce PR complexity
pennycoders Oct 1, 2025
c8e2203
[WIP] Updates: reduce PR complexity
pennycoders Oct 1, 2025
67447e4
[WIP] Updates: reduce PR complexity
pennycoders Oct 1, 2025
7872ddc
Refactor: Simplify / rewrite Audio
pennycoders Oct 6, 2025
141e2f9
fix: Address linting errors in audio code
pennycoders Oct 6, 2025
5158c89
fix: Replace 'any' with proper React.ChangeEvent type in AudioPopover
pennycoders Oct 6, 2025
04dd37f
fix: Add noise gate to prevent amplifying silence artifacts
pennycoders Oct 6, 2025
19fe908
refactor: Simplify audio implementation
pennycoders Oct 6, 2025
9c72db9
feat: Optimize audio quality and default to USB audio
pennycoders Oct 6, 2025
58fad71
[WIP] Updates: support in-process mode
pennycoders Oct 7, 2025
9d7fd87
[WIP] Updates: support in-process mode
pennycoders Oct 7, 2025
0f16e0b
[WIP] Updates: support in-process mode
pennycoders Oct 7, 2025
9abb2aa
[WIP] Updates: support in-process mode
pennycoders Oct 7, 2025
00b8da4
[WIP] Updates: support in-process mode
pennycoders Oct 7, 2025
035ba4c
[WIP] Updates: support in-process mode
pennycoders Oct 7, 2025
dd09cbc
Cleanup: PR Comments
pennycoders Oct 7, 2025
1bca60a
Merge branch 'feat/dual-audio-mode' into feat/audio-support
pennycoders Oct 7, 2025
bb5634b
refactor: Remove subprocess audio infrastructure, use CGO-only
pennycoders Oct 7, 2025
532e83e
Cleanup: reduce drift from dev
pennycoders Oct 7, 2025
71553bc
Merge branch 'dev' into feat/audio-support
pennycoders Oct 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 32 additions & 4 deletions .devcontainer/install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function sudo() {
if [ "$UID" -eq 0 ]; then
"$@"
else
${SUDO_PATH} "$@"
${SUDO_PATH} -E "$@"
fi
}

Expand All @@ -16,7 +16,7 @@ sudo apt-get update && \
sudo apt-get install -y --no-install-recommends \
build-essential \
device-tree-compiler \
gperf g++-multilib gcc-multilib \
gperf \
libnl-3-dev libdbus-1-dev libelf-dev libmpc-dev dwarves \
bc openssl flex bison libssl-dev python3 python-is-python3 texinfo kmod cmake \
wget zstd \
Expand All @@ -30,7 +30,35 @@ pushd "${BUILDKIT_TMPDIR}" > /dev/null

wget https://github.com/jetkvm/rv1106-system/releases/download/${BUILDKIT_VERSION}/buildkit.tar.zst && \
sudo mkdir -p /opt/jetkvm-native-buildkit && \
sudo tar --use-compress-program="unzstd --long=31" -xvf buildkit.tar.zst -C /opt/jetkvm-native-buildkit && \
sudo tar --use-compress-program="zstd -d --long=31" -xvf buildkit.tar.zst -C /opt/jetkvm-native-buildkit && \
rm buildkit.tar.zst
popd
rm -rf "${BUILDKIT_TMPDIR}"

# Install audio dependencies (ALSA and Opus) for JetKVM
echo "Installing JetKVM audio dependencies..."
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
PROJECT_ROOT="$(dirname "${SCRIPT_DIR}")"
AUDIO_DEPS_SCRIPT="${PROJECT_ROOT}/install_audio_deps.sh"

if [ -f "${AUDIO_DEPS_SCRIPT}" ]; then
echo "Running audio dependencies installation..."
# Pre-create audio libs directory with proper permissions
sudo mkdir -p /opt/jetkvm-audio-libs
sudo chmod 777 /opt/jetkvm-audio-libs
# Run installation script (now it can write without sudo)
bash "${AUDIO_DEPS_SCRIPT}"
echo "Audio dependencies installation completed."
if [ -d "/opt/jetkvm-audio-libs" ]; then
echo "Audio libraries installed in /opt/jetkvm-audio-libs"
# Set recursive permissions for all subdirectories and files
sudo chmod -R 777 /opt/jetkvm-audio-libs
echo "Permissions set to allow all users access to audio libraries"
else
echo "Error: /opt/jetkvm-audio-libs directory not found after installation."
exit 1
fi
else
echo "Warning: Audio dependencies script not found at ${AUDIO_DEPS_SCRIPT}"
echo "Skipping audio dependencies installation."
fi
rm -rf "${BUILDKIT_TMPDIR}"
74 changes: 74 additions & 0 deletions .devcontainer/install_audio_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/bin/bash
# .devcontainer/install_audio_deps.sh
# Build ALSA and Opus static libs for ARM in /opt/jetkvm-audio-libs
set -e

# Sudo wrapper function
SUDO_PATH=$(which sudo 2>/dev/null || echo "")
function use_sudo() {
if [ "$UID" -eq 0 ]; then
"$@"
elif [ -n "$SUDO_PATH" ]; then
${SUDO_PATH} -E "$@"
else
"$@"
fi
}

# Accept version parameters or use defaults
ALSA_VERSION="${1:-1.2.14}"
OPUS_VERSION="${2:-1.5.2}"

AUDIO_LIBS_DIR="/opt/jetkvm-audio-libs"
BUILDKIT_PATH="/opt/jetkvm-native-buildkit"
BUILDKIT_FLAVOR="arm-rockchip830-linux-uclibcgnueabihf"
CROSS_PREFIX="$BUILDKIT_PATH/bin/$BUILDKIT_FLAVOR"

# Create directory with proper permissions
use_sudo mkdir -p "$AUDIO_LIBS_DIR"
use_sudo chmod 777 "$AUDIO_LIBS_DIR"
cd "$AUDIO_LIBS_DIR"

# Download sources
[ -f alsa-lib-${ALSA_VERSION}.tar.bz2 ] || wget -N https://www.alsa-project.org/files/pub/lib/alsa-lib-${ALSA_VERSION}.tar.bz2
[ -f opus-${OPUS_VERSION}.tar.gz ] || wget -N https://downloads.xiph.org/releases/opus/opus-${OPUS_VERSION}.tar.gz

# Extract
[ -d alsa-lib-${ALSA_VERSION} ] || tar xf alsa-lib-${ALSA_VERSION}.tar.bz2
[ -d opus-${OPUS_VERSION} ] || tar xf opus-${OPUS_VERSION}.tar.gz

# Optimization flags for ARM Cortex-A7 with NEON (simplified to avoid FD_SETSIZE issues)
OPTIM_CFLAGS="-O2 -mfpu=neon -mtune=cortex-a7 -mfloat-abi=hard"

export CC="${CROSS_PREFIX}-gcc"
export CFLAGS="$OPTIM_CFLAGS"
export CXXFLAGS="$OPTIM_CFLAGS"

# Build ALSA
cd alsa-lib-${ALSA_VERSION}
if [ ! -f .built ]; then
chown -R $(whoami):$(whoami) .
# Use minimal ALSA configuration to avoid FD_SETSIZE issues in devcontainer
CFLAGS="$OPTIM_CFLAGS" ./configure --host $BUILDKIT_FLAVOR \
--enable-static=yes --enable-shared=no \
--with-pcm-plugins=rate,linear \
--disable-seq --disable-rawmidi --disable-ucm \
--disable-python --disable-old-symbols \
--disable-topology --disable-hwdep --disable-mixer \
--disable-alisp --disable-aload --disable-resmgr
make -j$(nproc)
touch .built
fi
cd ..

# Build Opus
cd opus-${OPUS_VERSION}
if [ ! -f .built ]; then
chown -R $(whoami):$(whoami) .
CFLAGS="$OPTIM_CFLAGS" ./configure --host $BUILDKIT_FLAVOR --enable-static=yes --enable-shared=no --enable-fixed-point
make -j$(nproc)
touch .built
fi
cd ..

echo "ALSA and Opus built in $AUDIO_LIBS_DIR"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ node_modules

# generated during the build process
#internal/native/include
#internal/native/lib
#internal/native/lib
4 changes: 3 additions & 1 deletion Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ ENV GOPATH=/go
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH

COPY install-deps.sh /install-deps.sh
COPY install_audio_deps.sh /install_audio_deps.sh

RUN /install-deps.sh

# Create build directory
Expand All @@ -21,4 +23,4 @@ RUN go mod download && go mod verify
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]
ENTRYPOINT [ "/entrypoint.sh" ]
104 changes: 93 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,52 @@
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
BUILDDATE := $(shell date -u +%FT%T%z)
BUILDTS := $(shell date -u +%s)
REVISION := $(shell git rev-parse HEAD)
# Build ALSA and Opus static libs for ARM in /opt/jetkvm-audio-libs
build_audio_deps:
bash .devcontainer/install_audio_deps.sh $(ALSA_VERSION) $(OPUS_VERSION)

# Prepare everything needed for local development (toolchain + audio deps + Go tools)
dev_env: build_audio_deps
$(CLEAN_GO_CACHE)
@echo "Installing Go development tools..."
go install golang.org/x/tools/cmd/goimports@latest
@echo "Development environment ready."
JETKVM_HOME ?= $(HOME)/.jetkvm
BUILDKIT_PATH ?= /opt/jetkvm-native-buildkit
BUILDKIT_FLAVOR ?= arm-rockchip830-linux-uclibcgnueabihf
AUDIO_LIBS_DIR ?= /opt/jetkvm-audio-libs

BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
BUILDDATE ?= $(shell date -u +%FT%T%z)
BUILDTS ?= $(shell date -u +%s)
REVISION ?= $(shell git rev-parse HEAD)
VERSION_DEV := 0.4.9-dev$(shell date +%Y%m%d%H%M)
VERSION := 0.4.8


# Audio library versions
ALSA_VERSION ?= 1.2.14
OPUS_VERSION ?= 1.5.2

# Set PKG_CONFIG_PATH globally for all targets that use CGO with audio libraries
export PKG_CONFIG_PATH := $(AUDIO_LIBS_DIR)/alsa-lib-$(ALSA_VERSION)/utils:$(AUDIO_LIBS_DIR)/opus-$(OPUS_VERSION)

# Common command to clean Go cache with verbose output for all Go builds
CLEAN_GO_CACHE := @echo "Cleaning Go cache..."; go clean -cache -v

# Optimization flags for ARM Cortex-A7 with NEON SIMD
OPTIM_CFLAGS := -O3 -mfpu=neon -mtune=cortex-a7 -mfloat-abi=hard -ftree-vectorize -ffast-math -funroll-loops -mvectorize-with-neon-quad -marm -D__ARM_NEON

# Cross-compilation environment for ARM - exported globally
export GOOS := linux
export GOARCH := arm
export GOARM := 7
export CC := $(BUILDKIT_PATH)/bin/$(BUILDKIT_FLAVOR)-gcc
export CGO_ENABLED := 1
export CGO_CFLAGS := $(OPTIM_CFLAGS) -I$(BUILDKIT_PATH)/$(BUILDKIT_FLAVOR)/include -I$(BUILDKIT_PATH)/$(BUILDKIT_FLAVOR)/sysroot/usr/include
export CGO_LDFLAGS := -L$(BUILDKIT_PATH)/$(BUILDKIT_FLAVOR)/lib -L$(BUILDKIT_PATH)/$(BUILDKIT_FLAVOR)/sysroot/usr/lib -lrockit -lrockchip_mpp -lrga -lpthread -lm -ldl

# Audio-specific flags (only used for audio C binaries, NOT for main Go app)
AUDIO_CFLAGS := $(CGO_CFLAGS) -I$(AUDIO_LIBS_DIR)/alsa-lib-$(ALSA_VERSION)/include -I$(AUDIO_LIBS_DIR)/opus-$(OPUS_VERSION)/include -I$(AUDIO_LIBS_DIR)/opus-$(OPUS_VERSION)/celt
AUDIO_LDFLAGS := $(AUDIO_LIBS_DIR)/alsa-lib-$(ALSA_VERSION)/src/.libs/libasound.a $(AUDIO_LIBS_DIR)/opus-$(OPUS_VERSION)/.libs/libopus.a -lm -ldl -lpthread

PROMETHEUS_TAG := github.com/prometheus/common/version
KVM_PKG_NAME := github.com/jetkvm/kvm

Expand Down Expand Up @@ -49,22 +91,26 @@ build_native:
./scripts/build_cgo.sh; \
fi

build_dev: build_native
build_dev: build_native build_audio_deps
$(CLEAN_GO_CACHE)
@echo "Building..."
$(GO_CMD) build \
go build \
-ldflags="$(GO_LDFLAGS) -X $(KVM_PKG_NAME).builtAppVersion=$(VERSION_DEV)" \
$(GO_RELEASE_BUILD_ARGS) \
-o $(BIN_DIR)/jetkvm_app -v cmd/main.go

build_test2json:
$(CLEAN_GO_CACHE)
$(GO_CMD) build -o $(BIN_DIR)/test2json cmd/test2json

build_gotestsum:
$(CLEAN_GO_CACHE)
@echo "Building gotestsum..."
$(GO_CMD) install gotest.tools/gotestsum@latest
cp $(shell $(GO_CMD) env GOPATH)/bin/linux_arm/gotestsum $(BIN_DIR)/gotestsum

build_dev_test: build_test2json build_gotestsum
build_dev_test: build_audio_deps build_test2json build_gotestsum
$(CLEAN_GO_CACHE)
# collect all directories that contain tests
@echo "Building tests for devices ..."
@rm -rf $(BIN_DIR)/tests && mkdir -p $(BIN_DIR)/tests
Expand All @@ -74,7 +120,7 @@ build_dev_test: build_test2json build_gotestsum
test_pkg_name=$$(echo $$test | sed 's/^.\///g'); \
test_pkg_full_name=$(KVM_PKG_NAME)/$$(echo $$test | sed 's/^.\///g'); \
test_filename=$$(echo $$test_pkg_name | sed 's/\//__/g')_test; \
$(GO_CMD) test -v \
go test -v \
-ldflags="$(GO_LDFLAGS) -X $(KVM_PKG_NAME).builtAppVersion=$(VERSION_DEV)" \
$(GO_BUILD_ARGS) \
-c -o $(BIN_DIR)/tests/$$test_filename $$test; \
Expand Down Expand Up @@ -111,9 +157,10 @@ dev_release: frontend build_dev
rclone copyto bin/jetkvm_app r2://jetkvm-update/app/$(VERSION_DEV)/jetkvm_app
rclone copyto bin/jetkvm_app.sha256 r2://jetkvm-update/app/$(VERSION_DEV)/jetkvm_app.sha256

build_release: frontend build_native
build_release: frontend build_native build_audio_deps
$(CLEAN_GO_CACHE)
@echo "Building release..."
$(GO_CMD) build \
go build \
-ldflags="$(GO_LDFLAGS) -X $(KVM_PKG_NAME).builtAppVersion=$(VERSION)" \
$(GO_RELEASE_BUILD_ARGS) \
-o bin/jetkvm_app cmd/main.go
Expand All @@ -127,4 +174,39 @@ release:
@echo "Uploading release..."
@shasum -a 256 bin/jetkvm_app | cut -d ' ' -f 1 > bin/jetkvm_app.sha256
rclone copyto bin/jetkvm_app r2://jetkvm-update/app/$(VERSION)/jetkvm_app
rclone copyto bin/jetkvm_app.sha256 r2://jetkvm-update/app/$(VERSION)/jetkvm_app.sha256
rclone copyto bin/jetkvm_app.sha256 r2://jetkvm-update/app/$(VERSION)/jetkvm_app.sha256

# Run both Go and UI linting
lint: lint-go lint-ui
@echo "All linting completed successfully!"

# Run golangci-lint locally with the same configuration as CI
lint-go: build_audio_deps
@echo "Running golangci-lint..."
@mkdir -p static && touch static/.gitkeep
golangci-lint run --verbose

# Run both Go and UI linting with auto-fix
lint-fix: lint-go-fix lint-ui-fix
@echo "All linting with auto-fix completed successfully!"

# Run golangci-lint with auto-fix
lint-go-fix: build_audio_deps
@echo "Running golangci-lint with auto-fix..."
@mkdir -p static && touch static/.gitkeep
golangci-lint run --fix --verbose

# Run UI linting locally (mirrors GitHub workflow ui-lint.yml)
lint-ui:
@echo "Running UI lint..."
@cd ui && npm ci
@cd ui && npm run lint

# Run UI linting with auto-fix
lint-ui-fix:
@echo "Running UI lint with auto-fix..."
@cd ui && npm ci
@cd ui && npm run lint:fix

# Legacy alias for UI linting (for backward compatibility)
ui-lint: lint-ui
Loading